#include <OCamera.h>
All LEDs keep their states beyond destruction of the interface.
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 OCameraLEDs * | poCreateInterface () |
Call this method to obtain a pointer to the LEDs interface. |
camera LEDs
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.
enLED | bitmask for one LED |
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.
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.
virtual int OCameraLEDs::iSetLED | ( | t_enCameraLED | enLED, | |
int | iState | |||
) | [pure virtual] |
Set one LED to a defined state.
enLED | number of LED | |
iState | set (1) or delete (0) one LED |
virtual int OCameraLEDs::iSetLEDs | ( | int | iMask, | |
int | iState | |||
) | [pure virtual] |
Set one, several or all of the LEDs.
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 |
virtual int OCameraLEDs::iToggleLED | ( | t_enCameraLED | enLED | ) | [pure virtual] |
Toggle the current state of one LED.
enLED | number of LED |
virtual int OCameraLEDs::iToggleLEDs | ( | int | iMask | ) | [pure virtual] |
Toggle the current state of one, several or all camera LEDs.
iMask | bitmask generated by a bitwise OR of OCameraLEDs::t_enCameraLED values |
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.