Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::SomeIpMessage Class Referenceabstract

SOME/IP Abstract Message. More...

#include <someip_message.h>

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

Public Member Functions

 SomeIpMessage (SomeIpMessage &&other) noexcept
 
SomeIpMessageoperator= (SomeIpMessage &&other)
 
uint32_t MessageId () const noexcept
 Get message ID. More...
 
virtual uint32_t Length () const noexcept=0
 Get message length. 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...
 
virtual std::vector< uint8_t > Payload () const
 Get message payload. More...
 

Protected Member Functions

 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

static void Deserialize (SomeIpMessage *message, const std::vector< uint8_t > &payload)
 Deserialize a SOME/IP message payload. More...
 

Detailed Description

SOME/IP Abstract Message.

Constructor & Destructor Documentation

◆ SomeIpMessage() [1/2]

ara::com::someip::SomeIpMessage::SomeIpMessage ( uint32_t  messageId,
uint16_t  clientId,
uint8_t  protocolVersion,
uint8_t  interfaceVersion,
SomeIpMessageType  messageType,
uint16_t  sessionId = 1 
)
protected

Constructor for request and notification.

Parameters
messageIdMessage ID consisting service and method/event ID
clientIdClient ID including ID prefix
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
messageTypeSOME/IP message type (request or notification)
sessionIdActive/non-active session ID

◆ SomeIpMessage() [2/2]

ara::com::someip::SomeIpMessage::SomeIpMessage ( uint32_t  messageId,
uint16_t  clientId,
uint8_t  protocolVersion,
uint8_t  interfaceVersion,
SomeIpMessageType  messageType,
SomeIpReturnCode  returnCode,
uint16_t  sessionId = 1 
)
protected

Constructor for response and error.

Parameters
messageIdMessage ID consisting service and method/event ID
clientIdClient ID including ID prefix
protocolVersionSOME/IP protocol header version
interfaceVersionService interface version
messageTypeSOME/IP message type (response or error)
returnCodeMessage response/error return code
sessionIdActive/non-active session ID

Member Function Documentation

◆ ClientId()

uint16_t ara::com::someip::SomeIpMessage::ClientId ( ) const
noexcept

Get client ID.

Returns
Client ID including ID prefix

◆ Deserialize()

void ara::com::someip::SomeIpMessage::Deserialize ( SomeIpMessage message,
const std::vector< uint8_t > &  payload 
)
staticprotected

Deserialize a SOME/IP message payload.

Parameters
messageSOME/IP message to be filled by deserializing the payload
payloadSerialized SOME/IP message payload byte array

◆ IncrementSessionId()

bool ara::com::someip::SomeIpMessage::IncrementSessionId ( )
virtualnoexcept

Increment the session ID by one.

Returns
True if the session ID is wrappered; otherwise false
Note
In the case of wrapping, session ID will start from 1

Reimplemented in ara::com::someip::sd::SomeIpSdMessage.

◆ InterfaceVersion()

uint8_t ara::com::someip::SomeIpMessage::InterfaceVersion ( ) const
noexcept

Get interface version.

Returns
Service interface version

◆ Length()

virtual uint32_t ara::com::someip::SomeIpMessage::Length ( ) const
pure virtualnoexcept

Get message length.

Returns
Message length including the payload length

Implemented in ara::com::someip::rpc::SomeIpRpcMessage, and ara::com::someip::sd::SomeIpSdMessage.

◆ MessageId()

uint32_t ara::com::someip::SomeIpMessage::MessageId ( ) const
noexcept

Get message ID.

Returns
Message ID consisting service and method/event ID

◆ MessageType()

SomeIpMessageType ara::com::someip::SomeIpMessage::MessageType ( ) const
noexcept

Get message type.

Returns
SOME/IP message type

◆ Payload()

std::vector< uint8_t > ara::com::someip::SomeIpMessage::Payload ( ) const
virtual

Get message payload.

Returns
Byte array

Reimplemented in ara::com::someip::rpc::SomeIpRpcMessage, and ara::com::someip::sd::SomeIpSdMessage.

◆ ProtocolVersion()

uint8_t ara::com::someip::SomeIpMessage::ProtocolVersion ( ) const
noexcept

Get protocol version.

Returns
SOME/IP protocol header version

◆ ReturnCode()

SomeIpReturnCode ara::com::someip::SomeIpMessage::ReturnCode ( ) const
noexcept

Get return code.

Returns
SOME/IP message return code

◆ SessionId()

uint16_t ara::com::someip::SomeIpMessage::SessionId ( ) const
noexcept

Get session ID.

Returns
Active/non-active session ID

◆ SetSessionId()

void ara::com::someip::SomeIpMessage::SetSessionId ( uint16_t  sessionId)
virtual

Set a new session ID.

Parameters
sessionIdNew session ID

Reimplemented in ara::com::someip::sd::SomeIpSdMessage.