fdhwlib
2.0.25
|
#include <pbusimp.h>
PbusImp::PbusImp | ( | ) |
virtual PbusImp::~PbusImp | ( | ) | [virtual] |
virtual void PbusImp::clearBlock | ( | unsigned long | addr, |
unsigned long | data, | ||
unsigned long | n, | ||
unsigned long | incr = 1 |
||
) | [virtual] |
Clear a continuous block of data.
The function protects a loop of rawWrite calls.The function can be overloaded using dedicated block transfer operation.
Reimplemented in PbusProxy.
virtual void PbusImp::cont | ( | ) | [virtual] |
Continues the access to the microEnable.
virtual void PbusImp::debugMsg | ( | const char * | msg, |
... | |||
) | [virtual] |
virtual void PbusImp::endDebugOutput | ( | ) | [virtual] |
virtual int PbusImp::free | ( | int | host = 0 | ) | [virtual] |
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusProxy, PbusPCI, and PbusPCIDMA.
virtual int PbusImp::get | ( | std::string | item, |
std::string * | value | ||
) | [virtual] |
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusPCI, PbusPCIDMA, and PbusProxy.
virtual char* PbusImp::getHostName | ( | int | tel | ) | [virtual] |
Reimplemented in PbusProxy.
virtual unsigned long PbusImp::getIRvector | ( | ) | [virtual] |
virtual const char* PbusImp::getLibName | ( | ) | [virtual] |
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusPCI, PbusPCIDMA, and PbusProxy.
virtual const char* PbusImp::getMode | ( | ) | [virtual] |
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusPCI, PbusPCIDMA, and PbusProxy.
virtual int PbusImp::getModeId | ( | ) | [virtual] |
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusPCI, PbusPCIDMA, and PbusProxy.
virtual int PbusImp::getNTelescopes | ( | ) | [virtual] |
Get the number of available telescopes.
Reimplemented in PbusProxy.
virtual unsigned long PbusImp::getPCTime | ( | ) | [virtual] |
Reimplemented in PbusProxy.
virtual unsigned long PbusImp::getState | ( | ) | [virtual] |
virtual unsigned long PbusImp::getState | ( | unsigned long | addr | ) | [virtual] |
virtual int PbusImp::getTelescope | ( | ) | [virtual] |
Get the id of the selected telescope.
This parameter is used only in PbusIP mode.
Reimplemented in PbusProxy.
virtual const char* PbusImp::getVersion | ( | ) | [virtual] |
virtual int PbusImp::init | ( | char * | inifile, |
int | host = 0 |
||
) | [virtual] |
Initilaization of the Pbus interface.
The function will throw an error if the interface is not avaialble The missing or powered-off FD Electronic will cause a warning but no error.
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusProxy, PbusPCI, and PbusPCIDMA.
virtual void PbusImp::initDebugOutput | ( | ) | [virtual] |
This procedure initializes the debug output.
The output file has to be specified using #define FDEBUG filename. The filenames "stdout" and "stderr" use the predefined output stream. To avoid debug output omit the define pragma or specify the filename /dev/null
If necessary specify a second debug stream to have another debug level.
How long does the debug output take? (100 000 loops)
Timing: CPU [s] RT [s] one loop [us] /dev/null 0.250 0.257 0.1 ..0.17 log-file 0.290 0.298 0.5 ..0.58 do nothing 0.24 0.24 0 *
virtual bool PbusImp::isConnected | ( | int | id = 0 | ) | [virtual] |
Return information about the connection to the electronic.
id | Number if the telescope requested. 0 (default) will select the current telescope. With all menable or test based connections there is only this one possible. |
Reimplemented in PbusProxy.
virtual unsigned long PbusImp::rawRead | ( | unsigned long | addr | ) | [virtual] |
Read data from the electronics via a special interface.
Re-implement this function for every interface.
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusProxy, PbusPCI, and PbusPCIDMA.
virtual void PbusImp::rawWrite | ( | unsigned long | addr, |
unsigned long | data | ||
) | [virtual] |
Write data to the electronics via a special interface.
Re-implement this function for every interface.
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusProxy, PbusPCI, and PbusPCIDMA.
virtual unsigned long PbusImp::read | ( | unsigned long | addr | ) | [virtual] |
Read with single access.
The function protects the rawRead call with the semaphore. Needs normally not to be overloaded.
Reimplemented in PbusProxy.
virtual void PbusImp::readBlock | ( | unsigned long | addr, |
unsigned long * | data, | ||
unsigned long | n, | ||
unsigned long | incr = 1 |
||
) | [virtual] |
Read data a continuous block of data.
The function protects a loop of rawRead calls. Normally the function is overloaded using dedicated block transfer operation.
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusProxy, PbusPCI, and PbusPCIDMA.
virtual void PbusImp::readRegisterBlock | ( | unsigned long | addr, |
unsigned long * | data, | ||
unsigned long | nPix, | ||
unsigned long | incrPix, | ||
unsigned long | nSlots = 1 , |
||
unsigned long | incrSlots = 0 |
||
) | [virtual] |
Read a block of registers with a single command.
In contrast to the readBlock for memory access the registers are normally no neighbors in the address space. To take the matrix structure of the camera image into account it is possible to specify two spacings.
addr | Base address = addr of pixel (0,0) |
data | Array to take the nPix * nSlots register values |
nPix | Number of pixel in the first dimension (rows) |
incrPix | Spacing in the first dimension (rows) |
nSlots | Number of pixel in the second dimension (slots) |
incrSlots | Spacing in the second dimension (slots) |
virtual void PbusImp::reset | ( | ) | [virtual] |
Reset of the Pbus access layer.
Reimplemented in PbusTemplate, Pbus1394, PbusSim, PbusProxy, PbusPCI, and PbusPCIDMA.
virtual void PbusImp::selectTelescope | ( | int | id | ) | [virtual] |
Select a telescope to connect to.
This parameter is used only in PbusIP mode.
Reimplemented in PbusProxy.
virtual int PbusImp::set | ( | std::string | item, |
std::string | value | ||
) | [virtual] |
Reimplemented in PbusPCI, PbusPCIDMA, and PbusProxy.
virtual void PbusImp::setBitsToHigh | ( | unsigned long | addr, |
unsigned long | mask | ||
) | [virtual] |
Read-Modify-Write with single access.
The function protects the rawRead and rawWrite calls with the semaphore. Needs normally not to be overloaded.
Reimplemented in PbusProxy.
virtual void PbusImp::setBitsToLow | ( | unsigned long | addr, |
unsigned long | mask | ||
) | [virtual] |
Read-Modify-Write with single access.
The function protects the rawRead and rawWrite calls with the semaphore. Needs normally not to be overloaded.
Reimplemented in PbusProxy.
virtual void PbusImp::shutdown | ( | ) | [virtual] |
Reimplemented in PbusProxy.
virtual int PbusImp::startBackgroundLoop | ( | char * | host, |
int | telId | ||
) | [virtual] |
virtual int PbusImp::startBackgroundLoop | ( | int | eyeId, |
char * | host, | ||
int | telId | ||
) | [virtual] |
Reimplemented in PbusProxy.
virtual void PbusImp::stop | ( | ) | [virtual] |
Stops the all access to the microEnable by requesting the semaphore.
To resume operation use the function cont() in the same process. The functions stop() and cont() are intended to reach a defined state of the system to terminate processes using the microEnable and leave the semaphore in a defined state. A monitor task may use stop, maintain the process table and continue afterwards.
virtual void PbusImp::vdebugMsg | ( | const char * | msg, |
va_list | va | ||
) | [virtual] |
virtual int PbusImp::waitForIR | ( | int | timeout | ) | [virtual] |
virtual void PbusImp::write | ( | unsigned long | addr, |
unsigned long | data | ||
) | [virtual] |
Write with single access.
The function protects the rawWrite call with the semaphore. Needs normally not to be overloaded.
Reimplemented in PbusProxy.
virtual void PbusImp::writeBits | ( | unsigned long | addr, |
unsigned long | data, | ||
unsigned long | mask, | ||
int | shift | ||
) | [virtual] |
Read-Modify-Write with single access.
The function protects the rawRead and rawWrite calls with the semaphore. Needs normally not to be overloaded.
Reimplemented in PbusProxy.
virtual void PbusImp::writeBlock | ( | unsigned long | addr, |
unsigned long * | data, | ||
unsigned long | n, | ||
unsigned long | incr = 1 |
||
) | [virtual] |
Write a continuous block of data.
The function protects a loop of rawWrite calls.The function can be overloaded using dedicated block transfer operation.
Reimplemented in PbusProxy, PbusPCI, and PbusPCIDMA.
virtual void PbusImp::writeIRvector | ( | unsigned long | vector | ) | [virtual] |
int PbusImp::debugLevel [static] |
FILE* PbusImp::fdebug [static] |
char PbusImp::libName[256] [static] |
semaphore PbusImp::mE [static] |
bool PbusImp::mounted [static] |
unsigned long PbusImp::nBlockAccess [static] |
unsigned long PbusImp::nBlockErrors [static] |
bool PbusImp::newLine [static] |
bool PbusImp::running [static] |
CMutex PbusImp::s_sock [static] |
MFC Mutex variable to make the windows version of the Pbus class thread safe.
This is necessary for any graphical programm like the diagnositc tool mirror.exe by S. Menchikov.
bool PbusImp::useSemaphore [static] |