I want to build a hardware device for the Weeder input cards. You already have an Input software device that I could use without reinventing the wolrd. However, how do I tell what the Subscription interace is that the hardware device should implement in order to send commands to a software device?
I can determine how to add a new Relay hardware device that supports the Relay software device because the Ocelot device will show me Interface list that is support. I can see "SetRelay" and implement it. But you don't show Subscriptions Interfaces anywhere.
How to determine Subscription interface to support in HW
I agree that it would be helpful in being able to reuse existing Devices if the subscription names were published somehow. The HardwareAPI.h file in the Interface SDK does list most of the subscription names in the comments, but it doesn't give the filters that may be used.
The Input Devices subscribes to the Input State Change notification list. It uses "M=<Module>;I=<Input>".
<Module> = the module ID (as a string) that corresponds to the input module (if applicable).
<Input> = the input number (as string) that corresponds to the interface input (if applicable).
The Input Devices subscribes to the Input State Change notification list. It uses "M=<Module>;I=<Input>".
<Module> = the module ID (as a string) that corresponds to the input module (if applicable).
<Input> = the input number (as string) that corresponds to the interface input (if applicable).
Scott
But the subscription doesn't say what the new state is? Only that it changed. The software device would then queriy this value.
From experience, I don't trust the software to accurately maintain a shadow of the state of the device. At initialization time, I have the software device get its state from the hardware. They you can make sure thinks stay in sink by passing up the state with the subscritpion.
From experience, I don't trust the software to accurately maintain a shadow of the state of the device. At initialization time, I have the software device get its state from the hardware. They you can make sure thinks stay in sink by passing up the state with the subscritpion.