rec::robotino::api2 C++ interface
Public Member Functions | Static Public Member Functions | Friends | List of all members
rec::robotino::api2::AnalogInput Class Reference

An analog Input. More...

#include <AnalogInput.h>

Inheritance diagram for rec::robotino::api2::AnalogInput:
rec::robotino::api2::ComObject

Public Member Functions

void setComId (const ComId &id)
 
void processEvents ()
 
void setInputNumber (unsigned int n)
 
float value () const
 
virtual void valueChangedEvent (float value)
 
- Public Member Functions inherited from rec::robotino::api2::ComObject
 ComObject ()
 
virtual ~ComObject ()
 
ComId comId () const
 

Static Public Member Functions

static unsigned int numAnalogInputs ()
 

Friends

class AnalogInputImpl
 

Additional Inherited Members

- Protected Attributes inherited from rec::robotino::api2::ComObject
ComId _comID
 

Detailed Description

An analog Input.

Member Function Documentation

static unsigned int rec::robotino::api2::AnalogInput::numAnalogInputs ( )
static
Returns
Returns the number of analog inputs.
void rec::robotino::api2::AnalogInput::processEvents ( )

Call this function from your main thread to get the virtual AnalogInput functions called. The virtual functions are called directly by a call of this function

Exceptions
nothing
See also
Com::processEvents
void rec::robotino::api2::AnalogInput::setComId ( const ComId id)

Sets the associated communication object.

Parameters
idThe id of the associated communication object.
Exceptions
RobotinoExceptionif given id is invalid.
Remarks
This function is thread save
void rec::robotino::api2::AnalogInput::setInputNumber ( unsigned int  n)

Sets the number of this analog input device.

Parameters
nThe input number. Range [0; numAnalogInputs()-1]
Exceptions
RobotinoExceptionif the given input number is out of range.
See also
numAnalogInputs
float rec::robotino::api2::AnalogInput::value ( ) const

Returns the current value of the specified input device.

Returns
The current value of the specified analog input
Exceptions
Exceptionif the underlying communication object is invalid
See also
setInputNumber(), ComObject::setComId
virtual void rec::robotino::api2::AnalogInput::valueChangedEvent ( float  value)
virtual

Called when new readings are available.

Remarks
This function is called from the thread in which Com::processEvents() is called.
See also
Com::processEvents

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