8#ifndef META_OCEAN_SYSTEM_USB_UTILITIES_H
9#define META_OCEAN_SYSTEM_USB_UTILITIES_H
74 using ProductMap = std::unordered_map<uint16_t, Product>;
124 static std::string
productName(
const uint16_t vendorId,
const uint16_t productId);
std::string deviceName_
The name of the product.
Definition system/usb/Utilities.h:65
DeviceCategory deviceCategory_
The category of the product.
Definition system/usb/Utilities.h:68
Product()=default
Default constructor.
std::string vendorName_
The name of the vendor.
Definition system/usb/Utilities.h:98
ProductMap productMap_
The map with all known products of the vendor.
Definition system/usb/Utilities.h:101
Vendor()=default
Default constructor.
This class implements utility functions for USB devices.
Definition system/usb/Utilities.h:27
DeviceCategory
Definition of individual device categories.
Definition system/usb/Utilities.h:34
@ DC_UNKNOWN
An unknown device category.
Definition system/usb/Utilities.h:36
@ DC_CAMERA
A device which contains a camera in some way.
Definition system/usb/Utilities.h:38
static DeviceCategory deviceCategory(const uint16_t vendorId, const uint16_t productId)
Lookups the device category of a device defined by it's vendor and product id.
static bool doesDeviceContainCategory(const uint16_t vendorId, const uint16_t productId, const uint8_t deviceClass, const DeviceCategory deviceCategory)
Checks whether a device contains a specific category.
static const VendorMap & vendorMap()
Returns the lookup table with all known vendors.
static std::string vendorName(const uint16_t vendorId)
Lookups the name of a vendor id (if known).
std::unordered_map< uint16_t, Product > ProductMap
Definition of an unordered map mapping product ids to products.
Definition system/usb/Utilities.h:74
static std::string productName(const uint16_t vendorId, const uint16_t productId)
Lookups the name of a product id (if known).
std::unordered_map< uint16_t, Vendor > VendorMap
Definition of an unordered map mapping vendor ids to vendor objects (a lookup table for USB devices).
Definition system/usb/Utilities.h:107
Namespace of the System library USB.
Definition system/usb/android/Android.h:20
Namespace of the System library.
Definition system/Memory.h:19
The namespace covering the entire Ocean framework.
Definition Accessor.h:15