50 lines
1.8 KiB
JavaScript
50 lines
1.8 KiB
JavaScript
|
|
"use strict";
|
||
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||
|
|
const UUID_1 = require("../UUID");
|
||
|
|
const MessageFlags_1 = require("../../enums/MessageFlags");
|
||
|
|
class RequestObjectPropertiesFamilyPacket {
|
||
|
|
constructor() {
|
||
|
|
this.name = 'RequestObjectPropertiesFamily';
|
||
|
|
this.flags = MessageFlags_1.MessageFlags.Zerocoded | MessageFlags_1.MessageFlags.FrequencyMedium;
|
||
|
|
this.id = 65285;
|
||
|
|
}
|
||
|
|
getSize() {
|
||
|
|
return 52;
|
||
|
|
}
|
||
|
|
writeToBuffer(buf, pos) {
|
||
|
|
const startPos = pos;
|
||
|
|
this.AgentData['AgentID'].writeToBuffer(buf, pos);
|
||
|
|
pos += 16;
|
||
|
|
this.AgentData['SessionID'].writeToBuffer(buf, pos);
|
||
|
|
pos += 16;
|
||
|
|
buf.writeUInt32LE(this.ObjectData['RequestFlags'], pos);
|
||
|
|
pos += 4;
|
||
|
|
this.ObjectData['ObjectID'].writeToBuffer(buf, pos);
|
||
|
|
pos += 16;
|
||
|
|
return pos - startPos;
|
||
|
|
}
|
||
|
|
readFromBuffer(buf, pos) {
|
||
|
|
const startPos = pos;
|
||
|
|
const newObjAgentData = {
|
||
|
|
AgentID: UUID_1.UUID.zero(),
|
||
|
|
SessionID: UUID_1.UUID.zero()
|
||
|
|
};
|
||
|
|
newObjAgentData['AgentID'] = new UUID_1.UUID(buf, pos);
|
||
|
|
pos += 16;
|
||
|
|
newObjAgentData['SessionID'] = new UUID_1.UUID(buf, pos);
|
||
|
|
pos += 16;
|
||
|
|
this.AgentData = newObjAgentData;
|
||
|
|
const newObjObjectData = {
|
||
|
|
RequestFlags: 0,
|
||
|
|
ObjectID: UUID_1.UUID.zero()
|
||
|
|
};
|
||
|
|
newObjObjectData['RequestFlags'] = buf.readUInt32LE(pos);
|
||
|
|
pos += 4;
|
||
|
|
newObjObjectData['ObjectID'] = new UUID_1.UUID(buf, pos);
|
||
|
|
pos += 16;
|
||
|
|
this.ObjectData = newObjObjectData;
|
||
|
|
return pos - startPos;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
exports.RequestObjectPropertiesFamilyPacket = RequestObjectPropertiesFamilyPacket;
|
||
|
|
//# sourceMappingURL=RequestObjectPropertiesFamily.js.map
|