Table of Contents

Class NullDevice

Namespace
Yubico.Core.Devices.Hid
Assembly
Yubico.Core.dll
public class NullDevice : IHidDevice, IDevice
Inheritance
object
NullDevice
Implements

Properties

LastAccessed

The time when this device was last accessed.

public DateTime LastAccessed { get; }

Property Value

DateTime

Remarks

Certain Yubico devices, such as the YubiKey, require a short delay before switching to and communicating with a different USB interface. This is called the reclaim timeout. The YubiKey SDK must keep track of the last interface to have been accessed and when in order to properly implement this delay.

ParentDeviceId

A unique identifier corresponding to the parent USB composite device, if available.

public string? ParentDeviceId { get; }

Property Value

string

Remarks

Certain devices that this SDK works with, like the YubiKey, are presented to the operating system as a composite device. This means that, to the operating system, multiple devices may be detected even though you have only plugged in one physical device. OSes that do this still expose a single "composite" device in their device tree. This is the common parent across all of the sub-devices.

Keeping track of this information, if available, can greatly increase the SDK's performance when it attempts to reconstruct the single, composite device out of all of the sub-devices. This isn't always possible, however, as the OS services that we use to enumerate the sub-devices don't always provide much information about its parent device. macOS and Windows 7, for example, cannot provide parent information for smart card devices. In those cases, we'll have to make do and attempt to match these devices some other way.

Path

Gets the platform defined path to the device.

public string Path { get; }

Property Value

string

Remarks

The exact meaning of this property may vary between operating systems and device types. The SDK treats this property as an opaque value and only uses it to check for uniqueness across device instances. It is strongly recommended that you do not take a dependency on the exact format or meaning of the value of this property.

ProductId

public short ProductId { get; }

Property Value

short

Usage

public short Usage { get; }

Property Value

short

UsagePage

public HidUsagePage UsagePage { get; }

Property Value

HidUsagePage

VendorId

public short VendorId { get; }

Property Value

short

Methods

ConnectToFeatureReports()

Establishes an active connection to the HID device for the transmittal of data through feature reports.

public IHidConnection ConnectToFeatureReports()

Returns

IHidConnection

ConnectToIOReports()

public IHidConnection ConnectToIOReports()

Returns

IHidConnection