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

Read/Write errors should set SEVR/STAT to alarm state #95

Open
dirk-zimoch opened this issue Feb 18, 2021 · 6 comments
Open

Read/Write errors should set SEVR/STAT to alarm state #95

dirk-zimoch opened this issue Feb 18, 2021 · 6 comments

Comments

@dirk-zimoch
Copy link
Contributor

Writing an array (aao record) with a wrong length fails and reprocesses the record with reason=writeFailure. However, this does not set the record to INVALID/WRITE alarm state.

Other record types (and other error conditions) may be affected as well.

@dirk-zimoch
Copy link
Contributor Author

Tested with open62541implementation. I don't know how the UA_SDK implementation handles arrays with mismatching length.

@dirk-zimoch
Copy link
Contributor Author

dirk-zimoch commented Feb 19, 2021

When initial read fails, the records are INVALID/UDF instead of INVALID/READ. Input records stay like this even when actively read again, output records become NO_ALARM (!) without doing anything.
I have experienced this with the server error "License expired". :-)

Pervious versions of this driver (commit 7e21b3) showed a different bahavior. The records would go to INVALID/COMM alarm because of an exception thrown ("no incoming data").

@dirk-zimoch dirk-zimoch changed the title Write errors should set SEVR/STAT to INVALID/WRITE Read/Write errors should set SEVR/STAT to alarm state Feb 19, 2021
@ralphlange
Copy link
Member

The error handling was added (some redone) to improve the "no incoming data" INVALID/COMM behavior.
Obviously an incomplete project.

I agree with your suggestion of INVALID/READ after a failed initial read. Also for output records? Probably.

@dirk-zimoch
Copy link
Contributor Author

The "improvement" was unfortunately degrading. I do not care too much if the error is COMM or READ,WRITE. The latter is more specific: initial read error of an output record deserves a READ alarm (one could agrue for UDF) while failing write should get a WRITE alarm, but both are undoubtly communication errors and may as well be COMM alarms. I do not favor UDF as that is typical for records that have never been processed. And NO_ALARM after a write failure is just wrong.

@ralphlange
Copy link
Member

The old behavior was ignoring all errors. That led to an exception being thrown during record processing that was caught and put as INVALID/COMM.
Hard to degrade from that, but possible.

@ralphlange
Copy link
Member

I will leave INVALID/COMM for communication failures that are not directly related to a read or write operation. (Disconnect etc.)

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

2 participants