Update nodehelper docs

This commit is contained in:
veeck 2021-10-18 14:36:31 +02:00 committed by rejas
parent 4d8fb8c176
commit cde0adc28e

View File

@ -22,39 +22,38 @@ const NodeHelper = Class.extend({
Log.log(`Starting module helper: ${this.name}`); Log.log(`Starting module helper: ${this.name}`);
}, },
/* stop() /**
* Called when the MagicMirror² server receives a `SIGINT` * Called when the MagicMirror² server receives a `SIGINT`
* Close any open connections, stop any sub-processes and * Close any open connections, stop any sub-processes and
* gracefully exit the module. * gracefully exit the module.
*
*/ */
stop() { stop() {
Log.log(`Stopping module helper: ${this.name}`); Log.log(`Stopping module helper: ${this.name}`);
}, },
/* socketNotificationReceived(notification, payload) /**
* This method is called when a socket notification arrives. * This method is called when a socket notification arrives.
* *
* argument notification string - The identifier of the notification. * @param {string} notification The identifier of the notification.
* argument payload mixed - The payload of the notification. * @param {*} payload The payload of the notification.
*/ */
socketNotificationReceived(notification, payload) { socketNotificationReceived(notification, payload) {
Log.log(`${this.name} received a socket notification: ${notification} - Payload: ${payload}`); Log.log(`${this.name} received a socket notification: ${notification} - Payload: ${payload}`);
}, },
/* setName(name) /**
* Set the module name. * Set the module name.
* *
* argument name string - Module name. * @param {string} name Module name.
*/ */
setName(name) { setName(name) {
this.name = name; this.name = name;
}, },
/* setPath(path) /**
* Set the module path. * Set the module path.
* *
* argument path string - Module path. * @param {string} path Module path.
*/ */
setPath(path) { setPath(path) {
this.path = path; this.path = path;