ioc: fix timestamp masking for monitor subscriptions
This commit is contained in:
1 parent
8d9455a19d
commit
b5024df8fd
2 files changed
+22
-3
No files matched your search
+21
-1
@@ -1009,6 +1009,25 @@ void testMonitorDBE(TestClient& ctxt)
|
||||
testEq(val["value"].as<int32_t>(), 43);
|
||||
}
|
||||
|
||||
void testMonitorNsecMask(TestClient& ctxt)
|
||||
{
|
||||
testDiag("%s", __func__);
|
||||
|
||||
TestSubscription sub(ctxt.monitor("test:nsec")
|
||||
.maskConnected(true)
|
||||
.maskDisconnected(true));
|
||||
|
||||
auto val(sub.waitForUpdate());
|
||||
|
||||
// nsec:lsb:8 clears the low 8 bits: 102030 -> 101888, userTag -> 142
|
||||
testFldEq(val, "timeStamp.nanoseconds", int32_t(101888));
|
||||
#if DBR_UTAG
|
||||
testFldEq(val, "timeStamp.userTag", int32_t(142));
|
||||
#else
|
||||
testSkip(1, "no UTAG");
|
||||
#endif
|
||||
}
|
||||
|
||||
void testiocsh(TestClient& ctxt)
|
||||
{
|
||||
testDiag("%s", __func__);
|
||||
@@ -1061,7 +1080,7 @@ void testiocsh(TestClient& ctxt)
|
||||
|
||||
MAIN(testqsingle)
|
||||
{
|
||||
testPlan(116);
|
||||
testPlan(118);
|
||||
testSetup();
|
||||
pvxs::logger_config_env();
|
||||
generalTimeRegisterCurrentProvider("test", 1, &testTimeCurrent);
|
||||
@@ -1106,6 +1125,7 @@ MAIN(testqsingle)
|
||||
testMonitorAIFilt(mctxt);
|
||||
testMonitorDBEAlarm(mctxt);
|
||||
testMonitorDBE(mctxt);
|
||||
testMonitorNsecMask(mctxt);
|
||||
testiocsh(mctxt);
|
||||
}
|
||||
timeSim = false;
|
||||
|
||||
Reference in new issue
Block a user