From 19be7d8f4f615a901c85e8ce0604492164fdd444 Mon Sep 17 00:00:00 2001
From: Philipp Jungkamp
Date: Mon, 23 May 2022 21:28:16 +0000
Subject: [PATCH] minor fixes
---
lib/nodes/iec60870.cpp | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
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);