Recent Changes - Search:

edit SideBar


Accessor Functions

The following functions should be invoked as a.f(), where a is the accessor and f is the function name. To invoke from within one of the accessor functions like an input handler, use this.f().

Functions Exported by an Accessor

The following functions are invoked by the host on the accessor (so that this will be the accessor, and this.f() can be used to invoke any of the above functions with name f).

  • fire: Fire the accessor.
  • initialize: Initialize the accessor.
  • latestOutput: Return the most recent output sent via the named output.
  • provideInput: Provide to a named input the given value.
  • react: React to any inputs that have been provided.
  • setParameter: Set a parameter with the given name to the given value.
  • setup: Set up the actor interface.
  • wrapup: Wrap up execution of the accessor.

Top-Level Functions

The following function can be invoked in any context by the accessor simply as f(), where f is the function name.

  • clearInterval: Cancel a function being invoked periodically.
  • clearTimeout: Cancel a function pending invocation after a delay.
  • currentTime: Return the current time as understood by the host.
  • error: Signal an error.
  • getResource: Get a resource from the swarmlet host.
  • require: Specify a module required by the accessor.
  • setInterval: Specify a function to be invoked periodically.
  • setTimeout: Specify a function to be invoked after a delay.
Edit - History - Print - Recent Changes - Search
Page last modified on May 23, 2018, at 12:38 PM