Class: DeviceCollection

DeviceCollection

Class representing a collection of Devices.

new DeviceCollection()

DeviceCollection.js, line 7
Create a collection of Devices.

Extends

  • jmap.core.BaseCollection

Methods

getByMap(map){Array}

DeviceCollection.js, line 47
Get a specific set of devices belonging to a map
Name Type Description
map jmap.core.Map Any map to query with
Returns:
Type Description
Array an array of devices

getByName(name){Array}

DeviceCollection.js, line 29
Get a specific set of devices belonging to a waypoint
Name Type Description
name String A device name
Returns:
Type Description
Array an array of devices

getByWaypoint(waypoint){Array}

DeviceCollection.js, line 38
Get a specific set of devices belonging to a waypoint
Name Type Description
waypoint jmap.core.Waypoint Any waypoint to query with
Returns:
Type Description
Array an array of devices

isDevice(item){Boolean}

DeviceCollection.js, line 20
Returns a boolean for weather or not argument is constructed as an Device object
Name Type Description
item Object Item to evaluate
Returns:
Type Description
Boolean Boolean based on evaluation result