8 #ifndef META_OCEAN_SYSTEM_USB_MANAGER_H
9 #define META_OCEAN_SYSTEM_USB_MANAGER_H
89 static void LIBUSB_CALL
libLogCallback(libusb_context* context,
enum libusb_log_level level,
const char* message);
This class implements a recursive lock object.
Definition: Lock.h:31
This template class is the base class for all singleton objects.
Definition: Singleton.h:71
This class implements a manager for USB devices.
Definition: system/usb/Manager.h:35
SharedContext context() const
Returns the context of this manager.
Definition: system/usb/Manager.h:100
Manager()
Creates a new manager with an own context.
void release()
Explicitly releases the manager.
Lock lock_
The manager's lock.
Definition: system/usb/Manager.h:97
static void LIBUSB_CALL libLogCallback(libusb_context *context, enum libusb_log_level level, const char *message)
Libusb log callback function.
~Manager() override
Destructs the manager and releases connected resources.
bool enumerateDevices(SharedDevices &devices, const int deviceClass=-1)
Enumerates all available USB devices.
SharedContext context_
The manager's context.
Definition: system/usb/Manager.h:94
void threadRun() override
The manager's thread function.
SharedDevice findDevice(const std::string &deviceName)
Finds a device by its name.
This class implements a thread.
Definition: Thread.h:115
std::shared_ptr< Device > SharedDevice
Definition of a shared pointer holding a device.
Definition: system/usb/Device.h:34
std::vector< SharedDevice > SharedDevices
Definition of a vector holding SharedDevice objects.
Definition: system/usb/Device.h:41
std::shared_ptr< Context > SharedContext
Definition of a shared pointer holding a context.
Definition: system/usb/Context.h:32
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15