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
13
namespace
ara
14
{
15
namespace
com
16
{
17
namespace
someip
18
{
19
namespace
pubsub
20
{
22
class
SomeIpPubSubServer
23
{
24
private
:
25
helper::FiniteStateMachine<helper::PubSubState>
mStateMachine;
26
helper::NetworkLayer<sd::SomeIpSdMessage>
*mCommunicationLayer;
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
;
42
~SomeIpPubSubServer
();
43
52
SomeIpPubSubServer
(
53
helper::NetworkLayer<sd::SomeIpSdMessage>
*networkLayer,
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
ara::com::entry::EventgroupEntry
Entry to subscribe/unsubscribe to/from an event-group.
Definition:
eventgroup_entry.h:14
ara::com::helper::FiniteStateMachine
Finite State Machine (FMS) controller.
Definition:
finite_state_machine.h:20
ara::com::helper::NetworkLayer
Network communication abstraction layer.
Definition:
network_layer.h:18
ara::com::someip::pubsub::SomeIpPubSubServer
SOME/IP publish/subscribe server.
Definition:
someip_pubsub_server.h:23
ara::com::someip::pubsub::SomeIpPubSubServer::Stop
void Stop()
Stop the server.
Definition:
someip_pubsub_server.cpp:129
ara::com::someip::pubsub::SomeIpPubSubServer::GetState
helper::PubSubState GetState() const noexcept
Get the current server state.
Definition:
someip_pubsub_server.cpp:124
ara::com::someip::pubsub::SomeIpPubSubServer::Start
void Start()
Start the server.
Definition:
someip_pubsub_server.cpp:115
ara::com::someip::pubsub::fsm::NotSubscribedState
Machine state in which the service is up but has no subscriber.
Definition:
notsubscribed_state.h:18
ara::com::someip::pubsub::fsm::ServiceDownState
Machine state in which the service is down.
Definition:
service_down_state.h:18
ara::com::someip::pubsub::fsm::SubscribedState
Machine state in which the service is up and it has at least a subscriber.
Definition:
subscribed_state.h:19
ara::com::someip::sd::SomeIpSdMessage
SOME/IP service discovery message.
Definition:
someip_sd_message.h:18
ara::com::helper::PubSubState
PubSubState
Publish-subscribe server machine state.
Definition:
machine_state.h:35
ara::com::helper::Ipv4Address
IPv4 address wrapper helper.
Definition:
ipv4_address.h:16
src
ara
com
someip
pubsub
someip_pubsub_server.h
Generated by
1.9.2