SMACC
Loading...
Searching...
No Matches
smacc_client_behavior_base.h
Go to the documentation of this file.
1/*****************************************************************************************************************
2 * ReelRobotix Inc. - Software License Agreement Copyright (c) 2018
3 * Authors: Pablo Inigo Blasco, Brett Aldrich
4 *
5 ******************************************************************************************************************/
6
7#pragma once
8#include <smacc/common.h>
9
10namespace smacc
11{
13 {
14 public:
16
17 virtual ~ISmaccClientBehavior();
18
20
21 std::string getName() const;
22
23 template <typename SmaccClientType>
24 void requiresClient(SmaccClientType *&storage);
25
26 template <typename SmaccComponentType>
27 void requiresComponent(SmaccComponentType *&storage);
28
29 ros::NodeHandle getNode();
30
31 protected:
32 virtual void runtimeConfigure();
33
34 virtual void onEntry();
35
36 virtual void onExit();
37
38 template <typename EventType>
39 void postEvent(const EventType &ev);
40
41 template <typename EventType>
42 void postEvent();
43
45
46 virtual void executeOnEntry();
47
48 virtual void executeOnExit();
49
50 virtual void dispose();
51
52 private:
53
54 template <typename TOrthogonal, typename TSourceObject>
56
57 // a reference to the owner state machine
59
60 // a reference to the state where the client behavior is being executed
62
64
65 friend class ISmaccState;
66 friend class ISmaccOrthogonal;
67 };
68} // namespace smacc
smacc::ISmaccOrthogonal * currentOrthogonal
void requiresComponent(SmaccComponentType *&storage)
void requiresClient(SmaccClientType *&storage)
ISmaccStateMachine * getStateMachine()