1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

minor fixes

This commit is contained in:
Philipp Jungkamp 2022-05-23 21:28:16 +00:00 committed by Philipp Jungkamp
parent 8164ce7693
commit 19be7d8f4f

View file

@ -86,8 +86,7 @@ std::optional<ASDUData> 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);