#include <ngcdcsSHM_IPC.hpp>
Public Member Functions | |
| ngcdcsSHM_IPC () | |
| Constructor. | |
| ngcdcsSHM_IPC (FILE *wd) | |
| Constructor with watchdog. | |
| ngcdcsSHM_IPC (FILE *wd, int n) | |
| Constructor with number of buffers. | |
| ngcdcsSHM_IPC (FILE *wd, const char *s) | |
| Constructor with name. | |
| ngcdcsSHM_IPC (FILE *wd, const char *s, int n) | |
| Constructor with name and number of buffers. | |
| virtual | ~ngcdcsSHM_IPC () |
| void * | Alloc (size_t size) |
| Allocate shared memory area. | |
| void | Free () |
| Release allocated resources. | |
| int | SetName (const char *newName) |
| Set new interface name. | |
Public Member Functions inherited from ngcdcsSHM | |
| ngcdcsSHM () | |
| Constructor. | |
| ngcdcsSHM (FILE *wd) | |
| Constructor with watchdog. | |
| ngcdcsSHM (FILE *wd, int n) | |
| Constructor with number of buffers. | |
| ngcdcsSHM (FILE *wd, const char *s) | |
| Constructor with name. | |
| ngcdcsSHM (FILE *wd, const char *s, int n) | |
| Constructor with name and number of buffers. | |
| virtual | ~ngcdcsSHM () |
| int | Initialized () |
| Check if initialization was OK. | |
| char * | ErrMsg () |
| Error message. | |
| int | NumBuf (int n) |
| Set number of buffers. | |
| int | NumBuf () |
| Return number of buffers. | |
| void * | Buffer (int noWait=1) |
| Get pointer to current buffer. | |
| int | Update (const ngcdcs_finfo_t &finfo, int endian, int fullFrame=0) |
| Update the current buffer. | |
| void | Next () |
| Switch to the next buffer. | |
| int | Export (const ngcdcs_finfo_t &finfo, int endian) |
| Update the current buffer and switch to the next item. | |
| void | Wait () |
| Wait until current buffer is unlocked. | |
| int | TryWait () |
| Return zero when current buffer is not locked. | |
| int | Locked () |
| Check if next buffer is locked. | |
| int | LockNext (int noWait=1) |
| Lock next buffer. | |
| void | Unlock (int noWait) |
| Unlock resources. | |
Protected Member Functions | |
| void | InvalidateEvent () |
| Invalidate last event. | |
| void | BufferWait (int idx) |
| Wait for buffer[idx]. | |
| int | BufferLocked (int idx) |
| Check if buffer[idx] is locked. | |
| int | BufferLock (int idx) |
| Lock buffer[idx]. | |
| int | BufferTryLock (int idx) |
| Try to lock buffer[idx]. | |
| void | BufferUnlock (int idx) |
| Unlock buffer. | |
| int | Publish (int idx, const ngcdcs_finfo_t &finfo, int endian, int fullFrame) |
| Publish buffer. | |
Protected Member Functions inherited from ngcdcsSHM | |
| void | Initialized (int flag) |
| Set initialization flag. | |
| void | Reset () |
| Reset buffer index. | |
| void | InvalidateBuffers () |
| Invalidate buffers. | |
Additional Inherited Members | |
Public Attributes inherited from ngcdcsSHM | |
| char | name [64] |
| Interface name for attachment. | |
| char | type [64] |
| Interface type. | |
| void * | spare |
| Spare buffer. | |
Protected Attributes inherited from ngcdcsSHM | |
| FILE * | watchdog |
| Watchdog stream. | |
| void ** | buffer |
| Pointers to shared memory buffers. | |
| size_t | bufferSize |
| Buffer size. | |
| char | thisHost [46] |
| This host. | |
NGC System V IPC shared memory interface class
| ngcdcsSHM_IPC::ngcdcsSHM_IPC | ( | ) |
Constructor.
|
explicit |
Constructor with watchdog.
| ngcdcsSHM_IPC::ngcdcsSHM_IPC | ( | FILE * | wd, |
| int | n ) |
Constructor with number of buffers.
| ngcdcsSHM_IPC::ngcdcsSHM_IPC | ( | FILE * | wd, |
| const char * | s ) |
Constructor with name.
| ngcdcsSHM_IPC::ngcdcsSHM_IPC | ( | FILE * | wd, |
| const char * | s, | ||
| int | n ) |
Constructor with name and number of buffers.
|
virtual |
|
virtual |
Allocate shared memory area.
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Lock buffer[idx].
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Check if buffer[idx] is locked.
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Try to lock buffer[idx].
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Unlock buffer.
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Wait for buffer[idx].
Reimplemented from ngcdcsSHM.
|
virtual |
Release allocated resources.
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Invalidate last event.
Reimplemented from ngcdcsSHM.
|
protectedvirtual |
Publish buffer.
Reimplemented from ngcdcsSHM.
|
virtual |
Set new interface name.
Reimplemented from ngcdcsSHM.