Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::rpc::SomeIpRpcMessage Class Reference

SOME/IP remote procedure call message. More...

#include <someip_rpc_message.h>

Inheritance diagram for ara::com::someip::rpc::SomeIpRpcMessage:
ara::com::someip::SomeIpMessage

Public Member Functions

 SomeIpRpcMessage (uint32_t messageId, uint16_t clientId, uint16_t sessionId, uint8_t protocolVersion, uint8_t interfaceVersion, const std::vector< uint8_t > &rpcPayload)
 Constructor for RPC request message by copying the RPC payload. More...
 
 SomeIpRpcMessage (uint32_t messageId, uint16_t clientId, uint16_t sessionId, uint8_t protocolVersion, uint8_t interfaceVersion, std::vector< uint8_t > &&rpcPayload)
 Constructor for RPC request message by moving the RPC payload. More...
 
 SomeIpRpcMessage (uint32_t messageId, uint16_t clientId, uint16_t sessionId, uint8_t protocolVersion, uint8_t interfaceVersion, SomeIpReturnCode returnCode, const std::vector< uint8_t > &rpcPayload)
 Constructor for RPC response or error message. More...
 
virtual uint32_t Length () const noexcept override
 Get message length. More...
 
virtual std::vector< uint8_t > Payload () const override
 Get message payload. More...
 
const std::vector< uint8_t > & RpcPayload () const
 Get the serialized RPC object. More...
 
- Public Member Functions inherited from ara::com::someip::SomeIpMessage
 SomeIpMessage (SomeIpMessage &&other) noexcept
 
SomeIpMessageoperator= (SomeIpMessage &&other)
 
uint32_t MessageId () const noexcept
 Get message ID. More...
 
uint16_t ClientId () const noexcept
 Get client ID. More...
 
uint16_t SessionId () const noexcept
 Get session ID. More...
 
virtual void SetSessionId (uint16_t sessionId)
 Set a new session ID. More...
 
virtual bool IncrementSessionId () noexcept
 Increment the session ID by one. More...
 
uint8_t ProtocolVersion () const noexcept
 Get protocol version. More...
 
uint8_t InterfaceVersion () const noexcept
 Get interface version. More...
 
SomeIpMessageType MessageType () const noexcept
 Get message type. More...
 
SomeIpReturnCode ReturnCode () const noexcept
 Get return code. More...
 

Static Public Member Functions

static SomeIpRpcMessage Deserialize (const std::vector< uint8_t > &payload)
 Deserialize a SOME/IP RPC message payload. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ara::com::someip::SomeIpMessage
 SomeIpMessage (uint32_t messageId, uint16_t clientId, uint8_t protocolVersion, uint8_t interfaceVersion, SomeIpMessageType messageType, uint16_t sessionId=1)
 Constructor for request and notification. More...
 
 SomeIpMessage (uint32_t messageId, uint16_t clientId, uint8_t protocolVersion, uint8_t interfaceVersion, SomeIpMessageType messageType, SomeIpReturnCode returnCode, uint16_t sessionId=1)
 Constructor for response and error. More...
 
- Static Protected Member Functions inherited from ara::com::someip::SomeIpMessage
static void Deserialize (SomeIpMessage *message, const std::vector< uint8_t > &payload)
 Deserialize a SOME/IP message payload. More...
 

Detailed Description

SOME/IP remote procedure call message.

Constructor & Destructor Documentation

◆ SomeIpRpcMessage() [1/3]

ara::com::someip::rpc::SomeIpRpcMessage::SomeIpRpcMessage ( uint32_t  messageId,
uint16_t  clientId,
uint16_t  sessionId,
uint8_t  protocolVersion,
uint8_t  interfaceVersion,
const std::vector< uint8_t > &  rpcPayload 
)

Constructor for RPC request message by copying the RPC payload.

Parameters
messageIdMessage ID consisting service and method/event ID
clientIdClient ID including ID prefix
sessionIdActive session ID
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
rpcPayloadSerialized RPC request object byte vector

◆ SomeIpRpcMessage() [2/3]

ara::com::someip::rpc::SomeIpRpcMessage::SomeIpRpcMessage ( uint32_t  messageId,
uint16_t  clientId,
uint16_t  sessionId,
uint8_t  protocolVersion,
uint8_t  interfaceVersion,
std::vector< uint8_t > &&  rpcPayload 
)

Constructor for RPC request message by moving the RPC payload.

Parameters
messageIdMessage ID consisting service and method/event ID
clientIdClient ID including ID prefix
sessionIdActive session ID
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
rpcPayloadSerialized RPC request object byte vector

◆ SomeIpRpcMessage() [3/3]

ara::com::someip::rpc::SomeIpRpcMessage::SomeIpRpcMessage ( uint32_t  messageId,
uint16_t  clientId,
uint16_t  sessionId,
uint8_t  protocolVersion,
uint8_t  interfaceVersion,
SomeIpReturnCode  returnCode,
const std::vector< uint8_t > &  rpcPayload 
)

Constructor for RPC response or error message.

Parameters
messageIdMessage ID consisting service and method/event ID
clientIdClient ID including ID prefix
sessionIdActive session ID
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
returnCodeMessage response/error return code
rpcPayloadSerialized RPC response/error object byte vector

Member Function Documentation

◆ Deserialize()

SomeIpRpcMessage ara::com::someip::rpc::SomeIpRpcMessage::Deserialize ( const std::vector< uint8_t > &  payload)
static

Deserialize a SOME/IP RPC message payload.

Parameters
payloadSerialized SOME/IP message payload byte array
Returns
SOME/IP RPC message filled by deserializing the payload
Exceptions
std::out_of_rangeThrows when the payload is corrupted

◆ Length()

uint32_t ara::com::someip::rpc::SomeIpRpcMessage::Length ( ) const
overridevirtualnoexcept

Get message length.

Returns
Message length including the payload length

Implements ara::com::someip::SomeIpMessage.

◆ Payload()

std::vector< uint8_t > ara::com::someip::rpc::SomeIpRpcMessage::Payload ( ) const
overridevirtual

Get message payload.

Returns
Byte array

Reimplemented from ara::com::someip::SomeIpMessage.

◆ RpcPayload()

const std::vector< uint8_t > & ara::com::someip::rpc::SomeIpRpcMessage::RpcPayload ( ) const

Get the serialized RPC object.

Returns
Byte vector constant reference