Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
someip_sd_message.h
1#ifndef SOMEIP_SD_MESSAGE_H
2#define SOMEIP_SD_MESSAGE_H
3
4#include <utility>
5#include "../someip_message.h"
6#include "../../entry/entry.h"
7
8namespace ara
9{
10 namespace com
11 {
12 namespace someip
13 {
14 namespace sd
15 {
18 {
19 private:
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;
27
28 bool mRebooted;
29 std::vector<std::unique_ptr<entry::Entry>> mEntries;
30
31 uint32_t getEntriesLength() const noexcept;
32 uint32_t getOptionsLength() const noexcept;
33
34 public:
37
38 SomeIpSdMessage& operator=(SomeIpSdMessage&& other);
39
42 const std::vector<std::unique_ptr<entry::Entry>> &Entries() const noexcept;
43
46 void AddEntry(std::unique_ptr<entry::Entry> entry);
47
48 virtual uint32_t Length() const noexcept override;
49
50 virtual void SetSessionId(uint16_t sessionId) override;
51
52 virtual bool IncrementSessionId() noexcept override;
53
54 virtual std::vector<uint8_t> Payload() const override;
55
60 static SomeIpSdMessage Deserialize(const std::vector<uint8_t> &payload);
61 };
62 }
63 }
64 }
65}
66#endif
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