Emergency 20 Dokumentation  4.2.0
WaitForSignalAction.h
Go to the documentation of this file.
1 // Copyright (C) 2012-2018 Promotion Software GmbH
2 
3 
4 //[-------------------------------------------------------]
5 //[ Header guard ]
6 //[-------------------------------------------------------]
7 #pragma once
8 
9 
10 //[-------------------------------------------------------]
11 //[ Includes ]
12 //[-------------------------------------------------------]
13 #include "em5/Export.h"
14 
17 
18 
19 //[-------------------------------------------------------]
20 //[ Namespace ]
21 //[-------------------------------------------------------]
22 namespace em5
23 {
24 
25 
26  //[-------------------------------------------------------]
27  //[ Classes ]
28  //[-------------------------------------------------------]
34  {
35 
36 
37  //[-------------------------------------------------------]
38  //[ Public definitions ]
39  //[-------------------------------------------------------]
40  public:
42 
43 
44  //[-------------------------------------------------------]
45  //[ Public methods ]
46  //[-------------------------------------------------------]
47  public:
53 
58  virtual ~WaitForSignalAction();
59 
60  void init(const qsf::MessageConfiguration& message);
61 
62  void init(const qsf::MessageConfiguration& message, const qsf::Time& maxWaitTime);
63 
64 
65  //[-------------------------------------------------------]
66  //[ Public virtual qsf::Action methods ]
67  //[-------------------------------------------------------]
68  public:
69  virtual void serialize(qsf::BinarySerializer& serializer) override;
70 
71 
72  //[-------------------------------------------------------]
73  //[ Protected virtual qsf::Action methods ]
74  //[-------------------------------------------------------]
75  protected:
76  virtual qsf::action::Result updateAction(const qsf::Clock& clock) override;
77 
78 
79  //[-------------------------------------------------------]
80  //[ Private methods ]
81  //[-------------------------------------------------------]
82  private:
83  void onMessage(const qsf::MessageParameters& parameters);
84 
85 
86  //[-------------------------------------------------------]
87  //[ Private data ]
88  //[-------------------------------------------------------]
89  private:
90  qsf::MessageProxy mMessageProxy;
91  bool mMessageReceived;
92  bool mWaitInfinite;
93  qsf::Time mMaxWaitTime;
94 
95 
96  //[-------------------------------------------------------]
97  //[ CAMP reflection system ]
98  //[-------------------------------------------------------]
99  QSF_CAMP_RTTI() // Only adds the virtual method "campClassId()", nothing more
100 
101 
102  };
103 
104 
105 //[-------------------------------------------------------]
106 //[ Namespace ]
107 //[-------------------------------------------------------]
108 } // em5
109 
110 
111 //[-------------------------------------------------------]
112 //[ CAMP reflection system ]
113 //[-------------------------------------------------------]
Definition: ActionPriority.h:13
Message parameters class.
Definition: MessageParameters.h:34
Clock class.
Definition: Clock.h:33
#define EM5_API_EXPORT
Definition: Export.h:28
static const qsf::NamedIdentifier ACTION_ID
"em5::WaitForSignalAction" unique action identifier
Definition: WaitForSignalAction.h:41
Message listener proxy class.
Definition: MessageProxy.h:47
EMERGENCY 5 wait for signal action.
Definition: WaitForSignalAction.h:33
void serialize(BinarySerializer &serializer, BitFlagSet< STORAGE, ENUM > &bitFlagSet)
Definition: BitFlagSet.h:359
#define QSF_CAMP_RTTI()
Only adds the virtual method "campClassId()", nothing more.
Definition: CampClass.h:75
#define QSF_CAMP_TYPE_NONCOPYABLE(type)
See "CAMP_TYPE_NONCOPYABLE" for details.
Definition: CampClass.h:112
Message configuration class.
Definition: MessageConfiguration.h:44
Abstract action base class.
Definition: Action.h:59
Class combining strings with their hashes.
Definition: NamedIdentifier.h:34
Binary serializer class.
Definition: BinarySerializer.h:35
Result
Definition: ActionResult.h:20
Data type for encapsulating time information. It might represents points in time and time spans...
Definition: Time.h:32