Components/Libraries/XF/FreeRTOS/IStateMachine
Sara.chalokh (Talk | contribs) |
Sara.chalokh (Talk | contribs) (→Member Attributes) |
||
(8 intermediate revisions by one user not shown) | |||
Line 3: | Line 3: | ||
This is an interface that defines all basic methods of a state machine | This is an interface that defines all basic methods of a state machine | ||
− | = Member Attributes = | + | = Member Attributes = |
+ | string '''_name''' : the name of the stat machine | ||
+ | |||
= Member Functions Documentation = | = Member Functions Documentation = | ||
== IStateMachine(string oName) == | == IStateMachine(string oName) == | ||
=== Description === | === Description === | ||
+ | The constructor of the IStateMachine | ||
=== Parameters === | === Parameters === | ||
+ | string '''oName''' : the name of the state machine | ||
+ | |||
== ~IStateMachine() [virtual] == | == ~IStateMachine() [virtual] == | ||
=== Description === | === Description === | ||
+ | The destructor of the IStateMachine. | ||
+ | |||
== void setName(string oNewName) == | == void setName(string oNewName) == | ||
=== Description === | === Description === | ||
+ | Set the name of the state machine | ||
=== Parameters === | === Parameters === | ||
+ | string '''oNewName''' : the new name of the state machine | ||
+ | |||
== string getName() == | == string getName() == | ||
=== Description === | === Description === | ||
+ | Returns the name of the state machine. | ||
+ | |||
== void startProcessing() [pure virtual] == | == void startProcessing() [pure virtual] == | ||
=== Description === | === Description === | ||
+ | Starts the state machine. This method must be implemented in subclass | ||
+ | |||
== pushEvent(Event* opEv) [pusr virtual] == | == pushEvent(Event* opEv) [pusr virtual] == | ||
=== Description === | === Description === | ||
+ | Sends an event to start an other state. This method must be implemented in subclass | ||
=== Parameters === | === Parameters === | ||
+ | Event* '''opEv''' : a pointer to the event to push | ||
+ | |||
== eEventStatus process(Event* opEv) [pure virtual] == | == eEventStatus process(Event* opEv) [pure virtual] == | ||
=== Description === | === Description === | ||
+ | Process an event (execute the code of the new state). This method must be implemented in subclass | ||
=== Parameters === | === Parameters === | ||
+ | Event* '''opEv''' : a pointer to the event to process | ||
+ | |||
== void cancelEvent(Event* opEv) [pure virtual] == | == void cancelEvent(Event* opEv) [pure virtual] == | ||
=== Description === | === Description === | ||
+ | Cancel an event that has been sent. This method must be implemented in subclass of this class | ||
=== Parameters === | === Parameters === | ||
+ | Event* '''opEv''' : a pointer on the event to cancel |
Latest revision as of 13:43, 21 August 2017
IStateMachine
This is an interface that defines all basic methods of a state machine
Member Attributes
string _name : the name of the stat machine
Member Functions Documentation
IStateMachine(string oName)
Description
The constructor of the IStateMachine
Parameters
string oName : the name of the state machine
~IStateMachine() [virtual]
Description
The destructor of the IStateMachine.
void setName(string oNewName)
Description
Set the name of the state machine
Parameters
string oNewName : the new name of the state machine
string getName()
Description
Returns the name of the state machine.
void startProcessing() [pure virtual]
Description
Starts the state machine. This method must be implemented in subclass
pushEvent(Event* opEv) [pusr virtual]
Description
Sends an event to start an other state. This method must be implemented in subclass
Parameters
Event* opEv : a pointer to the event to push
eEventStatus process(Event* opEv) [pure virtual]
Description
Process an event (execute the code of the new state). This method must be implemented in subclass
Parameters
Event* opEv : a pointer to the event to process
void cancelEvent(Event* opEv) [pure virtual]
Description
Cancel an event that has been sent. This method must be implemented in subclass of this class
Parameters
Event* opEv : a pointer on the event to cancel