SLCancelDelay message added (#29)
This commit is contained in:
7
index.js
7
index.js
@ -281,6 +281,10 @@ class UnitConnection extends EventEmitter {
|
||||
this.client.write(new messages.SLSetPumpFlow(pumpId, circuitId, setPoint, isRPMs).toBuffer());
|
||||
}
|
||||
|
||||
cancelDelay() {
|
||||
this.client.write(new messages.SLCancelDelay().toBuffer());
|
||||
}
|
||||
|
||||
onClientMessage(msg) {
|
||||
debugUnit('received message of length %d', msg.length);
|
||||
if (msg.length < 4) {
|
||||
@ -370,6 +374,9 @@ class UnitConnection extends EventEmitter {
|
||||
debugUnit(" it's a set pump flow ack");
|
||||
this.emit('setPumpFlow', new messages.SLSetPumpFlow());
|
||||
break;
|
||||
case messages.SLCancelDelay.getResponseId():
|
||||
this.emit('cancelDelay', new messages.SLCancelDelay());
|
||||
break;
|
||||
case 13:
|
||||
debugUnit(" it's a login failure.");
|
||||
this.emit('loginFailed');
|
||||
|
22
messages/SLCancelDelay.js
Normal file
22
messages/SLCancelDelay.js
Normal file
@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
const SLMessage = require('./SLMessage.js').SLMessage;
|
||||
|
||||
const MSG_ID = 12580;
|
||||
|
||||
exports.SLCancelDelay = class SLCancelDelay extends SLMessage {
|
||||
constructor() {
|
||||
super(0, MSG_ID);
|
||||
|
||||
}
|
||||
|
||||
encode() {
|
||||
this.writeInt32LE(0);
|
||||
|
||||
super.encode();
|
||||
}
|
||||
|
||||
static getResponseId() {
|
||||
return MSG_ID + 1;
|
||||
}
|
||||
};
|
@ -22,3 +22,4 @@ exports.SLSetScheduleEventById = require('./SLSetScheduleEventById.js').SLSetSch
|
||||
exports.SLSetCircuitRuntimeById = require('./SLSetCircuitRuntimeById.js').SLSetCircuitRuntimeById;
|
||||
exports.SLGetPumpStatus = require('./SLGetPumpStatus.js').SLGetPumpStatus;
|
||||
exports.SLSetPumpFlow = require('./SLSetPumpFlow.js').SLSetPumpFlow;
|
||||
exports.SLCancelDelay = require('./SLCancelDelay.js').SLCancelDelay;
|
||||
|
Reference in New Issue
Block a user