![]() |
Barst
2.0
A server that controls lab hardware.
|
#include <base classses.h>
Public Member Functions | |
CManager (const TCHAR szName[], const std::tstring csPipeName, int nChan) | |
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 |
![]() | |
CDevice (const TCHAR szName[]) | |
Public Attributes | |
const std::tstring | m_csPipeName |
const int | m_nChan |
![]() | |
const std::tstring | m_csName |
Protected Attributes | |
HINSTANCE | m_hLib |
![]() | |
CComm * | m_pcComm |
CLogBuffer * | m_pcLogBuffer |
CMemPool * | m_pcMemPool |
bool | m_bError |
This defines a manager. The main manager creates these managers and directs communication from users to one of these managers which deals with the requests such as queries or creating channels. Communication with these managers happen only though the main manager. However, managers create channels with their own pipes so communication with a channel doesn't have to go through a manager but happens directly with the channel. Nonetheless, creation and deletion of channels do go through the managers. The pipe name of each channels in a manager contains both the manager (channel) number and channel number (see API for comm names) details.
Definition at line 146 of file base classses.h.
|
inline |
Create the manager. szName is the unique name of this manager. csPipeName is the name of the main manager pipe. nChan is the channel number of this manager in the main manager's channel list.
Definition at line 152 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.
Implements CDevice.
Implemented in CManagerFTDI, CManagerMCDAQ, CManagerRTV, and CManagerSerial.
|
pure virtual |
Comm calls this function when a user sent data to the device.
Implements CDevice.
Implemented in 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.
Implements CDevice.
Implemented in CManagerFTDI, CManagerMCDAQ, CManagerRTV, and CManagerSerial.