Imt.Base C++ API V4.1.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RemoteObjectSignalTemplate.h
Go to the documentation of this file.
1// (c) IMT - Information Management Technology AG, CH-9470 Buchs, www.imt.ch.
2
3#ifndef IMT_BASE_LIB_REMOTING_REMOTEOBJECTSIGNALTEMPLATE_H
4#define IMT_BASE_LIB_REMOTING_REMOTEOBJECTSIGNALTEMPLATE_H
5
10
11namespace imt {
12namespace base {
13namespace lib {
14namespace remoting {
15
22template<uint16_t PROTOCOL_ID>
24
25public:
26
34 explicit RemoteObjectSignalTemplate(RemotingSendServiceIfc* const pRemotingSendService,
35 RemotingServiceIfc* const pRemotingReceiveService = nullptr,
37 RemoteObjectAbs {static_cast<int32_t>(PROTOCOL_ID), pRemotingSendService, pRemotingReceiveService},
38 m_pPortOut {portOut} {
39 }
40
45 if (m_pPortOut == nullptr) {
46 ASSERT_DEBUG1(false, "Output port not set, did you forget to pass the port in the constructor?");
47 return;
48 }
49
50 m_pPortOut->write(PROTOCOL_ID, nullptr, 0);
51 }
52
56 // AXIVION Next Routine AutosarC++19_03-M0.1.8: required construct (given by interface)
58 // nothing to do - no data in signal
59 }
60
61private:
62
64};
65
66} // namespace remoting
67} // namespace lib
68} // namespace base
69} // namespace imt
70
71#endif // IMT_BASE_LIB_REMOTING_REMOTEOBJECTSIGNALTEMPLATE_H
void ASSERT_DEBUG1(bool const condition, char_t const *const pMessage) noexcept
"Assert for debugging only" (ASSERT_DEBUG).
Definition Diagnostics.h:77
Deserializes various data types from the given byte buffer.
Interface to write a serializable object to another object.
virtual void write(uint16_t const protocolIdentifier, ::imt::base::core::serialization::SerializableIfc const *const pEventData, size_t const eventDataSizeBytes)=0
Write object.
Serializes various data types into the given byte buffer.
Definition Serializer.h:58
Provides an abstract base class for all remote object implementations.
Defines a remote object template to serialize and deserialize a signal.
RemoteObjectSignalTemplate(RemotingSendServiceIfc *const pRemotingSendService, RemotingServiceIfc *const pRemotingReceiveService=nullptr, ::imt::base::core::serialization::SerializableSenderIfc *const portOut=nullptr)
Constructor.
void serialize(::imt::base::core::serialization::Serializer &) const final
void deserialize(::imt::base::core::serialization::Deserializer &) final
Interface for the remoting sending service (allows remote objects to initiate the send by themselves)...
Interface for the RemotingService.
This is a application specific file which is used to configure Imt.Base.Core.Math.
__int32 int32_t
Definition stdint.h:60