Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
sd_network_layer.h
1#ifndef SD_NETWORK_LAYER_H
2#define SD_NETWORK_LAYER_H
3
4#include <asyncbsdsocket/poller.h>
5#include <asyncbsdsocket/udp_client.h>
6#include "../../helper/concurrent_queue.h"
7#include "../../helper/network_layer.h"
8#include "./someip_sd_message.h"
9
10namespace ara
11{
12 namespace com
13 {
14 namespace someip
15 {
18 namespace sd
19 {
21 class SdNetworkLayer : public helper::NetworkLayer<SomeIpSdMessage>
22 {
23 private:
24 static const size_t cBufferSize;
25 static const std::string cAnyIpAddress;
26
27 const std::string cNicIpAddress;
28 const std::string cMulticastGroup;
29 const uint16_t cPort;
30
32 AsyncBsdSocketLib::Poller *const mPoller;
33 AsyncBsdSocketLib::UdpClient mUdpSocket;
34
35 void onReceive();
36 void onSend();
37
38 public:
46 AsyncBsdSocketLib::Poller *poller,
47 std::string nicIpAddress,
48 std::string multicastGroup,
49 uint16_t port);
50
51 ~SdNetworkLayer() override;
52
53 void Send(const SomeIpSdMessage &message) override;
54 };
55 }
56 }
57 }
58}
59
60#endif
Thread-safe wrapper around STL queue using locking mechanism.
Definition: concurrent_queue.h:18
Network communication abstraction layer.
Definition: network_layer.h:18
SOME/IP service discovery multicast network layer.
Definition: sd_network_layer.h:22
SdNetworkLayer(AsyncBsdSocketLib::Poller *poller, std::string nicIpAddress, std::string multicastGroup, uint16_t port)
Constructor.
Definition: sd_network_layer.cpp:15
SOME/IP service discovery message.
Definition: someip_sd_message.h:18