UNPKG

node-insim

Version:

An InSim library for NodeJS with TypeScript support

36 lines (35 loc) 909 B
import { __decorate } from "tslib"; import { byte, stringNull } from '../decorators'; import { SendablePacket } from './base'; import { PacketType } from './enums'; export const MSX_MSG_MAX_LENGTH = 96; /** * MSg eXtended - like {@link IS_MST} but longer (not for commands) */ export class IS_MSX extends SendablePacket { constructor(data) { super(); this.Size = 100; this.Type = PacketType.ISP_MSX; this.ReqI = 0; this.Zero = 0; /** Last byte must be zero */ this.Msg = ''; this.initialize(data); } } __decorate([ byte() ], IS_MSX.prototype, "Size", void 0); __decorate([ byte() ], IS_MSX.prototype, "Type", void 0); __decorate([ byte() ], IS_MSX.prototype, "ReqI", void 0); __decorate([ byte() ], IS_MSX.prototype, "Zero", void 0); __decorate([ stringNull(MSX_MSG_MAX_LENGTH) ], IS_MSX.prototype, "Msg", void 0);