24 #include <core/exceptions/software.h> 25 #include <core/exceptions/system.h> 26 #include <fvutils/ipc/shm_lut.h> 27 #include <fvutils/net/fuse_lut_content.h> 28 #include <netinet/in.h> 33 namespace firevision {
50 if ((type != FUSE_MT_LUT) && (type != FUSE_MT_SET_LUT)) {
63 lut_id_ = (
char *)malloc(LUT_ID_MAX_LENGTH + 1);
64 lut_id_[LUT_ID_MAX_LENGTH] = 0;
65 strncpy(lut_id_, header_->
lut_id, LUT_ID_MAX_LENGTH);
67 buffer_size_ = (size_t)ntohl(header_->
width) * ntohl(header_->
height)
87 strncpy(header_->
lut_id, b->
lut_id(), LUT_ID_MAX_LENGTH - 1);
92 lut_id_ = strdup(b->
lut_id());
95 memcpy(buffer_, b->
buffer(), buffer_size_);
126 strncpy(header_->
lut_id,
lut_id, LUT_ID_MAX_LENGTH - 1);
133 memcpy(buffer_,
buffer, buffer_size_);
136 FuseLutContent::~FuseLutContent()
174 return ntohl(header_->
width);
183 return ntohl(header_->
height);
192 return ntohl(header_->
depth);
unsigned int depth() const
Depth of LUT.
const char * lut_id() const
Get LUT ID.
unsigned int width() const
Width of LUT.
size_t buffer_size() const
Get buffer size.
unsigned char * buffer() const
Get buffer.
FuseLutContent(const char *lut_id, void *buffer, unsigned int width, unsigned int height, unsigned int depth, unsigned int bpc)
Constructor.
virtual void * payload() const
Return pointer to payload.
unsigned int width() const
Get LUT width.
unsigned int bytes_per_cell() const
Get bytes per cell.
const char * lut_id() const
Get LUT ID.
unsigned int height() const
Height of LUT.
void * _payload
Pointer to payload.
unsigned int height() const
Get LUT height.
unsigned int bytes_per_cell() const
Bytes per cell in LUT.
virtual size_t payload_size() const
Return payload size.
unsigned int depth() const
Get LUT depth.
unsigned char * buffer() const
Get LUT buffer.
virtual void serialize()
Serialize message content.
Shared memory lookup table.
System ran out of memory and desired operation could not be fulfilled.
size_t _payload_size
Payloda size.