![]() |
Barst
2.0
A server that controls lab hardware.
|
#include <base classses.h>
Public Member Functions | |
CDevice (const TCHAR szName[]) | |
virtual void | ProcessData (const void *pHead, DWORD dwSize, __int64 llId)=0 |
virtual void | Result (void *pHead, bool bPass)=0 |
virtual DWORD | GetInfo (void *pHead, DWORD dwSize)=0 |
Public Attributes | |
const std::tstring | m_csName |
Protected Attributes | |
CComm * | m_pcComm |
CLogBuffer * | m_pcLogBuffer |
CMemPool * | m_pcMemPool |
bool | m_bError |
This defines a general device. Each channel type object is inherited from this device. A device can recieve notifications from a user through a comm through the ProcessData() function. When a device writes to a user through a comm using the SendData() function, the comm notifies the user of success or failure using the Result() function.
In additon, each type of device has a unique name (defined at compile time) that identifies it.
Definition at line 77 of file base classses.h.
|
inline |
szName is the device's unique name.
Definition at line 81 of file base classses.h.
|
pure virtual |
This function copies chennel specific info into pHead which could then be sent to the user in response to a query request. If phead is NULL, the function returns the required size of pHead. If non NULL, dwSize if the sise of pHead and the function returns the total size of the data copied into pHead. This funcion followes the rules where every sub-struct is proceeded by an SBase. Typically, it returns an SBaseOut sturct which holds the name of the device followed by channels specific structs.
Implemented in CPinRPeriph, CPinWPeriph, CMultiRPeriph, CMultiWPeriph, CADCPeriph, CManager, CPeriphFTDI, CMainManager, CChannelFTDI, CChannelMCDAQ, CChannelSerial, CChannelRTV, CManagerFTDI, CManagerMCDAQ, CManagerRTV, and CManagerSerial.
|
pure virtual |
Comm calls this function when a user sent data to the device.
Implemented in CPinRPeriph, CPinWPeriph, CMultiRPeriph, CMultiWPeriph, CADCPeriph, CManager, CPeriphFTDI, CMainManager, CChannelFTDI, CChannelMCDAQ, CChannelSerial, CChannelRTV, CManagerFTDI, CManagerMCDAQ, CManagerRTV, and CManagerSerial.
|
pure virtual |
Comm calls this function when it finished writing data to user sent by this device. phead is the pHead parameter in the SData struct that was sent with SendData() bPass is true if successfull and false otherwise.
Implemented in CPinRPeriph, CPinWPeriph, CMultiRPeriph, CMultiWPeriph, CADCPeriph, CManager, CPeriphFTDI, CMainManager, CChannelFTDI, CChannelMCDAQ, CChannelSerial, CChannelRTV, CManagerFTDI, CManagerMCDAQ, CManagerRTV, and CManagerSerial.
const std::tstring CDevice::m_csName |
The unique name that identifies this device.
Definition at line 98 of file base classses.h.