Skip to content

Allows to wire OpenMUC input and output channels to implement gateway applications

License

Notifications You must be signed in to change notification settings

openmucextensions/gateway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenMUC Gateway

This OpenMUC application allows to wire input and output channels to implement gateway applications. Each time the value of a wired input channel has been updated, the value will be written to the corresponding output channel. The application uses the OpenMUC data access service and therefore is completly driver and protocol agnostic. This enable to create gateways between multiple protocol using OpenMUC without any further implementation effort.

Configuration

For configuration, the application needs an XML file containing the wirings that should be applied. The default file name of the config file is ./conf/wirings.xml, but can be changed be setting the system property org.openmucextensions.app.gateway.configFilename. The following example shows a valid config file:

<wirings>
	<wiring>
		<input>input_channel_id</input>
		<output>output_channel_id</output>
	</wiring>
	<wiring bidirectionalConnection="True">
		<input>input_channel_2_id</input>
		<output>output_channel_2_id</output>
	</wiring>
</wirings>

The example contains two wirings defined by the wiring element. The sub-elements declare the input channel id as well as the output channel id of the wiring.

The second wiring element contains the optional bidirectionalConnection attribute. This wiring element is equivalent to:

...
	<wiring>
		<input>input_channel_2_id</input>
		<output>output_channel_2_id</output>
	</wiring>
	<wiring>
		<input>output_channel_2_id</input>
		<output>input_channel_2_id</output>
...

It means new values from both channels will be forwared to the opposite channel.

The configuration file will be read at bundle activation and all declared wirings will be applied. During runtime, a file watcher recognizes changes in the config file and applies them automatically.

About

Allows to wire OpenMUC input and output channels to implement gateway applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages