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));
RKH_TR_FWK_OBJ(&S1);
RKH_TR_FWK_OBJ(my);
RKH_TR_FWK_OBJ(&my->equeue);
RKH_TR_FWK_OBJ(&S1);
RKH_TR_FWK_OBJ(&S11);
RKH_TR_FWK_OBJ(&S111);
RKH_TR_FWK_OBJ(&S112);
RKH_TR_FWK_OBJ(&S12);
RKH_TR_FWK_OBJ(&S2);
RKH_TR_FWK_OBJ(&S3);
RKH_TR_FWK_OBJ(&S31);
RKH_TR_FWK_OBJ(&S32);
RKH_TR_FWK_OBJ(&C1);
RKH_TR_FWK_OBJ(&C2);
RKH_TR_FWK_OBJ(&CH);
RKH_TR_FWK_OBJ(&DH);
RKH_TR_FWK_OBJ(&H);
RKH_TR_FWK_SIG(ZERO);
RKH_TR_FWK_SIG(ONE);
RKH_TR_FWK_SIG(TWO);
RKH_TR_FWK_SIG(THREE);
RKH_TR_FWK_SIG(FOUR);
RKH_TR_FWK_SIG(FIVE);
RKH_TR_FWK_SIG(SIX);
RKH_TR_FWK_SIG(TERM);
realMe->x = realMe->y = 0;
}
Describes the SMA (active object in UML).
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;
}
void rkh_fwk_exit(void)
Exit the RKH framework.
Represents events without parameters.
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) ?
}
#define RKH_GFALSE
This values are retrived by guard functions.
Prev: Defining the state machine's objects
Next: Include files