Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
ara::com::someip::sd::SomeIpSdMessage Class Reference

SOME/IP service discovery message. More...

#include <someip_sd_message.h>

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

Public Member Functions

 SomeIpSdMessage (SomeIpSdMessage &&other)
 
SomeIpSdMessageoperator= (SomeIpSdMessage &&other)
 
const std::vector< std::unique_ptr< entry::Entry > > & Entries () const noexcept
 Get entries. More...
 
void AddEntry (std::unique_ptr< entry::Entry > entry)
 Add an entry. More...
 
virtual uint32_t Length () const noexcept override
 Get message length. More...
 
virtual void SetSessionId (uint16_t sessionId) override
 Set a new session ID. More...
 
virtual bool IncrementSessionId () noexcept override
 Increment the session ID by one. More...
 
virtual std::vector< uint8_t > Payload () const override
 Get message payload. 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...
 
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 SomeIpSdMessage Deserialize (const std::vector< uint8_t > &payload)
 Deserialize a SOME/IP SD 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 service discovery message.

Member Function Documentation

◆ AddEntry()

void ara::com::someip::sd::SomeIpSdMessage::AddEntry ( std::unique_ptr< entry::Entry entry)

Add an entry.

Parameters
entryEntry to be added

◆ Deserialize()

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

Deserialize a SOME/IP SD message payload.

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

◆ Entries()

const std::vector< std::unique_ptr< entry::Entry > > & ara::com::someip::sd::SomeIpSdMessage::Entries ( ) const
noexcept

Get entries.

Returns
Exisiting message entries

◆ IncrementSessionId()

bool ara::com::someip::sd::SomeIpSdMessage::IncrementSessionId ( )
overridevirtualnoexcept

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 from ara::com::someip::SomeIpMessage.

◆ Length()

uint32_t ara::com::someip::sd::SomeIpSdMessage::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::sd::SomeIpSdMessage::Payload ( ) const
overridevirtual

Get message payload.

Returns
Byte array

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

◆ SetSessionId()

void ara::com::someip::sd::SomeIpSdMessage::SetSessionId ( uint16_t  sessionId)
overridevirtual

Set a new session ID.

Parameters
sessionIdNew session ID

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