UDP Circuit basics, message changes
This commit is contained in:
73
lib/classes/messages/GroupRoleDataRequest.ts
Normal file
73
lib/classes/messages/GroupRoleDataRequest.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
// This file has been automatically generated by writeMessageClasses.js
|
||||
|
||||
import {UUID} from '../UUID';
|
||||
import {MessageFlags} from '../../enums/MessageFlags';
|
||||
import {MessageBase} from '../MessageBase';
|
||||
import {Message} from '../../enums/Message';
|
||||
|
||||
export class GroupRoleDataRequestMessage implements MessageBase
|
||||
{
|
||||
name = 'GroupRoleDataRequest';
|
||||
messageFlags = MessageFlags.FrequencyLow;
|
||||
id = Message.GroupRoleDataRequest;
|
||||
|
||||
AgentData: {
|
||||
AgentID: UUID;
|
||||
SessionID: UUID;
|
||||
};
|
||||
GroupData: {
|
||||
GroupID: UUID;
|
||||
RequestID: UUID;
|
||||
};
|
||||
|
||||
getSize(): number
|
||||
{
|
||||
return 64;
|
||||
}
|
||||
|
||||
writeToBuffer(buf: Buffer, pos: number): number
|
||||
{
|
||||
const startPos = pos;
|
||||
this.AgentData['AgentID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
this.AgentData['SessionID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
this.GroupData['GroupID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
this.GroupData['RequestID'].writeToBuffer(buf, pos);
|
||||
pos += 16;
|
||||
return pos - startPos;
|
||||
}
|
||||
|
||||
readFromBuffer(buf: Buffer, pos: number): number
|
||||
{
|
||||
const startPos = pos;
|
||||
let varLength = 0;
|
||||
const newObjAgentData: {
|
||||
AgentID: UUID,
|
||||
SessionID: UUID
|
||||
} = {
|
||||
AgentID: UUID.zero(),
|
||||
SessionID: UUID.zero()
|
||||
};
|
||||
newObjAgentData['AgentID'] = new UUID(buf, pos);
|
||||
pos += 16;
|
||||
newObjAgentData['SessionID'] = new UUID(buf, pos);
|
||||
pos += 16;
|
||||
this.AgentData = newObjAgentData;
|
||||
const newObjGroupData: {
|
||||
GroupID: UUID,
|
||||
RequestID: UUID
|
||||
} = {
|
||||
GroupID: UUID.zero(),
|
||||
RequestID: UUID.zero()
|
||||
};
|
||||
newObjGroupData['GroupID'] = new UUID(buf, pos);
|
||||
pos += 16;
|
||||
newObjGroupData['RequestID'] = new UUID(buf, pos);
|
||||
pos += 16;
|
||||
this.GroupData = newObjGroupData;
|
||||
return pos - startPos;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user