![]() |
NFC / NDEF Library for Proximity APIs
4.1.0
Easily parse and create NDEF records with the Windows Proximity APIs / Near Field Communication NFC.
|
Handover Select Record for the Connection Handover Standard. Its payload contains at least one reference to an Alternative Carrier record that defines a possible carrier for a connection handover. More...
Public Member Functions | |
| void | AddHandoverAlternativeCarrierRecord (NdefHandoverAlternativeCarrierRecord newRecord) |
| Add another Alternative Carrier record as a child and create the storage list if necessary. Also automatically updates the payload. More... | |
| NdefHandoverSelectRecord () | |
| Create an empty Handover Select Record. More... | |
| NdefHandoverSelectRecord (NdefRecord other) | |
| Create a Handover Select record based on the record passed through the argument. More... | |
| NdefHandoverSelectRecord (NdefHandoverVersion version) | |
| Create a Handover Select record based on the specified version number. More... | |
| NdefHandoverSelectRecord (NdefHandoverVersion version, NdefHandoverAlternativeCarrierRecord alternativeCarrier) | |
| Create a Handover Select record based on the specified version number and supplying an alternative carrier record. More... | |
| void | AssemblePayload () |
| Create the payload based on the data stored in the properties. Usually called automatically when changing properties, but you might need to call this manually if you modify the list of alternative carrier records directly without using accessor method provided by this class. More... | |
| void | SetAndAssignChildRecords (byte[] payloadToParse) |
| Go through the records stored in this message, parse them and assign them to the individual properties. This also checks if the child records are actually valid for a Handover Select message. More... | |
Public Member Functions inherited from NdefLibrary.Ndef.NdefRecord | |
| NdefRecord () | |
| Create an empty record, not setting any information. More... | |
| NdefRecord (TypeNameFormatType tnf, byte[] type) | |
| Create a new record with the specified type name format and type. Doesn't set the payload and ID. More... | |
| NdefRecord (NdefRecord other) | |
| Create a new record, copying the information of the record sent through the parameter. More... | |
| Type | CheckSpecializedType (bool checkForSubtypes) |
| Checks the type name format and type of this record and returns the appropriate specialized class, if one is available and known for this record type. More... | |
| virtual bool | CheckIfValid () |
| Checks if the contents of the record are valid; throws an exception if a problem is found, containing a textual description of the issue. More... | |
Static Public Member Functions | |
| static bool | IsRecordType (NdefRecord record) |
| Checks if the record sent via the parameter is indeed a Handover Select record. Checks the type and type name format. More... | |
Static Public Attributes | |
| static readonly byte [] | BtHsType = Encoding.UTF8.GetBytes("Hs") |
| Type of the Bluetooth Carrier Configuration Record. More... | |
Properties | |
| NdefHandoverVersion | HandoverVersion [get, set] |
| Indicates the connection handover specification, split up into a Major and a Minor version number. This implementation conforms to the Connection Handover specification version 1.3 by the NFC Forum. More... | |
| List< NdefHandoverAlternativeCarrierRecord > | HandoverAlternativeCarrierRecords [get, set] |
| After the Handover Select record, usually one or more Alternative Carrier records follow that define the possible carriers for the handover. More... | |
| NdefHandoverErrorRecord | HandoverErrorRecord [get, set] |
| The optional error record needs to be last in the message and can contain details if there was a problem. More... | |
Properties inherited from NdefLibrary.Ndef.NdefRecord | |
| TypeNameFormatType | TypeNameFormat [get, set] |
| Indicates the structure of the value of the TYPE field. More... | |
| virtual byte [] | Type [get, set] |
| An identifier describing the type of the payload. More... | |
| byte [] | Id [get, set] |
| An identifier in the form of a URI reference. More... | |
| virtual byte [] | Payload [get, set] |
| The application data carried within an NDEF record. More... | |
Additional Inherited Members | |
Public Types inherited from NdefLibrary.Ndef.NdefRecord | |
| enum | TypeNameFormatType { TypeNameFormatType.Empty = 0x00, TypeNameFormatType.NfcRtd = 0x01, TypeNameFormatType.Mime = 0x02, TypeNameFormatType.Uri = 0x03, TypeNameFormatType.ExternalRtd = 0x04, TypeNameFormatType.Unknown = 0x05, TypeNameFormatType.Unchanged = 0x06, TypeNameFormatType.Reserved = 0x07 } |
| Standardized type name formats, as defined by the NDEF record specification from the Nfc Forum. More... | |
Protected Attributes inherited from NdefLibrary.Ndef.NdefRecord | |
| byte [] | _type |
| Byte array storing raw contents of the type. Use Type property to access it whenever possible. More... | |
| byte [] | _payload |
| Byte array storing raw contents of the payload. Use Payload property to access it whenever possible. More... | |
Handover Select Record for the Connection Handover Standard. Its payload contains at least one reference to an Alternative Carrier record that defines a possible carrier for a connection handover.
This record is sent either in a connection handover process to select alternative carriers, or it can also be stored on an NFC tag to provide information about a connection handover to for example a Bluetooth carrier.
After the version information (this record is implemented according to version 1.3 of the NFC Forum Connection Handover specification from 2014-01-16), the payload of this record essentially contains a complete NDEF message (within its payload!) that identifies alternative carriers. These are then subrecords within this record.
At the end, one Handover error record may follow.
| NdefLibrary.Ndef.NdefHandoverSelectRecord.NdefHandoverSelectRecord | ( | ) |
Create an empty Handover Select Record.
| NdefLibrary.Ndef.NdefHandoverSelectRecord.NdefHandoverSelectRecord | ( | NdefRecord | other | ) |
Create a Handover Select record based on the record passed through the argument.
Internalizes and parses the payload of the original record. The original record has to be a Handover Select Record as well.
| other | Record to copy into this Handover Select record. |
| NdefException | Thrown if attempting to create a Handover Select record based on an incompatible record type. |
| NdefLibrary.Ndef.NdefHandoverSelectRecord.NdefHandoverSelectRecord | ( | NdefHandoverVersion | version | ) |
Create a Handover Select record based on the specified version number.
To use the Handover Select record, you also need to supply at least one Alternative Carrier record.
| version | Version to use for the handover select record. |
| NdefLibrary.Ndef.NdefHandoverSelectRecord.NdefHandoverSelectRecord | ( | NdefHandoverVersion | version, |
| NdefHandoverAlternativeCarrierRecord | alternativeCarrier | ||
| ) |
Create a Handover Select record based on the specified version number and supplying an alternative carrier record.
| version | Version to use for the handover select record. |
| alternativeCarrier | A single alternative carrier record. If you want to add multiple alternative carrier records, use the AddHandoverAlternativeCarrierRecord() method. |
| void NdefLibrary.Ndef.NdefHandoverSelectRecord.AddHandoverAlternativeCarrierRecord | ( | NdefHandoverAlternativeCarrierRecord | newRecord | ) |
Add another Alternative Carrier record as a child and create the storage list if necessary. Also automatically updates the payload.
| newRecord | Additional Alternative Carrier record to add to the list for use as children of the Handover Select record. |
| void NdefLibrary.Ndef.NdefHandoverSelectRecord.AssemblePayload | ( | ) |
Create the payload based on the data stored in the properties. Usually called automatically when changing properties, but you might need to call this manually if you modify the list of alternative carrier records directly without using accessor method provided by this class.
| NdefException | Thrown if unable to assemble the payload. The exception message contains further details about the issue. |
|
static |
Checks if the record sent via the parameter is indeed a Handover Select record. Checks the type and type name format.
| record | Record to check. |
| void NdefLibrary.Ndef.NdefHandoverSelectRecord.SetAndAssignChildRecords | ( | byte [] | payloadToParse | ) |
Go through the records stored in this message, parse them and assign them to the individual properties. This also checks if the child records are actually valid for a Handover Select message.
|
static |
Type of the Bluetooth Carrier Configuration Record.
|
getset |
After the Handover Select record, usually one or more Alternative Carrier records follow that define the possible carriers for the handover.
Note: setting this list triggers updating the payload. If you modify the list directly, make sure you call AssemblePayload() to trigger another payload update. Or use the AddHandoverAlternativeCarrierRecord() method to automate this process.
|
getset |
The optional error record needs to be last in the message and can contain details if there was a problem.
|
getset |
Indicates the connection handover specification, split up into a Major and a Minor version number. This implementation conforms to the Connection Handover specification version 1.3 by the NFC Forum.
1.8.13