ezeio2:expref:ds

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ezeio2:expref:ds [2019-08-29 15:20] andrehezeio2:expref:ds [2021-02-24 18:55] (current) – [ds( deviceno, subject )] andreh
Line 1: Line 1:
-===== Expressions ======+===== Device Status ======
  
 ==== ds( deviceno, subject ) ==== ==== ds( deviceno, subject ) ====
Line 9: Line 9:
 <code>ds( deviceno, subject )</code> <code>ds( deviceno, subject )</code>
  
-This function returns the current status of a device.+This function returns the current status of a device or the aggregate status of all devices.
  
 === Parameters === === Parameters ===
  
-| ''deviceno'' | Device number (1 - 40) |+| ''deviceno'' | Device number (1 - 40). If 0 (zero), the function returns the aggregate status of ALL devices.|
 | ''subject'' | Subject to request (see below) | | ''subject'' | Subject to request (see below) |
  
 ^ Subject ^ Description ^ ^ Subject ^ Description ^
-| Battery/supply voltage in mV | +DVCSTAT_BATTVOLT | Battery/supply voltage in mV | 
-| Signal level, typically 0-100% | +DVCSTAT_SIGNAL | Signal level, typically 0-100% | 
-| Comm count, typically count of valid messages | +DVCSTAT_COMMCOUNT | Comm count, typically count of valid messages | 
-| Comm error count, typically number of failed communication attempts | +DVCSTAT_COMMERR | Comm error count, typically number of failed communication attempts | 
-| Last comm, EPOCH timestamp of last successful communication |+DVCSTAT_LASTCOMM | Last comm, EPOCH timestamp of last successful communication 
 +| DVCSTAT_COMMSTAT | Device communication status (0-7, where 0=unknown, 1=error, 2,3,4=warning, 5,6,7=ideal) | 
 +| DVCSTAT_OPSTAT | Device operational status (0-3, where 0=unknown, 1=error, 2=warning, 3=nominal) | 
 +| DVCSTAT_APPSTAT | Device application status (0-7, where 0=unknown, 1=error, 2,3,4=warning, 5,6,7=nominal) | 
 +| DVCSTAT_STAT | Aggregated status (0-3, 0=unknown, 1=error, 2=warning, 3=ok) |
  
 === Return value === === Return value ===
Line 29: Line 33:
 === Example usage === === Example usage ===
  
-<code>ds(2, 4)</code>+<code>ds(2, DVCSTAT_COMMERR)</code>
  
 Returns the communication error count from device 2. Returns the communication error count from device 2.
  
  • ezeio2/expref/ds.1567092007.txt.gz
  • Last modified: 2019-08-29 15:20
  • by andreh