Fawkes API  Fawkes Development Version
FireVisionNetworkTool Class Reference

FireVision Network Tool. More...

Inheritance diagram for FireVisionNetworkTool:

Public Member Functions

 FireVisionNetworkTool (ArgumentParser *argp)
 Constructor. More...
 
void fuse_invalid_server_version (uint32_t local_version, uint32_t remote_version) throw ()
 Invalid version string received. More...
 
virtual void fuse_connection_established () throw ()
 Connection has been established. More...
 
virtual void fuse_connection_died () throw ()
 Connection died. More...
 
virtual void fuse_inbound_received (FuseNetworkMessage *m) throw ()
 Message received. More...
 
virtual void all_for_now ()
 All results have been retrieved. More...
 
virtual void cache_exhausted ()
 Cache exhausted. More...
 
virtual void browse_failed (const char *name, const char *type, const char *domain)
 Failed to browse for a given service. More...
 
virtual void service_added (const char *name, const char *type, const char *domain, const char *host_name, const char *interface, const struct sockaddr *addr, const socklen_t addr_size, uint16_t port, std::list< std::string > &txt, int flags)
 A service has been announced on the network. More...
 
virtual void service_removed (const char *name, const char *type, const char *domain)
 A service has been removed from the network. More...
 
void print_usage ()
 Print usage message. More...
 
void get_image (const char *image_id, bool jpeg)
 Request image. More...
 
void get_colormap (const char *lut_id)
 Request LUT. More...
 
void set_colormap (const char *lut_id)
 Upload LUT. More...
 
void show_all ()
 Show all images and LUTs. More...
 
void explore_network ()
 Explore network. More...
 
void run ()
 Run. More...
 
- Public Member Functions inherited from firevision::FuseClientHandler
virtual ~FuseClientHandler ()
 Destructor. More...
 
- Public Member Functions inherited from fawkes::ServiceBrowseHandler
virtual ~ServiceBrowseHandler ()
 Virtual destructor. More...
 

Detailed Description

FireVision Network Tool.

Definition at line 58 of file net.cpp.

Constructor & Destructor Documentation

◆ FireVisionNetworkTool()

FireVisionNetworkTool::FireVisionNetworkTool ( ArgumentParser argp)
inline

Constructor.

Parameters
argpargument parser

Definition at line 66 of file net.cpp.

Member Function Documentation

◆ all_for_now()

virtual void FireVisionNetworkTool::all_for_now ( )
inlinevirtual

All results have been retrieved.

If you read the DNS-SD specs you will see that there is no explicit "not existent" or "end of records" message - it cannot be. But after some time it is assumed that there are no more records. If that is the case this method is called.

Implements fawkes::ServiceBrowseHandler.

Definition at line 230 of file net.cpp.

◆ browse_failed()

virtual void FireVisionNetworkTool::browse_failed ( const char *  name,
const char *  type,
const char *  domain 
)
inlinevirtual

Failed to browse for a given service.

Parameters
namename of the service
typetype of the service
domaindomain of the service

Implements fawkes::ServiceBrowseHandler.

Definition at line 242 of file net.cpp.

◆ cache_exhausted()

virtual void FireVisionNetworkTool::cache_exhausted ( )
inlinevirtual

Cache exhausted.

Implements fawkes::ServiceBrowseHandler.

Definition at line 238 of file net.cpp.

◆ explore_network()

void FireVisionNetworkTool::explore_network ( )
inline

Explore network.

This will query via service discovery for all Fountain instances on the local network. It will then connect to each of these and query them for existing images and lookup tables.

Definition at line 369 of file net.cpp.

◆ fuse_connection_died()

virtual void FireVisionNetworkTool::fuse_connection_died ( )
throw (
)
inlinevirtual

Connection died.

Implements firevision::FuseClientHandler.

Definition at line 87 of file net.cpp.

◆ fuse_connection_established()

virtual void FireVisionNetworkTool::fuse_connection_established ( )
throw (
)
inlinevirtual

Connection has been established.

Implements firevision::FuseClientHandler.

Definition at line 82 of file net.cpp.

◆ fuse_inbound_received()

virtual void FireVisionNetworkTool::fuse_inbound_received ( FuseNetworkMessage m)
throw (
)
inlinevirtual

Message received.

An incoming message has been received and can now be processed. Note that if you want to work on the message after this method has finished you have to reference the message by calling FuseMessage::ref()!

Parameters
mmessage to handle

Implements firevision::FuseClientHandler.

Definition at line 92 of file net.cpp.

References firevision::ColormapFile::add_colormap(), fawkes::Exception::append(), firevision::FuseLutContent::buffer(), firevision::FuseImageContent::buffer(), firevision::FuseImageContent::buffer_size(), firevision::FUSE_lutinfo_t::bytes_per_cell, firevision::FuseImageContent::colorspace(), firevision::FUSE_imageinfo_t::colorspace, firevision::FuseLutContent::depth(), firevision::FUSE_lutinfo_t::depth, firevision::FuseImageContent::format(), firevision::FuseImageListContent::has_next(), firevision::FuseLutListContent::has_next(), firevision::FuseLutContent::height(), firevision::FUSE_imageinfo_t::height, firevision::FUSE_lutinfo_t::height, firevision::FUSE_imageinfo_t::image_id, firevision::FUSE_lutdesc_message_t::lut_id, firevision::FUSE_lutinfo_t::lut_id, firevision::FuseImageListContent::next(), firevision::FuseLutListContent::next(), firevision::FuseImageContent::pixel_height(), firevision::FuseImageContent::pixel_width(), fawkes::Exception::print_trace(), firevision::YuvColormap::set(), firevision::FuseLutContent::width(), firevision::FUSE_imageinfo_t::width, firevision::FUSE_lutinfo_t::width, firevision::FvRawWriter::write(), and firevision::FireVisionDataFile::write().

◆ fuse_invalid_server_version()

void FireVisionNetworkTool::fuse_invalid_server_version ( uint32_t  local_version,
uint32_t  remote_version 
)
throw (
)
inlinevirtual

Invalid version string received.

The remote end has a different incompatible FUSE version.

Parameters
local_versionversion that the FuseClient speaks
remote_versionversion that the remote FUSE server speaks.

Implements firevision::FuseClientHandler.

Definition at line 74 of file net.cpp.

◆ get_colormap()

void FireVisionNetworkTool::get_colormap ( const char *  lut_id)
inline

Request LUT.

Parameters
lut_idLUT ID.

Definition at line 330 of file net.cpp.

References firevision::FUSE_lutdesc_message_t::lut_id.

◆ get_image()

void FireVisionNetworkTool::get_image ( const char *  image_id,
bool  jpeg 
)
inline

Request image.

Parameters
image_idImage ID.
jpegif true JPEG images are requested, raw images otherwise

Definition at line 317 of file net.cpp.

References firevision::FUSE_imagereq_message_t::format, and firevision::FUSE_imagereq_message_t::image_id.

◆ print_usage()

void FireVisionNetworkTool::print_usage ( )
inline

Print usage message.

Definition at line 293 of file net.cpp.

◆ run()

void FireVisionNetworkTool::run ( )
inline

Run.

Definition at line 398 of file net.cpp.

References run().

Referenced by run().

◆ service_added()

virtual void FireVisionNetworkTool::service_added ( const char *  name,
const char *  type,
const char *  domain,
const char *  host_name,
const char *  interface,
const struct sockaddr *  addr,
const socklen_t  addr_size,
uint16_t  port,
std::list< std::string > &  txt,
int  flags 
)
inlinevirtual

A service has been announced on the network.

Parameters
namename of the service
typetype of the service
domaindomain of the service
host_namename of the host that provides the service
interfacename of network interface to reach service
addrpointer to sockaddr struct of appropriate type for address
addr_sizesize of addr struct
portport of the service
txtlist of txt records.
flagsextra flags, see Avahi documentation

Implements fawkes::ServiceBrowseHandler.

Definition at line 249 of file net.cpp.

References fawkes::c_blue, and fawkes::c_normal.

◆ service_removed()

virtual void FireVisionNetworkTool::service_removed ( const char *  name,
const char *  type,
const char *  domain 
)
inlinevirtual

A service has been removed from the network.

Parameters
namename of the service
typetype of the service
domaindomain of the service

Implements fawkes::ServiceBrowseHandler.

Definition at line 285 of file net.cpp.

◆ set_colormap()

void FireVisionNetworkTool::set_colormap ( const char *  lut_id)
inline

◆ show_all()

void FireVisionNetworkTool::show_all ( )
inline

Show all images and LUTs.

Definition at line 357 of file net.cpp.


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