24 #ifndef __FIREVISION_FVUTILS_IPC_SHM_LUT_H_
25 #define __FIREVISION_FVUTILS_IPC_SHM_LUT_H_
27 #include <utils/ipc/shm.h>
28 #include <utils/ipc/shm_lister.h>
29 #include <fvutils/ipc/defs.h>
33 #define FIREVISION_SHM_LUT_MAGIC_TOKEN "FireVision LUT"
35 namespace firevision {
42 char lut_id[LUT_ID_MAX_LENGTH];
57 unsigned int bytes_per_cell);
62 unsigned int bytes_per_cell);
67 virtual bool matches(
void *memptr);
68 virtual size_t size();
69 virtual bool create();
70 virtual void initialize(
void *memptr);
71 virtual void set(
void *memptr);
73 virtual size_t data_size();
76 virtual void print_info();
78 const char * lut_id()
const;
79 void set_lut_id(
const char *lut_id);
80 unsigned int width()
const;
81 unsigned int height()
const;
82 unsigned int depth()
const;
83 unsigned int bytes_per_cell()
const;
92 unsigned int __height;
94 unsigned int __bytes_per_cell;
103 virtual void print_header();
104 virtual void print_footer();
105 virtual void print_no_segments();
106 virtual void print_no_orphaned_segments();
108 int shm_id,
int semaphore,
unsigned int mem_size,
119 unsigned int width,
unsigned int height,
120 unsigned int depth = 1,
121 unsigned int bytes_per_cell = 1
126 const char * lut_id()
const;
127 bool set_lut_id(
const char *lut_id);
128 unsigned char * buffer()
const;
129 unsigned int width()
const;
130 unsigned int height()
const;
131 unsigned int depth()
const;
132 unsigned int bytes_per_cell()
const;
135 static void cleanup(
bool use_lister =
true);
136 static bool exists(
const char *lut_id);
137 static void wipe(
const char *lut_id);
140 void constructor(
const char *lut_id,
141 unsigned int width,
unsigned int height,
unsigned int depth,
142 unsigned int bytes_per_cell,
149 unsigned int __width;
150 unsigned int __height;
151 unsigned int __depth;
152 unsigned int __bytes_per_cell;
Format list output for shared memory segments.
Shared memory lookup table lister.
Shared memory lookup table.