Pre-processing of setting the statuses that enter “ID:SID” element. Allows to process and change if required the status that is set for the device and its length optl.

Note:

  • if the status changes due to internal reasons (e.g. leakage or temperature valve) the pre-handler is not got called.
  • V-ID and ID should be equal, in other words the script which contains element’s status pre-handler should be processed on the same module as element.

Return values:

  • return 0; – ignore
  • return opt; – use the current
  • return newStatus; – new status on the stack ( up to 256 bytes)
  • return may be missed then return opt adds automatically;

For example:

V-ID@V-ADDR
{
     u8 newStatus[2];
     optl = 2;
     newStatus[0] = time();
     return newStatus;
}

V-ADDR device status setting pre-processing, new status 2 bytes in length setting and changing the status setting for newStatus are shown in the example.