node-insim
Version:
An InSim library for NodeJS with TypeScript support
58 lines (57 loc) • 1.7 kB
JavaScript
import { __decorate } from "tslib";
import { byte, stringNull } from '../decorators';
import { Packet } from './base';
import { PacketType } from './enums';
/**
* BuTton Type - sent back when user types into a text entry button
*
* If the {@link IS_BTN.TypeIn} byte is set in {@link IS_BTN} the user can type text into the button
* In that case no {@link IS_BTC} is sent - an {@link IS_BTT} is sent when the user presses ENTER
*/
export class IS_BTT extends Packet {
constructor() {
super(...arguments);
this.Size = 104;
this.Type = PacketType.ISP_BTT;
/** ReqI as received in the {@link IS_BTN} */
this.ReqI = 0;
/** Connection that typed into the button (zero if local) */
this.UCID = 0;
/** Button identifier originally sent in {@link IS_BTN} */
this.ClickID = 0;
/** Used internally by InSim */
this.Inst = 0;
/** From original button specification */
this.TypeIn = 0;
this.Sp3 = 0;
/** Typed text, zero to {@link IS_BTN.TypeIn} specified in {@link IS_BTN} */
this.Text = '';
}
}
__decorate([
byte()
], IS_BTT.prototype, "Size", void 0);
__decorate([
byte()
], IS_BTT.prototype, "Type", void 0);
__decorate([
byte()
], IS_BTT.prototype, "ReqI", void 0);
__decorate([
byte()
], IS_BTT.prototype, "UCID", void 0);
__decorate([
byte()
], IS_BTT.prototype, "ClickID", void 0);
__decorate([
byte()
], IS_BTT.prototype, "Inst", void 0);
__decorate([
byte()
], IS_BTT.prototype, "TypeIn", void 0);
__decorate([
byte()
], IS_BTT.prototype, "Sp3", void 0);
__decorate([
stringNull(96)
], IS_BTT.prototype, "Text", void 0);