#include <ngcbMODIO.hpp>
|
| | ngcbMODIO () |
| | Trivial constructor.
|
| |
| | ngcbMODIO (const char *path) |
| |
| virtual | ~ngcbMODIO () |
| | Destructor.
|
| |
| const char * | ErrMsg () |
| | Return error message.
|
| |
| void | Sim (int stat) |
| | Set simulation mode (0 or 1)
|
| |
| void | Verbose (int stat) |
| | Set verbose mode (0 or 1)
|
| |
| void | Period (unsigned int p) |
| | Set polling period (milliseconds)
|
| |
| int | Open () |
| | Open module using the saved path.
|
| |
| int | Open (const char *path) |
| | Open module path.
|
| |
| int | Close () |
| | Shutdown module interface.
|
| |
| int | Timeout (int seconds) |
| | Set communication timeout.
|
| |
| int | Fifo (int size) |
| |
| int | Read (int addr, int *buffer, int size) |
| | Read buffer from address - size is given in words (32-bit)
|
| |
| int | Write (int addr, const int *buffer, int size) |
| | Write buffer to address - size is given in words (32-bit)
|
| |
| int | Wait (int addr, int mask, void *lock=NULL) |
| |
| int | Wait (int addr, int mask, int timeout, void *lock=NULL) |
| |
DFE Module-I/O Class
If not specified differently, all class member functions return a non-negative value in case of success. Otherwise -1 is returned and the ErrMsg() method gives a detailed error message.
◆ ngcbMODIO() [1/2]
◆ ngcbMODIO() [2/2]
| ngcbMODIO::ngcbMODIO |
( |
const char * | path | ) |
|
|
inlineexplicit |
DFE Module-I/O Class constructor. The path to the module is defined in the format: "device-name:n" where n is the sequential board number. If n is omitted or set to zero then the addressing does not refer to any DFE-module but to the interface device itself.
◆ ~ngcbMODIO()
| virtual ngcbMODIO::~ngcbMODIO |
( |
| ) |
|
|
inlinevirtual |
◆ Close()
Shutdown module interface.
◆ ErrMsg()
| const char * ngcbMODIO::ErrMsg |
( |
| ) |
|
|
inline |
◆ Fifo()
| int ngcbMODIO::Fifo |
( |
int | size | ) |
|
|
inline |
Set the transfer FIFO size (in 32-bit words). The default FIFO size is 128 words for backwards compatibility reasons. Current maximum is 1024 words. There are various setups in between. To optimize performance, the calling application may adapt the FIFO size depending on the board and revision to be addressed.
◆ Open() [1/2]
Open module using the saved path.
◆ Open() [2/2]
| int ngcbMODIO::Open |
( |
const char * | path | ) |
|
|
inline |
◆ Period()
| void ngcbMODIO::Period |
( |
unsigned int | p | ) |
|
|
inline |
Set polling period (milliseconds)
◆ Read()
| int ngcbMODIO::Read |
( |
int | addr, |
|
|
int * | buffer, |
|
|
int | size ) |
|
inline |
Read buffer from address - size is given in words (32-bit)
◆ Sim()
| void ngcbMODIO::Sim |
( |
int | stat | ) |
|
|
inline |
Set simulation mode (0 or 1)
◆ Timeout()
| int ngcbMODIO::Timeout |
( |
int | seconds | ) |
|
|
inline |
Set communication timeout.
◆ Verbose()
| void ngcbMODIO::Verbose |
( |
int | stat | ) |
|
|
inline |
Set verbose mode (0 or 1)
◆ Wait() [1/2]
| int ngcbMODIO::Wait |
( |
int | addr, |
|
|
int | mask, |
|
|
int | timeout, |
|
|
void * | lock = NULL ) |
|
inline |
Poll address until all bits in mask are set. The timeout is given in seconds. A negative value indicates an infinite timeout. The polling-read is locked if the lock points to a valid pthread_mutex_t. The mutex should be locked before the function is called. The mutex is unlocked while the polling sleeps.
◆ Wait() [2/2]
| int ngcbMODIO::Wait |
( |
int | addr, |
|
|
int | mask, |
|
|
void * | lock = NULL ) |
|
inline |
Poll address with infinite timeout until all bits in mask are set. The polling is locked if the lock points to a pthread_mutex_t.
◆ Write()
| int ngcbMODIO::Write |
( |
int | addr, |
|
|
const int * | buffer, |
|
|
int | size ) |
|
inline |
Write buffer to address - size is given in words (32-bit)
The documentation for this class was generated from the following file: