public static int Decode(MessageHeader messageHeader,
            MarketDataIncrementalRefreshTrades marketData,
            DirectBuffer buffer,
            int bufferIndex)
        {
            messageHeader.Wrap(buffer, bufferIndex, 0);

            int actingVersion = messageHeader.Version;
            int actingBlockLength = messageHeader.BlockLength;

            marketData.WrapForDecode(buffer, bufferIndex + MessageHeader.Size, actingBlockLength, actingVersion);

            var transactTime = marketData.TransactTime;
            var matchEventIndicator = marketData.MatchEventIndicator;

            var mdIncGrpGroup = marketData.MdIncGrp;
            while (mdIncGrpGroup.HasNext)
            {
                mdIncGrpGroup.Next();
                var tradeId = mdIncGrpGroup.TradeId;
                var securityId = mdIncGrpGroup.SecurityId;
                var mantissa = mdIncGrpGroup.MdEntryPx.Mantissa;
                var i = mdIncGrpGroup.MdEntrySize.Mantissa;
                var numberOfOrders = mdIncGrpGroup.NumberOfOrders;
                var mdUpdateAction = mdIncGrpGroup.MdUpdateAction;
                var rptSeq = mdIncGrpGroup.RptSeq;
                var aggressorSide = mdIncGrpGroup.AggressorSide;
                var mdEntryType = mdIncGrpGroup.MdEntryType;
            }

            return marketData.Size;
        }
Ejemplo n.º 2
0
 public void WrapForDecode(MarketDataIncrementalRefreshTrades parentMessage, DirectBuffer buffer, int actingVersion)
 {
     _parentMessage = parentMessage;
     _buffer        = buffer;
     _dimensions.Wrap(buffer, parentMessage.Limit, actingVersion);
     _count               = _dimensions.NumInGroup;
     _blockLength         = _dimensions.BlockLength;
     _actingVersion       = actingVersion;
     _index               = -1;
     _parentMessage.Limit = parentMessage.Limit + SbeHeaderSize;
 }
Ejemplo n.º 3
0
 public void WrapForEncode(MarketDataIncrementalRefreshTrades parentMessage, DirectBuffer buffer, int count)
 {
     _parentMessage = parentMessage;
     _buffer        = buffer;
     _dimensions.Wrap(buffer, parentMessage.Limit, _actingVersion);
     _dimensions.NumInGroup  = (byte)count;
     _dimensions.BlockLength = (ushort)34;
     _index              = -1;
     _count              = count;
     _blockLength        = 34;
     parentMessage.Limit = parentMessage.Limit + SbeHeaderSize;
 }
        public static int Encode(MessageHeader messageHeader,
            MarketDataIncrementalRefreshTrades marketData,
            DirectBuffer buffer,
            int bufferIndex)
        {
            messageHeader.Wrap(buffer, bufferIndex, 0);
            messageHeader.BlockLength = MarketDataIncrementalRefreshTrades.BlockLength;
            messageHeader.TemplateId = MarketDataIncrementalRefreshTrades.TemplateId;
            messageHeader.SchemaId = MarketDataIncrementalRefreshTrades.SchemaId;
            messageHeader.Version = MarketDataIncrementalRefreshTrades.Schema_Version;

            marketData.WrapForEncode(buffer, bufferIndex + MessageHeader.Size);
            marketData.TransactTime = 1234L;
            marketData.EventTimeDelta = 987;
            marketData.MatchEventIndicator = MatchEventIndicator.END_EVENT;

            var mdIncGrp = marketData.MdIncGrpCount(2);

            mdIncGrp.Next();
            mdIncGrp.TradeId = 1234L;
            mdIncGrp.SecurityId = 56789L;
            mdIncGrp.MdEntryPx.Mantissa = 50;
            mdIncGrp.MdEntrySize.Mantissa = 10;
            mdIncGrp.NumberOfOrders = 1;
            mdIncGrp.MdUpdateAction = MDUpdateAction.NEW;
            mdIncGrp.RptSeq = 1;
            mdIncGrp.AggressorSide = Side.BUY;
            mdIncGrp.MdEntryType = MDEntryType.BID;

            mdIncGrp.Next();
            mdIncGrp.TradeId = 1234L;
            mdIncGrp.SecurityId = 56789L;
            mdIncGrp.MdEntryPx.Mantissa = 50;
            mdIncGrp.MdEntrySize.Mantissa = 10;
            mdIncGrp.NumberOfOrders = 1;
            mdIncGrp.MdUpdateAction = MDUpdateAction.NEW;
            mdIncGrp.RptSeq = 1;
            mdIncGrp.AggressorSide = Side.SELL;
            mdIncGrp.MdEntryType = MDEntryType.OFFER;

            return marketData.Size;
        }
 public MarketDataIncrementalRefreshTrades()
 {
     _parentMessage = this;
 }
 public void WrapForEncode(MarketDataIncrementalRefreshTrades parentMessage, DirectBuffer buffer, int count)
 {
     _parentMessage = parentMessage;
     _buffer = buffer;
     _dimensions.Wrap(buffer, parentMessage.Limit, _actingVersion);
     _dimensions.NumInGroup = (byte)count;
     _dimensions.BlockLength = (ushort)34;
     _index = -1;
     _count = count;
     _blockLength = 34;
     parentMessage.Limit = parentMessage.Limit + HeaderSize;
 }
 public void WrapForDecode(MarketDataIncrementalRefreshTrades parentMessage, DirectBuffer buffer, int actingVersion)
 {
     _parentMessage = parentMessage;
     _buffer = buffer;
     _dimensions.Wrap(buffer, parentMessage.Limit, actingVersion);
     _count = _dimensions.NumInGroup;
     _blockLength = _dimensions.BlockLength;
     _actingVersion = actingVersion;
     _index = -1;
     _parentMessage.Limit = parentMessage.Limit + HeaderSize;
 }
Ejemplo n.º 8
0
 public MarketDataIncrementalRefreshTrades()
 {
     _parentMessage = this;
 }