This class controls a REV ExpansionHub plugged in over USB to Systemcore.
More...
#include <wpi/hardware/expansionhub/ExpansionHub.hpp>
This class controls a REV ExpansionHub plugged in over USB to Systemcore.
◆ ExpansionHub()
| wpi::ExpansionHub::ExpansionHub |
( |
int | usbId | ) |
|
|
explicit |
Constructs a new ExpansionHub for a given USB ID.
Multiple instances can be constructed, but will point to the same backing object with a ref count.
- Parameters
-
| usbId | The USB Port ID the hub is plugged into. |
◆ ~ExpansionHub()
| wpi::ExpansionHub::~ExpansionHub |
( |
| ) |
|
|
defaultnoexcept |
◆ GetUsbId()
| int wpi::ExpansionHub::GetUsbId |
( |
| ) |
const |
|
inline |
Gets the USB ID of this hub.
- Returns
- The USB ID
◆ IsHubConnected()
| bool wpi::ExpansionHub::IsHubConnected |
( |
| ) |
const |
Gets if the hub is currently connected over USB.
- Returns
- True if hub connection, otherwise false
◆ MakeMotor()
Constructs a motor at the requested channel on this hub.
Only a single instance of each motor per hub can be constructed at a time.
- Parameters
-
- Returns
- Motor object
◆ MakeServo()
Constructs a servo at the requested channel on this hub.
Only a single instance of each servo per hub can be constructed at a time.
- Parameters
-
- Returns
- Servo object
◆ DataStore
◆ ExpansionHubMotor
| friend class ExpansionHubMotor |
|
friend |
◆ ExpansionHubServo
| friend class ExpansionHubServo |
|
friend |
◆ NumMotorPorts
| int wpi::ExpansionHub::NumMotorPorts = 4 |
|
staticconstexpr |
◆ NumServoPorts
| int wpi::ExpansionHub::NumServoPorts = 6 |
|
staticconstexpr |
◆ NumUsbPorts
| int wpi::ExpansionHub::NumUsbPorts = 4 |
|
staticconstexpr |
The documentation for this class was generated from the following file: