diff --git a/lib/nodes/iec60870.cpp b/lib/nodes/iec60870.cpp index 9b18c9cd4..a157ccdc3 100644 --- a/lib/nodes/iec60870.cpp +++ b/lib/nodes/iec60870.cpp @@ -86,8 +86,7 @@ std::optional ASDUData::lookupType(int type, int ioa) }; auto descriptor = std::find_if(begin(descriptors), end(descriptors), check); if (descriptor != end(descriptors)) { - ASDUData data { *descriptor, ioa }; - return { data }; + return ASDUData { *descriptor, ioa }; } else { return std::nullopt; } @@ -217,8 +216,6 @@ void ASDUData::addSampleToASDU(CS101_ASDU &asdu, ASDUData::Sample sample) const ? std::optional { timespec_to_cp56time2a(sample.timestamp.value()) } : std::nullopt; - // ToDo: Error if missing timestamp - InformationObject io; switch (this->descriptor.type) { case ASDUData::SCALED_INT: { @@ -421,7 +418,7 @@ bool SlaveNode::onInterrogation(IMasterConnection connection, CS101_ASDU asdu, u auto &asdu_types = this->out.asdu_types; switch (qoi) { - // send initial values for all signals + // send last values without timestamps case IEC60870_QOI_STATION: { IMasterConnection_sendACT_CON(connection, asdu, false);