rainbird
Version:
The Rainbird library allows you to access your RainBird Controller.
28 lines • 657 B
JavaScript
import { Response } from './Response.js';
export class CurrentZoneResponse extends Response {
response;
_page;
_zoneId;
constructor(response) {
super();
this.response = response;
this._page = response[1];
const zoneId = response.readUInt32LE(2);
this._zoneId = zoneId === 0
? 0
: Math.log2(response.readUInt32LE(2)) + 1;
}
get type() {
return 0xBF;
}
get page() {
return this._page;
}
get zoneId() {
return this._zoneId;
}
toBuffer() {
return this.response;
}
}
//# sourceMappingURL=CurrentZoneResponse.js.map