FuseImageListContent Class Reference
[FireVision FUSE Network Protocol, FireVision Image Processing Framework and Applications]
FUSE image list content.
More...
#include <fvutils/net/fuse_imagelist_content.h>

Public Member Functions | |
| FuseImageListContent () | |
| Constructor. | |
| FuseImageListContent (uint32_t type, void *payload, size_t payload_size) | |
| Parsing constructor. | |
| ~FuseImageListContent () | |
| Destructor. | |
| void | add_imageinfo (const char *image_id, colorspace_t colorspace, unsigned int pixel_width, unsigned int pixel_height) |
| Add image info. | |
| void | reset_iterator () |
| Reset iterator. | |
| bool | has_next () |
| Check if another image info is available. | |
| FUSE_imageinfo_t * | next () |
| Get next image info. | |
| virtual void | serialize () |
| Serialize message content. | |
Detailed Description
FUSE image list content.This content provides means to send an arbitrary length list of image information chunks.
Definition at line 31 of file fuse_imagelist_content.h.
Constructor & Destructor Documentation
| FuseImageListContent::FuseImageListContent | ( | ) |
Constructor.
Creates an empty list.
Definition at line 46 of file fuse_imagelist_content.cpp.
References FuseMessageContent::_payload, FuseMessageContent::_payload_size, and FUSE_imagelist_message_t::image_list.
| FuseImageListContent::FuseImageListContent | ( | uint32_t | type, | |
| void * | payload, | |||
| size_t | payload_size | |||
| ) |
Parsing constructor.
Can be used with the FuseMessage::msgc() method to get correctly parsed output.
- Parameters:
-
type message type, must be FUSE_MT_IMAGE_LIST payload payload payload_size size of payload
- Exceptions:
-
TypeMismatchException thrown if the type is not FUSE_MT_IMAGE_LIST
Definition at line 62 of file fuse_imagelist_content.cpp.
References FUSE_imagelist_message_t::image_list.
| FuseImageListContent::~FuseImageListContent | ( | ) |
Member Function Documentation
| void FuseImageListContent::add_imageinfo | ( | const char * | image_id, | |
| colorspace_t | colorspace, | |||
| unsigned int | pixel_width, | |||
| unsigned int | pixel_height | |||
| ) |
Add image info.
This can only be called on contents that have been newly created, it is a bug to call this method on contents read from the network.
- Parameters:
-
image_id image ID colorspace colorspace pixel_width width of image in pixels pixel_height height of image in pixels
Definition at line 91 of file fuse_imagelist_content.cpp.
References fawkes::DynamicBuffer::append(), FUSE_imageinfo_t::buffer_size, FUSE_imageinfo_t::colorspace, FUSE_imageinfo_t::height, FUSE_imageinfo_t::image_id, and FUSE_imageinfo_t::width.
Referenced by FuseServerClientThread::process_getimagelist_message().
| bool FuseImageListContent::has_next | ( | ) |
Check if another image info is available.
- Returns:
- true if another image info is available, false otherwise
Definition at line 119 of file fuse_imagelist_content.cpp.
References fawkes::DynamicBuffer::has_next().
Referenced by FuseImageListWidget::fuse_inbound_received(), FireVisionNetworkTool::fuse_inbound_received(), and NetworkCamera::fuse_inbound_received().
| FUSE_imageinfo_t * FuseImageListContent::next | ( | ) |
Get next image info.
- Returns:
- next image info
- Exceptions:
-
TypeMismatchException thrown if the content contained invalid data OutOfBoundsException thrown if no more data is available
Definition at line 131 of file fuse_imagelist_content.cpp.
References fawkes::DynamicBuffer::next().
Referenced by FuseImageListWidget::fuse_inbound_received(), FireVisionNetworkTool::fuse_inbound_received(), and NetworkCamera::fuse_inbound_received().
| void FuseImageListContent::reset_iterator | ( | ) |
Reset iterator.
Definition at line 109 of file fuse_imagelist_content.cpp.
References fawkes::DynamicBuffer::reset_iterator().
| void FuseImageListContent::serialize | ( | ) | [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 FuseMessageContent.
Definition at line 145 of file fuse_imagelist_content.cpp.
References FuseMessageContent::_payload, FuseMessageContent::_payload_size, fawkes::DynamicBuffer::buffer(), fawkes::DynamicBuffer::buffer_size(), and FuseMessageContent::copy_payload().
The documentation for this class was generated from the following files:
- src/firevision/fvutils/net/fuse_imagelist_content.h
- src/firevision/fvutils/net/fuse_imagelist_content.cpp

