Link Search Menu Expand Document

Debug Entity Functions

Sep 28 2022 at 12:00 AM

  1. Delay

Delay

Function Description:

This function delays the value received from an endpoint for the specified duration. The function will only update to the value received after the delay duration has passed.

Function Structure:

Figure 1 - Delay

Inputs Required:

  • Endpoint ID - It is the specific endpoint requiring a delay on value output. It can be of any data type.
  • Time - This determines how long you wish to delay the endpoint value output for (HH:MM:SS).

Output Expected:

  • Datetime - The value returned is in datetime format after the delay duration has passed.

Use Case Example(s):

Example 1:

Live Endpoint DatetimeEndpoint ValueTimeDelay Return
2022/01/01 00:00:005000:04:00n/a
2022/01/01 00:02:005000:04:00n/a
2022/01/01 00:04:005200:04:0050
2022/01/01 00:06:005200:04:0050
2022/01/01 00:08:005200:04:0052
2022/01/01 00:10:005700:04:0052
2022/01/01 00:10:006000:04:0052
2022/01/01 00:10:006000:04:0057
ExampleLive Endpoint DatetimeDelay Duration (seconds)Delayed Endpoint Datetime
22018/01/01 00:00:0002018/01/01 00:00:00
32018/01/01 00:01:30602018/01/01 00:02:30
42018/01/01 00:03:001202018/01/01 00:05:00

Use Case Scenario(s):

1. If a fridge door has been left open for a period of time (ie. 5 minutes), notify the site manager.
2. If a generator loses more than 5% fuel capacity within ten minutes, notify security. At the same time, if the generator is being refilled at a rate of 5% every 3 minutes, send notification.