Class CMarshallObject#
Defined in File marshall_object.h
Inheritance Relationships#
Base Type#
public sdv::ps::IMarshall
(Struct IMarshall)
Class Documentation#
-
class CMarshallObject : public sdv::ps::IMarshall#
Storage class for a proxy or a stub object.
Public Functions
-
CMarshallObject(CCommunicationControl &rcontrol)#
Constructor.
- Parameters:
rcontrol – [in] Reference to the communication control class.
-
~CMarshallObject()#
Destructor.
-
bool IsValid() const#
Is this a valid marshal object?
- Returns:
Returns whether the marshal object is valid.
-
void Reset()#
Reset the marshal object.
-
sdv::interface_t InitializeAsProxy(uint32_t uiProxyIndex, sdv::interface_id id, sdv::ps::TMarshallID tStubID, CChannelConnector &rConnector)#
Initialize the marshall object as proxy.
- Parameters:
uiProxyIndex – [in] The index of this proxy; becoming part of the Proxy ID.
id – [in] The ID of the interface this object marshalls the calls for.
tStubID – [in] The stub ID this proxy is communicating to.
rConnector – [in] Reference to channel connector.
- Returns:
Returns a pointer to proxy interface or empty when the initialization failed.
-
bool InitializeAsStub(uint32_t uiStubIndex, sdv::interface_t ifc)#
Initialize the marshall object as stub.
- Parameters:
uiStubIndex – [in] The index of this stub; becoming part of the Stub ID.
ifc – [in] Interface to the object to be marshalled to.
- Returns:
Returns ‘true’ when initialization was successful; ‘false’ when not.
-
sdv::ps::TMarshallID GetMarshallID() const#
Return the proxy/stub ID.
The marshall ID consist of an index to easily access the marshalling details and a control value to increase higher security. The control value is a randomly generated value used in the communication to check whether the marshall object ID is valid. Both index and control value must be known by the caller for the call to succeed. If one is wrong, the call won’t be made.
- Returns:
The ID of this marshall object.
-
sdv::interface_t GetProxy()#
Return the proxy to the interface.
- Returns:
Proxy interface.
-
virtual sdv::sequence<sdv::pointer<uint8_t>> Call(sdv::sequence<sdv::pointer<uint8_t>> &seqInputData) override#
Marshall a function call. Ovverload of sdv::ps::IMarshall::Call.
Remark
This function call is synchronous and does not return until the call has been finalized or a timeout exception has occurred.
Remark
The sequence contains all data to make the call. It is important that the data in the sequence is complete and in the correct order.
- Parameters:
seqInputData – [inout] Reference to sequence of input data pointers. The first data pointer contains the marshalling header. The second contains the parameters (if available) and the others contain raw data pointers (if available). The call is allowed to change the sequence to be able to add additional information during the communication without having to copy the existing data.
- Returns:
Sequence of output data pointers. The first data pointer contains the marshalling header. The second contains the return value and parameters (if available) and the others contain raw data pointers (if available).
-
CMarshallObject(CCommunicationControl &rcontrol)#