Utilitary (/util/...) resources
Resources found under the /util/ category are available by default on all Octave devices. They allow control and monitoring of several edge system level processes.
/util/cellular
and /util/sim
are able to report information about the cellular connectivity status
/util/time
provides time information
/util/ulpm
is used to configure and operate ULPM as indicated here
/util/counter
and /util/delay
are used to handle periodic timers and delays on the Edge side. Their usage is detailed below.
Counter resource
The /counter resource is used to configure periodic executions on the Octave Edge side.
In order to configure a periodic counter:
- set
/counter/enable
to True - set
/counter/period
to the desired period value (in seconds)
Once this is done, the /counter/value
will be increased by one unit every time the period expires.
The typical usage is to Observe this counter to trigger an Edge Action on a periodic basis.
To handle multiple periods, multiple Observations can be made on the same counter with a throttling introduced in the Observations. Or one unique Edge action can compute different modulo values of the counter to run different parts of code.
/counter/trigger
can be written to in order to force a counter increment at any time (counter needs to be enabled, and this increment will be done on top of ongoing periodic increments)
Use counter to periodically report multiple resource values to the cloud
The counter feature can be used as indicated in this reference implementation
Delay resource
Delay resource is used to trigger an event a given time after an initial event.
In order to use the delay feature:
- set
/delay/set
to the desired delay value (in seconds) - observe the
/delay/value
: it will be updated (to the delay value) as soon as the delay has expired
The typical way of useing the delay feature is for an Edge action to perform an action (based on other inputs/logic) and to initiate a given delay
Then, with an Observation on the /delay/value
targeting another Edge Action, this allows execution of a secondary action systematically, any given time after the inital Edge Action.
Only one delay can be handled at the same time
If delay is set before a previously ongoing delay has expired, the new delay will supersede the ongoing one
Updated over 4 years ago