![]() |
Tetrapod Project
|
#include <teensy_serial.h>
Public Member Functions | |
| TeensySerial (int _number_of_motors) | |
| ~TeensySerial () | |
| bool | areControlCommandsAvailable () |
| Checks if there is any available data on the serial port. More... | |
| void | receiveControlCommands (double &_control_command_type, double *_control_commands) |
| Reads control command data available on the serial command and stores it. More... | |
| void | sendStates (double *_joint_positions, double *_joint_velocities, double *_joint_torques) |
| Sends the joint states to the serial line. More... | |
| void | printTxBuffer () |
Private Attributes | |
| int | number_of_motors |
| Number of motors. More... | |
| int | tx_buffer_size |
| Transmit buffer size. More... | |
| int | rx_buffer_size |
| Receive buffer size. More... | |
| unsigned char * | rx_buffer |
| Receive buffer. More... | |
| unsigned char * | tx_buffer |
| Transmit buffer. More... | |
Definition at line 6 of file teensy_serial.h.
| TeensySerial::TeensySerial | ( | int | _number_of_motors | ) |
Definition at line 3 of file teensy_serial.cpp.
| TeensySerial::~TeensySerial | ( | ) |
Definition at line 24 of file teensy_serial.cpp.
| bool TeensySerial::areControlCommandsAvailable | ( | ) |
Checks if there is any available data on the serial port.
Definition at line 33 of file teensy_serial.cpp.
| void TeensySerial::receiveControlCommands | ( | double & | _control_command_type, |
| double * | _control_commands | ||
| ) |
Reads control command data available on the serial command and stores it.
| [out] | _control_command_type | A variable indicating whether position, velocity, or torque control should be used |
| [out] | _control_commands | An array of control command values |
Definition at line 48 of file teensy_serial.cpp.
| void TeensySerial::sendStates | ( | double * | _joint_positions, |
| double * | _joint_velocities, | ||
| double * | _joint_torques | ||
| ) |
Sends the joint states to the serial line.
| [out] | _joint_positions | An array of measured joint positions from the motor |
| [out] | _joint_velocities | An array of measured joint velocities from the motor |
| [out] | _joint_torques | An array of measured joint torques from the motor |
Definition at line 92 of file teensy_serial.cpp.
| void TeensySerial::printTxBuffer | ( | ) |
Definition at line 120 of file teensy_serial.cpp.
|
private |
Number of motors.
Definition at line 33 of file teensy_serial.h.
|
private |
Transmit buffer size.
Definition at line 36 of file teensy_serial.h.
|
private |
Receive buffer size.
Definition at line 39 of file teensy_serial.h.
|
private |
Receive buffer.
Definition at line 42 of file teensy_serial.h.
|
private |
Transmit buffer.
Definition at line 45 of file teensy_serial.h.