File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -383,6 +383,7 @@ bool OccServer::checkMachineDone()
383383
384384void OccServer::runChecker ()
385385{
386+ bool endOfData = false ;
386387 while (!m_destroying) {
387388 m_mu.lock ();
388389
@@ -394,9 +395,10 @@ void OccServer::runChecker()
394395 }
395396
396397 // execute periodic actions, as defined for t_State::running
397- if (currentState == t_State::running) {
398+ if (currentState == t_State::running && !endOfData ) {
398399 int err = m_rco->iterateRunning ();
399400 if (err == 1 ) { // signal EndOfData event
401+ endOfData = true ;
400402 auto eodEvent = new pb::DeviceEvent;
401403 eodEvent->set_type (pb::END_OF_DATA);
402404 pushEvent (eodEvent);
Original file line number Diff line number Diff line change @@ -166,8 +166,8 @@ class OCC_EXPORT RuntimeControlledObject {
166166 *
167167 * @return 0 if the operation completed successfully and the machine can stay in the running state,
168168 * 1 if all data processing is done and the implementer wishes to notify the machine control
169- * mechanism of this condition, or any other value which immediately triggers a transition to
170- * the error state.
169+ * mechanism of this condition (send END_OF_DATA event) , or any other value which immediately
170+ * triggers a transition to the error state.
171171 *
172172 * This function is called continuously by OccServer::runChecker if the state machine is in the
173173 * state t_State::running. It is never called outside this state.
You can’t perform that action at this time.
0 commit comments