Fawkes API  Fawkes Development Version

FUSE image list content. More...

#include <>>

Inheritance diagram for firevision::FuseImageListContent:

Public Member Functions

 FuseImageListContent ()
 Constructor. More...
 
 FuseImageListContent (uint32_t type, void *payload, size_t payload_size)
 Parsing constructor. More...
 
 ~FuseImageListContent ()
 Destructor. More...
 
void add_imageinfo (const char *image_id, colorspace_t colorspace, unsigned int pixel_width, unsigned int pixel_height)
 Add image info. More...
 
void reset_iterator ()
 Reset iterator. More...
 
bool has_next ()
 Check if another image info is available. More...
 
FUSE_imageinfo_tnext ()
 Get next image info. More...
 
virtual void serialize ()
 Serialize message content. More...
 
- Public Member Functions inherited from firevision::FuseMessageContent
 FuseMessageContent ()
 Constructor. More...
 
virtual ~FuseMessageContent ()
 Virtual empty destructor. 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

- Protected Member Functions inherited from firevision::FuseMessageContent
void copy_payload (size_t offset, void *buf, size_t len)
 Copy payload into payload buffer to a specified offset. More...
 
- Protected Attributes inherited from firevision::FuseMessageContent
void * _payload
 Pointer to payload. More...
 
size_t _payload_size
 Payloda size. More...
 

Detailed Description

FUSE image list content.

This content provides means to send an arbitrary length list of image information chunks.

Author
Tim Niemueller

Definition at line 36 of file fuse_imagelist_content.h.

Constructor & Destructor Documentation

◆ FuseImageListContent() [1/2]

firevision::FuseImageListContent::FuseImageListContent ( )

Constructor.

Creates an empty list.

Definition at line 51 of file fuse_imagelist_content.cpp.

◆ FuseImageListContent() [2/2]

firevision::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
typemessage type, must be FUSE_MT_IMAGE_LIST
payloadpayload
payload_sizesize of payload
Exceptions
TypeMismatchExceptionthrown if the type is not FUSE_MT_IMAGE_LIST

Definition at line 67 of file fuse_imagelist_content.cpp.

References firevision::FUSE_imagelist_message_t::image_list.

◆ ~FuseImageListContent()

firevision::FuseImageListContent::~FuseImageListContent ( )

Destructor.

Definition at line 81 of file fuse_imagelist_content.cpp.

Member Function Documentation

◆ add_imageinfo()

void firevision::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_idimage ID
colorspacecolorspace
pixel_widthwidth of image in pixels
pixel_heightheight of image in pixels

Definition at line 96 of file fuse_imagelist_content.cpp.

References firevision::FUSE_imageinfo_t::buffer_size, firevision::FUSE_imageinfo_t::colorspace, firevision::FUSE_imageinfo_t::height, firevision::FUSE_imageinfo_t::image_id, and firevision::FUSE_imageinfo_t::width.

Referenced by firevision::FuseServerClientThread::process_getimagelist_message().

◆ has_next()

bool firevision::FuseImageListContent::has_next ( )

Check if another image info is available.

Returns
true if another image info is available, false otherwise

Definition at line 124 of file fuse_imagelist_content.cpp.

Referenced by firevision::FuseImageListWidget::fuse_inbound_received(), firevision::NetworkCamera::fuse_inbound_received(), and FireVisionNetworkTool::fuse_inbound_received().

◆ next()

FUSE_imageinfo_t * firevision::FuseImageListContent::next ( )

Get next image info.

Returns
next image info
Exceptions
TypeMismatchExceptionthrown if the content contained invalid data
OutOfBoundsExceptionthrown if no more data is available

Definition at line 136 of file fuse_imagelist_content.cpp.

Referenced by firevision::FuseImageListWidget::fuse_inbound_received(), firevision::NetworkCamera::fuse_inbound_received(), and FireVisionNetworkTool::fuse_inbound_received().

◆ reset_iterator()

void firevision::FuseImageListContent::reset_iterator ( )

Reset iterator.

Definition at line 114 of file fuse_imagelist_content.cpp.

◆ serialize()

void firevision::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 firevision::FuseMessageContent.

Definition at line 150 of file fuse_imagelist_content.cpp.


The documentation for this class was generated from the following files: