StreamDevice icon indicating copy to clipboard operation
StreamDevice copied to clipboard

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

Open bfrk opened this issue 4 years ago • 2 comments

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))

bfrk avatar Sep 10 '19 14:09 bfrk