TimeTrigger

TimeTriggerModule. TimeTrigger

new TimeTrigger(config)

Description:
  • Trigger for periodic events.

Source:
Parameters:
Name Type Description
config object

Configuration data

Properties
Name Type Attributes Description
signature string

Identifier intended to be used for persistence, but cannot be guaranteed to be unique.

timeout object <optional>

Configuration of the timeout interval.

Properties
Name Type Description
nominal number

Nominal time, in milliseconds, for the timeout.

tolerance number

Tolerance, in milliseconds, for the timeout.

duration object <optional>

Configuration of the tripped duration.

Properties
Name Type Description
nominal number

Nominal time, in milliseconds, for the tripped duration.

tolerance number

Tolerance, in milliseconds, for the tripped duration.

trip_limit number

Limit on the number of sequential trip events permitted.

Throws:
  • Thrown if 'config' is invalid.
Type
TypeError

Extends

  • EventEmitter

Members

Duration

Description:
  • Read property accessor for the tripped duration of the trigger

Source:

Read property accessor for the tripped duration of the trigger

Identifier

Description:
  • Read-only property accessor for the trigger identifier

Source:

Read-only property accessor for the trigger identifier

Name

Description:
  • Read-only property accessor for the trigger name

Source:

Read-only property accessor for the trigger name

Signature

Description:
  • Read-only property accessor for the trigger signature

Source:

Read-only property accessor for the trigger signature

State

Description:
  • Read-only property accessor for the trigger state

Source:

Read-only property accessor for the trigger state

TimeRemaining

Description:
  • Read property accessor for the time remaining until the next trip event

Source:

Read property accessor for the time remaining until the next trip event

Timeout

Description:
  • Read property accessor for the timeout of the trigger

Source:

Read property accessor for the timeout of the trigger

Methods

EnterArmed() → {boolean}

Description:
  • Enter Armed State

Source:
Returns:

Always return true.

Type
boolean

EnterArming() → {boolean}

Description:
  • Enter Arming State

Source:
Returns:

Always return true.

Type
boolean

EnterIdle() → {boolean}

Description:
  • Enter Idle State

Source:
Returns:

Always return true.

Type
boolean

EnterTripped() → {boolean}

Description:
  • Enter Tripped State

Source:
Returns:

Always return true.

Type
boolean

Start() → {void}

Description:
  • API to start/restart the timer.

Source:
Returns:
Type
void

Stop() → {void}

Description:
  • API to stop the timer.

Source:
Returns:
Type
void