Msg.hpp 841 Bytes
// Messages used by the Terminal and TerminalManager classes.

 

enum MsgType

{

    CREATE_TERMINAL,

    DELETE_TERMINAL,

    RUN_DIAGNOSTICS,

    PERFORM_SWITCHOVER

};

 

 

class Msg

{

    //...

    int msgType;

    int terminalType;

    int terminalId;

    int otherTerminalId;

    int terminalStatus;

 

public:

    MsgType GetType() const;

    int GetTerminalId() const;

    int GetOtherTerminalId() const;

    int GetTerminalType() const;

};

 

// Message used to create a terminal

class TerminalCreateMsg : public Msg

{

public:

    int GetTerminalStatus() const;

};

 

// Acknowledgement to Terminal Create message.

class TerminalCreateAck : public Msg

{

public:

    TerminalCreateAck(int terminalId, int terminalStatus);

};

 

// Terminal Delete message

class TerminalDeleteMsg : public Msg

{

};