Commit 977ef31b authored by Pavel Vainerman's avatar Pavel Vainerman

Ещё подправил конструкторы у сообщенй (оптимизация).

parent 38da890e
...@@ -127,7 +127,7 @@ namespace UniSetTypes ...@@ -127,7 +127,7 @@ namespace UniSetTypes
UniversalIO::IOTypes st = UniversalIO::DigitalInput, UniversalIO::IOTypes st = UniversalIO::DigitalInput,
ObjectId consumer=UniSetTypes::DefaultObjectId); ObjectId consumer=UniSetTypes::DefaultObjectId);
SensorMessage(ObjectId id, long value, IOController_i::CalibrateInfo& ci, SensorMessage(ObjectId id, long value, const IOController_i::CalibrateInfo& ci,
Priority priority = Message::Medium, Priority priority = Message::Medium,
UniversalIO::IOTypes st = UniversalIO::AnalogInput, UniversalIO::IOTypes st = UniversalIO::AnalogInput,
ObjectId consumer=UniSetTypes::DefaultObjectId); ObjectId consumer=UniSetTypes::DefaultObjectId);
...@@ -181,7 +181,7 @@ namespace UniSetTypes ...@@ -181,7 +181,7 @@ namespace UniSetTypes
Warning Warning
}; };
InfoMessage(); InfoMessage();
InfoMessage(ObjectId id, std::string str, ObjectId node = conf->getLocalNode(), InfoMessage(ObjectId id, const std::string str, ObjectId node = conf->getLocalNode(),
Character ch = InfoMessage::Normal, Character ch = InfoMessage::Normal,
Priority priority = Message::Medium, ObjectId consumer=UniSetTypes::DefaultObjectId); Priority priority = Message::Medium, ObjectId consumer=UniSetTypes::DefaultObjectId);
...@@ -231,11 +231,11 @@ namespace UniSetTypes ...@@ -231,11 +231,11 @@ namespace UniSetTypes
}; };
AlarmMessage(); AlarmMessage();
AlarmMessage(ObjectId id, std::string str, ObjectId node = conf->getLocalNode(), AlarmMessage(ObjectId id, const std::string str, ObjectId node = conf->getLocalNode(),
Character ch = AlarmMessage::Alarm, Character ch = AlarmMessage::Alarm,
Priority prior = Message::Medium, ObjectId cons=UniSetTypes::DefaultObjectId); Priority prior = Message::Medium, ObjectId cons=UniSetTypes::DefaultObjectId);
AlarmMessage(ObjectId id, std::string str, MessageCode ccode, AlarmMessage(ObjectId id, const std::string str, MessageCode ccode,
ObjectId node = conf->getLocalNode(), ObjectId node = conf->getLocalNode(),
Character ch = AlarmMessage::Alarm, Character ch = AlarmMessage::Alarm,
Priority prior = Message::Medium, ObjectId cons=UniSetTypes::DefaultObjectId); Priority prior = Message::Medium, ObjectId cons=UniSetTypes::DefaultObjectId);
......
...@@ -116,7 +116,7 @@ tid(UniSetTypes::DefaultThresholdId) ...@@ -116,7 +116,7 @@ tid(UniSetTypes::DefaultThresholdId)
ci.precision = 0; ci.precision = 0;
} }
SensorMessage::SensorMessage(ObjectId id, long value, IOController_i::CalibrateInfo& ci, SensorMessage::SensorMessage(ObjectId id, long value, const IOController_i::CalibrateInfo& ci,
Priority priority, Priority priority,
UniversalIO::IOTypes st, ObjectId consumer): UniversalIO::IOTypes st, ObjectId consumer):
id(id), id(id),
...@@ -172,7 +172,7 @@ route(false) ...@@ -172,7 +172,7 @@ route(false)
{ {
type = Message::Info; type = Message::Info;
} }
InfoMessage::InfoMessage(ObjectId id, string str, ObjectId node, Character ch, InfoMessage::InfoMessage(ObjectId id, const string str, ObjectId node, Character ch,
Priority priority, ObjectId consumer): Priority priority, ObjectId consumer):
id(id), id(id),
infocode( UniSetTypes::DefaultMessageCode ), infocode( UniSetTypes::DefaultMessageCode ),
...@@ -219,7 +219,7 @@ route(false) ...@@ -219,7 +219,7 @@ route(false)
type = Message::Alarm; type = Message::Alarm;
} }
AlarmMessage::AlarmMessage(ObjectId id, string str, ObjectId node, AlarmMessage::AlarmMessage(ObjectId id, const string str, ObjectId node,
Character ch, Priority prior, ObjectId cons): Character ch, Priority prior, ObjectId cons):
id(id), id(id),
alarmcode(UniSetTypes::DefaultMessageCode), alarmcode(UniSetTypes::DefaultMessageCode),
...@@ -236,7 +236,7 @@ route(false) ...@@ -236,7 +236,7 @@ route(false)
this->consumer = cons; this->consumer = cons;
} }
AlarmMessage::AlarmMessage(ObjectId id, string str, MessageCode ccode, AlarmMessage::AlarmMessage(ObjectId id, const string str, MessageCode ccode,
ObjectId node, Character ch, ObjectId node, Character ch,
Priority prior, ObjectId cons): Priority prior, ObjectId cons):
id(id), id(id),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment