Template Class CStubHandler#
Defined in File pssup.h
Inheritance Relationships#
Base Types#
public sdv::CSdvObject
(Class CSdvObject)public sdv::ps::IMarshallObjectIdent
(Struct IMarshallObjectIdent)public sdv::ps::IMarshall
(Struct IMarshall)
Class Documentation#
-
template<typename TInterface>
class CStubHandler : public sdv::CSdvObject, public sdv::ps::IMarshallObjectIdent, public sdv::ps::IMarshall# Stub class managing incoming calls containing the request and dispatching them to the functions.
- Template Parameters:
TInterface – The interface this stub is dispatching to.
Protected Types
-
typedef std::function<ECallResult(EEndian, const pointer<uint8_t>&, pointer<uint8_t>&)> FNDispatch#
Dispatch function type. Function arguments are endianness, input parameters and output parameters/return value/exception information. Function returns the dispact result.
Protected Functions
-
void RegisterDispatchFunc(FNDispatch fnDispatch)#
Register dispatch function.
Remark
This dispatch functions must be registered in the correct order.
- Attention
Registering dispatch functions should happen during construction. No protection of the vector is available during data dispatching.
- Parameters:
fnDispatch – [in] Dispatch function to call for this interface.
-
template<typename TExcept>
pointer<uint8_t> SerializeException(EEndian eEndian, const TExcept &rexcept)# Serialize exception helper function.
- Template Parameters:
TExcept – The exception type to serialize.
- Parameters:
eEndian – [in] The endianness of the serialization.
rexcept – [in] Reference to the exception.
- Returns:
The serialized exception.
-
virtual void SetIdentification(const TMarshallID &tMarshallID) override#
Set the identification. Overload of IMarshallObjectIdent::SetIdentification.
- Parameters:
tMarshallID – [in] Reference to The marshall object ID. For a proxy object, this is the proxy ID. For a stub object this is a stub ID.
-
virtual sequence<pointer<uint8_t>> Call(sequence<pointer<uint8_t>> &seqInputData) override#
Marshall a function call. Overload of 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).