#include <lsmp_con.hh>

Public Member Functions | |
| LSMP_CON (void) | |
| LSMP_CON (const char *part, int nbuf=0, int mask=-1) | |
| ~LSMP_CON (void) | |
| const char * | getBuffAddr (void) const |
| eventid_type | getEvtID (void) const |
| int | getLength (void) const |
| int | getMask (void) const |
| int | getNBuffer (void) const |
| int | getNSkip (void) const |
| bool | isConnected (void) const |
| bool | latest_buffer (void) const |
| bool | operator! (void) const |
| void | setNBuffer (int nbuf) |
| void | setNSkip (int nskip) |
| const char * | get_buffer (int flags=0) |
| const char * | find_dataID (eventid_type ID) |
| bool | free_buffer () |
| LSMP_CON::LSMP_CON | ( | void | ) |
The default constructor creates the consumer data structure without Attaching it to a partition or allocating a consumer slot. brief Default (null consumer) constructor.
| LSMP_CON::LSMP_CON | ( | const char * | part, | |
| int | nbuf = 0, |
|||
| int | mask = -1 | |||
| ) |
The consumer access constructor finds the specified parititon and allocates a consumer slot in the partition. If no partition exists with the given name, a new partition will be created with default size parameters .he nbuf and mask arguments specify respectively the number of buffers to be reserved automatically for the consumer and the requisite type-flags for data to be read by the consumer. brief Consumer access constructor.
| part | Pointer to character string with the partition name. | |
| nbuf | Number of buffers to reserve for the new consumer. | |
| mask | Bit mask indicating event types to be accepted by the consumer. |
| LSMP_CON::~LSMP_CON | ( | void | ) |
The consumer destructor releases the consumer slot if one was allocated. It also releases the partition if no other processes are using the parititon and the Keep flag is not set. brief Consumer destructor.
| const char * LSMP_CON::getBuffAddr | ( | void | ) | const [inline] |
Get the current buffer address. brief Buffer address.
| eventid_type LSMP_CON::getEvtID | ( | void | ) | const |
Get the record ID of the consumer data. brief Get current record ID.
| int LSMP_CON::getLength | ( | void | ) | const [inline] |
Get the length in bytes of the data in the current consumer buffer. brief Get current record length.
| int LSMP_CON::getMask | ( | void | ) | const |
Get the event type mask. brief Get event mask.
| int LSMP_CON::getNBuffer | ( | void | ) | const |
Get the current buffer address. brief Buffer address.
| int LSMP_CON::getNSkip | ( | void | ) | const |
Get the number of buffers to skip between buffers allocated. brief Skip count.
| bool LSMP_CON::isConnected | ( | void | ) | const [inline] |
Test whether the consumer is connected to the partition i.e. whether a consumer id has been allocated. brief Test for connected consumer
| bool LSMP_CON::latest_buffer | ( | void | ) | const |
Test whether the consumer's buffer is the latest in the free queue brief Test for latest buffer
| bool LSMP_CON::operator! | ( | void | ) | const [inline] |
Test for errors in construction or connection of consumer. brief Test for invalid consumer
| void LSMP_CON::setNBuffer | ( | int | nbuf | ) |
Sets the maximum number of full buffers that will be reserved for the consumer. This overrides the nbuf argument of the constructor. If "nbuf<0" all buffers will be reserved. If "nbuf=0" no buffers will be reserved and data will received as it becomes available. Reserved buffers will not be released until they have been read, even if nbuf is set to a value less than the current number of reserved buffers. brief Specify the number of buffers to reserve.
| nbuf | The number of buffers to reserve or -1 for all buffers. |
| void LSMP_CON::setNSkip | ( | int | nskip | ) |
Set the number of buffers to skip between reading buffers. The consumer skips the specified number of otherwise qualifying buffers between reading buffers. By default, the skip count is set to zero so all buffers matching the trigger criteria will be read. brief Set skip count.
| nskip | Number of buffers to be skipped. |
| const char* LSMP_CON::get_buffer | ( | int | flags = 0 |
) |
Get a buffer of data and associate it with the consumer. The buffer address is returned. If the consumer already has a buffer, no new buffer is allocated and the old buffer address is returned. By default, the consumer will wait for new data if no unread buffers are available. If "(flags & NOWAIT) != 0", get_buffer will return immediately with a NULL buffer address if no buffers are available. brief Allocate a full buffer.
| flags | Function modifier flag word. |
| const char* LSMP_CON::find_dataID | ( | eventid_type | ID | ) |
find_dataID() finds a specific data record identified by the data ID and returns the address of the buffer it is in. If the requested record isn't currently in the partition, find_dataID() returns NULL. brief Find a specific data buffer.
| ID | identified of data record to be found |
| bool LSMP_CON::free_buffer | ( | ) |
free_buffer() instructs the partition manager to release the data buffer accessed by the consumer. brief Release a buffer.
1.5.4