GetMobileLocation() Function

The GetMobileLocation() function retrieves the mobile location values for the specified time, in an array, for the asset associated with the trigger for this Expression Rule. The elements in the returned array are Strings of the form (lat, lng).

Important! This function is available only if the Axeda® Platform is configured to enable historical functions.

Historical functions retrieve data from the Platform, which can slow response time for rules processing.
To ensure optimal response time, Axeda strongly recommends that you limit the amount of data these functions retrieve, the frequency that the expression rules that use them run, and the number of assets associated with expression rules that use them. For example, do not request historical data more than once per second.

Format:

Array GetMobileLocation(Number timespan, Number max)

where:

timespan - The timespan during which you want to retrieve mobile locations. You can specify this value in minutes, hours, days, weeks, or months. To learn how to define the timespan, refer to Timespan values. Unless defined otherwise, the default unit for the value of the timespan is minutes.

max - Optional. The maximum number of values to be returned. This function does not return more than 100 (lat, lng) pairs.

Example:

For the asset associated with the trigger for this expression rule (used in either the Then or Else expressions), the following example returns up to 10 values of mobile locations that were logged to the Platform within the last five minutes

GetMobileLocation(5,10)

 

See Also