Skip to content
Snippets Groups Projects
Commit 68b3ef91 authored by Valerij Wittenbeck's avatar Valerij Wittenbeck
Browse files

added group for testing statechart profiles

parent 9cfc9ee1
No related branches found
No related tags found
No related merge requests found
add_subdirectory(operations)
add_subdirectory(WeissHapticGroup)
\ No newline at end of file
add_subdirectory(WeissHapticGroup)
add_subdirectory(StatechartProfilesTestGroup)
\ No newline at end of file
armarx_component_set_name("StatechartProfilesTestGroup")
#find_package(MyLib QUIET)
#armarx_build_if(MyLib_FOUND "MyLib not available")
#
# all include_directories must be guarded by if(Xyz_FOUND)
# for multiple libraries write: if(X_FOUND AND Y_FOUND)....
#if(MyLib_FOUND)
# include_directories(${MyLib_INCLUDE_DIRS})
#endif()
#find_package(Eigen3 QUIET)
#find_package(Simox QUIET)
#
#armarx_build_if(Eigen3_FOUND "Eigen3 not available")
#armarx_build_if(Simox_FOUND "Simox-VirtualRobot not available")
#
#if (Eigen3_FOUND AND Simox_FOUND)
# include_directories(
# ${Eigen3_INCLUDE_DIR}
# ${Simox_INCLUDE_DIRS}
# )
#endif()
set(COMPONENT_LIBS
# RobotAPIInterfaces RobotAPICore
ArmarXInterfaces ArmarXCore ArmarXCoreStatechart ArmarXCoreObservers)
# Sources
set(SOURCES
StatechartProfilesTestGroupRemoteStateOfferer.cpp
./TestState.cpp
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.cpp
)
set(HEADERS
StatechartProfilesTestGroupRemoteStateOfferer.h
StatechartProfilesTestGroup.scgxml
StatechartProfilesTestGroupStatechartContext.generated.h
./TestState.h
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.h
./TestState.xml
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.xml
./TestState.generated.h
#@TEMPLATE_LINE@@COMPONENT_PATH@/@COMPONENT_NAME@.generated.h
)
armarx_add_component("${SOURCES}" "${HEADERS}")
<?xml version="1.0" encoding="utf-8"?>
<StatechartGroup name="StatechartProfilesTestGroup" package="RobotAPI" generateContext="true">
<Proxies/>
<State filename="TestState.xml" visibility="public"/>
</StatechartGroup>
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::StatechartProfilesTestGroup::StatechartProfilesTestGroupRemoteStateOfferer
* @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#include "StatechartProfilesTestGroupRemoteStateOfferer.h"
using namespace armarx;
using namespace StatechartProfilesTestGroup;
// DO NOT EDIT NEXT LINE
StatechartProfilesTestGroupRemoteStateOfferer::SubClassRegistry StatechartProfilesTestGroupRemoteStateOfferer::Registry(StatechartProfilesTestGroupRemoteStateOfferer::GetName(), &StatechartProfilesTestGroupRemoteStateOfferer::CreateInstance);
StatechartProfilesTestGroupRemoteStateOfferer::StatechartProfilesTestGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader) :
XMLRemoteStateOfferer < StatechartProfilesTestGroupStatechartContext > (reader)
{
}
void StatechartProfilesTestGroupRemoteStateOfferer::onInitXMLRemoteStateOfferer()
{
}
void StatechartProfilesTestGroupRemoteStateOfferer::onConnectXMLRemoteStateOfferer()
{
}
void StatechartProfilesTestGroupRemoteStateOfferer::onExitXMLRemoteStateOfferer()
{
}
// DO NOT EDIT NEXT FUNCTION
std::string StatechartProfilesTestGroupRemoteStateOfferer::GetName()
{
return "StatechartProfilesTestGroupRemoteStateOfferer";
}
// DO NOT EDIT NEXT FUNCTION
XMLStateOffererFactoryBasePtr StatechartProfilesTestGroupRemoteStateOfferer::CreateInstance(StatechartGroupXmlReaderPtr reader)
{
return XMLStateOffererFactoryBasePtr(new StatechartProfilesTestGroupRemoteStateOfferer(reader));
}
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::StatechartProfilesTestGroup
* @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#ifndef _ARMARX_XMLUSERCODE_RobotAPI_StatechartProfilesTestGroup_REMOTESTATEOFFERER_H
#define _ARMARX_XMLUSERCODE_RobotAPI_StatechartProfilesTestGroup_REMOTESTATEOFFERER_H
#include <Core/statechart/xmlstates/XMLRemoteStateOfferer.h>
#include "StatechartProfilesTestGroupStatechartContext.generated.h"
namespace armarx
{
namespace StatechartProfilesTestGroup
{
class StatechartProfilesTestGroupRemoteStateOfferer :
virtual public XMLRemoteStateOfferer < StatechartProfilesTestGroupStatechartContext > // Change this statechart context if you need another context (dont forget to change in the constructor as well)
{
public:
StatechartProfilesTestGroupRemoteStateOfferer(StatechartGroupXmlReaderPtr reader);
// inherited from RemoteStateOfferer
void onInitXMLRemoteStateOfferer();
void onConnectXMLRemoteStateOfferer();
void onExitXMLRemoteStateOfferer();
// static functions for AbstractFactory Method
static std::string GetName();
static XMLStateOffererFactoryBasePtr CreateInstance(StatechartGroupXmlReaderPtr reader);
static SubClassRegistry Registry;
};
}
}
#endif
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::StatechartProfilesTestGroup
* @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#include "TestState.h"
using namespace armarx;
using namespace StatechartProfilesTestGroup;
// DO NOT EDIT NEXT LINE
TestState::SubClassRegistry TestState::Registry(TestState::GetName(), &TestState::CreateInstance);
TestState::TestState(const XMLStateConstructorParams& stateData) :
XMLStateTemplate<TestState>(stateData), TestStateGeneratedBase<TestState>(stateData)
{
}
void TestState::onEnter()
{
// put your user code for the enter-point here
// execution time should be short (<100ms)
}
void TestState::run()
{
// put your user code for the execution-phase here
// runs in seperate thread, thus can do complex operations
// should check constantly whether isRunningTaskStopped() returns true
// uncomment this if you need a continous run function. Make sure to use sleep or use blocking wait to reduce cpu load.
// while (!isRunningTaskStopped()) // stop run function if returning true
// {
// // do your calculations
// }
}
void TestState::onBreak()
{
// put your user code for the breaking point here
// execution time should be short (<100ms)
}
void TestState::onExit()
{
// put your user code for the exit point here
// execution time should be short (<100ms)
}
// DO NOT EDIT NEXT FUNCTION
XMLStateFactoryBasePtr TestState::CreateInstance(XMLStateConstructorParams stateData)
{
return XMLStateFactoryBasePtr(new TestState(stateData));
}
/*
* This file is part of ArmarX.
*
* ArmarX is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* ArmarX is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package RobotAPI::StatechartProfilesTestGroup
* @author Valerij Wittenbeck ( valerij dot wittenbeck at student dot kit dot edu )
* @date 2015
* @copyright http://www.gnu.org/licenses/gpl.txt
* GNU General Public License
*/
#ifndef _ARMARX_XMLUSERCODE_RobotAPI_StatechartProfilesTestGroup_TestState_H
#define _ARMARX_XMLUSERCODE_RobotAPI_StatechartProfilesTestGroup_TestState_H
#include "TestState.generated.h"
namespace armarx
{
namespace StatechartProfilesTestGroup
{
class TestState :
public TestStateGeneratedBase<TestState>
{
public:
TestState(const XMLStateConstructorParams& stateData);
// inherited from StateBase
void onEnter();
void run();
void onBreak();
void onExit();
// static functions for AbstractFactory Method
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData);
static SubClassRegistry Registry;
// DO NOT INSERT ANY CLASS MEMBERS,
// use stateparameters instead,
// if classmember are neccessary nonetheless, reset them in onEnter
};
}
}
#endif
<?xml version="1.0" encoding="utf-8"?>
<State version="1.2" name="TestState" uuid="84AE0A5A-9F6A-4CD7-B185-2173009CB87C" width="800" height="600" type="Normal State">
<InputParameters>
<Parameter name="EmptyStringTest" type="::armarx::StringVariantData" optional="no">
<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":""}}'/>
</Parameter>
<Parameter name="TestParam1" type="::armarx::StringVariantData" optional="no">
<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"OnlyRootSet"}}'/>
</Parameter>
<Parameter name="TestParam2" type="::armarx::StringVariantData" optional="no">
<DefaultValue profile="Armar3Base" value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Armar3BaseSet"}}'/>
<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"RootSet"}}'/>
</Parameter>
<Parameter name="TestParam3" type="::armarx::StringVariantData" optional="no">
<DefaultValue profile="Armar3a" value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Armar3aSet"}}'/>
<DefaultValue profile="Armar3b" value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"Armar3bSet"}}'/>
<DefaultValue value='{"type":"::armarx::SingleVariantBase","variant":{"typeName":"::armarx::StringVariantData","value":"RootSet"}}'/>
</Parameter>
</InputParameters>
<OutputParameters/>
<LocalParameters/>
<Substates/>
<Events/>
<Transitions/>
</State>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment