Class: WirelessTagManager

WirelessTagManager(platform, data)

new WirelessTagManager(platform, data)

The cloud instance of a Wireless Tag Manager. There can be multiple Wireless Tag managers under one account. A user will not normally need to create instances directly; instead they are found, and created by WirelessTagPlatform#discoverTagManagers.

Parameters:
Name Type Description
platform WirelessTagPlatform

the platform instance that discovered this tag manager

data Object

the object comprising the tag manager's status properties, as returned by the API endpoint.

Properties:
Name Type Description
mac string

unique serial number (MAC) of the tag manager

name string

name of the tag manager (user-assigned)

radioId string
rev string

hardware revision

wirelessConfig object
online boolean

true if the tag manager is online, and false otherwise

selected boolean

true if the tag manager is currently selected, and false otherwise

dbid number

a sequential number among the tag managers associated with an account

Source:

Members

callAPI :function

Type:
  • function
Source:

data :object

the JSON object returned by the cloud API

Type:
  • object
Source:

wirelessTagPlatform :WirelessTagPlatform

Type:
Source:

Methods

discoverTags(queryopt, callbackopt) → {Promise}

Retrieves the tags associated with this tag managaer and available to the connected account. The list is optionally filtered depending on the supplied query parameter.

Parameters:
Name Type Attributes Description
query Object <optional>

an object with keys and values that a tag data object returned by the API has to meet. The most useful ones are likely name and uuid. Consult the GetTagForSlaveId JSON API for possible keys.

callback module:wirelesstags~apiCallback <optional>

if provided, query must be provided too, even if as value undefined.

Source:
Fires:
Returns:

Resolves to an array of WirelessTag instances.

Type
Promise

findTagById(slaveId, callbackopt) → {Promise}

Finds the tag associated with this tag manager and identified by the given 'slaveId'.

Parameters:
Name Type Attributes Description
slaveId number

the sequential ID of the tag to be found

callback module:wirelesstags~apiCallback <optional>
Since:
  • 0.6.2
Source:
Returns:

resolves to the tag object if successful, and otherwise rejects with an InvalidOperationError

Type
Promise

select(callbackopt) → {Promise}

Selects this tag manager for subsequent API calls that expect it, if this tag manager is not already selected.

Note that the library will call this automatically, and so a user will not normally need to do so.

Parameters:
Name Type Attributes Description
callback module:wirelesstags~apiCallback <optional>
Source:
Returns:

resolves to the tag manager instance

Type
Promise

Events

data

Data event. Emitted whenever the properties data for an instance changes.

Type:
Source:

discover

Discover event. Emitted for every WirelessTag instance discovered.

Type:
Source: