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

In "rec/robotino/api2/c/PowerOutput.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_POWEROUTPUTID   -1
 

Typedefs

typedef int PowerOutputId
 

Functions

DLLEXPORT PowerOutputId PowerOutput_construct ()
 
DLLEXPORT BOOL PowerOutput_destroy (PowerOutputId id)
 
DLLEXPORT BOOL PowerOutput_setComId (PowerOutputId id, ComId comId)
 
DLLEXPORT BOOL PowerOutput_setValue (PowerOutputId id, float setPoint)
 
DLLEXPORT float PowerOutput_current (PowerOutputId id)
 
DLLEXPORT float PowerOutput_rawCurrentMeasurment (PowerOutputId id)
 

Detailed Description

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

Use PowerOutput_construct() to create a new power output object. Associate the power output object with a com object using PowerOutput_setComId(). Use PowerOutput_open() to open the power output. Use PowerOutput_close() to open the power output. Use PowerOutput_isOpened() to check if the power output is opened. Use PowerOutput_isClosed() to check if the power output is closed.

Macro Definition Documentation

#define INVALID_POWEROUTPUTID   -1

Invalid PowerOutputId is -1

Typedef Documentation

typedef int PowerOutputId

PowerOutputId

Function Documentation

DLLEXPORT PowerOutputId PowerOutput_construct ( )

Construct an power output object

Returns
Returns the ID of the newly constructed power output object.
DLLEXPORT float PowerOutput_current ( PowerOutputId  id)
Parameters
idThe id of the power output object.
Returns
The current delivered by the power output in A.
DLLEXPORT BOOL PowerOutput_destroy ( PowerOutputId  id)

Destroy the power output object assigned to id

Parameters
idThe id of the power output object to be destroyed
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given PowerOutputId is invalid.
DLLEXPORT float PowerOutput_rawCurrentMeasurment ( PowerOutputId  id)

The current is measured by a 10 bit adc and is not converted into A.

Parameters
idThe id of the power output object.
Returns
The current delivered by the power output. Range from 0 to 1023.
DLLEXPORT BOOL PowerOutput_setComId ( PowerOutputId  id,
ComId  comId 
)

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

Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given PowerOutputId or ComId is invalid.
DLLEXPORT BOOL PowerOutput_setValue ( PowerOutputId  id,
float  setPoint 
)

Sets the current set point of the power output.

Parameters
idThe id of the power output object.
setPointThe set point. Range from -100 to 100.
Returns
Returns TRUE (1) on success. Returns FALSE (0) if the given PowerOutputId is invalid.