Skip to main content

Device Class

Package: GHIElectronics.Endpoint.Devices.UsbHost
Namespace: GHIElectronics.Endpoint.Devices.UsbHost.Descriptors

Device descriptor.

class Device : public BaseDescriptor {};

Constructors​

Device(byte[] buffer)​

Device(const std::vector<uint8_t>& buffer);

Constructs a new descriptor.

ParameterTypeDescription
bufferbyte[]The buffer with which to populate the descriptor.

Device(byte[] buffer, int offset)​

Device(const std::vector<uint8_t>& buffer, int32_t offset);

Constructs a new descriptor.

ParameterTypeDescription
bufferbyte[]The buffer with which to populate the descriptor.
offsetintThe offset into the buffer at which to start.

Device()​

Device();

Constructs a new descriptor.

Properties​

ClassCode​

uint8_t ClassCode() const;
void ClassCode(uint8_t value);

The class code of the device.

Returns byte

ManufacturerIndex​

uint8_t ManufacturerIndex() const;
void ManufacturerIndex(uint8_t value);

The manufacturer string descriptor index.

Returns byte

MaximumPacketSize​

uint8_t MaximumPacketSize() const;
void MaximumPacketSize(uint8_t value);

The max packet size for endpoint zero.

Returns byte

NumberOfConfigurations​

uint8_t NumberOfConfigurations() const;
void NumberOfConfigurations(uint8_t value);

The number of possible configurations.

Returns byte

ProductId​

uint16_t ProductId() const;
void ProductId(uint16_t value);

The product id.

Returns ushort

ProductIndex​

uint8_t ProductIndex() const;
void ProductIndex(uint8_t value);

The product string descriptor index.

Returns byte

ProtocolCode​

uint8_t ProtocolCode() const;
void ProtocolCode(uint8_t value);

The protocol code.

Returns byte

ReleaseNumber​

uint16_t ReleaseNumber() const;
void ReleaseNumber(uint16_t value);

The device release number as a BCD.

Returns ushort

SerialNumberIndex​

uint8_t SerialNumberIndex() const;
void SerialNumberIndex(uint8_t value);

The serial number string descriptor index.

Returns byte

SubclassCode​

uint8_t SubclassCode() const;
void SubclassCode(uint8_t value);

The subclass code.

Returns byte

UsbSpecificationNumber​

uint16_t UsbSpecificationNumber() const;
void UsbSpecificationNumber(uint16_t value);

USB specification number that the device implements as a BCD.

Returns ushort

VendorId​

uint16_t VendorId() const;
void VendorId(uint16_t value);

The vendor id.

Returns ushort

Fields​

FixedLength​

static constexpr uint8_t FixedLength = 18;

The fixed length of this descriptor type in bytes.