
generated.sbe.MessageHeader Maven / Gradle / Ivy
/* Generated SBE (Simple Binary Encoding) message codec */
package generated.sbe;
import uk.co.real_logic.sbe.codec.java.*;
public class MessageHeader
{
private DirectBuffer buffer;
private int offset;
private int actingVersion;
public MessageHeader wrap(final DirectBuffer buffer, final int offset, final int actingVersion)
{
this.buffer = buffer;
this.offset = offset;
this.actingVersion = actingVersion;
return this;
}
public int size()
{
return 8;
}
public static int blockLengthNullValue()
{
return 65535;
}
public static int blockLengthMinValue()
{
return 0;
}
public static int blockLengthMaxValue()
{
return 65534;
}
public int blockLength()
{
return CodecUtil.uint16Get(buffer, offset + 0, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public MessageHeader blockLength(final int value)
{
CodecUtil.uint16Put(buffer, offset + 0, value, java.nio.ByteOrder.LITTLE_ENDIAN);
return this;
}
public static int templateIdNullValue()
{
return 65535;
}
public static int templateIdMinValue()
{
return 0;
}
public static int templateIdMaxValue()
{
return 65534;
}
public int templateId()
{
return CodecUtil.uint16Get(buffer, offset + 2, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public MessageHeader templateId(final int value)
{
CodecUtil.uint16Put(buffer, offset + 2, value, java.nio.ByteOrder.LITTLE_ENDIAN);
return this;
}
public static int schemaIdNullValue()
{
return 65535;
}
public static int schemaIdMinValue()
{
return 0;
}
public static int schemaIdMaxValue()
{
return 65534;
}
public int schemaId()
{
return CodecUtil.uint16Get(buffer, offset + 4, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public MessageHeader schemaId(final int value)
{
CodecUtil.uint16Put(buffer, offset + 4, value, java.nio.ByteOrder.LITTLE_ENDIAN);
return this;
}
public static int versionNullValue()
{
return 65535;
}
public static int versionMinValue()
{
return 0;
}
public static int versionMaxValue()
{
return 65534;
}
public int version()
{
return CodecUtil.uint16Get(buffer, offset + 6, java.nio.ByteOrder.LITTLE_ENDIAN);
}
public MessageHeader version(final int value)
{
CodecUtil.uint16Put(buffer, offset + 6, value, java.nio.ByteOrder.LITTLE_ENDIAN);
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy