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.
This commit is contained in:
18
test.js
Executable file
18
test.js
Executable file
@ -0,0 +1,18 @@
|
||||
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();
|
Reference in New Issue
Block a user