Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
Trigger Class Reference

#include <trigger.h>

List of all members.

Public Member Functions

bool enumSources (dc1394camera_t *camera, dc1394trigger_sources_t &sources)
 externalTriggerPowerState_ (DC1394_OFF)
dc1394switch_t getExternalTriggerPowerState (dc1394camera_t *camera)
dc1394trigger_mode_t getMode (dc1394camera_t *camera)
dc1394trigger_polarity_t getPolarity (dc1394camera_t *camera)
dc1394switch_t getSoftwareTriggerPowerState (dc1394camera_t *camera)
dc1394trigger_source_t getSource (dc1394camera_t *camera)
bool initialize (Config *newconfig)
bool isPowered ()
bool reconfigure (Config *newconfig)
bool setExternalTriggerPowerState (dc1394camera_t *camera, dc1394switch_t &state)
bool setMode (dc1394camera_t *camera, dc1394trigger_mode_t &mode)
bool setPolarity (dc1394camera_t *camera, dc1394trigger_polarity_t &polarity)
bool setSoftwareTriggerPowerState (dc1394camera_t *camera, dc1394switch_t &state)
bool setSource (dc1394camera_t *camera, dc1394trigger_source_t &source)
 Trigger (dc1394camera_t *camera)
const std::string triggerModeName (dc1394trigger_mode_t mode)
const std::string triggerPolarityName (dc1394trigger_polarity_t polarity)
const std::string triggerSourceName (dc1394trigger_source_t source)

Private Member Functions

bool checkTriggerSource (dc1394trigger_source_t source)
bool findTriggerMode (std::string str)
bool findTriggerPolarity (std::string str)
bool findTriggerSource (std::string str)

Private Attributes

dc1394camera_t * camera_
dc1394switch_t externalTriggerPowerState_
dc1394trigger_mode_t triggerMode_
dc1394trigger_polarity_t triggerPolarity_
dc1394trigger_source_t triggerSource_
dc1394trigger_sources_t triggerSources_

Static Private Attributes

static const std::string trigger_mode_names_ [DC1394_TRIGGER_MODE_NUM]
 driver parameter names, corresponding to DC1394 trigger modes
static const std::string trigger_polarity_names_ [DC1394_TRIGGER_ACTIVE_NUM] = {"active_low", "active_high", }
 driver parameter names, corresponding to DC1394 trigger sources
static const std::string trigger_source_names_ [DC1394_TRIGGER_SOURCE_NUM]
 driver parameter names, corresponding to DC1394 trigger sources

Detailed Description

Definition at line 55 of file trigger.h.


Constructor & Destructor Documentation

Trigger::Trigger ( dc1394camera_t *  camera) [inline]

Constructor

Parameters:
cameraaddress of DC1394 camera structure.

Definition at line 84 of file trigger.h.


Member Function Documentation

bool Trigger::checkTriggerSource ( dc1394trigger_source_t  source) [private]

Definition at line 115 of file trigger.cpp.

bool Trigger::enumSources ( dc1394camera_t *  camera,
dc1394trigger_sources_t &  sources 
)

Get supported external trigger sources.

Parameters:
camerapoints to DC1394 camera struct
Returns:
true if successful

Definition at line 128 of file trigger.cpp.

Trigger::externalTriggerPowerState_ ( DC1394_OFF  ) [inline]

Definition at line 85 of file trigger.h.

bool Trigger::findTriggerMode ( std::string  str) [private]

Definition at line 52 of file trigger.cpp.

bool Trigger::findTriggerPolarity ( std::string  str) [private]

Definition at line 100 of file trigger.cpp.

bool Trigger::findTriggerSource ( std::string  str) [private]

Definition at line 79 of file trigger.cpp.

dc1394switch_t Trigger::getExternalTriggerPowerState ( dc1394camera_t *  camera)

Get external trigger power state.

Parameters:
camerapoints to DC1394 camera struct.
Returns:
DC1394_ON for external trigger; DC1394_OFF for internal trigger.

Definition at line 236 of file trigger.cpp.

dc1394trigger_mode_t Trigger::getMode ( dc1394camera_t *  camera)

Get current trigger mode.

Parameters:
camerapoints to DC1394 camera struct.
Returns:
corresponding dc1394trigger_mode_t enum value selected, if successful; DC1394_TRIGGER_MODE_NUM if not.

Definition at line 325 of file trigger.cpp.

dc1394trigger_polarity_t Trigger::getPolarity ( dc1394camera_t *  camera)

Get external trigger polarity.

Parameters:
camerapoints to DC1394 camera struct.
Returns:
corresponding dc1394trigger_polarity_t enum value selected, if successful; DC1394_TRIGGER_ACTIVE_NUM if not.

Definition at line 159 of file trigger.cpp.

dc1394switch_t Trigger::getSoftwareTriggerPowerState ( dc1394camera_t *  camera)

Get software trigger power state.

Parameters:
camerapoints to DC1394 camera struct.
Returns:
DC1394_ON if software trigger is on; DC1394_OFF if not.

Definition at line 281 of file trigger.cpp.

dc1394trigger_source_t Trigger::getSource ( dc1394camera_t *  camera)

Get current trigger source.

Parameters:
camerapoints to DC1394 camera struct.
Returns:
corresponding dc1394trigger_source_t enum value selected, if successful; DC1394_TRIGGER_SOURCE_NUM if not.

Definition at line 370 of file trigger.cpp.

bool Trigger::initialize ( Config newconfig)

enumerates trigger sources and configures triggering parameters according to config values

Parameters:
newconfig[in,out] configuration parameters, updated to conform with device restrictions.
Returns:
true if successful; false if not

Definition at line 508 of file trigger.cpp.

bool Trigger::isPowered ( ) [inline]

Checks whether external trigger power is ON or OFF. This method uses cached value, which is updated every time the settings are changed by user

Returns:
true if external trigger power is ON; false if not

Definition at line 133 of file trigger.h.

bool Trigger::reconfigure ( Config newconfig)

reconfigures triggering parameters according to config values

Parameters:
newconfig[in,out] configuration parameters, updated to conform with device restrictions.
Returns:
true if successful; false if not

Definition at line 417 of file trigger.cpp.

bool Trigger::setExternalTriggerPowerState ( dc1394camera_t *  camera,
dc1394switch_t &  state 
)

Set external trigger power state.

Parameters:
camerapoints to DC1394 camera struct
[in,out]stateConfig parameter for this option, updated if the camera does not support the requested value
Returns:
true if set successfully, false if not.

Definition at line 257 of file trigger.cpp.

bool Trigger::setMode ( dc1394camera_t *  camera,
dc1394trigger_mode_t &  mode 
)

Set external trigger mode.

Parameters:
camerapoints to DC1394 camera struct
[in,out]modeConfig parameter for this option, updated if the camera does not support the requested value
Returns:
true if set successfully, false if not.

Definition at line 346 of file trigger.cpp.

bool Trigger::setPolarity ( dc1394camera_t *  camera,
dc1394trigger_polarity_t &  polarity 
)

Set external trigger polarity.

Parameters:
camerapoints to DC1394 camera struct
[in,out]polarityConfig parameter for this option, updated if the camera does not support the requested value
Returns:
true if polarity set successfully, false if not.

Definition at line 196 of file trigger.cpp.

bool Trigger::setSoftwareTriggerPowerState ( dc1394camera_t *  camera,
dc1394switch_t &  state 
)

Set software trigger power state.

Parameters:
camerapoints to DC1394 camera struct
[in,out]stateConfig parameter for this option, updated if the camera does not support the requested value
Returns:
true if set successfully, false if not.

Definition at line 301 of file trigger.cpp.

bool Trigger::setSource ( dc1394camera_t *  camera,
dc1394trigger_source_t &  source 
)

Set external trigger source.

Parameters:
camerapoints to DC1394 camera struct
[in,out]sourceConfig parameter for this option, updated if the camera does not support the requested value
Returns:
true if set successfully, false if not.

Definition at line 391 of file trigger.cpp.

const std::string Trigger::triggerModeName ( dc1394trigger_mode_t  mode) [inline]

Return driver parameter name of DC1394 trigger_mode.

Parameters:
modeDC1394 trigger mode number
Returns:
corresponding parameter name ("" if not a valid mode)

Definition at line 93 of file trigger.h.

const std::string Trigger::triggerPolarityName ( dc1394trigger_polarity_t  polarity) [inline]

Return driver parameter name of DC1394 trigger_polarity.

Parameters:
modeDC1394 trigger polarity
Returns:
corresponding parameter name ("" if not a valid mode)

Definition at line 119 of file trigger.h.

const std::string Trigger::triggerSourceName ( dc1394trigger_source_t  source) [inline]

Return driver parameter name of DC1394 trigger_source.

Parameters:
modeDC1394 trigger source number
Returns:
corresponding parameter name ("" if not a valid mode)

Definition at line 106 of file trigger.h.


Member Data Documentation

dc1394camera_t* Trigger::camera_ [private]

Definition at line 65 of file trigger.h.

dc1394switch_t Trigger::externalTriggerPowerState_ [private]

Definition at line 72 of file trigger.h.

const std::string Trigger::trigger_mode_names_ [static, private]
Initial value:
 {"mode_0", "mode_1", "mode_2", "mode_3", "mode_4",
                                                                         "mode_5", "mode_14", "mode_15", }

driver parameter names, corresponding to DC1394 trigger modes

Definition at line 59 of file trigger.h.

const std::string Trigger::trigger_polarity_names_ = {"active_low", "active_high", } [static, private]

driver parameter names, corresponding to DC1394 trigger sources

Definition at line 63 of file trigger.h.

Initial value:
 {"source_0", "source_1", "source_2",
                                                                             "source_3", "source_software", }

driver parameter names, corresponding to DC1394 trigger sources

Definition at line 61 of file trigger.h.

dc1394trigger_mode_t Trigger::triggerMode_ [private]

Definition at line 67 of file trigger.h.

dc1394trigger_polarity_t Trigger::triggerPolarity_ [private]

Definition at line 70 of file trigger.h.

dc1394trigger_source_t Trigger::triggerSource_ [private]

Definition at line 68 of file trigger.h.

dc1394trigger_sources_t Trigger::triggerSources_ [private]

Definition at line 69 of file trigger.h.


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


camera1394stereo
Author(s): Joan Pau Beltran
autogenerated on Thu Jun 6 2019 21:29:11