prosilica::Camera Class Reference

#include <prosilica.h>

List of all members.

Public Member Functions

 Camera (const char *ip_address, size_t bufferSize=DEFAULT_BUFFER_SIZE)
 Camera (unsigned long guid, size_t bufferSize=DEFAULT_BUFFER_SIZE)
void getAttribute (const std::string &name, std::string &value)
void getAttribute (const std::string &name, tPvFloat32 &value)
void getAttribute (const std::string &name, tPvUint32 &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.
void readUserMemory (char *data, size_t size)
void runCommand (const std::string &name)
void setAttribute (const std::string &name, const std::string &value)
void setAttribute (const std::string &name, tPvFloat32 value)
void setAttribute (const std::string &name, tPvUint32 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 91 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.

prosilica::Camera::~Camera (  ) 

Definition at line 192 of file prosilica.cpp.


Member Function Documentation

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

Definition at line 508 of file prosilica.cpp.

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

Definition at line 426 of file prosilica.cpp.

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

Definition at line 419 of file prosilica.cpp.

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

Definition at line 411 of file prosilica.cpp.

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

General get/set attribute functions.

Definition at line 405 of file prosilica.cpp.

unsigned long prosilica::Camera::getMaxDataRate (  ) 

Definition at line 474 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 466 of file prosilica.cpp.

tPvHandle prosilica::Camera::handle (  ) 

Get raw PvApi camera handle.

Definition at line 531 of file prosilica.cpp.

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

Definition at line 496 of file prosilica.cpp.

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

Definition at line 460 of file prosilica.cpp.

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

Definition at line 453 of file prosilica.cpp.

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

Definition at line 446 of file prosilica.cpp.

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

Definition at line 439 of file prosilica.cpp.

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

Definition at line 432 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.

void prosilica::Camera::setRoiToWholeFrame (  ) 

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.

void prosilica::Camera::start ( FrameStartTriggerMode  fmode = Freerun,
AcquisitionMode  amode = Continuous 
)

Start capture.

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

Definition at line 211 of file prosilica.cpp.

void prosilica::Camera::stop (  ) 

Stop capture.

Definition at line 242 of file prosilica.cpp.

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

Definition at line 484 of file prosilica.cpp.


Member Data Documentation

Definition at line 153 of file prosilica.h.

Definition at line 151 of file prosilica.h.

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

Definition at line 94 of file prosilica.h.

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

Definition at line 155 of file prosilica.h.

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

Definition at line 149 of file prosilica.h.

tPvUint32 prosilica::Camera::frameSize_ [private]

Definition at line 150 of file prosilica.h.

Definition at line 152 of file prosilica.h.

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

Definition at line 137 of file prosilica.h.

tPvHandle prosilica::Camera::handle_ [private]

Definition at line 148 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 140 of file prosilica.h.

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

Definition at line 154 of file prosilica.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


prosilica_camera
Author(s): Patrick Mihelich
autogenerated on Fri Jan 11 09:55:12 2013