#include <ServoHubLowLevel.h>
Inherited by rev::servohub::ServoHub.
◆ CommunicationMode
Enumerator |
---|
kNone | |
kCAN | |
kRS_485 | |
◆ ~ServoHubLowLevel()
ServoHubLowLevel::~ServoHubLowLevel |
( |
| ) |
|
|
virtual |
◆ ServoHubLowLevel()
ServoHubLowLevel::ServoHubLowLevel |
( |
int |
deviceID | ) |
|
|
explicitprotected |
◆ GetDeviceId()
int ServoHubLowLevel::GetDeviceId |
( |
| ) |
const |
Get the configured Device ID of the ServoHub.
- Returns
- int device ID
◆ GetFirmwareVersion()
Get the firmware version of the ServoHub.
- Returns
- Firmware version represented in the struct
◆ GetFirmwareVersionString()
std::string ServoHubLowLevel::GetFirmwareVersionString |
( |
| ) |
const |
Get the firmware version of the ServoHub as a string.
- Returns
- std::string Human readable firmware version string
◆ SetPeriodicFrameTimeout()
void ServoHubLowLevel::SetPeriodicFrameTimeout |
( |
int |
timeout_ms | ) |
|
Set the amount of time to wait for a periodic status frame before returning a timeout error. This timeout will apply to all periodic status frames for the ServoHub servo controller.
To prevent invalid timeout errors, the minimum timeout for a given periodic status is 2.1 times its period. To use the minimum timeout for all status frames, set timeout_ms to 0.
The default timeout is 500ms.
- Parameters
-
timeout_ms | The timeout in milliseconds |
◆ SetCANTimeout()
REVLibError ServoHubLowLevel::SetCANTimeout |
( |
int |
timeout_ms | ) |
|
Sets the timeout duration for waiting for CAN responses from the device.
- Parameters
-
timeout_ms | The timeout in milliseconds. |
- Returns
- REVLibError::kOk if successful
◆ SetCANMaxRetries()
void ServoHubLowLevel::SetCANMaxRetries |
( |
int |
numRetries | ) |
|
Set the maximum number of times to retry an RTR CAN frame. This applies to calls such as GetFirmwareVersion where a request is made to the ServoHub and a response is expected. Anytime sending the request or receiving the response fails, it will retry the request a number of times, no more than the value set by this method. If an attempt succeeds, it will immediately return. The minimum number of retries is 0, where only a single attempt will be made and will return regardless of success or failure.
The default maximum is 5 retries.
- Parameters
-
numRetries | The maximum number of retries |
◆ SetControlFramePeriodMs()
void ServoHubLowLevel::SetControlFramePeriodMs |
( |
int |
period_ms | ) |
|
Set the control frame send period for the native CAN Send thread.
- Parameters
-
period_ms | The send period in milliseconds between 1ms and 100ms or set to 0 to disable periodic sends. |
◆ GetControlFramePeriodMs()
int ServoHubLowLevel::GetControlFramePeriodMs |
( |
| ) |
const |
Set the control frame send period for the native CAN Send thread.
- Returns
- int The send period in milliseconds.
◆ GetPeriodicStatus0()
◆ GetPeriodicStatus1()
◆ GetPeriodicStatus2()
◆ GetPeriodicStatus3()
◆ GetPeriodicStatus4()
◆ CreateSimFaultManager()
void ServoHubLowLevel::CreateSimFaultManager |
( |
| ) |
|
Create the sim gui Fault Manager for this Servo Hub device
◆ ServoHubSimFaultManager
◆ m_servoHubHandle
void* rev::servohub::ServoHubLowLevel::m_servoHubHandle {nullptr} |
|
protected |
The documentation for this class was generated from the following files: