Climaps API  version 1
Static Public Member Functions | Static Public Attributes | List of all members
stations Class Reference

Static Public Member Functions

static getAllReboots ()
 
static getSystemInfo ()
 
static rename ()
 
static setPermissionByLogin ()
 
static setPosition ()
 
static setPrivate ()
 
static setPublic ()
 

Static Public Attributes

static STATION_TYPE_DS1_5_MASTER = 2
 DS1 or DS5 master station.
 
static STATION_TYPE_DS1_5_SLAVE = 4
 DS1 or DS5 slave station.
 
static STATION_TYPE_DS3_MASTER = 50
 DS3 station with a communication board plugged in.
 
static STATION_TYPE_DS3_SLAVE = 51
 DS3 station with no communication board.
 
static PERMISSION_NONE = 0
 The user cannot view or modify the station.
 
static PERMISSION_VIEW = 10
 The user can view the station but cannot modify it.
 
static PERMISSION_MODIFY = 20
 The user can view and modify the station.
 

Detailed Description

This class lets you consult and manipulate the metadata of stations.

Member Function Documentation

static stations::getAllReboots ( )
static

Get reboots information of a station.

Parameters
intstationIdStation id
Returns

An array of objects such as:

Property Type Description
epoch int Boot time in epoch time
version string Firmware version (e.g., "3.2.4")
txfreq float The transmission frequency of the radio in MHz
txpower int The transmission power of the radio in dBm
Note
The array is sorted by epoch time, oldest boot first
static stations::getSystemInfo ( )
static

Get system information of a given station.

Parameters
intstationIdStation id.
Returns

An object such as:

Property Type Description
main object An object holding information on the main board
slot1 object An object holding information on the sensor board plugged into slot 1
slot2 object An object holding information on the sensor board plugged into slot 2
slot3 object An object holding information on the sensor board plugged into slot 3
com object An object holding information on the sensor board plugged into the communication slot

The main property is an object such as:

Property Type Description
isDS3 boolean Whether the data logger is a DS3 or of an older generation (e.g., DS5)
booted int Date of the last reboot in epoch time
txfreq float The transmission frequency of the radio in MHz
txpower int The transmission power of the radio in dBm
version string Firmware version (e.g., "3.2.4")
compilation int Date of compilation of the firmware in epoch time

The slot1, slot2, slot3, and com properties are objects such as:

Property Type Description
connected boolean Whether a bord is plugged into the corresponding slot
epoch int Date of the last time the slot was probed in epoch time
board string Name of the connected board
boardId int Id of the connected board
firmware string Name of the firmware operating the board
firmwareId int Id of the firmware operating the board
version string Firmware version (e.g., "3.2.4")
Note
Slot objects are null for non DS3 data loggers
static stations::rename ( )
static

Rename a station.

Parameters
intstationIdStation id
stringnameNew name of the station
Returns

An object such as:

Property Type Description
success boolean Whether the station could be renamed
error string An error message in case of failure
static stations::setPermissionByLogin ( )
static

Set the permission of a user on a set of stations.

Parameters
stringusersLogin of the user
stringstationsThe list of stations as a comma-separated string (e.g., "300,652,666")
intpermissionThe new permission (e.g., stations::PERMISSION_VIEW)
Returns

An object such as:

Property Type Description
success boolean Whether the station could be moved to the new position
error string An error message in case of failure
Note
The users parameter must be a single login, not a list of logins
static stations::setPosition ( )
static

Set the position of the station.

Parameters
intstationIdStation id
floatlatLatitude in degrees
floatlngLongitude in degrees
Returns

An object such as:

Property Type Description
success boolean Whether the station could be moved to the new position
error string An error message in case of failure
static stations::setPrivate ( )
static

Make a station private.

Parameters
intstationIdStation id.
Returns

An object such as:

Property Type Description
success boolean Whether the station could be made private
error string An error message in case of failure
static stations::setPublic ( )
static

Make a station public.

Parameters
intstationId Station id.
Returns

An object such as:

Property Type Description
success boolean Whether the station could be made public
error string An error message in case of failure