In "rec/robotino/api2/c/Relay.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.
In "rec/robotino/api2/c/Relay.h" you can find functions for reading Robotino's bumper.
Use Relay_construct() to create a new relay object. Associate the relay object with a com object using Relay_setComId(). Use Relay_setSetPointSpeed() to set the relay's speed.
#define INVALID_RELAYID -1 |
DLLEXPORT unsigned int numRelays |
( |
| ) |
|
- Returns
- Returns the number of drive relays on Robotino
DLLEXPORT RelayId Relay_construct |
( |
unsigned int |
number | ) |
|
Construct an relay object
- Parameters
-
- Returns
- Returns the ID of the newly constructed relay object.
DLLEXPORT BOOL Relay_destroy |
( |
RelayId |
id | ) |
|
Destroy the relay object assigned to id
- Parameters
-
id | The id of the relay object to be destroyed |
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given RelayId is invalid.
Associated a relay object with a communication interface, i.e. binding the relay to a specific Robotino
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given RelayId or ComId is invalid.
DLLEXPORT BOOL Relay_setRelayNumber |
( |
RelayId |
id, |
|
|
unsigned int |
n |
|
) |
| |
Sets the relay number.
- Parameters
-
id | The id of the relay object to be set |
n | The relay number. Range: [0 - numRelays()] |
- Exceptions
-
RobotinoException | if relay number is invalid. |
DLLEXPORT BOOL Relay_setValue |
( |
RelayId |
id, |
|
|
BOOL |
on |
|
) |
| |
Sets the setpoint speed of this relay.
- Parameters
-
id | The id of the relay object. |
on | The value the relay will be set to. |
- Returns
- Returns TRUE (1) on success. Returns FALSE (0) if the given RelayId is invalid.