CExternalAlarmManager

Encapsulates the methods and handlers used to generate and process external alarms.

class EXTMGRAPIEXPORT CExternalAlarmManager : public AlarmGen

{

public:

    CExternalAlarmManager();

    virtual ~CExternalAlarmManager();

    BOOL            Start (BOOL bAsync=FALSE);

    BOOL            Stop ();

    int GenerateAlarmStampWithVerify (LPCTSTR alarmId,

                                    LPCTSTR fr,

                                    LPCTSTR refId,

                                    int state,

                                    COR_STAMP stamp,

                                    COR_I4 clearedTime);

    virtual void    OnAlarmAck (LPCTSTR alarmId,

                               LPCTSTR frId, LPCTSTR refId);

    virtual void    OnAlarmClear (LPCTSTR alarmId,

                                 LPCTSTR frId,

                                 LPCTSTR refId);

    virtual void    OnAlarmDel (LPCTSTR alarmId,

                               LPCTSTR frId, LPCTSTR refId);

    virtual void    OnShutdown ()=0;

    virtual void    OnInited ();

    BOOL            IsRunning () const {return m_bRunning;};

    void            report_error (LPCTSTR name, int x,

                                 COR_STATUS *stat);

}

This is the abstract base class from which you drive an XASMgr object. An XASMgr object provides member functions for processing alarm messages.

The constructor of CExternalAlarmManager takes care of connecting to a CIMPLICITY project.

Start() starts the process of generating alarms and monitoring their state changes. This process can by synchronous or asynchronous.

The synchronous Start() waits until the process shuts down.

The asynchronous Start can be stopped by Stop().

Stop() stops the process of generating alarms and monitoring alarm state changes.

More information

Create an XASMgr API application.