System Item

sys( subject )

Return a system status value.

Description

sys( subject )

This function returns the current value of a system item.

Parameters

subject Subject to request (see below)
Subject Description
SYSITEM_GPSX Current GPS longitude in degrees x 106
SYSITEM_GPSY Current GPS latitude in degrees x 106
SYSITEM_GPSZ Current GPS elevation in meter x 10
SYSITEM_GPSSIGNAL Current GPS reception signal
SYSITEM_GPSLOCK 0 if GPS is not locked. 1 if locked.
SYSITEM_UPTIME Number of seconds since last reset
SYSITEM_CELLINHIBIT 0 if normal operation. >0 if cell modem is turned off
SYSITEM_RSSI Cell modem RSSI (received signal), 1 (bad) to 31 (good)
SYSITEM_ETHLINK 0 if no hardware link detected. 1 if ok
SYSITEM_ETHCONN 0 if not connected via Ethernet. 1 if connected
SYSITEM_CELLCONN 0 if not connected to cell network. 1 if connected
SYSITEM_YEAR Current year (eg 2020)
SYSITEM_MONTH Current month (1-12)
SYSITEM_DAY Current day of the month (1-31)
SYSITEM_WDAY Current weekday (0=Sunday, 6=Saturday)
SYSITEM_YDAY Current day of the year
SYSITEM_HOUR Current hour (0-23)
SYSITEM_MINUTE Current minute (0-59)
SYSITEM_SECOND Current second (0-59)
SYSITEM_EPOCH Epoch time stamp (seconds since 1970-01-01 00:00:00 UTC
SYSITEM_RND Random number 0-232

Returns the current status value of the subject requested.

Example usage

sys(SYSITEM_MONTH)

Returns the current month number.

sys(SYSITEM_RND) % 47

Returns random value between 0 and 46