/home/ciesla/projects/svn.openrobotino.org/openrobotino1/lib/rec/robotino/com/c/Relay.h File Reference
In "rec/robotino/com/c/Relay.h" you can find functions for reading Robotino's bumper.
More...
#include "rec/robotino/com/c/globals.h"
#include "rec/robotino/com/c/Com.h"
Go to the source code of this file.
Detailed Description
In "rec/robotino/com/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.
Function Documentation
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.
DLLEXPORT BOOL Relay_setComId |
( |
RelayId |
id, |
|
|
ComId |
comId | |
|
) |
| | |
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.