Woman, Life, Freedom


Adaptive AUTOSAR
ARA public interface header documentation
subscribed_state.h
1#ifndef SUBSCRIBED_STATE_H
2#define SUBSCRIBED_STATE_H
3
4#include <cstdint>
5#include "../../../helper/machine_state.h"
6
7namespace ara
8{
9 namespace com
10 {
11 namespace someip
12 {
13 namespace pubsub
14 {
15 namespace fsm
16 {
18 class SubscribedState : public helper::MachineState<helper::PubSubState>
19 {
20 private:
21 int32_t mSubscriptionCounter;
22
23 protected:
24 void Deactivate(helper::PubSubState nextState) override;
25
26 public:
28 SubscribedState() noexcept;
29
30 SubscribedState(const SubscribedState &) = delete;
31 SubscribedState &operator=(const SubscribedState &) = delete;
32
33 void Activate(helper::PubSubState previousState) override;
34
36 void Subscribed() noexcept;
37
39 void Unsubscribed();
40
42 void Stopped();
43 };
44 }
45 }
46 }
47 }
48}
49
50#endif
Machine state abstract class.
Definition: machine_state.h:46
Machine state in which the service is up and it has at least a subscriber.
Definition: subscribed_state.h:19
void Deactivate(helper::PubSubState nextState) override
Deactivating the current state before transiting to the next state.
Definition: subscribed_state.cpp:42
SubscribedState() noexcept
Default constructor.
Definition: subscribed_state.cpp:13
void Unsubscribed()
Notify that a new client has unsubscribed from the server.
Definition: subscribed_state.cpp:27
void Stopped()
Notify that the server has been stopped.
Definition: subscribed_state.cpp:37
void Subscribed() noexcept
Notify that a new client has subscribed to the server.
Definition: subscribed_state.cpp:22
void Activate(helper::PubSubState previousState) override
Activate the state.
Definition: subscribed_state.cpp:17
PubSubState
Publish-subscribe server machine state.
Definition: machine_state.h:35