OCameraOutputs Class Reference

#include <OCamera.h>

List of all members.


Detailed Description

Basic class for access to the digital outputs of the camera.

All outputs keep their states beyond destruction of the interface.

Example Usage
  1. create interface with poCreateInterface()
  2. open it with iOpen()
  3. work with the outputs using
  1. after work close interface with iClose()
  2. if interface is no longer needed call Destroy()

Public Types

enum  t_enCameraOutput {
  OUTPUT_O0 = 1, OUTPUT_O1 = 2, OUTPUT_O2 = 4, OUTPUT_O3 = 8,
  OUTPUT_OVERLOAD_UNLOCK = 16, OUTPUT_ALL = OUTPUT_O0 | OUTPUT_O1 | OUTPUT_O2 | OUTPUT_O3
}
 digital camera outputs More...

Public Member Functions

virtual void Destroy ()=0
 Removes completely the outputs interface object created with poCreateInterface().
virtual int iClose ()=0
 Defined cleanup after the work with the digital outputs has been finished.
virtual int iGetOutput (t_enCameraOutput enOut)=0
 Returns the state of one digital output.
virtual int iGetOutputs ()=0
 Returns the state of all digital outputs.
virtual int iOpen ()=0
 Grants the access to the camera's digital outputs.
virtual int iSetOutput (t_enCameraOutput enOut, int iState)=0
 Set one digital output to a defined state.
virtual int iSetOutputs (int iMask, int iState)=0
 Set one, several or all of the digital outputs.
virtual int iToggleOutput (t_enCameraOutput enOut)=0
 Toggle the current state of one digital outputs.
virtual int iToggleOutputs (int iMask)=0
 Toggle the current state of one, several or all digital outputs.

Static Public Member Functions

static OCameraOutputspoCreateInterface ()
 Call this method to obtain a pointer to the outputs interface.

Member Enumeration Documentation

digital camera outputs

Enumerator:
OUTPUT_O0  digital output nr 0 (pink cable)
OUTPUT_O1  digital output nr 1 (yellow cable)
OUTPUT_O2  digital output nr 2 (red cable)
OUTPUT_O3  digital output nr 3 (NOT USED)
OUTPUT_OVERLOAD_UNLOCK  virtual output to unlock an overcurrent situation
OUTPUT_ALL  all outputs (nr 0 to nr 3)


Member Function Documentation

virtual void OCameraOutputs::Destroy (  )  [pure virtual]

Removes completely the outputs interface object created with poCreateInterface().

This should happen after iClose() was called and the interface is no longer needed.
Does NOT affect the actual states of the outputs.
Be careful to DO NOT USE THE INTERFACE POINTER any longer after having called this method!!

virtual int OCameraOutputs::iClose (  )  [pure virtual]

Defined cleanup after the work with the digital outputs has been finished.

Does NOT affect the actual states of the outputs.

virtual int OCameraOutputs::iGetOutput ( t_enCameraOutput  enOut  )  [pure virtual]

Returns the state of one digital output.

This call never blocks.

Parameters:
enOut bitmask for one digital output
Returns:
0 ... digital output is logic low
1 ... digital output is logic high
-errno ... on failure always negative (see errno.h)

virtual int OCameraOutputs::iGetOutputs (  )  [pure virtual]

Returns the state of all digital outputs.

Use the OCameraOutputs::t_enCameraOutput bitmasks to ask for the state of individual digital outputs.
This call never blocks.

Returns:
>= 0 ... value of all digital outputs acc. to OCameraOutputs::t_enCameraOutput
-errno ... on failure always negative (see errno.h)

virtual int OCameraOutputs::iOpen (  )  [pure virtual]

Grants the access to the camera's digital outputs.

Has to be called PRIOR to use any subsequent call to the OCameraOutputs interface.
When work with digital outputs is finished, the user should call iClose() for cleanup.
Does NOT affect the actual states of the outputs.

Returns:
< 0 ... on failure, usage of digital inputs is not available

virtual int OCameraOutputs::iSetOutput ( t_enCameraOutput  enOut,
int  iState 
) [pure virtual]

Set one digital output to a defined state.

Parameters:
enOut number of output
iState set (1) or delete (0) one digital output
Returns:
-errno ... on failure always negative (see errno.h)

virtual int OCameraOutputs::iSetOutputs ( int  iMask,
int  iState 
) [pure virtual]

Set one, several or all of the digital outputs.

Only the digital outputs defined by iMask are set to the corresponding state of iState.

Parameters:
iMask bitmask generated by a bitwise OR of OCameraOutputs::t_enCameraOutput values
iState the corresponding state (0 or 1) on the same bit position as iMask
Returns:
-errno ... on failure always negative (see errno.h)

virtual int OCameraOutputs::iToggleOutput ( t_enCameraOutput  enOut  )  [pure virtual]

Toggle the current state of one digital outputs.

Parameters:
enOut number of output
Returns:
-errno ... on failure always negative (see errno.h)

virtual int OCameraOutputs::iToggleOutputs ( int  iMask  )  [pure virtual]

Toggle the current state of one, several or all digital outputs.

Parameters:
iMask bitmask generated by a bitwise OR of OCameraOutputs::t_enCameraOutput values
Returns:
-errno ... on failure always negative (see errno.h)

static OCameraOutputs* OCameraOutputs::poCreateInterface (  )  [static]

Call this method to obtain a pointer to the outputs interface.

Does NOT affect the actual states of the outputs.


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

Generated on Mon Mar 15 16:11:05 2010 for Festo Camera API by  doxygen 1.5.6