Removed debug logging

Added verification of broadcast response message size
Added clearer handling of message types

I'm sure there's a better way to do debug logging, but I don't really feel like adding a dependency on another module just for that.
This commit is contained in:
Parnic
2018-03-30 20:35:24 -05:00
parent ce41d6b009
commit 0bbae0446b
8 changed files with 114 additions and 57 deletions

View File

@ -1,11 +1,13 @@
const SLMessage = require('./SLMessage.js').SLMessage;
const MSG_ID = 12526;
const SPA_CIRCUIT_ID = 500;
const POOL_CIRCUIT_ID = 505;
exports.SLPoolStatusMessage = class SLPoolStatusMessage extends SLMessage {
constructor(buf) {
super(0, 12526);
super(0, MSG_ID);
if (!buf) {
this.writeInt32LE(0);
} else {
@ -98,4 +100,8 @@ exports.SLPoolStatusMessage = class SLPoolStatusMessage extends SLMessage {
}
}
}
static getResponseId() {
return MSG_ID + 1;
}
}