Commit 9bad3df1 authored by Michael Hogger's avatar Michael Hogger Committed by Wolfgang Seiss

[FIX] Improve DLL_CNLossSoC_REC cumulative counter

The cumulative counter (object 0x1C0B/0x01) doesn't count lost SoC
frames correctly. It stops counting logical SoC losses after the first
logical loss, and then only counts SoC timeouts. With this commit,
the counting continues without limits in case of logical SoC losses.
However, lost SoA frames will not be counted any more, if the CN waits
for an SoA frame and an SoC timeout occurs.

Change-Id: I723263cdb3676d36f1bce1d834ca816b41c8e655
parent 4fe1b684
......@@ -571,6 +571,12 @@ static tOplkError processCsFullCycleDllWaitSoc(tNmtState nmtState_p,
case kNmtEventDllCePres:
case kNmtEventDllCePreq:
// enter DLL_CS_WAIT_SOA
dllkInstance_g.dllState = kDllCsWaitSoa;
if (triggerLossOfSocEvent())
pDllEvent_p->dllErrorEvents |= DLL_ERR_CN_LOSS_SOC;
break;
case kNmtEventDllCeSoa:
if (nmtState_p == kNmtCsPreOperational2)
{ // logical loss of SoC is counted always in PreOp2
......@@ -625,7 +631,6 @@ static tOplkError processCsFullCycleDllWaitSoa(tNmtState nmtState_p,
if (triggerLossOfSocEventOnFrameTimeout())
pDllEvent_p->dllErrorEvents |= DLL_ERR_CN_LOSS_SOC;
pDllEvent_p->dllErrorEvents |= DLL_ERR_CN_LOSS_SOA;
dllkInstance_g.dllState = kDllCsWaitSoc;
break;
......@@ -640,6 +645,9 @@ static tOplkError processCsFullCycleDllWaitSoa(tNmtState nmtState_p,
case kNmtEventDllCeSoa:
// enter DLL_CS_WAIT_SOC
dllkInstance_g.dllState = kDllCsWaitSoc;
// prepare new cycle -> Reset report flags!
dllkInstance_g.lossSocStatus.fLossReported = FALSE;
dllkInstance_g.lossSocStatus.fTimeoutOccurred = FALSE;
break;
case kNmtEventDllCeSoc: // DLL_CT9
......
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