Skip to content

v0.9.9

Latest

Choose a tag to compare

@smiti1642 smiti1642 released this 17 Jun 01:38

Headline: digital input read APIGetDigitalInputs 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(). Returns Vec<DigitalInput> where each entry carries token and idle_state ("closed" / "open", or empty string when the firmware omits the attribute). Mirrors the existing get_relay_outputs shape; no Set-side method is exposed because the Device service spec doesn't define one.
  • New DigitalInput type re-exported from the crate root. PartialEq/Eq derived on both DigitalInput and RelayOutput.

Fixed

  • Compile failure when quick-xml/encoding is enabled anywhere in the build graph (#1). quick-xml 0.39 cfg-gates Attribute::unescape_value away whenever its encoding feature 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 through Attribute::decode_and_unescape_value(reader.decoder()), which is always available and decodes identically. A quick-xml encoding-on dev-dependency guards against regressions in CI.

Mock server

  • Stateful Relay/Input. MockState now carries relay_outputs and digital_inputs; GetRelayOutputs / GetDigitalInputs render from state, and SetRelayOutputState / SetRelayOutputSettings mutate state and fault on unknown tokens.
  • PullPoint IO event topics. GetEventProperties advertises tns1:Device/Trigger/DigitalInput and tns1:Device/Trigger/Relay; SetRelayOutputState queues a RelayOutput event.
  • /mock/digital-input/:token/pulse and /set?state=... REST hooks (mock-server feature) to simulate physical input signals in tests.

Full Changelog: v0.9.7...v0.9.9