![]() |
NFC / NDEF Library for Proximity APIs
4.1.0
Easily parse and create NDEF records with the Windows Proximity APIs / Near Field Communication NFC.
|
Defines the Class of Device information data. This is to be used to provide a graphical representation to the user as part of UI involving operations with Bluetooth devices. For example, it may provide a particular icon to represent the device. More...
Classes | |
| class | MinorDeviceClassType |
| Information class that specifies required information to correclty parse and create a minor device class based on one or more encoded values. The exact format of the minor device class depends on the major device class in use, and this class enables to look up the encoding and lets this implementation take care of most of the complex underlying work that needs to be done. More... | |
Public Types | |
| enum | ClassOfDeviceFormatTypes : uint { Format1 = 0x00 } |
| Defines the format of the class of device information. Only two bits are used. More... | |
| enum | MajorServiceClassTypes : uint { LimitedDiscoverableMode = 1 << 0, ReservedBit14 = 1 << 1, ReservedBit15 = 1 << 2, Positioning = 1 << 3, Networking = 1 << 4, Rendering = 1 << 5, Capturing = 1 << 6, ObjectTransfer = 1 << 7, Audio = 1 << 8, Telephony = 1 << 9, Information = 1 << 10 } |
| The different major service class flags, including the two reserved bits not yet in use. The actual service class in use can be a combination of one or more of these flags. More... | |
| enum | MajorDeviceClassTypes : uint { Miscellaneous = (uint)0x00, Computer = (uint)0x01, Phone = (uint)0x02, LanNetworkAccessPoint = (uint)0x03, AudioVideo = (uint)0x04, Peripheral = (uint)0x05, Imaging = (uint)0x06, Wearable = (uint)0x07, Toy = (uint)0x08, Health = (uint)0x09, Uncategorized = (uint)0x1F } |
| Different major device class types currently standardized. More... | |
| enum | MinorDeviceClassList : uint { ComputerUncategorized, ComputerDesktopWorkstation, ComputerServerClassComputer, ComputerLaptop, ComputerHandheldPcPdaClamshell, ComputerPalmSizePcPda, ComputerWearableComputerWatchSize, ComputerTablet, PhoneUncategorized, PhoneCellular, PhoneCordless, PhoneSmartphone, PhoneWiredModemOrVoiceGateway, PhoneCommonIsdnAccess, Lan1FullyAvailable, Lan1_1To17PercentUtilized, Lan1_17To33PercentUtilized, Lan1_33To50PercentUtilized, Lan1_50To67PercentUtilized, Lan1_67To83PercentUtilized, Lan1_83To99PercentUtilized, Lan1NoServiceAvailable, Lan2Uncategorized, AudioVideoUncategorized, AudioVideoWearableHeadsetDevice, AudioVideoHandsFreeDevice, AudioVideoMicrophone, AudioVideoLoudspeaker, AudioVideoHeadphones, AudioVideoPortableAudio, AudioVideoCarAudio, AudioVideoSetTopBox, AudioVideoHiFiAudioDevice, AudioVideoVcr, AudioVideoVideoCamera, AudioVideoCamcorder, AudioVideoVideoMonitor, AudioVideoVideoDisplayAndLoudspeaker, AudioVideoVideoConferencing, AudioVideoGamingToy, Peripheral1NotKeyboardNotPointing, Peripheral1Keyboard, Peripheral1Pointing, Peripheral1ComboKeyboardPointing, Peripheral2Uncategorized, Peripheral2Joystick, Peripheral2Gamepad, Peripheral2RemoteControl, Peripheral2SensingDevice, Peripheral2DigitizerTablet, Peripheral2CardReader, Peripheral2DigitalPen, Peripheral2HandheldScanner, Peripheral2HandheldGesturalInput, ImagingDisplay, ImagingCamera, ImagingScanner, ImagingPrinter, ImagingUncategorized, WearableWristwatch, WearablePager, WearableJacket, WearableHelmet, WearableGlasses, ToyRobot, ToyVehicle, ToyDollActionFigure, ToyController, ToyGame, HealthUndefined, HealthBloodPressureMonitor, HealthThermometer, HealthWeighingScale, HealthGlucoseMeter, HealthPulseOximeter, HealthHeartPulseRateMonitor, HealthHealthDataDisplay, HealthStepCounter, HealthBodyCompositionAnalyzer, HealthPeakFlowMonitor, HealthMedicationMonitor, HealthKneeProsthesis, HealthAnkleProsthesis, HealthGenericHealthManager, HealthPersonalMobilityDevice, Unknown } |
| Definition list of the minor device classes currently standardized for Bluetooth. More... | |
Public Member Functions | |
| void | SetMajorServiceClassFromEnum (MajorServiceClassTypes majorClass) |
| Set the MajorServiceClass property by providing a single service class as specified by the MajorServiceClassTypes enum. More... | |
| void | SetMajorServiceClassFromEnum (IEnumerable< MajorServiceClassTypes > majorClasses) |
| Set the major service class by providing a list of service class types. The method takes care of combining those into the single MajorServiceClass property. More... | |
| List< MajorServiceClassTypes > | MajorServiceClassesAsList () |
| Get the current major service class(es) as a list of enum values, which makes parsing easier than having to manually check for flags. More... | |
| void | SetMajorDeviceClassFromEnum (MajorDeviceClassTypes deviceClass) |
| Set the major device class by directly specifying the enum value. More... | |
| List< MinorDeviceClassList > | MinorDeviceClassAsEnum (int primarySecondary) |
| Get all currently set minor device class values as a list for the specified primary or secondary minor device class. More... | |
| List< MinorDeviceClassType > | MinorDeviceClassAsType (int primarySecondary) |
| Get all currently set minor device class values as extended type info for the specified primary or secondary minor device class. More... | |
| void | SetMinorDeviceClassFromEnum (List< MinorDeviceClassList > minorClassType, int primarySecondary, bool clearPrevious) |
| Conveniently set a minor device class by supplying enum values, letting the implementation to figure out the exact bit encoding. More... | |
| BtClassOfDevice (byte[] codData) | |
| Create a new class of device instance and parse the supplied class of device data into the instance properties. More... | |
| BtClassOfDevice () | |
| Create an empty class of device instance. More... | |
| byte [] | ToByteArray () |
| Convert the data stored in this class of device instance to a byte array, for use in the payload of the parent record. More... | |
Static Public Member Functions | |
| static int | NumDeviceClassesForMajorClass (MajorDeviceClassTypes majorType) |
| Get how many minor classes the supplied major class has. A major class can have 0 to 2 minor classes, depending on its type. See the Bluetooth specifications for more details. More... | |
| static bool | UsesFlagsForMinorClass (MajorDeviceClassTypes majorType, int primarySecondary) |
| Check whether the major type is using flags for its minor type (primary / secondary). If yes, multiple minor values can be set for a minor type. If no, only a single minor value applies. More... | |
Static Public Attributes | |
| static readonly List< MinorDeviceClassType > | MinorDeviceClasses |
| Minor device class definitions. Used by the implementation to assemble and to parse the minor device class information encoded into the record. More... | |
Properties | |
| ClassOfDeviceFormatTypes | ClassOfDeviceFormat [get, set] |
| The class of device format currently in use by the class of device definition. More... | |
| uint | MajorServiceClass [get, set] |
| Defines the major service class of the Bluetooth device. Bitmask containing one or more flags from the MajorServiceClassTypes enum. More... | |
| uint | MajorDeviceClass [get, set] |
| Major device class of the Bluetooth device. Can equal one of the types defined in the MajorDeviceClassTypes enum. More... | |
| uint | MinorDeviceClass [get, set] |
| Minor device class of the Bluetooth of the device. More... | |
Defines the Class of Device information data. This is to be used to provide a graphical representation to the user as part of UI involving operations with Bluetooth devices. For example, it may provide a particular icon to represent the device.
For more information regarding the standardized values that are contained in the class of device, see: https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
|
strong |
Defines the format of the class of device information. Only two bits are used.
Currently, only the format #1 is defined / standardized.
|
strong |
Different major device class types currently standardized.
|
strong |
The different major service class flags, including the two reserved bits not yet in use. The actual service class in use can be a combination of one or more of these flags.
|
strong |
Definition list of the minor device classes currently standardized for Bluetooth.
The values are not mapped directly to bit-values stored in the payload. They are used to interact with the class and to conveniently set one or more minor device classes. The implementation will take care of setting the correct bits when you supply the minor device classes. Of course, you need to make sure the minor device classes fit to the major device class.
| NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.BtClassOfDevice | ( | byte [] | codData | ) |
Create a new class of device instance and parse the supplied class of device data into the instance properties.
| codData | Class of device payload data to parse and to internalize for use in this class through properties. |
| NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.BtClassOfDevice | ( | ) |
Create an empty class of device instance.
| List<MajorServiceClassTypes> NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.MajorServiceClassesAsList | ( | ) |
Get the current major service class(es) as a list of enum values, which makes parsing easier than having to manually check for flags.
| List<MinorDeviceClassList> NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.MinorDeviceClassAsEnum | ( | int | primarySecondary | ) |
Get all currently set minor device class values as a list for the specified primary or secondary minor device class.
| primarySecondary | Set to 1 to retrieve the minor device class values for the first minor class, or set to 2 for the second minor class (if applicable). |
| List<MinorDeviceClassType> NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.MinorDeviceClassAsType | ( | int | primarySecondary | ) |
Get all currently set minor device class values as extended type info for the specified primary or secondary minor device class.
In contrast to the MinorDeviceClassAsEnum() method, this will retrieve a list of MinorDeviceClassType objects; these contain not just the actual minor device class value(s), but also additional information about each minor device class in use. See the definition of the MinorDeviceClassType class for more details
| primarySecondary | Set to 1 to retrieve the minor device class values for the first minor class, or set to 2 for the second minor class (if applicable). |
|
static |
Get how many minor classes the supplied major class has. A major class can have 0 to 2 minor classes, depending on its type. See the Bluetooth specifications for more details.
| majorType | The major type to retrieve the number of minor classes for. |
| void NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.SetMajorDeviceClassFromEnum | ( | MajorDeviceClassTypes | deviceClass | ) |
Set the major device class by directly specifying the enum value.
| deviceClass | The major device class as enum value. |
| void NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.SetMajorServiceClassFromEnum | ( | MajorServiceClassTypes | majorClass | ) |
Set the MajorServiceClass property by providing a single service class as specified by the MajorServiceClassTypes enum.
| majorClass | The major service class to set. |
| void NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.SetMajorServiceClassFromEnum | ( | IEnumerable< MajorServiceClassTypes > | majorClasses | ) |
Set the major service class by providing a list of service class types. The method takes care of combining those into the single MajorServiceClass property.
| majorClasses | A list of different major service classes. |
| void NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.SetMinorDeviceClassFromEnum | ( | List< MinorDeviceClassList > | minorClassType, |
| int | primarySecondary, | ||
| bool | clearPrevious | ||
| ) |
Conveniently set a minor device class by supplying enum values, letting the implementation to figure out the exact bit encoding.
| minorClassType | The minor device class value to set. If the minor device class supports setting multiple values as flags, the minorClassType list parameter can contain multiple minor device classes. Otherwise, it can only contain a single minor device class. Find out how if the minor device class uses flags, use UsesFlagsForMinorClass(). |
| primarySecondary | Whether to assign the minor device class value as a primary or secondary minor device class. Set to 1 to retrieve the minor device class values for the first minor class, or set to 2 for the second minor class (if applicable). |
| clearPrevious | Set to true to delete all minor device classes that are currently assigned before applying the new minor device class. This essentially sets the MinorDeviceClass property to 0 before using the logical OR operator to add the new minor device class. |
| byte [] NdefLibrary.Ndef.NdefBtSecureSimplePairingRecord.BtClassOfDevice.ToByteArray | ( | ) |
Convert the data stored in this class of device instance to a byte array, for use in the payload of the parent record.
|
static |
Check whether the major type is using flags for its minor type (primary / secondary). If yes, multiple minor values can be set for a minor type. If no, only a single minor value applies.
Currently, only the primary minor class of the Imaging major class is using flags.
| majorType | Major device class type to retrieve the information for. |
| primarySecondary | Use the primary or secondary bits. |
|
static |
Minor device class definitions. Used by the implementation to assemble and to parse the minor device class information encoded into the record.
For details about the individual values, see the MinorDeviceClassType class definition. The actual definitions correspond to the Bluetooth specification, as defined by: https://www.bluetooth.org/en-us/specification/assigned-numbers/baseband
|
getset |
The class of device format currently in use by the class of device definition.
|
getset |
Major device class of the Bluetooth device. Can equal one of the types defined in the MajorDeviceClassTypes enum.
|
getset |
Defines the major service class of the Bluetooth device. Bitmask containing one or more flags from the MajorServiceClassTypes enum.
|
getset |
Minor device class of the Bluetooth of the device.
This is the original value, where multiple minor device classes can be encoded. Note that the value retrieved here does not directly correspond to the MinorDeviceClassList enum definition. To de-encode the values that are actually set to the enum, use the MinorDeviceClassAsEnum() method.
1.8.13