This article gives example methods to convert between tag ids, tag objects and tag id strings using the Ubisense .NET API.
None. You can use this article on its own.
Before you start, remember to:
Add the Ubisense references to your application
The following examples give definitions for methods
to convert between
Ubisense.ULocationIntegration.Tag instances,
string instances and tag
IDs as
ulong integers.
Ubisense.ULocationIntegration.Tag.ConvertStringToId is used to get a tag ID from the string written on the tag casing, for
example '123-123-123-123':
|
You can create a tag from a string by using the tag ID
in the
Ubisense.ULocationIntegration.Tag
constructor:
|
You can get a tag's ID as a
ulong by using the ToString() method on the
Ubisense.ULocationIntegration.Tag.Id field and again use
Ubisense.ULocationIntegration.Tag.ConvertStringToId:
|
Ubisense.ULocationIntegration.Tag.ConvertStringToId is used to get a tag ID as a string, with any
char as a byte-separator. A hyphen is commonly used so that the string
matches that printed on the tag casing. The following example shows how to use
this method given a tag ID as a
ulong:
|
This example uses the techniques from previous
examples to get the tag ID string from a
Ubisense.ULocationIntegration.Tag:
|
This example shows how to create a
Ubisense.ULocationIntegration.Tag instance given its ID:
|