8 #ifndef _FIPAACL_CONVMONITOR_STATE_H_
9 #define _FIPAACL_CONVMONITOR_STATE_H_
14 #include <fipa_acl/message_generator/acl_message.h>
15 #include <fipa_acl/conversation_monitor/role.h>
20 struct EmbeddedStateMachine;
24 namespace default_transition {
66 std::vector<Transition> mTransitions;
74 std::vector<EmbeddedStateMachine> mEmbeddedStateMachines;
79 std::vector<fipa::acl::StateMachine> mSubStateMachines;
86 std::vector<Transition> mSubstateMachineProxiedTransitions;
88 static std::vector<StateId> msDefaultStates;
97 void setFinal(
bool final) { mIsFinal =
final; }
181 std::string
getId()
const {
return mId; }
208 std::string
toXML()
const;
224 namespace default_state
void addEmbeddedStateMachine(fipa::acl::EmbeddedStateMachine embeddedStateMachine)
ConversationCancelSuccess()
implements a state of the StateMachine class
bool isFinished() const
method that returns whether the state is a finished state or not. In the case of a state with embedde...
static const StateId GENERAL_FAILURE_STATE
static const StateId CONVERSATION_CANCEL_FAILURE
static const StateId CONVERSATION_CANCELLING
FinalState(const StateId &id)
void setId(const StateId &id)
setter method for the uid field of the state NOTE: maybe should be taken out and name only be allowed...
const Transition & getTransition(const ACLMessage &msg, const MessageArchive &archive, const RoleMapping &roleMapping) const
Check whether the received message triggers a transition.
State()
empty constructor initializes default fields
void consumeSubStateMachineMessage(const ACLMessage &msg, const fipa::acl::StateMachine &stateMachine, const fipa::acl::RoleMapping &roleMapping, int numberOfSubConversations)
std::string getId() const
getter method for the uid field of the class
void generateDefaultTransitions()
method that generates implicit generic transitions applicable to all states, that may or may not be s...
implements a XML parser that generates a state machine from a given spec. file; uses the tinyXML libr...
void setFinal(bool final)
setter method for the final field of the class When changing the final state flag make sure you eithe...
Mapping between roles and actual agent ids.
An embedded state machine with mappings.
ConversationCancelFailure()
const std::vector< Transition > & getTransitions() const
std::string toString() const
const std::vector< EmbeddedStateMachine > & getEmbeddedStatemachines() const
This class provides a representation of a message conforming to the FIPA specification SC00061...
std::string toXML() const
static const StateId CONVERSATION_CANCEL_SUCCESS
static const StateId UNDEFINED_ID
static const StateId NOT_UNDERSTOOD
Transition addTransition(const Transition &t)
const Transition & getSubstateMachineProxiedTransition(const ACLMessage &msg, const MessageArchive &archive, const RoleMapping &roleMapping)
Check whether the received message triggers a substatemachine proxied transition. This method is not ...
bool isDefaultState() const
Test if state belongs to the default state or not.