rainbird
Version:
The Rainbird library allows you to access your RainBird Controller.
38 lines • 868 B
JavaScript
import { Buffer } from 'node:buffer';
import { Request } from './Request.js';
export class ControllerTimeSetRequest extends Request {
_hour = 0;
_minute = 0;
_second = 0;
constructor(hour, minute, second) {
super();
this._hour = hour;
this._minute = minute;
this._second = second;
}
get type() {
return 0x11;
}
get hour() {
return this._hour;
}
set hour(value) {
this._hour = value;
}
get minute() {
return this._minute;
}
set minute(value) {
this._minute = value;
}
get second() {
return this._second;
}
set second(value) {
this._second = value;
}
toBuffer() {
return Buffer.from([this.type, this.hour, this.minute, this.second]);
}
}
//# sourceMappingURL=ControllerTimeSetRequest.js.map