Terminal.hpp 662 Bytes
// Terminal class header file.

 

// Forward declaration for messages

class TerminalCreateMsg;

class TerminalDeleteMsg;

class RunDiagnosticsMsg;

class Msg;

 

// Terminal class

class Terminal

{

    enum { UNKNOWN = 0 };

    enum {OUT_OF_SERVICE=1, INSERVICE=2};

    //...

    int terminalId;

    int terminalType;

    int terminalStatus;

    void SendMessage(Msg *pMsg);

 

public:

    void Activate(const TerminalCreateMsg *pMsg);

    void Deactivate(const TerminalDeleteMsg *pMsg);

    int HandleRunDiagnostics(const RunDiagnosticsMsg *pMsg);

    int HandleOutOfService();

    int HandleInService();

    Terminal();

    ~Terminal();

};