Fawkes API Fawkes Development Version
|
FUSE lookup table list content. More...
#include <>>
Public Member Functions | |
FuseLutListContent () | |
Constructor. More... | |
FuseLutListContent (uint32_t type, void *payload, size_t payload_size) | |
Parsing constructor. More... | |
~FuseLutListContent () | |
Destructor. More... | |
void | add_lutinfo (const char *lut_id, unsigned int width, unsigned int height, unsigned int depth, unsigned int bytes_per_cell) |
Add LUT info. More... | |
void | reset_iterator () |
Reset iterator. More... | |
bool | has_next () |
Check if another LUT info is available. More... | |
FUSE_lutinfo_t * | next () |
Get next LUT info. More... | |
virtual void | serialize () |
Serialize message content. More... | |
![]() | |
FuseMessageContent () | |
Constructor. More... | |
virtual | ~FuseMessageContent () |
Virtual empty destructor. More... | |
virtual void | serialize ()=0 |
Serialize message content. More... | |
virtual void * | payload () const |
Return pointer to payload. More... | |
virtual size_t | payload_size () const |
Return payload size. More... | |
void | free_payload () |
Free message payload. More... | |
Additional Inherited Members | |
![]() | |
void | copy_payload (size_t offset, void *buf, size_t len) |
Copy payload into payload buffer to a specified offset. More... | |
![]() | |
void * | _payload |
Pointer to payload. More... | |
size_t | _payload_size |
Payloda size. More... | |
FUSE lookup table list content.
This content provides means to send an arbitrary length list of LUT information chunks.
Definition at line 33 of file fuse_lutlist_content.h.
firevision::FuseLutListContent::FuseLutListContent | ( | ) |
Constructor.
Creates an empty list.
Definition at line 48 of file fuse_lutlist_content.cpp.
References firevision::FuseMessageContent::_payload, firevision::FuseMessageContent::_payload_size, and firevision::FUSE_lutlist_message_t::lut_list.
firevision::FuseLutListContent::FuseLutListContent | ( | uint32_t | type, |
void * | payload, | ||
size_t | payload_size | ||
) |
Parsing constructor.
Can be used with the FuseContent::fmsg() method to get correctly parsed output.
type | message type, must be FUSE_MT_LUT_LIST |
payload | payload |
payload_size | size of payload |
TypeMismatchException | thrown if the type is not FUSE_MT_LUT_LIST |
Definition at line 63 of file fuse_lutlist_content.cpp.
References firevision::FUSE_lutlist_message_t::lut_list, firevision::FuseMessageContent::payload(), and firevision::FuseMessageContent::payload_size().
firevision::FuseLutListContent::~FuseLutListContent | ( | ) |
Destructor.
Definition at line 73 of file fuse_lutlist_content.cpp.
void firevision::FuseLutListContent::add_lutinfo | ( | const char * | lut_id, |
unsigned int | width, | ||
unsigned int | height, | ||
unsigned int | depth, | ||
unsigned int | bytes_per_cell | ||
) |
Add LUT info.
lut_id | LUT ID |
width | width of LUT |
height | height of LUT |
depth | depth of LUT |
bytes_per_cell | bytes per cell |
Definition at line 86 of file fuse_lutlist_content.cpp.
References fawkes::DynamicBuffer::append(), firevision::FUSE_lutinfo_t::bytes_per_cell, firevision::FUSE_lutinfo_t::depth, firevision::FUSE_lutinfo_t::height, firevision::FUSE_lutinfo_t::lut_id, and firevision::FUSE_lutinfo_t::width.
Referenced by firevision::FuseServerClientThread::process_getlutlist_message().
bool firevision::FuseLutListContent::has_next | ( | ) |
Check if another LUT info is available.
Definition at line 115 of file fuse_lutlist_content.cpp.
References fawkes::DynamicBuffer::has_next().
Referenced by FuseTransferWidget::fuse_inbound_received(), and FireVisionNetworkTool::fuse_inbound_received().
FUSE_lutinfo_t * firevision::FuseLutListContent::next | ( | ) |
Get next LUT info.
TypeMismatchException | thrown if the content contained invalid data |
OutOfBoundsException | thrown if no more data is available |
Definition at line 126 of file fuse_lutlist_content.cpp.
References fawkes::DynamicBuffer::next().
Referenced by FuseTransferWidget::fuse_inbound_received(), and FireVisionNetworkTool::fuse_inbound_received().
void firevision::FuseLutListContent::reset_iterator | ( | ) |
Reset iterator.
Definition at line 106 of file fuse_lutlist_content.cpp.
References fawkes::DynamicBuffer::reset_iterator().
|
virtual |
Serialize message content.
Generate a single contiguous buffer. Make _payload point to this buffer and _payload_size contain the size of the buffer.
Implements firevision::FuseMessageContent.
Definition at line 139 of file fuse_lutlist_content.cpp.
References firevision::FuseMessageContent::_payload, firevision::FuseMessageContent::_payload_size, fawkes::DynamicBuffer::buffer(), fawkes::DynamicBuffer::buffer_size(), and firevision::FuseMessageContent::copy_payload().