Repeater

Repeater

Class repeating a child.

Repeater is a decorator that repeats the run signal until the child node return RUNNING or ERROR. Optionally, a maximum number of repetitions can be defined.

Constructor

new Repeater(params)

Source:

Creates an instance of MaxTime.

  • maxLoop (Integer) Maximum number of repetitions. Default to -1 (infinite).
  • child (BaseNode) The child node.
Parameters:
Name Type Description
params Object

Object with parameters.

Properties
Name Type Attributes Default Description
maxLoop Number <optional>
-1 (infinite)

Maximum number of repetitions.

child BaseNode

The child node.

Extends

  • Decorator

Members

maxLoop :number

Source:
Type:
  • number

Methods

open(context) → {void}

Source:

Open method.

Parameters:
Name Type Description
context Context

A run instance.

Returns:
Type
void

run(context)

Source:

Context method.

Parameters:
Name Type Description
context Context

A run instance.