Definition at line 51 of file roboteqSC.h.
Public Types | |
| enum | { baudrate = B9600 } |
| The required baudrate for the speed Controller. | |
| enum | status { OPEN = 1, CLOSED = 0, ERROR = -1 } |
| The enumeration for the status of the speed controller. More... | |
| enum | Motor { MOTOR0 = 0x41, MOTOR1 = 0x42, MOTOR0BKW = 0x61, MOTOR1BKW = 0x62 } |
| Enumerations for both of the motors controlled by the speed controller. More... | |
Public Member Functions | |
| status | getStatus () |
| Get the status of the speed controller. | |
| int | openSC () |
| Open the speed controller so that it can be used. | |
| int | closeSC () |
| Close down the speed controller. | |
| int | setMotorSpeed (int motor, int speed) |
| Set the motor speed. | |
| int | getPower (int motor) |
| Query the amount of power supplied to a motor. | |
| int | getAmps (int motor) |
| Query the amount of amps supplied to a motor. | |
| int | getControllerTemp () |
| Query the temperature of the heatsinks on the speed controller. | |
| int | convertTemp (int input) |
| Converts between the raw speed controller output and degrees Cel. | |
| int | applyParam () |
| Apply a parameter change to the robot without restarting. | |
| void | resetController () |
| Reset the speed controller. | |
| int | readParamSetting (int param) |
| Read one of the Parameter settings. | |
| int | setParam (int param, int value) |
| Set a Param, note many paramets require the controller to be reset. | |
| int | sem_P () |
| enter a semaphore protected body of code | |
| int | sem_V () |
| exit a semaphore protected body of code | |
| int | openCommand () |
| open the controller from being in R/C or analog mode this will put the controller into RS232 watchDog mode | |
| int | getfd () |
| get the file descriptor for the serial connection | |
Static Public Member Functions | |
| RoboteqSC * | theInstance () |
| The function responsible for gaining access to the instance of the speed controller. | |
| void | watchDog () |
| the watchDog function for the speed controller sends a return character to the speed controller often enough to ensure a constand connection with it. | |
Protected Member Functions | |
| RoboteqSC () | |
| Constructor for RoboteqSC class. | |
| ~RoboteqSC () | |
| Destructor for RoboteqSC class. | |
Private Attributes | |
| status | SCStatus |
| The status for the speed controller. | |
| int | fd |
| The file descriptor for the speed controller. | |
| termios | oldttyS |
| The old serial port settings. | |
| termios | newttyS |
| The new serial port settings. | |
| fd_set | set |
| fd_set for waiting for the returns from the controller | |
| timeval | tv |
| timeout for waiting for values from the controller | |
| pthread_t | scThread |
| thread for the watchdog function | |
| int | roboteqsv |
| semaphore data for the speed controller | |
|
|
Enumerations for both of the motors controlled by the speed controller.
Definition at line 74 of file roboteqSC.h. |
|
|
The enumeration for the status of the speed controller.
Definition at line 62 of file roboteqSC.h. |
|
|
Apply a parameter change to the robot without restarting.
|
|
|
Close down the speed controller.
|
|
|
Converts between the raw speed controller output and degrees Cel.
|
|
|
Query the amount of amps supplied to a motor.
|
|
|
Query the temperature of the heatsinks on the speed controller.
|
|
|
get the file descriptor for the serial connection
|
|
|
Query the amount of power supplied to a motor.
|
|
|
Get the status of the speed controller.
Definition at line 96 of file roboteqSC.h. References SCStatus. |
|
|
open the controller from being in R/C or analog mode this will put the controller into RS232 watchDog mode
|
|
|
Open the speed controller so that it can be used.
|
|
|
Read one of the Parameter settings.
|
|
|
enter a semaphore protected body of code
|
|
|
exit a semaphore protected body of code
|
|
||||||||||||
|
Set the motor speed.
|
|
||||||||||||
|
Set a Param, note many paramets require the controller to be reset.
|
|
|
The function responsible for gaining access to the instance of the speed controller.
|
|
|
the watchDog function for the speed controller sends a return character to the speed controller often enough to ensure a constand connection with it. If this fuction stops and watchDog is enabled on the speed controller the speed controller will shutdown the motors everytime it does not receive a character in a one second period |
1.3.6