Commit dfb66511 authored by Omar Gabella's avatar Omar Gabella

KM3NET BROADCAST : Two counters added to monitor the timestamps flagged as incorrect.

parent c3143b99
......@@ -53,6 +53,12 @@ struct wr_dsport {
FixedDelta otherNodeDeltaRx;
Boolean doRestart;
Boolean linkUP;
#ifdef BROADCAST
/* Counters to monitor the timestamps flagged as incorrect
* in 'wr_e2e_offset_downlink'.*/
UInteger16 ctr_incorrect_timestamp;
UInteger16 ctr_consecutive_incorrect_timestamp;
#endif // BROADCAST
};
/* This uppercase name matches "DSPOR(ppi)" used by standard protocol */
......
......@@ -453,9 +453,15 @@ int wr_e2e_offset_downlink(struct pp_instance *ppi,
if (is_incorrect(&s->t1) || is_incorrect(&s->t2)) {
errcount++;
/* KM3NET: Counter to monitor the timestamps flagged as incorrect.
* In the past i have detected that when the CLB have 5 consecutives t1 incorrect
* she get stucked in unitialized servo state.*/
WR_DSPOR(ppi)->ctr_incorrect_timestamp++;
if (errcount > 5) {/* a 2-3 in a row are expected */
pp_error("%s: TimestampsIncorrect: %d %d\n", __func__,
!is_incorrect(&s->t1), !is_incorrect(&s->t2));
/*KM3NET: Counter to monitor how many times we have a errcount > 5.*/
WR_DSPOR(ppi)->ctr_consecutive_incorrect_timestamp++;
/* If errcount > 5 we reset the wrMode so as not get stuck on the
* uninitialized servo state. */
WR_DSPOR(ppi)->wrModeOn = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment