All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.real_logic.artio.messages.ManageSessionDecoder Maven / Gradle / Ivy

There is a newer version: 0.160
Show newest version
/* Generated SBE (Simple Binary Encoding) message codec. */
package uk.co.real_logic.artio.messages;

import org.agrona.MutableDirectBuffer;
import org.agrona.DirectBuffer;


/**
 * Any event to manage a session from gateway to library
 */
@SuppressWarnings("all")
public final class ManageSessionDecoder
{
    public static final int BLOCK_LENGTH = 104;
    public static final int TEMPLATE_ID = 8;
    public static final int SCHEMA_ID = 666;
    public static final int SCHEMA_VERSION = 25;
    public static final String SEMANTIC_VERSION = "0.2";
    public static final java.nio.ByteOrder BYTE_ORDER = java.nio.ByteOrder.LITTLE_ENDIAN;

    private final ManageSessionDecoder parentMessage = this;
    private DirectBuffer buffer;
    private int offset;
    private int limit;
    int actingBlockLength;
    int actingVersion;

    public int sbeBlockLength()
    {
        return BLOCK_LENGTH;
    }

    public int sbeTemplateId()
    {
        return TEMPLATE_ID;
    }

    public int sbeSchemaId()
    {
        return SCHEMA_ID;
    }

    public int sbeSchemaVersion()
    {
        return SCHEMA_VERSION;
    }

    public String sbeSemanticType()
    {
        return "";
    }

    public DirectBuffer buffer()
    {
        return buffer;
    }

    public int offset()
    {
        return offset;
    }

    public ManageSessionDecoder wrap(
        final DirectBuffer buffer,
        final int offset,
        final int actingBlockLength,
        final int actingVersion)
    {
        if (buffer != this.buffer)
        {
            this.buffer = buffer;
        }
        this.offset = offset;
        this.actingBlockLength = actingBlockLength;
        this.actingVersion = actingVersion;
        limit(offset + actingBlockLength);

        return this;
    }

    public ManageSessionDecoder wrapAndApplyHeader(
        final DirectBuffer buffer,
        final int offset,
        final MessageHeaderDecoder headerDecoder)
    {
        headerDecoder.wrap(buffer, offset);

        final int templateId = headerDecoder.templateId();
        if (TEMPLATE_ID != templateId)
        {
            throw new IllegalStateException("Invalid TEMPLATE_ID: " + templateId);
        }

        return wrap(
            buffer,
            offset + MessageHeaderDecoder.ENCODED_LENGTH,
            headerDecoder.blockLength(),
            headerDecoder.version());
    }

    public ManageSessionDecoder sbeRewind()
    {
        return wrap(buffer, offset, actingBlockLength, actingVersion);
    }

    public int sbeDecodedLength()
    {
        final int currentLimit = limit();
        sbeSkip();
        final int decodedLength = encodedLength();
        limit(currentLimit);

        return decodedLength;
    }

    public int actingVersion()
    {
        return actingVersion;
    }

    public int encodedLength()
    {
        return limit - offset;
    }

    public int limit()
    {
        return limit;
    }

    public void limit(final int limit)
    {
        this.limit = limit;
    }

    public static int libraryIdId()
    {
        return 1;
    }

    public static int libraryIdSinceVersion()
    {
        return 0;
    }

    public static int libraryIdEncodingOffset()
    {
        return 0;
    }

    public static int libraryIdEncodingLength()
    {
        return 4;
    }

    public static String libraryIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int libraryIdNullValue()
    {
        return -2147483648;
    }

    public static int libraryIdMinValue()
    {
        return -2147483647;
    }

    public static int libraryIdMaxValue()
    {
        return 2147483647;
    }

    public int libraryId()
    {
        return buffer.getInt(offset + 0, BYTE_ORDER);
    }


    public static int connectionId()
    {
        return 2;
    }

    public static int connectionSinceVersion()
    {
        return 0;
    }

    public static int connectionEncodingOffset()
    {
        return 4;
    }

    public static int connectionEncodingLength()
    {
        return 8;
    }

    public static String connectionMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long connectionNullValue()
    {
        return -9223372036854775808L;
    }

    public static long connectionMinValue()
    {
        return -9223372036854775807L;
    }

    public static long connectionMaxValue()
    {
        return 9223372036854775807L;
    }

    public long connection()
    {
        return buffer.getLong(offset + 4, BYTE_ORDER);
    }


    public static int sessionId()
    {
        return 3;
    }

    public static int sessionSinceVersion()
    {
        return 0;
    }

    public static int sessionEncodingOffset()
    {
        return 12;
    }

    public static int sessionEncodingLength()
    {
        return 8;
    }

    public static String sessionMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long sessionNullValue()
    {
        return -9223372036854775808L;
    }

    public static long sessionMinValue()
    {
        return -9223372036854775807L;
    }

    public static long sessionMaxValue()
    {
        return 9223372036854775807L;
    }

    public long session()
    {
        return buffer.getLong(offset + 12, BYTE_ORDER);
    }


    public static int lastSentSequenceNumberId()
    {
        return 4;
    }

    public static int lastSentSequenceNumberSinceVersion()
    {
        return 0;
    }

    public static int lastSentSequenceNumberEncodingOffset()
    {
        return 20;
    }

    public static int lastSentSequenceNumberEncodingLength()
    {
        return 4;
    }

    public static String lastSentSequenceNumberMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int lastSentSequenceNumberNullValue()
    {
        return -2147483648;
    }

    public static int lastSentSequenceNumberMinValue()
    {
        return -2147483647;
    }

    public static int lastSentSequenceNumberMaxValue()
    {
        return 2147483647;
    }

    public int lastSentSequenceNumber()
    {
        return buffer.getInt(offset + 20, BYTE_ORDER);
    }


    public static int lastReceivedSequenceNumberId()
    {
        return 5;
    }

    public static int lastReceivedSequenceNumberSinceVersion()
    {
        return 0;
    }

    public static int lastReceivedSequenceNumberEncodingOffset()
    {
        return 24;
    }

    public static int lastReceivedSequenceNumberEncodingLength()
    {
        return 4;
    }

    public static String lastReceivedSequenceNumberMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int lastReceivedSequenceNumberNullValue()
    {
        return -2147483648;
    }

    public static int lastReceivedSequenceNumberMinValue()
    {
        return -2147483647;
    }

    public static int lastReceivedSequenceNumberMaxValue()
    {
        return 2147483647;
    }

    public int lastReceivedSequenceNumber()
    {
        return buffer.getInt(offset + 24, BYTE_ORDER);
    }


    public static int sessionStatusId()
    {
        return 7;
    }

    public static int sessionStatusSinceVersion()
    {
        return 0;
    }

    public static int sessionStatusEncodingOffset()
    {
        return 28;
    }

    public static int sessionStatusEncodingLength()
    {
        return 1;
    }

    public static String sessionStatusMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short sessionStatusRaw()
    {
        return ((short)(buffer.getByte(offset + 28) & 0xFF));
    }

    public SessionStatus sessionStatus()
    {
        return SessionStatus.get(((short)(buffer.getByte(offset + 28) & 0xFF)));
    }


    public static int slowStatusId()
    {
        return 8;
    }

    public static int slowStatusSinceVersion()
    {
        return 0;
    }

    public static int slowStatusEncodingOffset()
    {
        return 29;
    }

    public static int slowStatusEncodingLength()
    {
        return 1;
    }

    public static String slowStatusMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short slowStatusRaw()
    {
        return ((short)(buffer.getByte(offset + 29) & 0xFF));
    }

    public SlowStatus slowStatus()
    {
        return SlowStatus.get(((short)(buffer.getByte(offset + 29) & 0xFF)));
    }


    public static int connectionTypeId()
    {
        return 9;
    }

    public static int connectionTypeSinceVersion()
    {
        return 0;
    }

    public static int connectionTypeEncodingOffset()
    {
        return 30;
    }

    public static int connectionTypeEncodingLength()
    {
        return 1;
    }

    public static String connectionTypeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short connectionTypeRaw()
    {
        return ((short)(buffer.getByte(offset + 30) & 0xFF));
    }

    public ConnectionType connectionType()
    {
        return ConnectionType.get(((short)(buffer.getByte(offset + 30) & 0xFF)));
    }


    public static int sessionStateId()
    {
        return 10;
    }

    public static int sessionStateSinceVersion()
    {
        return 0;
    }

    public static int sessionStateEncodingOffset()
    {
        return 31;
    }

    public static int sessionStateEncodingLength()
    {
        return 1;
    }

    public static String sessionStateMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short sessionStateRaw()
    {
        return ((short)(buffer.getByte(offset + 31) & 0xFF));
    }

    public SessionState sessionState()
    {
        return SessionState.get(((short)(buffer.getByte(offset + 31) & 0xFF)));
    }


    public static int heartbeatIntervalInSId()
    {
        return 11;
    }

    public static int heartbeatIntervalInSSinceVersion()
    {
        return 0;
    }

    public static int heartbeatIntervalInSEncodingOffset()
    {
        return 32;
    }

    public static int heartbeatIntervalInSEncodingLength()
    {
        return 4;
    }

    public static String heartbeatIntervalInSMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int heartbeatIntervalInSNullValue()
    {
        return -2147483648;
    }

    public static int heartbeatIntervalInSMinValue()
    {
        return -2147483647;
    }

    public static int heartbeatIntervalInSMaxValue()
    {
        return 2147483647;
    }

    public int heartbeatIntervalInS()
    {
        return buffer.getInt(offset + 32, BYTE_ORDER);
    }


    public static int replyToIdId()
    {
        return 12;
    }

    public static int replyToIdSinceVersion()
    {
        return 0;
    }

    public static int replyToIdEncodingOffset()
    {
        return 36;
    }

    public static int replyToIdEncodingLength()
    {
        return 8;
    }

    public static String replyToIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long replyToIdNullValue()
    {
        return -9223372036854775808L;
    }

    public static long replyToIdMinValue()
    {
        return -9223372036854775807L;
    }

    public static long replyToIdMaxValue()
    {
        return 9223372036854775807L;
    }

    public long replyToId()
    {
        return buffer.getLong(offset + 36, BYTE_ORDER);
    }


    public static int sequenceIndexId()
    {
        return 13;
    }

    public static int sequenceIndexSinceVersion()
    {
        return 0;
    }

    public static int sequenceIndexEncodingOffset()
    {
        return 44;
    }

    public static int sequenceIndexEncodingLength()
    {
        return 4;
    }

    public static String sequenceIndexMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int sequenceIndexNullValue()
    {
        return -2147483648;
    }

    public static int sequenceIndexMinValue()
    {
        return -2147483647;
    }

    public static int sequenceIndexMaxValue()
    {
        return 2147483647;
    }

    public int sequenceIndex()
    {
        return buffer.getInt(offset + 44, BYTE_ORDER);
    }


    public static int closedResendIntervalId()
    {
        return 22;
    }

    public static int closedResendIntervalSinceVersion()
    {
        return 0;
    }

    public static int closedResendIntervalEncodingOffset()
    {
        return 48;
    }

    public static int closedResendIntervalEncodingLength()
    {
        return 1;
    }

    public static String closedResendIntervalMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short closedResendIntervalRaw()
    {
        return ((short)(buffer.getByte(offset + 48) & 0xFF));
    }

    public Bool closedResendInterval()
    {
        return Bool.get(((short)(buffer.getByte(offset + 48) & 0xFF)));
    }


    public static int resendRequestChunkSizeId()
    {
        return 23;
    }

    public static int resendRequestChunkSizeSinceVersion()
    {
        return 0;
    }

    public static int resendRequestChunkSizeEncodingOffset()
    {
        return 49;
    }

    public static int resendRequestChunkSizeEncodingLength()
    {
        return 4;
    }

    public static String resendRequestChunkSizeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int resendRequestChunkSizeNullValue()
    {
        return -2147483648;
    }

    public static int resendRequestChunkSizeMinValue()
    {
        return -2147483647;
    }

    public static int resendRequestChunkSizeMaxValue()
    {
        return 2147483647;
    }

    public int resendRequestChunkSize()
    {
        return buffer.getInt(offset + 49, BYTE_ORDER);
    }


    public static int sendRedundantResendRequestsId()
    {
        return 24;
    }

    public static int sendRedundantResendRequestsSinceVersion()
    {
        return 0;
    }

    public static int sendRedundantResendRequestsEncodingOffset()
    {
        return 53;
    }

    public static int sendRedundantResendRequestsEncodingLength()
    {
        return 1;
    }

    public static String sendRedundantResendRequestsMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short sendRedundantResendRequestsRaw()
    {
        return ((short)(buffer.getByte(offset + 53) & 0xFF));
    }

    public Bool sendRedundantResendRequests()
    {
        return Bool.get(((short)(buffer.getByte(offset + 53) & 0xFF)));
    }


    public static int enableLastMsgSeqNumProcessedId()
    {
        return 25;
    }

    public static int enableLastMsgSeqNumProcessedSinceVersion()
    {
        return 0;
    }

    public static int enableLastMsgSeqNumProcessedEncodingOffset()
    {
        return 54;
    }

    public static int enableLastMsgSeqNumProcessedEncodingLength()
    {
        return 1;
    }

    public static String enableLastMsgSeqNumProcessedMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short enableLastMsgSeqNumProcessedRaw()
    {
        return ((short)(buffer.getByte(offset + 54) & 0xFF));
    }

    public Bool enableLastMsgSeqNumProcessed()
    {
        return Bool.get(((short)(buffer.getByte(offset + 54) & 0xFF)));
    }


    public static int logonReceivedSequenceNumberId()
    {
        return 33;
    }

    public static int logonReceivedSequenceNumberSinceVersion()
    {
        return 4;
    }

    public static int logonReceivedSequenceNumberEncodingOffset()
    {
        return 55;
    }

    public static int logonReceivedSequenceNumberEncodingLength()
    {
        return 4;
    }

    public static String logonReceivedSequenceNumberMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int logonReceivedSequenceNumberNullValue()
    {
        return -2147483648;
    }

    public static int logonReceivedSequenceNumberMinValue()
    {
        return -2147483647;
    }

    public static int logonReceivedSequenceNumberMaxValue()
    {
        return 2147483647;
    }

    public int logonReceivedSequenceNumber()
    {
        if (parentMessage.actingVersion < 4)
        {
            return -2147483648;
        }

        return buffer.getInt(offset + 55, BYTE_ORDER);
    }


    public static int logonSequenceIndexId()
    {
        return 34;
    }

    public static int logonSequenceIndexSinceVersion()
    {
        return 4;
    }

    public static int logonSequenceIndexEncodingOffset()
    {
        return 59;
    }

    public static int logonSequenceIndexEncodingLength()
    {
        return 4;
    }

    public static String logonSequenceIndexMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int logonSequenceIndexNullValue()
    {
        return -2147483648;
    }

    public static int logonSequenceIndexMinValue()
    {
        return -2147483647;
    }

    public static int logonSequenceIndexMaxValue()
    {
        return 2147483647;
    }

    public int logonSequenceIndex()
    {
        if (parentMessage.actingVersion < 4)
        {
            return -2147483648;
        }

        return buffer.getInt(offset + 59, BYTE_ORDER);
    }


    public static int metaDataStatusId()
    {
        return 35;
    }

    public static int metaDataStatusSinceVersion()
    {
        return 5;
    }

    public static int metaDataStatusEncodingOffset()
    {
        return 63;
    }

    public static int metaDataStatusEncodingLength()
    {
        return 1;
    }

    public static String metaDataStatusMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short metaDataStatusRaw()
    {
        if (parentMessage.actingVersion < 5)
        {
            return (short)255;
        }

        return ((short)(buffer.getByte(offset + 63) & 0xFF));
    }

    public MetaDataStatus metaDataStatus()
    {
        if (parentMessage.actingVersion < 5)
        {
            return MetaDataStatus.NULL_VAL;
        }

        return MetaDataStatus.get(((short)(buffer.getByte(offset + 63) & 0xFF)));
    }


    public static int cancelOnDisconnectOptionId()
    {
        return 38;
    }

    public static int cancelOnDisconnectOptionSinceVersion()
    {
        return 16;
    }

    public static int cancelOnDisconnectOptionEncodingOffset()
    {
        return 64;
    }

    public static int cancelOnDisconnectOptionEncodingLength()
    {
        return 2;
    }

    public static String cancelOnDisconnectOptionMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public int cancelOnDisconnectOptionRaw()
    {
        if (parentMessage.actingVersion < 16)
        {
            return 65535;
        }

        return (buffer.getShort(offset + 64, BYTE_ORDER) & 0xFFFF);
    }

    public CancelOnDisconnectOption cancelOnDisconnectOption()
    {
        if (parentMessage.actingVersion < 16)
        {
            return CancelOnDisconnectOption.NULL_VAL;
        }

        return CancelOnDisconnectOption.get((buffer.getShort(offset + 64, BYTE_ORDER) & 0xFFFF));
    }


    public static int cancelOnDisconnectTimeoutInNsId()
    {
        return 39;
    }

    public static int cancelOnDisconnectTimeoutInNsSinceVersion()
    {
        return 16;
    }

    public static int cancelOnDisconnectTimeoutInNsEncodingOffset()
    {
        return 66;
    }

    public static int cancelOnDisconnectTimeoutInNsEncodingLength()
    {
        return 8;
    }

    public static String cancelOnDisconnectTimeoutInNsMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long cancelOnDisconnectTimeoutInNsNullValue()
    {
        return -9223372036854775808L;
    }

    public static long cancelOnDisconnectTimeoutInNsMinValue()
    {
        return -9223372036854775807L;
    }

    public static long cancelOnDisconnectTimeoutInNsMaxValue()
    {
        return 9223372036854775807L;
    }

    public long cancelOnDisconnectTimeoutInNs()
    {
        if (parentMessage.actingVersion < 16)
        {
            return -9223372036854775808L;
        }

        return buffer.getLong(offset + 66, BYTE_ORDER);
    }


    public static int awaitingResendId()
    {
        return 21;
    }

    public static int awaitingResendSinceVersion()
    {
        return 0;
    }

    public static int awaitingResendEncodingOffset()
    {
        return 74;
    }

    public static int awaitingResendEncodingLength()
    {
        return 1;
    }

    public static String awaitingResendMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public short awaitingResendRaw()
    {
        return ((short)(buffer.getByte(offset + 74) & 0xFF));
    }

    public AwaitingResend awaitingResend()
    {
        return AwaitingResend.get(((short)(buffer.getByte(offset + 74) & 0xFF)));
    }


    public static int lastResentMsgSeqNoId()
    {
        return 28;
    }

    public static int lastResentMsgSeqNoSinceVersion()
    {
        return 1;
    }

    public static int lastResentMsgSeqNoEncodingOffset()
    {
        return 75;
    }

    public static int lastResentMsgSeqNoEncodingLength()
    {
        return 4;
    }

    public static String lastResentMsgSeqNoMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static int lastResentMsgSeqNoNullValue()
    {
        return -2147483648;
    }

    public static int lastResentMsgSeqNoMinValue()
    {
        return -2147483647;
    }

    public static int lastResentMsgSeqNoMaxValue()
    {
        return 2147483647;
    }

    public int lastResentMsgSeqNo()
    {
        if (parentMessage.actingVersion < 1)
        {
            return -2147483648;
        }

        return buffer.getInt(offset + 75, BYTE_ORDER);
    }


    public static int lastResendChunkMsgSeqNumId()
    {
        return 29;
    }

    public static int lastResendChunkMsgSeqNumSinceVersion()
    {
        return 1;
    }

    public static int lastResendChunkMsgSeqNumEncodingOffset()
    {
        return 79;
    }

    public static int lastResendChunkMsgSeqNumEncodingLength()
    {
        return 4;
    }

    public static String lastResendChunkMsgSeqNumMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static int lastResendChunkMsgSeqNumNullValue()
    {
        return -2147483648;
    }

    public static int lastResendChunkMsgSeqNumMinValue()
    {
        return -2147483647;
    }

    public static int lastResendChunkMsgSeqNumMaxValue()
    {
        return 2147483647;
    }

    public int lastResendChunkMsgSeqNum()
    {
        if (parentMessage.actingVersion < 1)
        {
            return -2147483648;
        }

        return buffer.getInt(offset + 79, BYTE_ORDER);
    }


    public static int endOfResendRequestRangeId()
    {
        return 30;
    }

    public static int endOfResendRequestRangeSinceVersion()
    {
        return 1;
    }

    public static int endOfResendRequestRangeEncodingOffset()
    {
        return 83;
    }

    public static int endOfResendRequestRangeEncodingLength()
    {
        return 4;
    }

    public static String endOfResendRequestRangeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static int endOfResendRequestRangeNullValue()
    {
        return -2147483648;
    }

    public static int endOfResendRequestRangeMinValue()
    {
        return -2147483647;
    }

    public static int endOfResendRequestRangeMaxValue()
    {
        return 2147483647;
    }

    public int endOfResendRequestRange()
    {
        if (parentMessage.actingVersion < 1)
        {
            return -2147483648;
        }

        return buffer.getInt(offset + 83, BYTE_ORDER);
    }


    public static int awaitingHeartbeatId()
    {
        return 31;
    }

    public static int awaitingHeartbeatSinceVersion()
    {
        return 1;
    }

    public static int awaitingHeartbeatEncodingOffset()
    {
        return 87;
    }

    public static int awaitingHeartbeatEncodingLength()
    {
        return 1;
    }

    public static String awaitingHeartbeatMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public short awaitingHeartbeatRaw()
    {
        if (parentMessage.actingVersion < 1)
        {
            return (short)255;
        }

        return ((short)(buffer.getByte(offset + 87) & 0xFF));
    }

    public Bool awaitingHeartbeat()
    {
        if (parentMessage.actingVersion < 1)
        {
            return Bool.NULL_VAL;
        }

        return Bool.get(((short)(buffer.getByte(offset + 87) & 0xFF)));
    }


    public static int lastLogonTimeId()
    {
        return 6;
    }

    public static int lastLogonTimeSinceVersion()
    {
        return 0;
    }

    public static int lastLogonTimeEncodingOffset()
    {
        return 88;
    }

    public static int lastLogonTimeEncodingLength()
    {
        return 8;
    }

    public static String lastLogonTimeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static long lastLogonTimeNullValue()
    {
        return -9223372036854775808L;
    }

    public static long lastLogonTimeMinValue()
    {
        return -9223372036854775807L;
    }

    public static long lastLogonTimeMaxValue()
    {
        return 9223372036854775807L;
    }

    public long lastLogonTime()
    {
        return buffer.getLong(offset + 88, BYTE_ORDER);
    }


    public static int lastSequenceResetTimeId()
    {
        return 37;
    }

    public static int lastSequenceResetTimeSinceVersion()
    {
        return 7;
    }

    public static int lastSequenceResetTimeEncodingOffset()
    {
        return 96;
    }

    public static int lastSequenceResetTimeEncodingLength()
    {
        return 8;
    }

    public static String lastSequenceResetTimeMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "optional";
        }

        return "";
    }

    public static long lastSequenceResetTimeNullValue()
    {
        return -9223372036854775808L;
    }

    public static long lastSequenceResetTimeMinValue()
    {
        return -9223372036854775807L;
    }

    public static long lastSequenceResetTimeMaxValue()
    {
        return 9223372036854775807L;
    }

    public long lastSequenceResetTime()
    {
        if (parentMessage.actingVersion < 7)
        {
            return -9223372036854775808L;
        }

        return buffer.getLong(offset + 96, BYTE_ORDER);
    }


    public static int localCompIdId()
    {
        return 14;
    }

    public static int localCompIdSinceVersion()
    {
        return 0;
    }

    public static String localCompIdCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String localCompIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int localCompIdHeaderLength()
    {
        return 2;
    }

    public int localCompIdLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipLocalCompId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getLocalCompId(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getLocalCompId(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapLocalCompId(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String localCompId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int localSubIdId()
    {
        return 15;
    }

    public static int localSubIdSinceVersion()
    {
        return 0;
    }

    public static String localSubIdCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String localSubIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int localSubIdHeaderLength()
    {
        return 2;
    }

    public int localSubIdLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipLocalSubId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getLocalSubId(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getLocalSubId(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapLocalSubId(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String localSubId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int localLocationIdId()
    {
        return 16;
    }

    public static int localLocationIdSinceVersion()
    {
        return 0;
    }

    public static String localLocationIdCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String localLocationIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int localLocationIdHeaderLength()
    {
        return 2;
    }

    public int localLocationIdLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipLocalLocationId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getLocalLocationId(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getLocalLocationId(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapLocalLocationId(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String localLocationId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int remoteCompIdId()
    {
        return 17;
    }

    public static int remoteCompIdSinceVersion()
    {
        return 0;
    }

    public static String remoteCompIdCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String remoteCompIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int remoteCompIdHeaderLength()
    {
        return 2;
    }

    public int remoteCompIdLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipRemoteCompId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getRemoteCompId(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getRemoteCompId(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapRemoteCompId(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String remoteCompId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int remoteSubIdId()
    {
        return 18;
    }

    public static int remoteSubIdSinceVersion()
    {
        return 0;
    }

    public static String remoteSubIdCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String remoteSubIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int remoteSubIdHeaderLength()
    {
        return 2;
    }

    public int remoteSubIdLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipRemoteSubId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getRemoteSubId(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getRemoteSubId(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapRemoteSubId(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String remoteSubId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int remoteLocationIdId()
    {
        return 19;
    }

    public static int remoteLocationIdSinceVersion()
    {
        return 0;
    }

    public static String remoteLocationIdCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String remoteLocationIdMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int remoteLocationIdHeaderLength()
    {
        return 2;
    }

    public int remoteLocationIdLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipRemoteLocationId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getRemoteLocationId(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getRemoteLocationId(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapRemoteLocationId(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String remoteLocationId()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int addressId()
    {
        return 20;
    }

    public static int addressSinceVersion()
    {
        return 0;
    }

    public static String addressCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String addressMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int addressHeaderLength()
    {
        return 2;
    }

    public int addressLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipAddress()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getAddress(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getAddress(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapAddress(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String address()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int usernameId()
    {
        return 26;
    }

    public static int usernameSinceVersion()
    {
        return 0;
    }

    public static String usernameCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String usernameMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int usernameHeaderLength()
    {
        return 2;
    }

    public int usernameLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipUsername()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getUsername(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getUsername(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapUsername(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String username()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int passwordId()
    {
        return 27;
    }

    public static int passwordSinceVersion()
    {
        return 0;
    }

    public static String passwordCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String passwordMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int passwordHeaderLength()
    {
        return 2;
    }

    public int passwordLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipPassword()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getPassword(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getPassword(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapPassword(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String password()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int fixDictionaryId()
    {
        return 32;
    }

    public static int fixDictionarySinceVersion()
    {
        return 0;
    }

    public static String fixDictionaryCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String fixDictionaryMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int fixDictionaryHeaderLength()
    {
        return 2;
    }

    public int fixDictionaryLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipFixDictionary()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getFixDictionary(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getFixDictionary(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapFixDictionary(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String fixDictionary()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public static int metaDataId()
    {
        return 36;
    }

    public static int metaDataSinceVersion()
    {
        return 0;
    }

    public static String metaDataCharacterEncoding()
    {
        return java.nio.charset.StandardCharsets.UTF_8.name();
    }

    public static String metaDataMetaAttribute(final MetaAttribute metaAttribute)
    {
        if (MetaAttribute.PRESENCE == metaAttribute)
        {
            return "required";
        }

        return "";
    }

    public static int metaDataHeaderLength()
    {
        return 2;
    }

    public int metaDataLength()
    {
        final int limit = parentMessage.limit();
        return (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
    }

    public int skipMetaData()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int dataOffset = limit + headerLength;
        parentMessage.limit(dataOffset + dataLength);

        return dataLength;
    }

    public int getMetaData(final MutableDirectBuffer dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public int getMetaData(final byte[] dst, final int dstOffset, final int length)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        final int bytesCopied = Math.min(length, dataLength);
        parentMessage.limit(limit + headerLength + dataLength);
        buffer.getBytes(limit + headerLength, dst, dstOffset, bytesCopied);

        return bytesCopied;
    }

    public void wrapMetaData(final DirectBuffer wrapBuffer)
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);
        wrapBuffer.wrap(buffer, limit + headerLength, dataLength);
    }

    public String metaData()
    {
        final int headerLength = 2;
        final int limit = parentMessage.limit();
        final int dataLength = (buffer.getShort(limit, BYTE_ORDER) & 0xFFFF);
        parentMessage.limit(limit + headerLength + dataLength);

        if (0 == dataLength)
        {
            return "";
        }

        final byte[] tmp = new byte[dataLength];
        buffer.getBytes(limit + headerLength, tmp, 0, dataLength);

        return new String(tmp, java.nio.charset.StandardCharsets.UTF_8);
    }

    public String toString()
    {
        if (null == buffer)
        {
            return "";
        }

        final ManageSessionDecoder decoder = new ManageSessionDecoder();
        decoder.wrap(buffer, offset, actingBlockLength, actingVersion);

        return decoder.appendTo(new StringBuilder()).toString();
    }

    public StringBuilder appendTo(final StringBuilder builder)
    {
        if (null == buffer)
        {
            return builder;
        }

        final int originalLimit = limit();
        limit(offset + actingBlockLength);
        builder.append("[ManageSession](sbeTemplateId=");
        builder.append(TEMPLATE_ID);
        builder.append("|sbeSchemaId=");
        builder.append(SCHEMA_ID);
        builder.append("|sbeSchemaVersion=");
        if (parentMessage.actingVersion != SCHEMA_VERSION)
        {
            builder.append(parentMessage.actingVersion);
            builder.append('/');
        }
        builder.append(SCHEMA_VERSION);
        builder.append("|sbeBlockLength=");
        if (actingBlockLength != BLOCK_LENGTH)
        {
            builder.append(actingBlockLength);
            builder.append('/');
        }
        builder.append(BLOCK_LENGTH);
        builder.append("):");
        builder.append("libraryId=");
        builder.append(this.libraryId());
        builder.append('|');
        builder.append("connection=");
        builder.append(this.connection());
        builder.append('|');
        builder.append("session=");
        builder.append(this.session());
        builder.append('|');
        builder.append("lastSentSequenceNumber=");
        builder.append(this.lastSentSequenceNumber());
        builder.append('|');
        builder.append("lastReceivedSequenceNumber=");
        builder.append(this.lastReceivedSequenceNumber());
        builder.append('|');
        builder.append("sessionStatus=");
        builder.append(this.sessionStatus());
        builder.append('|');
        builder.append("slowStatus=");
        builder.append(this.slowStatus());
        builder.append('|');
        builder.append("connectionType=");
        builder.append(this.connectionType());
        builder.append('|');
        builder.append("sessionState=");
        builder.append(this.sessionState());
        builder.append('|');
        builder.append("heartbeatIntervalInS=");
        builder.append(this.heartbeatIntervalInS());
        builder.append('|');
        builder.append("replyToId=");
        builder.append(this.replyToId());
        builder.append('|');
        builder.append("sequenceIndex=");
        builder.append(this.sequenceIndex());
        builder.append('|');
        builder.append("closedResendInterval=");
        builder.append(this.closedResendInterval());
        builder.append('|');
        builder.append("resendRequestChunkSize=");
        builder.append(this.resendRequestChunkSize());
        builder.append('|');
        builder.append("sendRedundantResendRequests=");
        builder.append(this.sendRedundantResendRequests());
        builder.append('|');
        builder.append("enableLastMsgSeqNumProcessed=");
        builder.append(this.enableLastMsgSeqNumProcessed());
        builder.append('|');
        builder.append("logonReceivedSequenceNumber=");
        builder.append(this.logonReceivedSequenceNumber());
        builder.append('|');
        builder.append("logonSequenceIndex=");
        builder.append(this.logonSequenceIndex());
        builder.append('|');
        builder.append("metaDataStatus=");
        builder.append(this.metaDataStatus());
        builder.append('|');
        builder.append("cancelOnDisconnectOption=");
        builder.append(this.cancelOnDisconnectOption());
        builder.append('|');
        builder.append("cancelOnDisconnectTimeoutInNs=");
        builder.append(this.cancelOnDisconnectTimeoutInNs());
        builder.append('|');
        builder.append("awaitingResend=");
        builder.append(this.awaitingResend());
        builder.append('|');
        builder.append("lastResentMsgSeqNo=");
        builder.append(this.lastResentMsgSeqNo());
        builder.append('|');
        builder.append("lastResendChunkMsgSeqNum=");
        builder.append(this.lastResendChunkMsgSeqNum());
        builder.append('|');
        builder.append("endOfResendRequestRange=");
        builder.append(this.endOfResendRequestRange());
        builder.append('|');
        builder.append("awaitingHeartbeat=");
        builder.append(this.awaitingHeartbeat());
        builder.append('|');
        builder.append("lastLogonTime=");
        builder.append(this.lastLogonTime());
        builder.append('|');
        builder.append("lastSequenceResetTime=");
        builder.append(this.lastSequenceResetTime());
        builder.append('|');
        builder.append("localCompId=");
        builder.append('\'').append(localCompId()).append('\'');
        builder.append('|');
        builder.append("localSubId=");
        builder.append('\'').append(localSubId()).append('\'');
        builder.append('|');
        builder.append("localLocationId=");
        builder.append('\'').append(localLocationId()).append('\'');
        builder.append('|');
        builder.append("remoteCompId=");
        builder.append('\'').append(remoteCompId()).append('\'');
        builder.append('|');
        builder.append("remoteSubId=");
        builder.append('\'').append(remoteSubId()).append('\'');
        builder.append('|');
        builder.append("remoteLocationId=");
        builder.append('\'').append(remoteLocationId()).append('\'');
        builder.append('|');
        builder.append("address=");
        builder.append('\'').append(address()).append('\'');
        builder.append('|');
        builder.append("username=");
        builder.append('\'').append(username()).append('\'');
        builder.append('|');
        builder.append("password=");
        builder.append('\'').append(password()).append('\'');
        builder.append('|');
        builder.append("fixDictionary=");
        builder.append('\'').append(fixDictionary()).append('\'');
        builder.append('|');
        builder.append("metaData=");
        builder.append('\'').append(metaData()).append('\'');

        limit(originalLimit);

        return builder;
    }
    
    public ManageSessionDecoder sbeSkip()
    {
        sbeRewind();
        skipLocalCompId();
        skipLocalSubId();
        skipLocalLocationId();
        skipRemoteCompId();
        skipRemoteSubId();
        skipRemoteLocationId();
        skipAddress();
        skipUsername();
        skipPassword();
        skipFixDictionary();
        skipMetaData();

        return this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy