Public Member Functions

firevision::NetworkCamera Class Reference

Network camera. More...

#include <>>

Inheritance diagram for firevision::NetworkCamera:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 NetworkCamera (const char *host, unsigned short port, bool jpeg=false)
 Constructor.
 NetworkCamera (const char *host, unsigned short port, const char *image_id, bool jpeg=false)
 Constructor.
 NetworkCamera (const CameraArgumentParser *cap)
 Constructor.
virtual ~NetworkCamera ()
 Destructor.
virtual void open ()
virtual void start ()
virtual void stop ()
virtual void close ()
virtual void flush ()
virtual void capture ()
virtual void print_info ()
virtual bool ready ()
virtual unsigned char * buffer ()
virtual unsigned int buffer_size ()
virtual void dispose_buffer ()
virtual unsigned int pixel_width ()
virtual unsigned int pixel_height ()
virtual colorspace_t colorspace ()
virtual void set_image_id (const char *image_id)
 Select the image that is opened.
virtual void set_image_number (unsigned int n)
virtual fawkes::Timecapture_time ()
virtual std::vector
< FUSE_imageinfo_t > & 
image_list ()
 List the available images.
virtual void fuse_invalid_server_version (uint32_t local_version, uint32_t remote_version) throw ()
 Invalid version string received.
virtual void fuse_connection_established () throw ()
 Connection has been established.
virtual void fuse_connection_died () throw ()
 Connection died.
virtual void fuse_inbound_received (FuseNetworkMessage *m) throw ()
 Message received.

Detailed Description

Network camera.

Retrieve images via network (FUSE).

See also:
FuseClient
Author:
Tim Niemueller

Definition at line 42 of file net.h.


Constructor & Destructor Documentation

firevision::NetworkCamera::NetworkCamera ( const char *  host,
unsigned short  port,
bool  jpeg = false 
)

Constructor.

Allows to initiate a NetworkCamera w/o specifying an image id. This can be done later with the set_image_id() method.

Parameters:
host host to connect to
port port to connect to
jpeg if true jpeg images will be transferred and automatically be decompressed, otherwise raw images are transferred

Definition at line 63 of file net.cpp.

firevision::NetworkCamera::NetworkCamera ( const char *  host,
unsigned short  port,
const char *  image_id,
bool  jpeg = false 
)

Constructor.

Parameters:
host host to connect to
port port to connect to
image_id image ID of image to retrieve
jpeg if true jpeg images will be transferred and automatically be decompressed, otherwise raw images are transferred

Definition at line 98 of file net.cpp.

firevision::NetworkCamera::NetworkCamera ( const CameraArgumentParser cap  ) 

Constructor.

Initialize with parameters from camera argument parser, supported values are:

  • host=HOST, hostname or IP of host to connect to
  • port=PORT, port number to connect to
  • image=ID, image ID of image to retrieve
  • jpeg=<true|false>, if true JPEGs are recieved and decompressed otherwise raw images will be transferred (raw is the default)
    Parameters:
    cap camera argument parser

Definition at line 140 of file net.cpp.

References firevision::CameraArgumentParser::get(), and firevision::CameraArgumentParser::has().

firevision::NetworkCamera::~NetworkCamera (  )  [virtual]

Destructor.

Definition at line 184 of file net.cpp.


Member Function Documentation

void firevision::NetworkCamera::fuse_connection_died (  )  throw () [virtual]

Connection died.

Implements firevision::FuseClientHandler.

Definition at line 460 of file net.cpp.

void firevision::NetworkCamera::fuse_connection_established (  )  throw () [virtual]

Connection has been established.

Implements firevision::FuseClientHandler.

Definition at line 453 of file net.cpp.

void firevision::NetworkCamera::fuse_inbound_received ( FuseNetworkMessage m  )  throw () [virtual]

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:
m message to handle

Implements firevision::FuseClientHandler.

Definition at line 467 of file net.cpp.

References firevision::FUSE_imageinfo_t::buffer_size, firevision::FUSE_imageinfo_t::colorspace, firevision::FuseImageListContent::has_next(), firevision::FUSE_imageinfo_t::height, firevision::FUSE_imageinfo_t::image_id, firevision::FuseImageListContent::next(), and firevision::FUSE_imageinfo_t::width.

void firevision::NetworkCamera::fuse_invalid_server_version ( uint32_t  local_version,
uint32_t  remote_version 
) throw () [virtual]

Invalid version string received.

The remote end has a different incompatible FUSE version.

Parameters:
local_version version that the FuseClient speaks
remote_version version that the remote FUSE server speaks.

Implements firevision::FuseClientHandler.

Definition at line 444 of file net.cpp.

std::vector< FUSE_imageinfo_t > & firevision::NetworkCamera::image_list (  )  [virtual]

List the available images.

Returns:
a vector containing information about the available images

Definition at line 429 of file net.cpp.

References firevision::FuseClient::enqueue_and_wait().

void firevision::NetworkCamera::set_image_id ( const char *  image_id  )  [virtual]

Select the image that is opened.

Parameters:
image_id the image id

Definition at line 389 of file net.cpp.

References firevision::FuseClient::enqueue_and_wait(), and firevision::FUSE_imagedesc_message_t::image_id.


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