ezeio2:scriptref:getdevicestatus

Differences

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

Link to this comparison view

Next revision
Previous revision
ezeio2:scriptref:getdevicestatus [2020-06-15 18:37] – created andrehezeio2:scriptref:getdevicestatus [2021-06-14 22:45] (current) andreh
Line 11: Line 11:
 === Parameters === === Parameters ===
  
-| ''deviceno'' | Device number to request status from (or 0 for aggregate status) |+| ''deviceno'' | Device number to request status from (or 0 for all devices) |
 | ''status item'' | The status item to return (see below) | | ''status item'' | The status item to return (see below) |
  
Line 23: Line 23:
 | ''DVCSTAT_OPSTAT'' | Operational status, one of: \\ DS_OP_UNKNOWN \\ DS_OP_ERROR \\ DS_OP_PART \\ DS_OP_FULL | YES | | ''DVCSTAT_OPSTAT'' | Operational status, one of: \\ DS_OP_UNKNOWN \\ DS_OP_ERROR \\ DS_OP_PART \\ DS_OP_FULL | YES |
 | ''DVCSTAT_APPSTAT'' | Application status, one of: \\ DS_APP_UNKNOWN \\ DS_APP_ERROR \\ DS_APP_WARNING \\ DS_APP_OK \\ DS_APP_OK1 \\ DS_APP_OK2 \\ DS_APP_OK3 \\ DS_APP_OK4 | YES | | ''DVCSTAT_APPSTAT'' | Application status, one of: \\ DS_APP_UNKNOWN \\ DS_APP_ERROR \\ DS_APP_WARNING \\ DS_APP_OK \\ DS_APP_OK1 \\ DS_APP_OK2 \\ DS_APP_OK3 \\ DS_APP_OK4 | YES |
-| ''DVCSTAT_STAT'' | Aggregated status, one of: \\ DS_UNKNOWN \\ DS_ERROR \\ DS_WARNING \\ DS_OK | YES |+| ''DVCSTAT_STAT'' | Aggregated status, one of: (read only) \\ DS_UNKNOWN \\ DS_ERROR \\ DS_WARNING \\ DS_OK | YES | 
 +| ''DVCSTAT_ACTIVE'' | Returns 1 if device is loaded/active (read only) | NO |  
 +| ''DVCSTAT_REGCOUNT'' | Number of registers allocated (read only) | NO |  
 +| ''DVCSTAT_TYPE'' | Driver id number | NO |  
 +| ''DVCSTAT_VERSION'' | Driver version | NO |  
 +| ''DVCSTAT_MODE'' | User defined mode | NO |  
 +| ''DVCSTAT_PARAM'' | User defined parameter | NO |  
 + 
 +//DVCSTAT_ACTIVE, _REGCOUNT, _TYPE, _VERSION, _MODE and _PARAM are available in firmware 21061101 and newer//
  
 === Return value === === Return value ===
Line 32: Line 40:
  
 <code javascript>    <code javascript>   
-   if( GetDeviceStatus(0, DVCSTAT_STAT) < DS_OK ) {+   if( GetDeviceStatus(0, DVCSTAT_STAT) < DS_OK ) {  // Get 'worst' status from all devices
       // DEVICE ERROR DETECTED -- SHUT OFF PROCESS       // DEVICE ERROR DETECTED -- SHUT OFF PROCESS
       SetOutput(1, 0);       SetOutput(1, 0);
  • ezeio2/scriptref/getdevicestatus.1592246263.txt.gz
  • Last modified: 2020-06-15 18:37
  • by andreh