Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition Time set to 0 generating an Alarm from a timed callback #6391

Open
3 of 7 tasks
giuseppedevito opened this issue Apr 8, 2024 · 0 comments
Open
3 of 7 tasks

Comments

@giuseppedevito
Copy link

giuseppedevito commented Apr 8, 2024

Description

I have a timed callback that read a temperature value and, if this value is over a threshold, a Condition
is set to active state setting ActiveState->Id filed to true. Before the ActiveState->Id field is set to true,
I set the "Time" of the condition using

UA_DateTime ts = UA_DateTime_now();

UA_Server_writeObjectProperty_scalar( server, conditionNodeId, UA_QUALIFIEDNAME(0, "Time"), &ts, &UA_TYPES[UA_TYPES_DATETIME] );

But in UAExpert, where the Alarm message, comment and status is showed correctly, I see
2000-01-01T00:00:00.000Z as time value.

The correct time is set instead, in the Enabled, Acked and Confirmed Callback, using the same code as above.
It seems that, after I set the time in the callback, the Time is set again to 0 when the event is generated.

Background Information / Reproduction Steps

Used CMake options:

cmake .. -DCMAKE_BUILD_TYPE=MinSizeRel -DUA_LOGLEVEL=99 -DBUILD_SHARED_LIBS=yes 
-DUA_NAMESPACE_ZERO=FULL -DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON 
-DUA_ENABLE_SUBSCRIPTIONS_ALARMS_CONDITIONS=ON

Checklist

Please provide the following information:

  • open62541 Version (release number or git tag): 1.4
  • Other OPC UA SDKs used (client or server): UaExpert
  • Operating system: Debian 12
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • Self-contained code example attached
  • Critical issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant