Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| ezeio2:scriptref:updatedevicestatus [2020-06-15 18:57] – created andreh | ezeio2:scriptref:updatedevicestatus [2025-07-10 18:21] (current) – andreh | ||
|---|---|---|---|
| Line 5: | Line 5: | ||
| === Description === | === Description === | ||
| - | < | + | < |
| Updates the device status. | Updates the device status. | ||
| Line 17: | Line 17: | ||
| | '' | | '' | ||
| | '' | | '' | ||
| + | | '' | ||
| Only the first parameter, deviceno, is required. All other parameters are optional. Use _ (underscore) to skip parameters (eg '' | Only the first parameter, deviceno, is required. All other parameters are optional. Use _ (underscore) to skip parameters (eg '' | ||
| Line 22: | Line 23: | ||
| === Return value === | === Return value === | ||
| - | This function does not return a value. | + | Returns 1 by default, or the value of the '' |
| === Example usage === | === Example usage === | ||
| <code javascript> | <code javascript> | ||
| - | | + | |
| + | // Indicate normal condition | ||
| + | UpdateDeviceStatus( 3, DS_COM_OK, DS_OP_FULL, DS_APP_OK ); | ||
| + | |||
| + | // Indicate marginal communication condition | ||
| + | | ||
| + | |||
| + | // Indicate application status | ||
| + | new batteryVoltage = 12345; // read the battery voltage from the device | ||
| + | | ||
| + | |||
| </ | </ | ||