public byte[] CreateServiceRecord(
ServiceRecord record
)
Public Function CreateServiceRecord (
record As ServiceRecord
) As Byte()
public:
array<unsigned char>^ CreateServiceRecord(
ServiceRecord^ record
)
member CreateServiceRecord :
record : ServiceRecord -> byte[]
The only oddity (as with parsing) is with the TextString type. The ServiceElement can either hold the string already encoded to its array of bytes or an String. In the latter case we will always simply encode the string to an array of bytes using encoding UTF8.
Currently any UUIDs in the record are written out in the form supplied, we should probably write a ‘short-form’ equivalent if its a ‘Bluetooth-based’ UUID e.g. Uuid128 as Uuid16.