From cb8f159914275b9b78fee7dfeb5b5627aecced8a Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Sat, 21 Mar 2020 16:25:48 +0100 Subject: [PATCH] - IEC 61850 server: unbuffered reporting - send first integrity report after integrity timeout (before it was sent when the RCB was enabled) --- src/iec61850/inc_private/reporting.h | 4 ++-- src/iec61850/server/mms_mapping/reporting.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iec61850/inc_private/reporting.h b/src/iec61850/inc_private/reporting.h index be5a1293..96dc362b 100644 --- a/src/iec61850/inc_private/reporting.h +++ b/src/iec61850/inc_private/reporting.h @@ -69,9 +69,9 @@ typedef struct { bool gi; /* flag to indicate that a GI report is triggered */ uint16_t sqNum; - uint32_t intgPd; + uint32_t intgPd; /* integrity period in ms */ uint32_t bufTm; - uint64_t nextIntgReportTime; + uint64_t nextIntgReportTime; /* time when to send next integrity report */ uint64_t reservationTimeout; MmsServerConnection clientConnection; diff --git a/src/iec61850/server/mms_mapping/reporting.c b/src/iec61850/server/mms_mapping/reporting.c index e8341ff7..b93af1f6 100644 --- a/src/iec61850/server/mms_mapping/reporting.c +++ b/src/iec61850/server/mms_mapping/reporting.c @@ -615,7 +615,7 @@ refreshIntegrityPeriod(ReportControl* rc) rc->intgPd = MmsValue_toUint32(intgPd); if (rc->buffered == false) - rc->nextIntgReportTime = 0; + rc->nextIntgReportTime = Hal_getTimeInMs() + rc->intgPd; } static void