new PollingTagUpdater(platformopt, optionsopt)
Creates the updater instance.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
platform |
WirelessTagPlatform |
<optional> |
Platform object through
which tags to be updated were (or are going to be)
found (or created in discovery mode). In normal mode,
this is only used to possibly override configuration
options, specifically the base URI for the cloud API
endpoints. For discovery mode to work, either this or
|
||||||||||||||||||||
options |
object |
<optional> |
overriding configuration options Properties
|
- Source:
Members
discoveryMode :boolean
Type:
- boolean
- Source:
factory :WirelessTagPlatform~factory
Type:
- Source:
platform :WirelessTagPlatform
Type:
- Source:
Methods
addTags(tags) → {module:plugins/polling-updater~PollingTagUpdater}
Adds the given tag object(s) to the ones to be updated by this updater.
Adding the same (determined by identity) object again has no
effect. However, an object that represents the same tag as one
already added (i.e., has the same uuid
property value) will be
registered for updates, too.
Parameters:
Name | Type | Description |
---|---|---|
tags |
WirelessTag | Array.<WirelessTag> | the tag object(s) to be updated |
- Source:
Returns:
apiClient() → {Promise}
If necessary creates, and otherwise obtains from cache the SOAP client instance for the WSDL endpoint.
- Source:
Returns:
Resolves to the SOAP client object.
- Type
- Promise
removeTags(tags) → {module:plugins/polling-updater~PollingTagUpdater}
Removes the given tags from the ones to be updated by this updater.
Note that only the given object(s) will be removed. Specifically,
other tag objects with the same uuid
property value, if
previously added, remain registered.
Parameters:
Name | Type | Description |
---|---|---|
tags |
WirelessTag | Array.<WirelessTag> | the tag object(s) to be removed from updating |
- Source:
Returns:
startUpdateLoop(waitTimeopt, callbackopt)
Starts the continuous update loop. Registered tags will get updated
until they are removed, or stopUpdateLoop()
is called.
Has no effect if a continuous update loop is already running.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
waitTime |
number |
<optional> |
the time to wait until scheduling the
next update; defaults to |
callback |
module:wirelesstags~apiCallback |
<optional> |
result.value will be array of tag data objects returned by the polling API |
- Source:
stopUpdateLoop()
Stops the continuous update loop. Has no effect if an update loop is not currently active.
- Source:
uniqueTagManagers() → {Array.<WirelessTagManager>}
Determines the list of tag managers with unique MACs used by the tag objects registered with this updater, and returns it.
- Source:
Returns:
- Type
- Array.<WirelessTagManager>