Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
t-b committed Aug 22, 2024
1 parent 9c33299 commit ef494e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Packages/MIES/MIES_Publish.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ End
threadsafe Function PUB_Publish(variable jsonID, string messageFilter, [variable releaseJSON])
variable err
string payload

printf "PUB_Publish: %s\r", messageFilter

releaseJSON = ParamIsDefault(releaseJSON) ? 1 : !!releaseJSON
payload = JSON_Dump(jsonID)
Expand Down Expand Up @@ -663,7 +665,7 @@ threadsafe Function PUB_TPResult(STRUCT TPZMQData &tpzmq)
variable jsonId = JSON_New()
string adUnit = GetADChannelUnit(tpzmq.clampMode)
string daUnit = GetDAChannelUnit(tpzmq.clampMode)

path = "properties"
JSON_AddTreeObject(jsonID, path)
JSON_AddVariable(jsonID, path + "/tp marker", tpzmq.marker)
Expand Down Expand Up @@ -714,7 +716,7 @@ threadsafe static Function PUB_CheckPublishingTime(string pubFilter, variable pe
variable curTime = DateTime

TUFXOP_AcquireLock/N=(pubFilter)
lastTime = TSDS_ReadVar(pubFilter, defValue = curTime, create = 1)
lastTime = TSDS_ReadVar(pubFilter, defValue = 0, create = 1)
if(lastTime + period < curTime)
TSDS_Write(pubFilter, var = curTime + period)
TUFXOP_ReleaseLock/N=(pubFilter)
Expand Down
7 changes: 6 additions & 1 deletion Packages/tests/HardwareBasic/UTF_TestPulseAndTPDuringDAQ.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1399,15 +1399,20 @@ End
/// UTF_TD_GENERATOR DeviceNameGeneratorMD1
static Function TestTPPublishing([str])
string str

TUFXOP_Clear/Z/N=(ZMQ_FILTER_TPRESULT_1S)
TUFXOP_Clear/Z/N=(ZMQ_FILTER_TPRESULT_5S)
TUFXOP_Clear/Z/N=(ZMQ_FILTER_TPRESULT_10S)

STRUCT DAQSettings s
InitDAQSettingsFromString(s, "MD1_RA0_I0_L0_BKG1_STP1_TP1" + \
"__HS0_DA0_AD0_CM:IC:_ST:TestPulse:")

AcquireData_NG(s, str)

CtrlNamedBackGround StopTPAfterFiveSeconds, start=(ticks + TP_DURATION_S * 60), period=1, proc=StopTPAfterFiveSeconds_IGNORE
PrepareForPublishTest()

CtrlNamedBackGround StopTPAfterFiveSeconds, start=(ticks + TP_DURATION_S * 60), period=1, proc=StopTPAfterFiveSeconds_IGNORE
End

static Function TestTPPublishing_REENTRY([str])
Expand Down

0 comments on commit ef494e7

Please sign in to comment.