Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
someip_pubsub_server.h
1#ifndef SOMEIP_PUBSUB_SERVER
2#define SOMEIP_PUBSUB_SERVER
3
4#include "../../helper/finite_state_machine.h"
5#include "../../helper/network_layer.h"
6#include "../sd/someip_sd_message.h"
7#include "../../entry/eventgroup_entry.h"
8#include "../../option/ipv4_endpoint_option.h"
9#include "./fsm/service_down_state.h"
10#include "./fsm/notsubscribed_state.h"
11#include "./fsm/subscribed_state.h"
12
13namespace ara
14{
15 namespace com
16 {
17 namespace someip
18 {
19 namespace pubsub
20 {
23 {
24 private:
27 const uint16_t mServiceId;
28 const uint16_t mInstanceId;
29 const uint8_t mMajorVersion;
30 const uint16_t mEventgroupId;
31 const helper::Ipv4Address mEndpointIp;
32 const uint16_t mEndpointPort;
33 fsm::ServiceDownState mServiceDownState;
34 fsm::NotSubscribedState mNotSubscribedState;
35 fsm::SubscribedState mSubscribedState;
36
37 void onMessageReceived(sd::SomeIpSdMessage &&message);
38 void processEntry(const entry::EventgroupEntry *entry);
39
40 public:
41 SomeIpPubSubServer() = delete;
43
54 uint16_t serviceId,
55 uint16_t instanceId,
56 uint8_t majorVersion,
57 uint16_t eventgroupId,
58 helper::Ipv4Address ipAddress,
59 uint16_t port);
60
62 void Start();
63
66 helper::PubSubState GetState() const noexcept;
67
69 void Stop();
70 };
71 }
72 }
73 }
74}
75
76#endif
Entry to subscribe/unsubscribe to/from an event-group.
Definition: eventgroup_entry.h:14
Finite State Machine (FMS) controller.
Definition: finite_state_machine.h:20
Network communication abstraction layer.
Definition: network_layer.h:18
SOME/IP publish/subscribe server.
Definition: someip_pubsub_server.h:23
void Stop()
Stop the server.
Definition: someip_pubsub_server.cpp:129
helper::PubSubState GetState() const noexcept
Get the current server state.
Definition: someip_pubsub_server.cpp:124
void Start()
Start the server.
Definition: someip_pubsub_server.cpp:115
Machine state in which the service is up but has no subscriber.
Definition: notsubscribed_state.h:18
Machine state in which the service is down.
Definition: service_down_state.h:18
Machine state in which the service is up and it has at least a subscriber.
Definition: subscribed_state.h:19
SOME/IP service discovery message.
Definition: someip_sd_message.h:18
PubSubState
Publish-subscribe server machine state.
Definition: machine_state.h:35
IPv4 address wrapper helper.
Definition: ipv4_address.h:16