Msg.h 746 Bytes
/* Messages used by the Terminal and TerminalManager classes. */

 

#ifndef MSG_H

#define MSG_H

 

enum MsgType

{

    CREATE_TERMINAL,

    DELETE_TERMINAL,

    RUN_DIAGNOSTICS,

    PERFORM_SWITCHOVER

};

 

typedef struct

{

    /*...*/

    int msgType;

    int terminalType;

    int terminalId;

    int otherTerminalId;

    int terminalStatus;

} Msg;

 

/* Message used to create a terminal. */

typedef struct

{

    Msg header;

}TerminalCreateMsg;

 

/* Acknowledgement to Terminal Create message. */

typedef struct

{

    Msg header;

} TerminalCreateAck;

 

/* Terminal Delete message */

typedef struct

{

    Msg header;

} TerminalDeleteMsg;

 

 

typedef struct

{

    Msg header;

} RunDiagnosticsMsg;

#endif