DynamicRemoteStateClass.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 ArmarX::
17* @author Mirko Waechter ( mirko.waechter at kit dot edu)
18* @date 2014
19* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20* GNU General Public License
21*/
22
24
26{
28 {
29 setStateName("DynamicRemoteState");
30
32 StateParameterPtr proxyName(new StateParameter());
33 proxyName->optional = false;
34 proxyName->type = QString::fromStdString(Variant::typeToString(VariantType::String));
35 input["proxyName"] = proxyName;
37 stateName->optional = false;
38 stateName->type = QString::fromStdString(Variant::typeToString(VariantType::String));
39 input["stateName"] = stateName;
40
41 setInputParameters(input);
42
43 EventList events;
45 event->name = "LoadingFailed";
46 event->description = "The connecting to the desired remote state failed";
47 events.push_back(event);
48 this->outgoingTransitions = events;
49 }
50
54
55 eStateType
57 {
58 return eDynamicRemoteState;
59 }
60} // namespace armarx::statechartmodel
static std::string typeToString(VariantTypeId typeId)
Return the name of the registered type typeId.
Definition Variant.cpp:848
State(const QString &uuid="")
Definition State.cpp:38
void setStateName(const QString &newName)
Definition State.cpp:122
void setInputParameters(const StateParameterMap &newInputParameters)
Definition State.cpp:696
const VariantTypeId String
Definition Variant.h:921
QMap< QString, StateParameterPtr > StateParameterMap
std::shared_ptr< StateParameter > StateParameterPtr
std::shared_ptr< Event > EventPtr
Definition XmlWriter.h:46
QList< EventPtr > EventList
Definition XmlWriter.h:47