Files
node-screenlogic/test.js
Parnic af02f60791 Code cleanup
Much better organization and ease-of-use now that the proof of concept is established. Still an awful lot to do here, but I'm getting the hang of the whole node.js thing.
Also moved the actual test functionality out to a test script so the module itself doesn't execute anything.
2018-03-30 10:27:01 -05:00

19 lines
472 B
JavaScript
Executable File

const ScreenLogic = require('./index');
var finder = new ScreenLogic.FindUnits();
finder.on('serverFound', function(server) {
var client = new ScreenLogic.UnitConnection(server);
client.on('loggedIn', function() {
this.getPoolStatus();
this.getControllerConfig();
}).on('poolStatus', function(status) {
}).on('controllerConfig', function(config) {
client.close();
finder.close();
});
client.connect();
});
finder.search();