IO · repose-io
Digital IO
Grippers, vacuum, part sensors and lamps are usually wired to the robot controller's digital IO. repose-io gives that IO two vendor-neutral payloads, so IO logic works on any robot.
Channels
Rx digital_in | CuDigitalInputPayload<N>: values: [bool; N] (true = energised) and a CuIoStatus. |
Tx digital_out | CuDigitalOutputPayload<N>: values and a mask: [bool; N]. |
Masks
Only outputs whose mask bit is set are driven; the bridge leaves all others at their current level. That lets several tasks share one digital_out channel, each owning its own bits, without overwriting each other.
let mut cmd = CuDigitalOutputPayload::<16>::default();
cmd.values[3] = true; cmd.mask[3] = true; // drive output 3 high, touch nothing elseStatus
CuIoStatus: NotReady until the bridge confirms the IO device, Ready when inputs are valid and outputs applied, Fault(code) for device faults. Don't act on inputs that aren't Ready.