Class DeviceTypeExtensions
Extensions for the DeviceType enum.
Inherited Members
Namespace: NixUniversalSDK
Assembly: NixUniversalSDK.dll
Syntax
public static class DeviceTypeExtensions
Methods
GetDeviceType(byte)
Helper method to find the DeviceType enum that corresponds to a byte value. If an unknown byte value is provided, Unknown is returned.
Declaration
public static DeviceType GetDeviceType(this byte value)
Parameters
Type | Name | Description |
---|---|---|
byte | value | Byte value to query |
Returns
Type | Description |
---|---|
DeviceType | DeviceType enum corresponding to the byte value |
GetDeviceType(string)
Helper method to find the DeviceType enum that corresponds to the name found during device advertisement. If an unknown name is provided, Unknown is returned.
Declaration
public static DeviceType GetDeviceType(this string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | Advertised name of from a Nix device |
Returns
Type | Description |
---|---|
DeviceType | DeviceType enum corresponding to the advertised name |
GetDeviceType(ushort, ushort)
Helper method to find the DeviceType enum that corresponds to a given USB vendor ID and product ID. If an unknown combination is provided, Unknown is returned.
Declaration
public static DeviceType GetDeviceType(ushort vid, ushort pid)
Parameters
Type | Name | Description |
---|---|---|
ushort | vid | USB vendor ID from USB device |
ushort | pid | USB product ID from USB device |
Returns
Type | Description |
---|---|
DeviceType | DeviceType enum corresponding to the provided vendor and product IDs |
GetFullName(DeviceType)
Full name for device type, as advertised on Bluetooth
Declaration
public static string GetFullName(this DeviceType type)
Parameters
Type | Name | Description |
---|---|---|
DeviceType | type |
Returns
Type | Description |
---|---|
string |
GetShortName(DeviceType)
Short name for the device type
Declaration
public static string GetShortName(this DeviceType type)
Parameters
Type | Name | Description |
---|---|---|
DeviceType | type |
Returns
Type | Description |
---|---|
string |
IsFeatureSupported(DeviceType, LicenseFeature)
Defines if a particular feature is supported by a certain device type
Declaration
public static bool IsFeatureSupported(this DeviceType type, LicenseFeature feature)
Parameters
Type | Name | Description |
---|---|---|
DeviceType | type | |
LicenseFeature | feature |
Returns
Type | Description |
---|---|
bool |