Camera1394 Features class.
More...
#include <features.h>
|
void | configure (dc1394feature_t feature, int *control, double *value, double *value2=NULL) |
|
state_t | getState (dc1394feature_info_t *finfo) |
|
void | getValues (dc1394feature_info_t *finfo, double *value, double *value2) |
|
bool | hasMode (dc1394feature_info_t *finfo, dc1394feature_mode_t mode) |
|
bool | hasTrigger (void) |
|
bool | setMode (dc1394feature_info_t *finfo, dc1394feature_mode_t mode) |
|
void | setPower (dc1394feature_info_t *finfo, dc1394switch_t on_off) |
|
void | updateIfChanged (dc1394feature_t feature, int old_control, int *control, double old_value, double *value) |
|
void | updateIfChanged (dc1394feature_t feature, int old_control, int *control, double old_value, double *value, double old_value2, double *value2) |
|
Camera1394 Features class.
Sets IIDC features from Config updates. Tracks values and ranges, modifying configured values to those supported by the device.
Definition at line 61 of file features.h.
camera1394::Camera1394_* state values
Definition at line 76 of file features.h.
Features::Features |
( |
dc1394camera_t * |
camera | ) |
|
Constructor
- Parameters
-
camera | address of DC1394 camera structure. |
Definition at line 125 of file features.cpp.
void Features::configure |
( |
dc1394feature_t |
feature, |
|
|
int * |
control, |
|
|
double * |
value, |
|
|
double * |
value2 = NULL |
|
) |
| |
|
private |
Configure a feature for the currently open device.
- Precondition
- feature_set_ initialized
- Parameters
-
feature | desired feature number |
control | [in,out] pointer to control parameter (may change) |
value | [in,out] pointer to requested parameter value (may change depending on device restrictions) |
value2 | [in,out] optional pointer to second parameter value for white balance (may change depending on device restrictions). No second value if NULL pointer. |
The parameter values are represented as double despite the fact that most features on most cameras only allow unsigned 12-bit values. The exception is the rare feature that supports "absolute" values in 32-bit IEEE float format. Double can represent all possible option values accurately.
Definition at line 280 of file features.cpp.
Get current state of a feature from the camera.
- Precondition
- feature_set_ initialized for this camera
- Parameters
-
finfo | pointer to information for this feature |
- Returns
- current state ID
Definition at line 420 of file features.cpp.
void Features::getValues |
( |
dc1394feature_info_t * |
finfo, |
|
|
double * |
value, |
|
|
double * |
value2 |
|
) |
| |
|
private |
Get feature values.
- Precondition
- feature_set_ initialized for this camera
- Parameters
-
finfo | pointer to information for this feature |
value | [out] pointer where parameter value stored |
value2 | [out] optional pointer for second parameter value for white balance. Otherwise NULL. |
Definition at line 481 of file features.cpp.
bool Features::hasMode |
( |
dc1394feature_info_t * |
finfo, |
|
|
dc1394feature_mode_t |
mode |
|
) |
| |
|
inlineprivate |
Does this camera feature support a given mode?
- Precondition
- feature_set_ initialized for this camera
- Parameters
-
finfo | pointer to information for this feature |
mode | DC1394 mode desired |
- Returns
- true if mode supported
Definition at line 92 of file features.h.
bool Features::hasTrigger |
( |
void |
| ) |
|
|
inlineprivate |
Does this camera support triggering?
- Precondition
- feature_set_ initialized for this camera
- Returns
- true if triggering supported
Definition at line 107 of file features.h.
bool Features::initialize |
( |
Config * |
newconfig | ) |
|
Query and set all features for newly opened (or reopened) device.
- Parameters
-
newconfig | [in,out] configuration parameters, updated to conform with device restrictions. |
- Returns
- true if successful
- Postcondition
- feature_set_ initialized, if successful
-
oldconfig_ settings available, if successful
Definition at line 140 of file features.cpp.
bool Features::isTriggerPowered |
( |
| ) |
|
|
inline |
void Features::reconfigure |
( |
Config * |
newconfig | ) |
|
Reconfigure features for already open device.
For each supported feature that has changed, update the device.
- Precondition
- feature_set_ initialized
-
oldconfig_ has previous settings
- Parameters
-
newconfig | [in,out] configuration parameters, may be updated to conform with device restrictions. |
- Postcondition
- oldconfig_ settings updated
Definition at line 202 of file features.cpp.
bool Features::setMode |
( |
dc1394feature_info_t * |
finfo, |
|
|
dc1394feature_mode_t |
mode |
|
) |
| |
|
private |
Set mode for a feature.
- Precondition
- feature_set_ initialized for this camera
- Parameters
-
finfo | pointer to information for this feature |
mode | DC1394 mode desired |
- Returns
- true if mode set successfully
Definition at line 571 of file features.cpp.
void Features::setPower |
( |
dc1394feature_info_t * |
finfo, |
|
|
dc1394switch_t |
on_off |
|
) |
| |
|
private |
Set power for a feature On or Off.
- Precondition
- feature_set_ initialized for this camera
- Parameters
-
finfo | pointer to information for this feature |
on_off | either DC1394_ON or DC1394_OFF |
Definition at line 606 of file features.cpp.
void Features::updateIfChanged |
( |
dc1394feature_t |
feature, |
|
|
int |
old_control, |
|
|
int * |
control, |
|
|
double |
old_value, |
|
|
double * |
value |
|
) |
| |
|
private |
Update a feature for the currently open device, if changed.
Normal version: for features with one value parameter.
- Precondition
- feature_set_ initialized
-
oldconfig_ has previous settings
- Parameters
-
feature | desired feature number |
old_control | previous control parameter setting |
control | [in,out] pointer to control parameter (may change) |
old_value | previous parameter value |
value | [in,out] pointer to requested parameter value (may change depending on device restrictions) |
Definition at line 642 of file features.cpp.
void Features::updateIfChanged |
( |
dc1394feature_t |
feature, |
|
|
int |
old_control, |
|
|
int * |
control, |
|
|
double |
old_value, |
|
|
double * |
value, |
|
|
double |
old_value2, |
|
|
double * |
value2 |
|
) |
| |
|
private |
Update a feature for the currently open device, if changed.
Special version: for White Balance feature with two value parameters.
- Precondition
- feature_set_ initialized
-
oldconfig_ has previous settings
- Parameters
-
feature | desired feature number |
old_control | previous control parameter setting |
control | [in,out] pointer to control parameter (may change) |
old_value | previous parameter value |
value | [in,out] pointer to requested parameter value (may change depending on device restrictions) |
old_value2 | previous second parameter value |
value2 | [in,out] pointer to requested second parameter value (may change depending on device restrictions). |
Definition at line 669 of file features.cpp.
dc1394camera_t* Features::camera_ |
|
private |
dc1394featureset_t Features::feature_set_ |
|
private |
that camera's feature set
Definition at line 127 of file features.h.
previous Config settings
Definition at line 128 of file features.h.
The documentation for this class was generated from the following files:
camera1394
Author(s): Jack O'Quin, Ken Tossell, Patrick Beeson, Nate Koenig, Andrew Howard, Damien Douxchamps, Dan Dennedy
autogenerated on Mon Jun 10 2019 12:52:31