Trigger

Methods

(static) getHundredItemsBeforeAfter(array, index) → {object}

Description:
  • This functions returns all 100th items before and after a certain index within an array.

Source:
Example
let result = getHundredItemsBeforeAfter(channelData["CH3"].points, 841);
Parameters:
Name Type Description
array Array.<number>

Data points from a channel

index number

Position within the array where the trigger threshold has been surpassed.

Returns:

Returns an object with two arrays :

  • before : all 100th items before the index point.
  • after : all 100th items after the index point.
Type
object

(static) triggerCheck(channelPoints) → {boolean}

Description:
  • This function evaluates a channel's data points to determine if a trigger condition has been met based on predefined trigger options. We start by checking wether or not the trigger edge / window has been surpassed. If the one of the points is higher than the threshold set by the user, we finish by checking the current slope the point is in to make sur all criterias are met before stopping the display.

Source:
Example
triggerCheck(channelData["CH4"].points);
Parameters:
Name Type Description
channelPoints Array.<number>

Array containing the channel's data points.

Returns:

True if the trigger should be activated and false otherwise.

Type
boolean