![]() |
Barst
2.0
A server that controls lab hardware.
|
Public Member Functions | |
CMultiRPeriph (const SValveInit &sValveInit, CComm *pcComm, const SInitPeriphFT &sInitFT, int &nError, HANDLE hNewData, CTimer *pcTimer) | |
bool | DoWork (void *pHead, DWORD dwSize, FT_HANDLE ftHandle, EStateFTDI eReason, int nError) |
void | ProcessData (const void *pHead, DWORD dwSize, __int64 llId) |
void | Result (void *pHead, bool bPass) |
EStateFTDI | GetState () |
DWORD | GetInfo (void *pHead, DWORD dwSize) |
![]() | |
CPeriphFTDI (const TCHAR szName[], const SInitPeriphFT &sInitFT) | |
void | SetOutputBits (unsigned char ucBitOutput) |
unsigned char | GetOutputBits () |
![]() | |
CDevice (const TCHAR szName[]) | |
Public Attributes | |
const SValveInit | m_sInit |
const unsigned char | m_ucMask |
const unsigned char | m_ucDefault |
![]() | |
const SInitPeriphFT | m_sInitFT |
![]() | |
const std::tstring | m_csName |
Additional Inherited Members | |
![]() | |
EStateFTDI | m_eState |
CTimer * | m_pcTimer |
unsigned char | m_ucBitOutput |
CMemRing * | m_pcMemRing |
![]() | |
CComm * | m_pcComm |
CLogBuffer * | m_pcLogBuffer |
CMemPool * | m_pcMemPool |
bool | m_bError |
Definition at line 265 of file ftdi device.h.
|
virtual |
The FTDI thread calls this function on all the devices everytime a read/write occurs. However, devices only do something if they are active or are in/activated by the this call. This is called before every write to give each device the oppertunity to update the buffer to be written. Then after the write it's called again so that the buffer can be set again to the proper values. In both cases pHead is the write buffer. The function is also called after a read with pHead pointing to the index of memory gotten from m_pcMemRing which holds the most recent buffer read. The device should claim the memory while it's used and not forget to release it after. This allows prolonged usgae of the read buffer without holding up the read thread. The device can now extract the data read. Finally, the function is also called when we need to change the state of a device. In that case it's only called on the device in question. In all cases, dwSize is the size of the buffer (in case of read it's the buffer from m_pcMemRing struct). ftHandle if the handle to the ft device, you probably shouldn't do anything with it. eReason is the reson for this call, such as prewrite etc. Defined in EStateFTDI. nError is given the reason for this call if that failed. I.e. if the reason is a post write, it indicates if the write failed. The return value has no meaning at the moment.
Implements CPeriphFTDI.
Definition at line 317 of file cpl ft io.cpp.
|
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 CPeriphFTDI.
Definition at line 282 of file cpl ft io.cpp.
|
virtual |
Comm calls this function when a user sent data to the device.
Implements CPeriphFTDI.
Definition at line 475 of file cpl ft io.cpp.
|
inlinevirtual |
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 CPeriphFTDI.
Definition at line 273 of file ftdi device.h.