K8062 for Linux

Daemon communication protocol

The daemon uses a shared memory segment with the ID 0x56444D58 for the communication with the clients. That shared memory will hold an array of signed int whose size may change in the future.

Memory structure

Offsetvariableuse
0dmx_maxchannelsNumber of channels to send (6..512)
1dmx_shutdownSet to -1 to ask to the daemon to shutdown
2dmx_capsFlags telling which extra-capabilities are present
3Reserved for future use
4Reserved for future use
5Reserved for future use
6Reserved for future use
7Reserved for future use
8Reserved for future use
9Reserved for future use
10..521dmx_channels[]Current values of the DMX channels. If you need to read these values, you need to AND them with 0xFF as the higher bits may be used by some extensions.

future extensions

The 7 reserved fields will be used for extensions. Additionnals fields may also be added after the channels table. These extensions will be made so older client which don't use these feature will work out of the box with a freshly started daemon.

An "auto-change" feature is planned for the channels (increase/decrease to a given value, ...). These will be enabled by high bits in the channel value. By storing values between 0 and 255, these features will be turned off as an easy way to keep compatibility with older clients. If you need to read a channel value, don't forget to mask it to only keep lower bits.

The behaviour of the shutdown flag may be changed. It'll anyway be done in such a way that setting it to 0 will allow normal behaviour. Right now, any non-zero value will make the daemon shutdown but this can be changed in the future.