Headline: digital input read API — GetDigitalInputs returns each port's token + idle electrical state, completing the read side of the Device-service IO surface that previously only exposed relay outputs. Live input transitions still arrive via PullPoint subscription on the tns1:Device/Trigger/DigitalInput topic (unchanged from 0.9.8).
Added
OnvifSession::get_digital_inputs()/OnvifClient::get_digital_inputs(). ReturnsVec<DigitalInput>where each entry carriestokenandidle_state("closed"/"open", or empty string when the firmware omits the attribute). Mirrors the existingget_relay_outputsshape; no Set-side method is exposed because the Device service spec doesn't define one.- New
DigitalInputtype re-exported from the crate root.PartialEq/Eqderived on bothDigitalInputandRelayOutput.
Fixed
- Compile failure when
quick-xml/encodingis enabled anywhere in the build graph (#1). quick-xml 0.39 cfg-gatesAttribute::unescape_valueaway whenever itsencodingfeature is active, and Cargo feature unification turns that feature on for the whole graph as soon as any sibling crate (e.g.calamine) requests it. The XML attribute parser now goes throughAttribute::decode_and_unescape_value(reader.decoder()), which is always available and decodes identically. Aquick-xmlencoding-on dev-dependency guards against regressions in CI.
Mock server
- Stateful Relay/Input.
MockStatenow carriesrelay_outputsanddigital_inputs;GetRelayOutputs/GetDigitalInputsrender from state, andSetRelayOutputState/SetRelayOutputSettingsmutate state and fault on unknown tokens. - PullPoint IO event topics.
GetEventPropertiesadvertisestns1:Device/Trigger/DigitalInputandtns1:Device/Trigger/Relay;SetRelayOutputStatequeues aRelayOutputevent. /mock/digital-input/:token/pulseand/set?state=...REST hooks (mock-serverfeature) to simulate physical input signals in tests.
Full Changelog: v0.9.7...v0.9.9