Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes
prosilica::Camera Class Reference

#include <prosilica.h>

List of all members.

Public Member Functions

 Camera (unsigned long guid, size_t bufferSize=DEFAULT_BUFFER_SIZE)
 Camera (const char *ip_address, size_t bufferSize=DEFAULT_BUFFER_SIZE)
void getAttribute (const std::string &name, tPvUint32 &value)
void getAttribute (const std::string &name, tPvFloat32 &value)
void getAttribute (const std::string &name, std::string &value)
void getAttributeEnum (const std::string &name, std::string &value)
 General get/set attribute functions.
unsigned long getMaxDataRate ()
tPvFrame * grab (unsigned long timeout_ms=PVINFINITE)
unsigned long guid ()
tPvHandle handle ()
 Get raw PvApi camera handle.
bool hasAttribute (const std::string &name)
 Returns true if camera supports the attribute.
void readUserMemory (char *data, size_t size)
void runCommand (const std::string &name)
void setAttribute (const std::string &name, tPvUint32 value)
void setAttribute (const std::string &name, tPvFloat32 value)
void setAttribute (const std::string &name, const std::string &value)
void setAttributeEnum (const std::string &name, const std::string &value)
void setBinning (unsigned int binning_x=1, unsigned int binning_y=1)
void setExposure (unsigned int val, AutoSetting isauto=Manual)
void setFrameCallback (boost::function< void(tPvFrame *)> callback)
 Must be used before calling start() in a non-triggered mode.
void setGain (unsigned int val, AutoSetting isauto=Manual)
void setRoi (unsigned int x, unsigned int y, unsigned int width, unsigned int height)
void setRoiToWholeFrame ()
void setWhiteBalance (unsigned int blue, unsigned int red, AutoSetting isauto=Manual)
void start (FrameStartTriggerMode=Freerun, AcquisitionMode=Continuous)
 Start capture.
void stop ()
 Stop capture.
void writeUserMemory (const char *data, size_t size)
 ~Camera ()

Static Public Attributes

static const size_t DEFAULT_BUFFER_SIZE = 4
static const unsigned long GIGE_MAX_DATA_RATE = 115000000
static const size_t USER_MEMORY_SIZE = 512
 Data must have size <= USER_MEMORY_SIZE bytes.

Private Member Functions

void setup ()

Static Private Member Functions

static void frameDone (tPvFrame *frame)

Private Attributes

AcquisitionMode Amode_
size_t bufferSize_
boost::mutex frameMutex_
tPvFrame * frames_
tPvUint32 frameSize_
FrameStartTriggerMode FSTmode_
tPvHandle handle_
boost::function< void(tPvFrame *) userCallback_ )

Detailed Description

Definition at line 94 of file prosilica.h.


Constructor & Destructor Documentation

prosilica::Camera::Camera ( unsigned long  guid,
size_t  bufferSize = DEFAULT_BUFFER_SIZE 
)

Definition at line 138 of file prosilica.cpp.

prosilica::Camera::Camera ( const char *  ip_address,
size_t  bufferSize = DEFAULT_BUFFER_SIZE 
)

Definition at line 147 of file prosilica.cpp.

Definition at line 192 of file prosilica.cpp.


Member Function Documentation

void prosilica::Camera::frameDone ( tPvFrame *  frame) [static, private]

Definition at line 517 of file prosilica.cpp.

void prosilica::Camera::getAttribute ( const std::string &  name,
tPvUint32 &  value 
)

Definition at line 420 of file prosilica.cpp.

void prosilica::Camera::getAttribute ( const std::string &  name,
tPvFloat32 &  value 
)

Definition at line 428 of file prosilica.cpp.

void prosilica::Camera::getAttribute ( const std::string &  name,
std::string &  value 
)

Definition at line 435 of file prosilica.cpp.

void prosilica::Camera::getAttributeEnum ( const std::string &  name,
std::string &  value 
)

General get/set attribute functions.

Definition at line 414 of file prosilica.cpp.

Definition at line 483 of file prosilica.cpp.

tPvFrame * prosilica::Camera::grab ( unsigned long  timeout_ms = PVINFINITE)

Capture a single frame from the camera. Must be called after start(Software Triggered).

Todo:
This is a hack, it seems that re-commanding the software trigger too quickly may cause the Prosilica driver to complain that the sequence of API calls is incorrect.

Definition at line 253 of file prosilica.cpp.

unsigned long prosilica::Camera::guid ( )

Definition at line 475 of file prosilica.cpp.

Get raw PvApi camera handle.

Definition at line 540 of file prosilica.cpp.

bool prosilica::Camera::hasAttribute ( const std::string &  name)

Returns true if camera supports the attribute.

Definition at line 392 of file prosilica.cpp.

void prosilica::Camera::readUserMemory ( char *  data,
size_t  size 
)

Definition at line 505 of file prosilica.cpp.

void prosilica::Camera::runCommand ( const std::string &  name)

Definition at line 469 of file prosilica.cpp.

void prosilica::Camera::setAttribute ( const std::string &  name,
tPvUint32  value 
)

Definition at line 448 of file prosilica.cpp.

void prosilica::Camera::setAttribute ( const std::string &  name,
tPvFloat32  value 
)

Definition at line 455 of file prosilica.cpp.

void prosilica::Camera::setAttribute ( const std::string &  name,
const std::string &  value 
)

Definition at line 462 of file prosilica.cpp.

void prosilica::Camera::setAttributeEnum ( const std::string &  name,
const std::string &  value 
)

Definition at line 441 of file prosilica.cpp.

void prosilica::Camera::setBinning ( unsigned int  binning_x = 1,
unsigned int  binning_y = 1 
)

Definition at line 380 of file prosilica.cpp.

void prosilica::Camera::setExposure ( unsigned int  val,
AutoSetting  isauto = Manual 
)

Definition at line 308 of file prosilica.cpp.

void prosilica::Camera::setFrameCallback ( boost::function< void(tPvFrame *)>  callback)

Must be used before calling start() in a non-triggered mode.

Definition at line 206 of file prosilica.cpp.

void prosilica::Camera::setGain ( unsigned int  val,
AutoSetting  isauto = Manual 
)
Todo:
Here and in setWhiteBalance, would be better to split off setGainMode etc. I didn't take into account there are cameras that don't support auto gain, auto white balance.

Definition at line 318 of file prosilica.cpp.

void prosilica::Camera::setRoi ( unsigned int  x,
unsigned int  y,
unsigned int  width,
unsigned int  height 
)

Definition at line 350 of file prosilica.cpp.

Definition at line 363 of file prosilica.cpp.

void prosilica::Camera::setup ( ) [private]

Definition at line 158 of file prosilica.cpp.

void prosilica::Camera::setWhiteBalance ( unsigned int  blue,
unsigned int  red,
AutoSetting  isauto = Manual 
)

Definition at line 333 of file prosilica.cpp.

Start capture.

Todo:
verify this assert again
Todo:
take this one also as an argument

Definition at line 211 of file prosilica.cpp.

Stop capture.

Definition at line 242 of file prosilica.cpp.

void prosilica::Camera::writeUserMemory ( const char *  data,
size_t  size 
)

Definition at line 493 of file prosilica.cpp.


Member Data Documentation

Definition at line 159 of file prosilica.h.

Definition at line 157 of file prosilica.h.

const size_t prosilica::Camera::DEFAULT_BUFFER_SIZE = 4 [static]

Definition at line 97 of file prosilica.h.

boost::mutex prosilica::Camera::frameMutex_ [private]

Definition at line 161 of file prosilica.h.

tPvFrame* prosilica::Camera::frames_ [private]

Definition at line 155 of file prosilica.h.

tPvUint32 prosilica::Camera::frameSize_ [private]

Definition at line 156 of file prosilica.h.

Definition at line 158 of file prosilica.h.

const unsigned long prosilica::Camera::GIGE_MAX_DATA_RATE = 115000000 [static]

Definition at line 143 of file prosilica.h.

tPvHandle prosilica::Camera::handle_ [private]

Definition at line 154 of file prosilica.h.

const size_t prosilica::Camera::USER_MEMORY_SIZE = 512 [static]

Data must have size <= USER_MEMORY_SIZE bytes.

Definition at line 146 of file prosilica.h.

boost::function<void (tPvFrame*) prosilica::Camera::userCallback_) [private]

Definition at line 160 of file prosilica.h.


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


prosilica_camera
Author(s): Maintained by William Woodall - wwoodall@willowgarage.com
autogenerated on Mon Oct 6 2014 03:56:56