Programmers Reference - CDataServer (1)
class CDataServer : public CObject
#include "ConSys.h"
class CDataServer : public CObject { public: DECLARE_CONSYS_SERIAL(CDataServer); public: CDataServer(); virtual void Create(CDataRequest* aRequest, const CConSysEnviroment* aEnviroment, const CDeviceArray* aDeviceArray const CBoolean* forceDataReadEvent); public: virtual CConSysData* Data(); virtual void NewData(CConSysData* newData); protected: friend class CDevice; const CConSysEnviroment* pEnviroment; const CDeviceArray* pDeviceArray; const CBoolean* pForceDataRead; #ifdef _DEBUG public: virtual void Dump(CDumpContext &dc) const; virtual void AssertValid() const; #endif
The member variables is automatically kept track of. A pulse on the forceDataRead event is a signal that the data server wants an immediate poll on the Data function for priority data.
It is important to remember that the data server may be used by many threads at the same time. Appropriate measures must be taken to assure that the threads don't conflict.
References:
Last Modified 10 January 2019