Options
All
  • Public
  • Public/Protected
  • All
Menu

External module events

Introduction

The piweb.events module encapsulates the events with the associated callbacks that are triggered by the PiWeb host application. The callback functions serve as entry points for almost everything that happens in a variable extension, like drawing and data processing.

'use strict';

import * as piweb from 'piweb';

piweb.events.on("calculate", calculate);
function calculate( ) : any
{
    //The variable value is calculated
    piweb.logger.debug(`'calculate' called`)
}
see

data

Index

Classes

Type aliases

Variables

Functions

Type aliases

PiWebEvents

PiWebEvents: "calculate"

An enumeration of supported events

Variables

Private context

context: EventContext = new EventContext()

Functions

Private emit

  • Parameters

    Returns any

on

  • Call this function to specify a callback for a specific event.

    Parameters

    • name: PiWebEvents

      The name of the event.

    • callback: Function

      The callback function.

    Returns void

Generated using TypeDoc