/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.

Defines

#define INVALID_RELAYID   -1

Typedefs

typedef int RelayId

Functions

DLLEXPORT RelayId Relay_construct (unsigned int number)
DLLEXPORT BOOL Relay_destroy (RelayId id)
DLLEXPORT BOOL Relay_setComId (RelayId id, ComId comId)
DLLEXPORT BOOL Relay_setRelayNumber (RelayId id, unsigned int n)
DLLEXPORT unsigned int numRelays ()
DLLEXPORT BOOL Relay_setValue (RelayId id, BOOL on)


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:
number number of this relay. Range [0; numRelays()-1].
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.


Generated on Fri Aug 17 15:09:42 2012 for rec_robotino_com_c by  doxygen 1.5.5