![]() |
MiniballSort
|
#include <DataSpy.hh>
Public Member Functions | |
| DataSpy () | |
| ~DataSpy () | |
| void | Verbose (int opt) |
| int | Open (int id) |
| int | Close (int id) |
| int | ReadWithSeq (int id, char *data, unsigned int length, int *seq) |
| int | Read (int id, char *data, unsigned int length) |
Public Attributes | |
| key_t | shmkey = SHM_KEY |
| void * | shm_bufferarea [MAX_ID] |
| int | shmid [MAX_ID] |
| BUFFER_HEADER * | baseaddress |
| int | number_of_buffers [MAX_ID] |
| int | buffers_offset [MAX_ID] |
| int | next_index [MAX_ID] |
| unsigned long long | current_age [MAX_ID] |
| int | verbose |
Definition at line 63 of file DataSpy.hh.
|
inline |
Definition at line 67 of file DataSpy.hh.
|
inline |
Definition at line 68 of file DataSpy.hh.
| int DataSpy::Close | ( | int | id | ) |
dataSpyClose close a connection to an the shared file for that id close the file return OK or ERROR
Definition at line 80 of file DataSpy.cc.
Referenced by monitor_run().
| int DataSpy::Open | ( | int | id | ) |
DataSpy.cc data access routines These functions can be used by user programs to access data blocks held in shared memory This version Mar 2003 J.Cresswell and V.Pucknell Major update Dec 2014 to support use of Posix shared memory and for general use within the MIDAS data acq infrastructure Edits by L. P. Gaffney to C++ -ify it, with help from D. Zemlianska - July 2022 dataSpyOpen make a connection to an the shared file for that id return OK or ERROR (0 or -1)
Definition at line 13 of file DataSpy.cc.
Referenced by monitor_run().
| int DataSpy::Read | ( | int | id, |
| char * | data, | ||
| unsigned int | length ) |
DataSpy::Read get a block of data for that id as for DataSpy::ReadWithSeq, but ignoring the sequence numbering provided for compatibility with earlier version
Definition at line 186 of file DataSpy.cc.
Referenced by monitor_run().
| int DataSpy::ReadWithSeq | ( | int | id, |
| char * | data, | ||
| unsigned int | length, | ||
| int * | seq ) |
DataSpy::Read get a block of data for that field check that the id is valid and opened check that there is any data in the queue increment the queue read index return length of data block or ERROR length is in units of bytes
Definition at line 112 of file DataSpy.cc.
Referenced by Read().
|
inline |
Definition at line 70 of file DataSpy.hh.
| BUFFER_HEADER* DataSpy::baseaddress |
Definition at line 86 of file DataSpy.hh.
Referenced by Open(), and ReadWithSeq().
| int DataSpy::buffers_offset[MAX_ID] |
Definition at line 89 of file DataSpy.hh.
Referenced by Open(), and ReadWithSeq().
| unsigned long long DataSpy::current_age[MAX_ID] |
Definition at line 91 of file DataSpy.hh.
Referenced by Open(), and ReadWithSeq().
| int DataSpy::next_index[MAX_ID] |
Definition at line 90 of file DataSpy.hh.
Referenced by Open(), and ReadWithSeq().
| int DataSpy::number_of_buffers[MAX_ID] |
Definition at line 88 of file DataSpy.hh.
Referenced by Open(), and ReadWithSeq().
| void* DataSpy::shm_bufferarea[MAX_ID] |
Definition at line 84 of file DataSpy.hh.
Referenced by Close(), Open(), and ReadWithSeq().
| int DataSpy::shmid[MAX_ID] |
Definition at line 85 of file DataSpy.hh.
Referenced by Open().
| key_t DataSpy::shmkey = SHM_KEY |
Definition at line 81 of file DataSpy.hh.
Referenced by Open().
| int DataSpy::verbose |
Definition at line 93 of file DataSpy.hh.
Referenced by ReadWithSeq(), and Verbose().