TestState.cpp
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package RobotAPI::StatechartProfilesTestGroup
19 * @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu )
20 * @date 2015
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24
25#include "TestState.h"
26
27using namespace armarx;
28using namespace StatechartProfilesTestGroup;
29
30// DO NOT EDIT NEXT LINE
31TestState::SubClassRegistry TestState::Registry(TestState::GetName(), &TestState::CreateInstance);
32
34 XMLStateTemplate<TestState>(stateData), TestStateGeneratedBase<TestState>(stateData)
35{
36}
37
38void
40{
41 std::string emptyString = in.getEmptyStringTest();
42 std::string TestParam1 = in.getTestParam1();
43 std::string TestParam2 = in.getTestParam2();
44 std::string TestParam3 = in.getTestParam3();
45
46 ARMARX_IMPORTANT << "TestParam1: " << TestParam1;
47 ARMARX_IMPORTANT << "TestParam2: " << TestParam2;
48 ARMARX_IMPORTANT << "TestParam3: " << TestParam3;
49
50 ARMARX_CHECK_EXPRESSION(emptyString == "") << "EmptyStringTest is not empty.";
51 ARMARX_CHECK_EXPRESSION(TestParam1 == "OnlyRootSet");
52 ARMARX_CHECK_EXPRESSION(TestParam2 == "Armar3BaseSet");
53 ARMARX_CHECK_EXPRESSION(TestParam3 == "Armar3aSet" || TestParam3 == "Armar3SimulationSet");
54 ARMARX_IMPORTANT << "All tests passed.";
55}
56
57void
59{
60 // put your user code for the execution-phase here
61 // runs in seperate thread, thus can do complex operations
62 // should check constantly whether isRunningTaskStopped() returns true
63
64 // uncomment this if you need a continous run function. Make sure to use sleep or use blocking wait to reduce cpu load.
65 // while (!isRunningTaskStopped()) // stop run function if returning true
66 // {
67 // // do your calculations
68 // }
69}
70
71void
73{
74 // put your user code for the breaking point here
75 // execution time should be short (<100ms)
76}
77
78void
80{
81 // put your user code for the exit point here
82 // execution time should be short (<100ms)
83}
84
85// DO NOT EDIT NEXT FUNCTION
TestState(const XMLStateConstructorParams &stateData)
Definition TestState.cpp:33
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
Definition TestState.cpp:87
Class for legacy to stay compatible with old statecharts.
Definition XMLState.h:147
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
Definition Logging.h:190
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
Definition XMLState.h:64