minor: comments
This commit is contained in:
@@ -5,7 +5,7 @@ export default class N1mmServer {
|
|||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.xmlParser = new XMLParser();
|
this.xmlParser = new XMLParser();
|
||||||
this.turnHandlers = []; // TurnEventHandler
|
this.turnHandlers = []; // TurnMessageHandler[]
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ export default class RotClient {
|
|||||||
this.label = label;
|
this.label = label;
|
||||||
this.ip = clientConfig.ip;
|
this.ip = clientConfig.ip;
|
||||||
this.bands = clientConfig.bands;
|
this.bands = clientConfig.bands;
|
||||||
this.startOffset = null;
|
|
||||||
this.cachedData = null
|
this.cachedData = null
|
||||||
this.dynamicData = null;
|
this.dynamicData = null;
|
||||||
this.dynamicHandlers = [];
|
this.dynamicHandlers = [];
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import RotClient from './RotClient.js';
|
import RotClient from './RotClient.js';
|
||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
|
|
||||||
export default class RotRouter { // implements TurnEventHandler
|
export default class RotRouter { // implements TurnMessageHandler
|
||||||
constructor() {
|
constructor() {
|
||||||
this.clients = {};
|
this.clients = {};
|
||||||
this.loadConfig();
|
this.loadConfig();
|
||||||
this.routerDataHandlers = [];
|
this.routerDataHandlers = []; // array of callbacks accepting (RotClient, data)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ export default class RotRouter { // implements TurnEventHandler
|
|||||||
client.turn(msg.az);
|
client.turn(msg.az);
|
||||||
}
|
}
|
||||||
|
|
||||||
onRotatorData(handler) { // (RotClient, data)
|
onRotatorData(handler) { // will call with (RotClient, data)
|
||||||
this.routerDataHandlers.push(handler);
|
this.routerDataHandlers.push(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user