node-insim
Version:
An InSim library for NodeJS with TypeScript support
44 lines (43 loc) • 988 B
JavaScript
import { __decorate } from "tslib";
import { byte, word } from '../decorators';
import { SendablePacket } from './base';
import { PacketType } from './enums';
/**
* State Flags Pack
*/
export class IS_SFP extends SendablePacket {
constructor(data) {
super();
this.Size = 8;
this.Type = PacketType.ISP_SFP;
this.ReqI = 0;
this.Zero = 0;
/** The state to set */
this.Flag = 0;
/** 0 = off / 1 = on */
this.OffOn = 0;
this.Sp3 = 0;
this.initialize(data);
}
}
__decorate([
byte()
], IS_SFP.prototype, "Size", void 0);
__decorate([
byte()
], IS_SFP.prototype, "Type", void 0);
__decorate([
byte()
], IS_SFP.prototype, "ReqI", void 0);
__decorate([
byte()
], IS_SFP.prototype, "Zero", void 0);
__decorate([
word()
], IS_SFP.prototype, "Flag", void 0);
__decorate([
byte()
], IS_SFP.prototype, "OffOn", void 0);
__decorate([
byte()
], IS_SFP.prototype, "Sp3", void 0);