72 bool CheckAndReserveServo(
int channel);
73 void UnreserveServo(
int channel);
75 bool CheckAndReserveMotor(
int channel);
76 void UnreserveMotor(
int channel);
78 void ReportUsage(std::string_view device, std::string_view data);
83 std::shared_ptr<DataStore> m_dataStore;
87 static std::weak_ptr<DataStore> m_storeMap[4];
89 static std::shared_ptr<DataStore> GetForUsbId(
int usbId);
friend class DataStore
Definition ExpansionHub.hpp:81
int GetUsbId() const
Gets the USB ID of this hub.
Definition ExpansionHub.hpp:65
static constexpr int NumMotorPorts
Definition ExpansionHub.hpp:69
ExpansionHubServo MakeServo(int channel)
Constructs a servo at the requested channel on this hub.
static constexpr int NumUsbPorts
Definition ExpansionHub.hpp:67
bool IsHubConnected() const
Gets if the hub is currently connected over USB.
static constexpr int NumServoPorts
Definition ExpansionHub.hpp:68
ExpansionHubMotor MakeMotor(int channel)
Constructs a motor at the requested channel on this hub.
~ExpansionHub() noexcept=default
friend class ExpansionHubServo
Definition ExpansionHub.hpp:30
ExpansionHub(int usbId)
Constructs a new ExpansionHub for a given USB ID.
friend class ExpansionHubMotor
Definition ExpansionHub.hpp:31
This class controls a specific motor and encoder hooked up to an ExpansionHub.
Definition ExpansionHubMotor.hpp:23
This class controls a specific servo hooked up to an ExpansionHub.
Definition ExpansionHubServo.hpp:18
::std::mutex mutex
Definition mutex.hpp:17
Definition CvSource.hpp:15