RKH
RKH_SCMP_T Struct Reference

Describes a composite state. More...

#include <rkhsm.h>

Data Fields

RKHROM RKH_TR_Ttrtbl
 Points to state transition table.
 
RKH_PPRO_T prepro
 Points to event preprocessor. More...
 
RKHROM void * defchild
 Points to state's default child.
 
RKH_INIT_ACT_T initialAction
 Points to state's initial action.
 
RKHROM RKH_SHIST_Thistory
 Points to state's history.
 

Detailed Description

Describes a composite state.

Definition at line 2152 of file rkhsm.h.

Field Documentation

RKH_PPRO_T prepro

Points to event preprocessor.

Aditionally, by means of single inheritance in C it could be used as state's abstract data. Aditionally, implementing the single inheritance in C is very simply by literally embedding the base type, RKH_PPRO_T in this case, as the first member of the derived structure.

This argument is optional, thus it could be declared as NULL.

Example:

static
preprocessor( RKH_EVT_T *pe )
{
...
}
typedef struct
{
RKH_PPRO_T prepro; // extend the RKH_PPRO_T class
unsigned min:4;
unsigned max:4;
char *buff;
} SDATA_T;
static const SDATA_T option = { preprocessor, 4, 8, token1 };
RKH_CREATE_BASIC_STATE( S111, set_x_1,
NULL, &S11, preprocessor );
RKH_CREATE_BASIC_STATE( S22, set_x_4,
NULL, &S2, (RKH_PPRO_T*)&option );

Definition at line 2201 of file rkhsm.h.


The documentation for this struct was generated from the following file: