Defines a remote object template to serialize and deserialize a protocol and send them directly to a PortOut.
More...
template<class ProtocolType, uint16_t PROTOCOL_ID>
class imt::base::lib::remoting::RemoteObjectTemplate< ProtocolType, PROTOCOL_ID >
Defines a remote object template to serialize and deserialize a protocol and send them directly to a PortOut.
Example of usage inside an ActivePart:
[..]
private:
typedef RemoteObjectTemplate<AlarmDataAckProtocol, DataBusProtocolIdentifier::ALARM_DATA_ACK> AlarmDataAckRemoteObject;
[..]
Receiving:
ReceiverAP::ReceiverAP() :
PortOutAlarmData(),
m_remotingReceiveService(),
m_alarmDataAckRemoteObject(nullptr, &m_remotingReceiveService, &PortOutAlarmData) {
[..]
RuntimePriority
Runtime executable priorities (=software priorities) The priorities start at 1 with lowest priority,...
Definition: RuntimePriority.h:53
unsigned __int32 uint32_t
Definition: stdint.h:64
Sending:
SenderAP::SenderAP() :
m_remotingSendService(m_sendBuffer, SEND_BUFFER_SIZE),
m_alarmDataRemoteObject(&m_remotingSendService) {
[..]
void SenderAP::execute(
const uint16_t protocolIdentifier, Deserializer& deserializer) {
switch (protocolIdentifier) {
case DataBusProtocolIdentifier::ALARM_DATA:
AlarmDataProtocol message(deserializer);
m_alarmDataRemoteObject.setDataToSend(&message);
const bool ok = m_alarmDataRemoteObject.send();
break;
}
}
unsigned __int16 uint16_t
Definition: stdint.h:63
- Template Parameters
-
ProtocolType | defines the Protocol where remote object is serialized into |
PROTOCOL_ID | defines the unique ProtocolIdentifier |