Programmers Reference - CPacketServer (1)
class CPacketServer : public CDataServer
#include "ConSys.h"
class CPacketServer : public CDataServer { public: DECLARE_CONSYS_SERIAL(CPacketServer); public: CDataServer(); virtual void Create(CDataRequest* aRequest, const CConSysEnviroment* aEnviroment, const CDeviceArray* aDeviceArray const CEvent* forceDataReadEvent); public: virtual CConSysData* Data(); virtual void NewData(CConSysData* newData); protected: friend class CDevice; const CConSysEnviroment* enviroment; const CDeviceArray* deviceArray; const CEvent* forceDataRead; #ifdef _DEBUG public: virtual void Dump(CDumpContext &dc) const; virtual void AssertValid() const; #endif
The member variables is automaticaly 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