OCameraLEDs Class Reference

#include <OCamera.h>

List of all members.


Detailed Description

Basic class for access to the camera status LEDs on the cameras rear side.


All LEDs keep their states beyond destruction of the interface.

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

Public Types

enum  t_enCameraLED {
  LED_0_RED = 0x01, LED_0_GREEN = 0x02, LED_1_RED = 0x04, LED_1_GREEN = 0x08,
  LED_2_RED = 0x10, LED_2_YELLOW = 0x20, LED_3_RED = 0x40, LED_3_YELLOW = 0x80,
  LED_ALL_RED = LED_0_RED | LED_1_RED | LED_2_RED | LED_3_RED, LED_ALL_GREEN = LED_0_GREEN | LED_1_GREEN, LED_ALL_YELLOW = LED_2_YELLOW | LED_3_YELLOW, LED_ALL = LED_ALL_RED | LED_ALL_GREEN | LED_ALL_YELLOW
}
 camera LEDs More...

Public Member Functions

virtual void Destroy ()=0
 Removes completely the LEDs interface object created with poCreateInterface().
virtual int iClose ()=0
 Defined cleanup after the work with the LEDs has been finished.
virtual int iGetLED (t_enCameraLED enLED)=0
 Returns the state of one LED.
virtual int iGetLEDs ()=0
 Returns the state of all LEDs.
virtual int iOpen ()=0
 Grants the access to the camera's digital LEDs.
virtual int iSetLED (t_enCameraLED enLED, int iState)=0
 Set one LED to a defined state.
virtual int iSetLEDs (int iMask, int iState)=0
 Set one, several or all of the LEDs.
virtual int iToggleLED (t_enCameraLED enLED)=0
 Toggle the current state of one LED.
virtual int iToggleLEDs (int iMask)=0
 Toggle the current state of one, several or all camera LEDs.

Static Public Member Functions

static OCameraLEDspoCreateInterface ()
 Call this method to obtain a pointer to the LEDs interface.

Member Enumeration Documentation

camera LEDs

Enumerator:
LED_0_RED  LED nr A, red.
LED_0_GREEN  LED nr A, green.
LED_1_RED  LED nr B, red.
LED_1_GREEN  LED nr B, green.
LED_2_RED  LED nr C, red.
LED_2_YELLOW  LED nr C, yellow.
LED_3_RED  LED nr D, red.
LED_3_YELLOW  LED nr D, yellow.
LED_ALL_RED  all red LEDs
LED_ALL_GREEN  all green LEDs
LED_ALL_YELLOW  all yellow LEDs
LED_ALL  all LEDs


Member Function Documentation

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

Removes completely the LEDs 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 LEDs.
Be careful to DO NOT USE THE INTERFACE POINTER any longer after having called this method!!

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

Defined cleanup after the work with the LEDs has been finished.

Does NOT affect the actual states of the LEDs.

virtual int OCameraLEDs::iGetLED ( t_enCameraLED  enLED  )  [pure virtual]

Returns the state of one LED.

This call never blocks.

Parameters:
enLED bitmask for one LED
Returns:
0 ... LED is off
1 ... LED is on
-errno ... on failure always negative (see errno.h)

virtual int OCameraLEDs::iGetLEDs (  )  [pure virtual]

Returns the state of all LEDs.

Use the OCameraLEDs::t_enCameraLED bitmasks to ask for the sate of individual LEDs.
This call never blocks.

Returns:
>= 0 ... value of all LEDs acc. to OCameraLEDs::t_enCameraLED
-errno ... on failure always negative (see errno.h)

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

Grants the access to the camera's digital LEDs.

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

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

virtual int OCameraLEDs::iSetLED ( t_enCameraLED  enLED,
int  iState 
) [pure virtual]

Set one LED to a defined state.

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

virtual int OCameraLEDs::iSetLEDs ( int  iMask,
int  iState 
) [pure virtual]

Set one, several or all of the LEDs.

Parameters:
iMask bitmask generated by a bitwise OR of OCameraLEDs::t_enCameraLED 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 OCameraLEDs::iToggleLED ( t_enCameraLED  enLED  )  [pure virtual]

Toggle the current state of one LED.

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

virtual int OCameraLEDs::iToggleLEDs ( int  iMask  )  [pure virtual]

Toggle the current state of one, several or all camera LEDs.

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

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

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

Does NOT affect the actual states of the LEDs.


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