Fawkes API
Fawkes Development Version
|
24 #ifndef _FIREVISION_FVUTILS_IPC_SHM_LUT_H_
25 #define _FIREVISION_FVUTILS_IPC_SHM_LUT_H_
27 #include <fvutils/ipc/defs.h>
28 #include <utils/ipc/shm.h>
29 #include <utils/ipc/shm_lister.h>
34 #define FIREVISION_SHM_LUT_MAGIC_TOKEN "FireVision LUT"
36 namespace firevision {
41 char lut_id[LUT_ID_MAX_LENGTH];
65 virtual bool matches(
void *memptr);
66 virtual size_t size();
69 virtual void set(
void *memptr);
76 const char *
lut_id()
const;
78 unsigned int width()
const;
79 unsigned int height()
const;
80 unsigned int depth()
const;
92 unsigned int bytes_per_cell_;
108 unsigned int mem_size,
109 const void * memptr);
118 unsigned int depth = 1,
123 const char *
lut_id()
const;
125 unsigned char *
buffer()
const;
126 unsigned int width()
const;
127 unsigned int height()
const;
128 unsigned int depth()
const;
132 static void cleanup(
bool use_lister =
true);
137 void constructor(
const char *
lut_id,
149 unsigned int height_;
151 unsigned int bytes_per_cell_;
unsigned char * buffer() const
Get LUT buffer.
Shared memory lookup table lister.
Format list output for shared memory segments.
bool set_lut_id(const char *lut_id)
Set LUT ID.
bool is_read_only() const
Check for read-only mode.
virtual void print_no_orphaned_segments()
Print this if no matching orphaned segment was found.
static void wipe(const char *lut_id)
Erase a specific shared memory segment that contains a LUT.
static void list()
List shared memory LUT segments.
virtual void print_info(const fawkes::SharedMemoryHeader *header, int shm_id, int semaphore, unsigned int mem_size, const void *memptr)
Print info about segment.
SharedMemoryLookupTableLister()
Constructor.
virtual ~SharedMemoryLookupTableLister()
Destructor.
static bool exists(const char *lut_id)
Check LUT availability.
const char * lut_id() const
Get LUT ID.
SharedMemoryLookupTable(const char *lut_id, unsigned int width, unsigned int height, unsigned int depth=1, unsigned int bytes_per_cell=1)
Write Constructor.
virtual void print_no_segments()
Print this if no matching segment was found.
unsigned int width() const
Get LUT width.
unsigned int bytes_per_cell() const
Get bytes per cell.
Shared memory lookup table.
unsigned int depth() const
Get LUT depth.
virtual void print_footer()
Print footer of the table.
unsigned int height() const
Get LUT height.
~SharedMemoryLookupTable()
Destructor.
virtual void print_header()
Print header of the table.
static void cleanup(bool use_lister=true)
Erase all shared memory segments that contain FireVision LUTs.