// alarms_input_base.h: interface for the alarms_input_base class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_ALARMS_INPUT_BASE_H__5B5DE69F_EB80_4A75_A553_B36E33A9F586__INCLUDED_) #define AFX_ALARMS_INPUT_BASE_H__5B5DE69F_EB80_4A75_A553_B36E33A9F586__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include //! interface for the alarms_input_base class. /*! This abstract base class provides the function prototypes for the input modules of the alarm system. All alarm acquisition modules will be expected to implement the pure virtual functions listed. The getData() function is crucial and may be called up to 50 times a second. It must provide the latest states of the inputs and the length of this data. */ class alarms_input_base : public alarms_base { public: alarms_input_base(){}; virtual ~alarms_input_base(){}; /*! init is called when the module needs to load it's configuration file, the module should also do any intialisation it needs to do at this point. \param sFileName points the the configuration file to load. \return Return true if initialised OK, otherwise false. */ virtual bool init(char* sFileName, bool bIsGreeningRequired=false)=0; /*! This is called by the main application (in the main thread) each time it requires the current state of the inputs. This during the main calculation loop. This function may be called up to 50 times a second. \param data is a pointer to a pointer to the data - use this to point to the data array \param length is a pointer to the length of the data - use this to point to the length \return Return true if successful, otherwise false*/ virtual bool getData(int **data, int* length)=0; virtual void startGreening()=0; virtual void stopGreening()=0; }; #endif // !defined(AFX_ALARMS_INPUT_BASE_H__5B5DE69F_EB80_4A75_A553_B36E33A9F586__INCLUDED_)