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