#include <ServoHubSim.h>
◆ ServoHubSim()
ServoHubSim::ServoHubSim |
( |
ServoHub * |
servoHub | ) |
|
|
explicit |
Create a simulated CAN Servo Hub object. This class simulates some of the internal behavior of the device. This class is not required to display to the sim GUI, but is required to interact with it.
- Parameters
-
servoHub | The Servo Hub to simulate |
◆ GetDeviceVoltage()
double ServoHubSim::GetDeviceVoltage |
( |
| ) |
const |
◆ SetDeviceVoltage()
void ServoHubSim::SetDeviceVoltage |
( |
double |
voltage | ) |
|
Set the simulated device voltage.
- Parameters
-
voltage | device voltage in volts |
◆ GetDeviceCurrent()
double ServoHubSim::GetDeviceCurrent |
( |
| ) |
const |
◆ SetDeviceCurrent()
void ServoHubSim::SetDeviceCurrent |
( |
double |
current | ) |
|
Set the simulated device current.
- Parameters
-
current | device current in amps |
◆ GetServoVoltage()
double ServoHubSim::GetServoVoltage |
( |
| ) |
const |
◆ SetServoVoltage()
void ServoHubSim::SetServoVoltage |
( |
double |
voltage | ) |
|
Set the simulated device voltage.
- Parameters
-
voltage | device voltage in volts |
◆ GetBankPulsePeriod()
Get the simulated bank pulse period. This matches the value from the ServoHub::GetBankPulsePeriod().
- Parameters
-
bank | the specific bank (0-2, or 3-5)to get |
- Returns
- pulse period (in microseconds)for the specified bank
◆ SetBankPulsePeriod()
void ServoHubSim::SetBankPulsePeriod |
( |
ServoHub::Bank |
bank, |
|
|
int |
pulsePeriod_us |
|
) |
| |
Set the simulated bank pulse period
- Parameters
-
bank | the specific bank (0-2, or 3-5)to get |
pulsePeriod_us | pulse period (in microseconds)for the specified bank |
◆ enable()
void ServoHubSim::enable |
( |
| ) |
|
Enable the Servo Hub Device.
◆ disable()
void ServoHubSim::disable |
( |
| ) |
|
Disable the Servo Hub Device
◆ useDriverStationEnable()
void ServoHubSim::useDriverStationEnable |
( |
| ) |
|
Use the driver station enable as the method to enable/disable the Servo Hub. This is the default, so you do not need to call this unless you previously called enable() or disable().
◆ GetFaultManager()
Get the ServoHubSimFaultManager object associated with this Servo Hub Device. This will allow you to set simulated faults on your simulated device and view the Fault Manager in the Sim GUI.
- Returns
- The ServoHubSimFaultManager object associated with this Servo Hub Device
The documentation for this class was generated from the following files: