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

device support should set a non-zero status when startProtocol fails #42

Open
bfrk opened this issue Sep 10, 2019 · 2 comments
Open

device support should set a non-zero status when startProtocol fails #42

bfrk opened this issue Sep 10, 2019 · 2 comments
Labels

Comments

@bfrk
Copy link

bfrk commented Sep 10, 2019

bool Stream::process() initializes the status to NO_ALARM, then calls startProtocol, and if that fails sets recGblSetSevr(record, status, INVALID_ALARM). This means the record will have STAT=NO_ALARM and SEVR=INVALID which is a bit confusing.

Here is a fix, using the COMM_ALARM status instead.

diff --git a/src/StreamEpics.cc b/src/StreamEpics.cc
index 9117fd9..1f16e2d 100644
--- a/src/StreamEpics.cc
+++ b/src/StreamEpics.cc
@@ -732,7 +732,7 @@ process()
         return false;
     }
     debug("Stream::process(%s) start\n", name());
-    status = NO_ALARM;
+    status = COMM_ALARM;
     convert = OK;
     record->pact = true;
     if (!startProtocol(StreamCore::StartNormal))

@chrschroeder
Copy link

A short comment: this will be a problem on disconnects, which can easily be simulated by setting of autoconnect and disconnect through CNCT field of the asyn record.

@dirk-zimoch
Copy link
Member

You are right, NO_ALARM/INVALID is a confusing combination and was not intended.
But I need to check your fix with "I/O Intr" records first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants