// 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 AgentDropGroupMessage implements MessageBase { name = 'AgentDropGroup'; messageFlags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.Deprecated | MessageFlags.FrequencyLow; id = Message.AgentDropGroup; AgentData: { AgentID: UUID; GroupID: UUID; }; getSize(): number { return 32; } writeToBuffer(buf: Buffer, pos: number): number { const startPos = pos; this.AgentData['AgentID'].writeToBuffer(buf, pos); pos += 16; this.AgentData['GroupID'].writeToBuffer(buf, pos); pos += 16; return pos - startPos; } readFromBuffer(buf: Buffer, pos: number): number { const startPos = pos; let varLength = 0; const newObjAgentData: { AgentID: UUID, GroupID: UUID } = { AgentID: UUID.zero(), GroupID: UUID.zero() }; newObjAgentData['AgentID'] = new UUID(buf, pos); pos += 16; newObjAgentData['GroupID'] = new UUID(buf, pos); pos += 16; this.AgentData = newObjAgentData; return pos - startPos; } }