xt1121DCDU − The MagAOX App to control an xt1121 based DCDU
xt1121DCDU is normally configured with a configuration file. Typically the only command-line argument is
-n to specify the configuration name.
xt1121DCDU provides an interface to a xt1121-based D.C. distribution unit. This is an Electronics-Salon D-228 relay module controlled by an Acromag xt1121 digital I/O module.
INDI properties provide the status of each outlet.
||config||string||A local config file|
||none||Print this message and exit|
||loopPause||unsigned long||The main loop pause time in ns|
||RTPriority||unsigned||The real-time priority (0-99)|
||logger.logDir||string||The directory for log files|
||logger.logExt||string||The extension for log files|
||logger.maxLogSize||string||The maximum size of log files|
||logger.writePause||unsigned long||The log thread pause time in ns|
||logger.logThreadPrio||int||The log thread priority|
||logger.logLevel||string||The log level|
||name||string||The name of the application, specifies config.|
||power.device||string||Device controlling power for this app's device (INDI name).|
||power.channel||string||Channel on device for this app's device (INDI name).|
||power.element||string||INDI element name. Default is "state", only need to specify if different.|
||device.name||string||The device INDI name.|
||The channel numbers to use for the outlets, in order.|
The outlets are controlled in channels, which consist of at least one outlet. Channels are configured as sections in the configuration file. Any section name, say
[channel1], which has either a
outlets= keyword will be treated as a channel specification.
outlets= keyword=value pair specifies which outlet or outletss, 1-8, are controlled by this channel. Multiple outlets are specified in an comma separate list.
You can also specify the order in which the outlets are turnned on with the
offOrder keywords. The values contain indices in the vector specified by the
outlets keyword, not the outlet numbers. So if you have
outlets=7,8 you would then have
onOrder=1,0 to turn on outlet 8 first, then outlet 7.
You can use
offDelays, to specify the delays between outlet operations in milliseconds. The first entry is always ignored, then the second entry specifies the delay between the first and second outlet operation, etc.
An example config file section is:
[sue] #this channel will be named sue outlets=4,5 #this channel uses outlets 4 and 5 onOrder=1,0 #outlet 5 will be turned on first offOrder=0,1 #Outlet 4 will be turned off first onDelays=0,150 #a 150 msec delay between outlet turn on offDelays=0,345 #a 345 msec delay between outlet turn off
Channel states are reported by the property with the channel name, and state changes can be requested by the same property. The
target element contains the last requested state until the
state element, which is the current state, matches it. Changing either
target will request a state change in that channel.
<name>.<channelName>.state = On | Int | Off <name>.<channelName>.target = On | Off | [empty]
Each outlet has a property which indicates its current state.
<name>.outlet<N>.state = On | Int | Off
This app is started for DCDU 0, which has config file
/opt/MagAOX/bin/xt1121DCDU -n dcdu0