
typedef struct {
    void (*pEventHandler)();
    int nextState;
    } CEventInfo;

typedef struct {
    CEventInfo events[NUMBER_OF_EVENTS];
    } CStateInfo;

CStateInfo stateTable[] = {
    {{DoSomething,              STATE_1},
     {DoSomethingElse,          STATE_2},
     {DoNothing,                STATE_3}},
    {{DoSomethingExotic,        STATE_3},
     {DoSomethingEsoterik,      STATE_3},
     {EatDirtAndDie,            STATE_1}},
    {{Etc,                      STATE_1},
     {EtcEtc,                   STATE_1},
     {EatEtcEtc,                STATE_2}}};
