40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
const UUID_1 = require("../UUID");
|
|
const MessageFlags_1 = require("../../enums/MessageFlags");
|
|
class EventLocationRequestPacket {
|
|
constructor() {
|
|
this.name = 'EventLocationRequest';
|
|
this.flags = MessageFlags_1.MessageFlags.Trusted | MessageFlags_1.MessageFlags.Zerocoded | MessageFlags_1.MessageFlags.FrequencyLow;
|
|
this.id = 4294902067;
|
|
}
|
|
getSize() {
|
|
return 20;
|
|
}
|
|
writeToBuffer(buf, pos) {
|
|
const startPos = pos;
|
|
this.QueryData['QueryID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
buf.writeUInt32LE(this.EventData['EventID'], pos);
|
|
pos += 4;
|
|
return pos - startPos;
|
|
}
|
|
readFromBuffer(buf, pos) {
|
|
const startPos = pos;
|
|
const newObjQueryData = {
|
|
QueryID: UUID_1.UUID.zero()
|
|
};
|
|
newObjQueryData['QueryID'] = new UUID_1.UUID(buf, pos);
|
|
pos += 16;
|
|
this.QueryData = newObjQueryData;
|
|
const newObjEventData = {
|
|
EventID: 0
|
|
};
|
|
newObjEventData['EventID'] = buf.readUInt32LE(pos);
|
|
pos += 4;
|
|
this.EventData = newObjEventData;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
exports.EventLocationRequestPacket = EventLocationRequestPacket;
|
|
//# sourceMappingURL=EventLocationRequest.js.map
|