1#ifndef SOMEIP_SD_MESSAGE_H
2#define SOMEIP_SD_MESSAGE_H
5#include "../someip_message.h"
6#include "../../entry/entry.h"
20 static const uint32_t cMessageId = 0xffff8100;
21 static const uint16_t cClientId = 0x0000;
22 static const uint8_t cProtocolVersion = 0x01;
23 static const uint8_t cInterfaceVersion = 0x01;
24 static const SomeIpMessageType cMessageType = SomeIpMessageType::Notification;
25 static const uint32_t cRebootedFlag = 0xc0000000;
26 static const uint32_t cNotRebootedFlag = 0x40000000;
29 std::vector<std::unique_ptr<entry::Entry>> mEntries;
31 uint32_t getEntriesLength()
const noexcept;
32 uint32_t getOptionsLength()
const noexcept;
42 const std::vector<std::unique_ptr<entry::Entry>> &
Entries()
const noexcept;
46 void AddEntry(std::unique_ptr<entry::Entry> entry);
48 virtual uint32_t
Length()
const noexcept override;
54 virtual std::vector<uint8_t>
Payload()
const override;
SOME/IP Abstract Message.
Definition: someip_message.h:54
SOME/IP service discovery message.
Definition: someip_sd_message.h:18
const std::vector< std::unique_ptr< entry::Entry > > & Entries() const noexcept
Get entries.
Definition: someip_sd_message.cpp:68
virtual void SetSessionId(uint16_t sessionId) override
Set a new session ID.
Definition: someip_sd_message.cpp:97
static SomeIpSdMessage Deserialize(const std::vector< uint8_t > &payload)
Deserialize a SOME/IP SD message payload.
Definition: someip_sd_message.cpp:172
virtual uint32_t Length() const noexcept override
Get message length.
Definition: someip_sd_message.cpp:78
virtual std::vector< uint8_t > Payload() const override
Get message payload.
Definition: someip_sd_message.cpp:117
void AddEntry(std::unique_ptr< entry::Entry > entry)
Add an entry.
Definition: someip_sd_message.cpp:73
virtual bool IncrementSessionId() noexcept override
Increment the session ID by one.
Definition: someip_sd_message.cpp:108