![]() |
Imt.Base C++ API V4.1.1.0
|
Defines a remote object template to serialize and deserialize a protocol and send them directly to a PortOut. More...
#include <Imt.Base.Lib.Remoting/inc/Imt.Base.Lib.Remoting/RemoteObjectTemplate.h>
Public Member Functions | |
| RemoteObjectTemplate ()=default | |
| Constructor. | |
| RemoteObjectTemplate (RemotingSendServiceIfc *const pRemotingSendService, RemotingServiceIfc *const pRemotingReceiveService=nullptr, ::imt::base::core::serialization::SerializableSenderIfc *const portOut=nullptr) | |
| Constructor. | |
| void | deserialize (::imt::base::core::serialization::Deserializer &buffer) final |
| void | serialize (::imt::base::core::serialization::Serializer &buffer) const final |
| void | setDataToSend (ProtocolType const *const protocolData) |
| Set the reference to the data which is serialized. | |
Public Member Functions inherited from imt::base::lib::remoting::RemoteObjectAbs | |
| RemoteObjectAbs (int32_t const uniqueIdToAttach, RemotingSendServiceIfc *const pRemotingSendService=nullptr, RemotingServiceIfc *const pRemotingReceiveService=nullptr) | |
| Constructor. | |
| int32_t | getUniqueId () const final |
| bool | send () final |
| void | onReceive (::imt::base::core::serialization::Deserializer &buffer) final |
| void | attach (int32_t const uniqueId) final |
| void | detach () final |
| virtual int32_t | getUniqueId () const =0 |
| Gets the unique id of this remote object. | |
| virtual bool | send ()=0 |
| Sends this remote object. | |
| virtual void | onReceive (::imt::base::core::serialization::Deserializer &buffer)=0 |
| Will be called when data has been received. | |
| virtual void | attach (int32_t const uniqueId)=0 |
| Attaches this remote object to remoting service. | |
| virtual void | detach ()=0 |
| Detaches this remote object from remoting service. | |
Public Member Functions inherited from imt::base::core::serialization::SerializableIfc | |
| virtual void | deserialize (Deserializer &buffer)=0 |
| Deserialize this object from the given deserialize. | |
| virtual void | serialize (Serializer &buffer) const =0 |
| Serialize this object into the given serializer. | |
Additional Inherited Members | |
Static Public Attributes inherited from imt::base::lib::remoting::RemoteObjectIfc | |
| static constexpr int32_t | UNDEFINED_ID {-1} |
| ID to indicate no or an invalid remote object. | |
Protected Member Functions inherited from imt::base::lib::remoting::RemoteObjectAbs | |
| ~RemoteObjectAbs () noexcept | |
| Destructor. | |
| virtual uint32_t | getMaxTransferSize () const |
| Gets the maximum number of bytes that can be transfered by one transmission. | |
Protected Member Functions inherited from imt::base::lib::remoting::RemoteObjectIfc | |
| RemoteObjectIfc () noexcept=default | |
| RemoteObjectIfc (RemoteObjectIfc const &) noexcept=default | |
| RemoteObjectIfc (RemoteObjectIfc &&) noexcept=default | |
| ~RemoteObjectIfc () noexcept=default | |
| RemoteObjectIfc & | operator= (RemoteObjectIfc const &) &noexcept=default |
| RemoteObjectIfc & | operator= (RemoteObjectIfc &&) &noexcept=default |
Protected Member Functions inherited from imt::base::core::serialization::SerializableIfc | |
| SerializableIfc () noexcept=default | |
| SerializableIfc (SerializableIfc const &) noexcept=default | |
| SerializableIfc (SerializableIfc &&) noexcept=default | |
| ~SerializableIfc () noexcept=default | |
| SerializableIfc & | operator= (SerializableIfc const &) &noexcept=default |
| SerializableIfc & | operator= (SerializableIfc &&) &noexcept=default |
Defines a remote object template to serialize and deserialize a protocol and send them directly to a PortOut.
Example of usage inside an ActivePart:
Receiving:
Sending:
| ProtocolType | defines the Protocol where remote object is serialized into |
| PROTOCOL_ID | defines the unique ProtocolIdentifier |
Definition at line 64 of file RemoteObjectTemplate.h.
|
default |
Constructor.
|
inlineexplicit |
Constructor.
| pRemotingSendService | The sending service to which this object will be attached |
| pRemotingReceiveService | The receiving service to which this object will be attached |
| portOut | The PortOutput which is used to send received remoting objects to |
Definition at line 80 of file RemoteObjectTemplate.h.
|
inlinefinal |
Definition at line 91 of file RemoteObjectTemplate.h.
|
inlinefinal |
Definition at line 104 of file RemoteObjectTemplate.h.
|
inline |
Set the reference to the data which is serialized.
| protocolData | the protocol to send |
Definition at line 118 of file RemoteObjectTemplate.h.