Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
someip_pubsub_client.h
1#ifndef SOMEIP_PUBSUB_CLIENT
2#define SOMEIP_PUBSUB_CLIENT
3
4#include <condition_variable>
5#include "../../entry/eventgroup_entry.h"
6#include "../../helper/network_layer.h"
7#include "../../helper/concurrent_queue.h"
8#include "../sd/someip_sd_message.h"
9
10namespace ara
11{
12 namespace com
13 {
14 namespace someip
15 {
16 namespace pubsub
17 {
20 {
21 private:
23 std::mutex mSubscriptionMutex;
24 std::unique_lock<std::mutex> mSubscriptionLock;
25 std::condition_variable mSubscriptionConditionVariable;
27 uint8_t mCounter;
28 bool mValidNotify;
29
30 void onMessageReceived(sd::SomeIpSdMessage &&message);
31
32 public:
33 SomeIpPubSubClient() = delete;
35
41 uint8_t counter);
42
48 void Subscribe(
49 uint16_t serviceId,
50 uint16_t instanceId,
51 uint8_t majorVersion,
52 uint16_t eventgroupId);
53
59 void Unsubscribe(
60 uint16_t serviceId,
61 uint16_t instanceId,
62 uint8_t majorVersion,
63 uint16_t eventgroupId);
64
70 int duration,
71 sd::SomeIpSdMessage &message);
72 };
73 }
74 }
75 }
76}
77
78#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 publish/subscribe client.
Definition: someip_pubsub_client.h:20
bool TryGetProcessedSubscription(int duration, sd::SomeIpSdMessage &message)
Try to wait unitl the server processes a subscription request.
Definition: someip_pubsub_client.cpp:75
void Unsubscribe(uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint16_t eventgroupId)
Unsubscribe from a subscribed event-group.
Definition: someip_pubsub_client.cpp:59
void Subscribe(uint16_t serviceId, uint16_t instanceId, uint8_t majorVersion, uint16_t eventgroupId)
Subscribe to an event-group.
Definition: someip_pubsub_client.cpp:43
SOME/IP service discovery message.
Definition: someip_sd_message.h:18