#include <OCamera.h>
Public Types | |
enum | t_enCameraInput { INPUT_I0 = 1, INPUT_I1 = 2, INPUT_I0_RE = 4, INPUT_I0_FE = 8, INPUT_I1_RE = 16, INPUT_I1_FE = 32, OVERLOAD = 64, INPUT_ALL = INPUT_I0 | INPUT_I1 } |
digital camera inputs More... | |
Public Member Functions | |
virtual void | Destroy ()=0 |
Removes completely the inputs interface object created with poCreateInterface(). | |
virtual int | GetDriverFileDescriptor ()=0 |
Retrive a file descriptor to perform select/poll on the input interface (e.g. | |
virtual int | iClearEdges (int iMask)=0 |
Edge detection bits are sticky, they remain in their state unless they are cleared by this method. | |
virtual int | iClose ()=0 |
Defined cleanup after the work with the digital inputs has been finished. | |
virtual int | iGetInput (t_enCameraInput enIn)=0 |
Returns the state (0 or 1) of one digital input. | |
virtual int | iGetInputs ()=0 |
Returns the state of all digital inputs and the state of the output overload signal. | |
virtual int | iOpen ()=0 |
Grants the access to the camera's digital inputs. | |
virtual int | iSetTimeout (int iTimeout)=0 |
Set the timeout to wait during an iWaitForInputxxx() operation. | |
virtual int | iWaitForInput (t_enCameraInput enIn, int iState)=0 |
Wait until the digital input pattern reaches a given state. | |
virtual int | iWaitForInputChange (t_enCameraInput enIn)=0 |
Wait until the specified digital input changes it's logic level. | |
virtual int | iWaitForInputs (int iMask, int iState)=0 |
Wait until one, several or all inputs reach a given state. | |
virtual int | iWaitForInputsChange (int iMask)=0 |
Wait until one, several or all inputs change their logic levels. | |
Static Public Member Functions | |
static OCameraInputs * | poCreateInterface () |
Call this method to obtain a pointer to the inputs interface. |
digital camera inputs
virtual void OCameraInputs::Destroy | ( | ) | [pure virtual] |
Removes completely the inputs interface object created with poCreateInterface().
This should happen after iClose() was called and the interface is no longer needed.
Be careful to DO NOT USE THE INTERFACE POINTER any longer after having called this method!!
virtual int OCameraInputs::GetDriverFileDescriptor | ( | ) | [pure virtual] |
Retrive a file descriptor to perform select/poll on the input interface (e.g.
wait until input has changed).
virtual int OCameraInputs::iClearEdges | ( | int | iMask | ) | [pure virtual] |
Edge detection bits are sticky, they remain in their state unless they are cleared by this method.
To clear the state of an edge detection bit set the corresponding bit in iMask when calling iClearEdges.
iMask | all input's bit position, that equal "1" will be cleared (only in case of edge detection inputs) |
virtual int OCameraInputs::iClose | ( | ) | [pure virtual] |
Defined cleanup after the work with the digital inputs has been finished.
virtual int OCameraInputs::iGetInput | ( | t_enCameraInput | enIn | ) | [pure virtual] |
Returns the state (0 or 1) of one digital input.
This call never blocks.
enIn | bitmask for one digital input |
virtual int OCameraInputs::iGetInputs | ( | ) | [pure virtual] |
Returns the state of all digital inputs and the state of the output overload signal.
The overload is logic high whenever the total sum of output current on all digital outputs exceeds 1.8A.
Use the OCameraInputs::t_enCameraInput bit masks to ask for the sate of individual digital inputs.
This call never blocks.
virtual int OCameraInputs::iOpen | ( | ) | [pure virtual] |
Grants the access to the camera's digital inputs.
Has to be called PRIOR to use any subsequent call to the OCameraInputs interface.
When work with digital inputs is finished, the user should call iClose() for cleanup.
virtual int OCameraInputs::iSetTimeout | ( | int | iTimeout | ) | [pure virtual] |
Set the timeout to wait during an iWaitForInputxxx() operation.
This may prevent from hanging if the input doesn't change.
By default no timeout is used.
iTimeout | timeout value in milliseconds (1E-3) -1 ... no timeout is desired (infinite wait) |
virtual int OCameraInputs::iWaitForInput | ( | t_enCameraInput | enIn, | |
int | iState | |||
) | [pure virtual] |
Wait until the digital input pattern reaches a given state.
The default behaviour is infinite blocking. To specify a defined timeout call iSetTimeout() before the first use of this function.
enIn | digital input values, that should be observed | |
iState | state of digital inputs to stop waiting |
virtual int OCameraInputs::iWaitForInputChange | ( | t_enCameraInput | enIn | ) | [pure virtual] |
Wait until the specified digital input changes it's logic level.
The default behaviour is infinite blocking. To specify a defined timeout call iSetTimeout().
enIn | digital input value acc. to OCameraInputs::t_enCameraInput, that should be observed |
virtual int OCameraInputs::iWaitForInputs | ( | int | iMask, | |
int | iState | |||
) | [pure virtual] |
Wait until one, several or all inputs reach a given state.
The program execution stops at this function until
The default behaviour is infinite blocking. To specify a defined timeout call iSetTimeout().
iMask | set of OCameraInputs::t_enCameraInput values ORed together. For each input set in iMask the corresponding bit in iState denotes the desired state for this input to wait for. | |
iState | state of digital inputs to stop waiting |
virtual int OCameraInputs::iWaitForInputsChange | ( | int | iMask | ) | [pure virtual] |
Wait until one, several or all inputs change their logic levels.
The call returns if one of the selected inputs change. The default behaviour is infinite blocking. To specify a defined timeout call iSetTimeout().
iMask | set of OCameraInputs::t_enCameraInput values ORed together |
static OCameraInputs* OCameraInputs::poCreateInterface | ( | ) | [static] |
Call this method to obtain a pointer to the inputs interface.