Skip to content
Snippets Groups Projects
Commit 9d47a3fa authored by Jonathan Hanks's avatar Jonathan Hanks
Browse files

Adjusting the logic instead of signaling PRDCR_STALLED, signal PRDCR_NOT_STALLED.

This defaults the channel to stalled and forces the system to take action to mark it as not stalled.  In a bad state we want to default to bad, not a bad state hidden because the producer wasn't run.
parent 13c6062f
No related branches found
No related tags found
1 merge request!158Daqd diagnostics
......@@ -48,7 +48,7 @@ namespace PV
PV_PRDCR_TP_DATA_RATE_KB_PER_S,
PV_PRDCR_MODEL_DATA_RATE_KB_PER_S,
PV_PRDCR_OPEN_TP_COUNT,
PV_PRDCR_STALLED,
PV_PRDCR_NOT_STALLED,
// Main producer thread timings
PV_PRDCR_TIME_FULL_MEAN_MS,
PV_PRDCR_TIME_FULL_MIN_MS,
......
......@@ -270,12 +270,12 @@ pvInfo exServer::pvList[] = {
1,
pvValue + PV::PV_PRDCR_OPEN_TP_COUNT ),
pvInfo( 1,
"PRDCR_STALLED",
"PRDCR_NOT_STALLED",
0xffffffff,
0,
excasIoSync,
1,
pvValue + PV::PV_PRDCR_STALLED ),
pvValue + PV::PV_PRDCR_NOT_STALLED ),
pvInfo( 1,
"PRDCR_TIME_FULL_MEAN_MS",
0xffffffff,
......
......@@ -237,7 +237,7 @@ producer::frame_writer( )
ShMemReceiver shmem_receiver(
daqd.parameters( ).get( "shmem_input", "local_dc" ),
daqd.parameters( ).get< size_t >( "shmem_size", 104857600 ),
[]( ) { PV::set_pv( PV::PV_PRDCR_STALLED, 1 ); } );
[]( ) { PV::set_pv( PV::PV_PRDCR_NOT_STALLED, 0 ); } );
sleep( 1 );
......@@ -318,7 +318,7 @@ producer::frame_writer( )
stat_recv.sample( );
daq_dc_data_t* data_block = shmem_receiver.receive_data( );
stat_recv.tick( );
PV::set_pv( PV::PV_PRDCR_STALLED, 0 );
PV::set_pv( PV::PV_PRDCR_NOT_STALLED, 1 );
// clear the total crc
total_crc_obj.reset( );
......
......@@ -95,9 +95,9 @@ PID_MULTI_STREAM=0
sleep 5
SVAL=`caget -F z -f 0 X3:DAQ-SHM0_PRDCR_STALLED | cut -d z -f 2`
echo "X3:DAQ-SHM0_PRDCR_STALLED = $SVAL"
if [ "$SVAL" -ne "1" ]; then
SVAL=`caget -F z -f 0 X3:DAQ-SHM0_PRDCR_NOT_STALLED | cut -d z -f 2`
echo "X3:DAQ-SHM0_PRDCR_NOT_STALLED = $SVAL"
if [ "$SVAL" -ne "0" ]; then
exit 1
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment