TestStateForStatechartExecution.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package ArmarXCore::StatechartExecutionGroup
17  * @author Stefan Reither ( stefan dot reither at kit dot edu )
18  * @date 2019
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
24 
25 //#include <ArmarXCore/core/time/TimeUtil.h>
26 //#include <ArmarXCore/observers/variant/DatafieldRef.h>
27 
29 
30 using namespace armarx;
31 using namespace StatechartExecutionGroup;
32 
33 // DO NOT EDIT NEXT LINE
34 TestStateForStatechartExecution::SubClassRegistry TestStateForStatechartExecution::Registry(TestStateForStatechartExecution::GetName(), &TestStateForStatechartExecution::CreateInstance);
35 
36 
37 
39 {
40  // put your user code for the enter-point here
41  // execution time should be short (<100ms)
42  i = 0;
43  std::cout << "Hallo onEnter()" << std::endl;
44 
45  PosePtr p;
46  if (in.isblaSet())
47  {
48  ARMARX_INFO << VAROUT(*in.getbla());
49  p = in.getbla();
50  }
51  if (in.isintTestSet())
52  {
53  ARMARX_INFO << VAROUT(in.getintTest());
54  }
55 
56  if (in.isbla2Set())
57  {
58  ARMARX_INFO << VAROUT(*in.getbla2());
59  }
60 
61  if (in.isintListTestSet())
62  {
63  ARMARX_INFO << VAROUT(*in.getintListTest()[0]);
64  }
65  out.setOutputPose(p);
66 }
67 
69 {
70  // put your user code for the breaking point here
71  // execution time should be short (<100ms)
72  ARMARX_INFO << "MainState broke";
73 }
74 
76 {
77  // put your user code for the exit point here
78  // execution time should be short (<100ms)
79  // out.setOutputInt(500);
80  ARMARX_INFO << "MainState exited";
81 }
82 
83 
84 // DO NOT EDIT NEXT FUNCTION
86 {
88 }
89 
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::onEnter
void onEnter() override
Definition: TestStateForStatechartExecution.cpp:38
Pose.h
armarx::XMLStateConstructorParams
Definition: XMLState.h:50
IceInternal::Handle< Pose >
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::TestStateForStatechartExecution
TestStateForStatechartExecution(const XMLStateConstructorParams &stateData)
Definition: TestStateForStatechartExecution.h:32
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::CreateInstance
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition: TestStateForStatechartExecution.cpp:85
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::i
int i
Definition: TestStateForStatechartExecution.h:49
TestStateForStatechartExecution.h
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::Registry
static SubClassRegistry Registry
Definition: TestStateForStatechartExecution.h:44
armarx::XMLStateFactoryBasePtr
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition: XMLState.h:65
ARMARX_INFO
#define ARMARX_INFO
Definition: Logging.h:174
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::onExit
void onExit() override
Definition: TestStateForStatechartExecution.cpp:75
VAROUT
#define VAROUT(x)
Definition: StringHelpers.h:182
armarx::StatechartExecutionGroup::TestStateForStatechartExecution::onBreak
void onBreak() override
Definition: TestStateForStatechartExecution.cpp:68
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28