rec::robotino::api2 C interface
Macros | Typedefs | Functions
DigitalOutput.h File Reference

In "rec/robotino/api2/c/DigitalOutput.h" you can find functions for reading Robotino's bumper. More...

#include "rec/robotino/api2/c/globals.h"
#include "rec/robotino/api2/c/Com.h"

Go to the source code of this file.

Macros

#define INVALID_DIGITALOUTPUTID   -1
 

Typedefs

typedef int DigitalOutputId
 

Functions

DLLEXPORT DigitalOutputId DigitalOutput_construct (unsigned int n)
 
DLLEXPORT BOOL DigitalOutput_destroy (DigitalOutputId id)
 
DLLEXPORT BOOL DigitalOutput_setComId (DigitalOutputId id, ComId comId)
 
DLLEXPORT BOOL DigitalOutput_setOutputNumber (DigitalOutputId id, unsigned int n)
 
DLLEXPORT unsigned int numDigitalOutputs ()
 
DLLEXPORT BOOL DigitalOutput_setValue (DigitalOutputId id, BOOL on)
 

Detailed Description

In "rec/robotino/api2/c/DigitalOutput.h" you can find functions for reading Robotino's bumper.

Use DigitalOutput_construct() to create a new digital output object. Associate the bumper object with a com object using DigitalOutput_setComId(). Use DigitalOutput_value() to read the digital output's state.

Macro Definition Documentation

#define INVALID_DIGITALOUTPUTID   -1

Invalid DigitalOutputId is -1

Typedef Documentation

typedef int DigitalOutputId

DigitalOutputId

Function Documentation

DLLEXPORT DigitalOutputId DigitalOutput_construct ( unsigned int  n)

Construct an digital output object

Parameters
nThe input number. Range [0; numDigitalOutputs()-1]
Returns
Returns the ID of the newly constructed digital output object.
DLLEXPORT BOOL DigitalOutput_destroy ( DigitalOutputId  id)

Destroy the digital output object assigned to id

Parameters
idThe id of the digital output object to be destroyed
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given DigitalOutputId is invalid.
DLLEXPORT BOOL DigitalOutput_setComId ( DigitalOutputId  id,
ComId  comId 
)

Associated a digital output object with a communication interface, i.e. binding the digital output to a specific Robotino

Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given DigitalOutputId or ComId is invalid.
DLLEXPORT BOOL DigitalOutput_setOutputNumber ( DigitalOutputId  id,
unsigned int  n 
)

Sets the number of this digital output device.

Parameters
idThe id of the digital input object to be set
nThe output number. Range [0 - numAnalogInputs()]
Returns
Returns TRUE (1) on success otherwise FALSE (0)
DLLEXPORT BOOL DigitalOutput_setValue ( DigitalOutputId  id,
BOOL  on 
)

Sets the value of this digital output device.

Parameters
idThe id of the digital output object to be written
onTurn the output on or off
Returns
Returns TRUE (1) on success otherwise FALSE (0)
DLLEXPORT unsigned int numDigitalOutputs ( )
Returns
Returns the number of digital outputs.