55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
// 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 TransferInventoryAckMessage implements MessageBase
|
|
{
|
|
name = 'TransferInventoryAck';
|
|
messageFlags = MessageFlags.Trusted | MessageFlags.Zerocoded | MessageFlags.FrequencyLow;
|
|
id = Message.TransferInventoryAck;
|
|
|
|
InfoBlock: {
|
|
TransactionID: UUID;
|
|
InventoryID: UUID;
|
|
};
|
|
|
|
getSize(): number
|
|
{
|
|
return 32;
|
|
}
|
|
|
|
// @ts-ignore
|
|
writeToBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
this.InfoBlock['TransactionID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
this.InfoBlock['InventoryID'].writeToBuffer(buf, pos);
|
|
pos += 16;
|
|
return pos - startPos;
|
|
}
|
|
|
|
// @ts-ignore
|
|
readFromBuffer(buf: Buffer, pos: number): number
|
|
{
|
|
const startPos = pos;
|
|
const newObjInfoBlock: {
|
|
TransactionID: UUID,
|
|
InventoryID: UUID
|
|
} = {
|
|
TransactionID: UUID.zero(),
|
|
InventoryID: UUID.zero()
|
|
};
|
|
newObjInfoBlock['TransactionID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
newObjInfoBlock['InventoryID'] = new UUID(buf, pos);
|
|
pos += 16;
|
|
this.InfoBlock = newObjInfoBlock;
|
|
return pos - startPos;
|
|
}
|
|
}
|
|
|