Skip to content

ros2_medkit_opcua: verify ConditionRefresh re-emit on reconnect (follow-up #386) #389

@mfaferek93

Description

@mfaferek93

Context

Issue #386 introduced OpcuaPoller::condition_refresh() (calls Server.ConditionRefresh, NodeId i=3875 on the Server object i=2253) on every successful subscribe + every reconnect. The intent was: after a transport drop, the gateway re-subscribes and ConditionRefresh causes the server to re-emit any still-active conditions so /faults stays consistent.

The reconnect scenario in run_alarm_tests.sh does not verify this path. open62541 v1.4.6 returns BadMethodInvalid for the call (visible in CI logs as [opcua_client] call_method object=i=2253 method=i=3875 statusCode=BadMethodInvalid). The reconnect test passes only because we manually re-fire the alarm after restart - the test proves reconnect + new event, not re-emit-of-existing-state.

TODO

  • Find a fixture / vendor that actually implements ConditionRefresh (Beckhoff TF6100 or Siemens S7-1500 FW V2.9+). Or: spin up open62541's tutorial_server_alarms_conditions example which implements it.
  • Extend the docker integration test: fire → CONFIRMED, drop transport (without clear), reconnect, assert /faults still shows CONFIRMED without a new fire (the alarm was active before drop, ConditionRefresh re-emit must surface it).
  • If the vendor matrix is too thin, escalate condition_refresh() log level from "not fatal" silent to a log_warn once per connect so operators see when their PLC doesn't implement it.

Out of scope

  • Cold-start without ConditionRefresh (covered: gateway gets events as conditions transition).
  • Branch handling (Part 9 §5.5.2.12) - separate ticket if/when needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions