#include <ngcbSHM.hpp>
Public Member Functions | |
| ngcbSHM () | |
| Constructor. | |
| ngcbSHM (const char *s) | |
| Constructor with name. | |
| virtual | ~ngcbSHM () |
| Destructor. | |
| int | Initialized () |
| Check, if initialization was OK. | |
| char * | ErrMsg () |
| Error message. | |
| int | Fd () |
| Return event file descriptor. | |
| int | IntPipe () |
| Return internal pipe indicator. | |
| int | NumClient () |
| Return number of registered clients. | |
| void | Remove () |
| Remove shared memory event interface. | |
| int | WrInit (int semId) |
| Initialize writer lock. | |
| int | WrLock (int semId) |
| Writer lock. | |
| int | WrTryLock (int semId) |
| Writer try-lock. | |
| int | WrUnlock (int semId) |
| Writer unlock. | |
| void | RdWait (int semId) |
| Wait until there are no more readers. | |
| int | RdCnt (int semId) |
| Return number of readers. | |
| void | RdUnlock (int semId) |
| Release read-lock. | |
| void | RdUnlock (ngcb_shmhdr_t &hdr) |
| Release read-lock. | |
| int | ShmLock (int shmId, int noWait=0) |
| Lock shared memory (reader) | |
| void | ShmNoUndo () |
| Disable reader-lock undo-function (use with care!) | |
| int | ShmUnlock (int shmId) |
| Unlock shared memory (reader) | |
| void * | AttachBuffer (int shmId, void *hdr, int noWait=0) |
| Attach buffer to shared memory and read-lock. | |
| void * | TryAttachBuffer (int shmId, void *hdr) |
| Try to read-lock and then attach buffer to shared memory. | |
| void | DetachBuffer () |
| Detach buffer from shared memory and release read-lock. | |
| unsigned int | EvtCnt () |
| Return event counter. | |
| unsigned int | NextEvt () |
| Return next event. | |
| int | AttachEvt () |
| Attach to event handler. | |
| int | Wait (int noWait=0) |
| Wait for next event. | |
| int | TryWait () |
| Try to wait for next event. | |
| void * | GetBuffer (void *hdr, int noWait=0) |
| Wait for next event and return a read-locked buffer. | |
| void * | TryGetBuffer (void *hdr) |
| Try to wait for next event then try to read-lock the buffer. | |
| int | GetHdr (void *hdr, int noWait=0) |
| Wait for next event, acquire read-lock and fill the header. | |
| int | TryGetHdr (void *hdr) |
| Try to wait for event, try to acquire read-lock, then fill the header. | |
| int | Send (int shmId) |
| Send event. | |
| int | Release () |
| Release event. | |
| void | Invalidate () |
| Invalidate event. | |
| int | RecvEvt () |
| Receive event from internal pipe. | |
| int | SendAck () |
| Send event acknowledge to internal pipe. | |
| void | Thread () |
| Thread function overloading the thread base class. | |
Public Member Functions inherited from ngcbSHMTHR | |
| ngcbSHMTHR () | |
| Constructor. | |
| virtual | ~ngcbSHMTHR () |
| Destructor. | |
Public Attributes | |
| char | name [64] |
| Interface name. | |
| ngcb_shmhdr_t * | sharedHeader |
| Shared event header. | |
Shared memory i/o class
|
inline |
Constructor.
|
inlineexplicit |
Constructor with name.
|
inlinevirtual |
Destructor.
|
inline |
Attach buffer to shared memory and read-lock.
|
inline |
Attach to event handler.
|
inline |
Detach buffer from shared memory and release read-lock.
|
inline |
Error message.
|
inline |
Return event counter.
|
inline |
Return event file descriptor.
|
inline |
Wait for next event and return a read-locked buffer.
|
inline |
Wait for next event, acquire read-lock and fill the header.
|
inline |
Check, if initialization was OK.
|
inline |
Return internal pipe indicator.
|
inline |
Invalidate event.
|
inline |
Return next event.
|
inline |
Return number of registered clients.
|
inline |
Return number of readers.
|
inline |
Release read-lock.
|
inline |
Release read-lock.
|
inline |
Wait until there are no more readers.
|
inline |
Receive event from internal pipe.
|
inline |
Release event.
|
inline |
Remove shared memory event interface.
|
inline |
Send event.
|
inline |
Send event acknowledge to internal pipe.
|
inline |
Lock shared memory (reader)
|
inline |
Disable reader-lock undo-function (use with care!)
|
inline |
Unlock shared memory (reader)
|
inlinevirtual |
Thread function overloading the thread base class.
Reimplemented from ngcbSHMTHR.
|
inline |
Try to read-lock and then attach buffer to shared memory.
|
inline |
Try to wait for next event then try to read-lock the buffer.
|
inline |
Try to wait for event, try to acquire read-lock, then fill the header.
|
inline |
Try to wait for next event.
|
inline |
Wait for next event.
|
inline |
Initialize writer lock.
|
inline |
Writer lock.
|
inline |
Writer try-lock.
|
inline |
Writer unlock.
| char ngcbSHM::name[64] |
Interface name.
| ngcb_shmhdr_t* ngcbSHM::sharedHeader |
Shared event header.