Discrete Inputs

Discrete inputs are single bits wired to the device from an external source. They have only two states: true or false. They are read-only.

Camel-jamod implements a polling consumer for reading the status of discrete inputs. Each time the device is polled, the consumer will send the resulting BitVector to the Camel route. This behavior can be modified to only send messages when one or more inputs change by specifying changesOnly=true in the URI's query string.

The BitVector contains the status of all the bits polled. Individual bit values can be retrieved using BitVector.getBit(int), where the first bit is at position 0.

Optional parameters:

PropertyDefaultDescription
changesOnlyfalseWhen true, messages will only be sent to the camel route when one or more digital inputs have changed state since the last polling.