Prev: Defining the state machine's objects
Next: Include files
All init, entry, exit, and transition actions of my
state machine are implemented in "myact.c" file and declaring in "myact.h" file. These files also includes transition guard and branch selection functions.
Initial action of "my" state machine
void
{
MySm *realMe = ((MySm *)(me));
realMe->x = realMe->y = 0;
}
Effect actions of "my" state machine
void
{
(void)pe;
((MySm *)(me))->x = 1;
}
void
{
(void)pe;
((MySm *)(me))->y = 2;
}
void
{
(void)pe;
((MySm *)(me))->y = 1;
}
void
{
(void)me;
(void)pe;
}
void
{
(void)me;
(void)pe;
}
void
{
(void)me;
(void)pe;
}
Entry actions of "my" state machine
void
{
((MySm *)(me))->x = 1;
}
void
{
((MySm *)(me))->x = 2;
}
void
{
((MySm *)(me))->x = 3;
}
void
{
((MySm *)(me))->y = 0;
}
Exit actions of "my" state machine
Transition guard functions of "my" state machine
Branch selection functions of "my" state machine
rbool_t
{
(void)pe;
}
rbool_t
{
(void)pe;
}
rbool_t
{
(void)pe;
}
rbool_t
{
(void)pe;
}
rbool_t
{
(void)pe;
return (((MySm *)(me))->x == 2 || ((MySm *)(me))->x == 3) ?
}
Prev: Defining the state machine's objects
Next: Include files