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 2097 of file rkhsm.h.

Field Documentation

◆ prepro

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);
#define RKH_CREATE_BASIC_STATE(name, en, ex, parent, prepro)
This macro creates a basic state.
Definition: rkhsm.h:277
rui8_t RKH_SIG_T
Definition: rkhevt.h:100
RKH_SIG_T(* RKH_PPRO_T)(const RKH_SM_T *sma, RKH_EVT_T *pe)
Event preprocessor.
Definition: rkhsm.h:1726
Represents events without parameters.
Definition: rkhevt.h:170
RKH_PPRO_T prepro
Points to event preprocessor.
Definition: rkhsm.h:2146

Definition at line 2146 of file rkhsm.h.


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