rec::robotino::com::Camera Class Reference

Represents a camera. More...

#include <Camera.h>

List of all members.

Public Member Functions

void setStreaming (bool streaming)
bool isStreaming () const
void setResolution (unsigned int width, unsigned int height)
void resolution (unsigned int *width, unsigned int *height) const
virtual void imageReceivedEvent (const unsigned char *data, unsigned int dataSize, unsigned int width, unsigned int height, unsigned int numChannels, unsigned int bitsPerChannel, unsigned int step)


Detailed Description

Represents a camera.

Member Function Documentation

void rec::robotino::com::Camera::setStreaming ( bool  streaming  ) 

Turns the streaming on and off. Call this after connecting this object to a com object by calling setComId.

Parameters:
streaming TRUE to turn streaming on.
Exceptions:
RobotinoException If an error occured.

bool rec::robotino::com::Camera::isStreaming (  )  const

Checks if streaming is enabled.

Returns:
TRUE if streaming is enabled.
Exceptions:
nothing. 

void rec::robotino::com::Camera::setResolution ( unsigned int  width,
unsigned int  height 
)

Sets this camera to the given resolution (if possible)

Parameters:
width Requested image width
height Requested image height
Exceptions:
RobotinoException if given com object is invalid.

void rec::robotino::com::Camera::resolution ( unsigned int *  width,
unsigned int *  height 
) const

Returns the width and height set by setResolution

Parameters:
width Set to the currently requested image width
height Set to the currently requested image height
Exceptions:
RobotinoException if given com object is invalid.

virtual void rec::robotino::com::Camera::imageReceivedEvent ( const unsigned char *  data,
unsigned int  dataSize,
unsigned int  width,
unsigned int  height,
unsigned int  numChannels,
unsigned int  bitsPerChannel,
unsigned int  step 
) [virtual]

Called when an image is received. Note: If Com is not initialized with useQueuedCallback=true this function is called from outside the applications main thread. This is extremely important particularly with regard to GUI applications.

Parameters:
imageData Contains the image data. You must not delete this buffer. Instead you should make a copy of this buffer within this function call.
dataSize Is the size of the jpeg data buffer.
width The number of pixels per line
height The number of lines
numChannels The number of channels
numBitsPerChannel The number of bits per channel
step The number of bytes per line. This is normally width * numChannels.
Exceptions:
nothing. 


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

Generated on Thu Dec 30 08:47:33 2010 for rec_robotino_com_c by  doxygen 1.5.5