UNPKG

tsinsim

Version:

An InSim library for Node.js (JavaScript runtime environment) with TypeScript support.

92 lines (91 loc) 2.9 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; import { Receivable } from "../../utilities/index.js"; import { define, byte, word, short, unsigned } from "../../utilities/decorators.js"; import { PacketType } from "../../types/PacketType.js"; import { ObjectIndex } from "../../enums/index.js"; import { CarContOBJ } from "../CarContOBJ.js"; let IS_OBH = class IS_OBH extends Receivable { Size = 28; Type = PacketType.ISP_OBH; ReqI = 0; PLID = 0; SPClose = 0; SpW = 0; Time = 0; X = 0; Y = 0; Zbyte = 0; Sp1 = 0; Index = 0; OBHFlags = 0; C = new CarContOBJ; unpack(data) { super.unpack(Buffer.concat([data.subarray(0, 8), data.subarray(16, data.length)])); this.C = new CarContOBJ().unpack(data.subarray(8, 16)); return this; } }; __decorate([ byte(), __metadata("design:type", Object) ], IS_OBH.prototype, "Size", void 0); __decorate([ byte(), __metadata("design:type", Object) ], IS_OBH.prototype, "Type", void 0); __decorate([ byte(), __metadata("design:type", Object) ], IS_OBH.prototype, "ReqI", void 0); __decorate([ byte(), __metadata("design:type", Object) ], IS_OBH.prototype, "PLID", void 0); __decorate([ word(), __metadata("design:type", Object) ], IS_OBH.prototype, "SPClose", void 0); __decorate([ word(), __metadata("design:type", Object) ], IS_OBH.prototype, "SpW", void 0); __decorate([ unsigned(), __metadata("design:type", Object) ], IS_OBH.prototype, "Time", void 0); __decorate([ short(), __metadata("design:type", Object) ], IS_OBH.prototype, "X", void 0); __decorate([ short(), __metadata("design:type", Object) ], IS_OBH.prototype, "Y", void 0); __decorate([ byte(), __metadata("design:type", Object) ], IS_OBH.prototype, "Zbyte", void 0); __decorate([ byte(), __metadata("design:type", Object) ], IS_OBH.prototype, "Sp1", void 0); __decorate([ byte(), __metadata("design:type", Number) ], IS_OBH.prototype, "Index", void 0); __decorate([ byte(), __metadata("design:type", Number) ], IS_OBH.prototype, "OBHFlags", void 0); IS_OBH = __decorate([ define ], IS_OBH); export { IS_OBH };