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);
functioncalculate() : any{
//The variable value is calculated
piweb.logger.debug(`'calculate' called`)
}
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`) }
data