RKH
RKH_SBSC_T Struct Reference

Describes a basic 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...
 

Detailed Description

Describes a basic state.

Definition at line 2095 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);
NULL, &S2, (RKH_PPRO_T*)&option);

Definition at line 2144 of file rkhsm.h.


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