Package com.barchart.feed.ddf.util.enums

Examples of com.barchart.feed.ddf.util.enums.DDF_Fraction


    decodeDay(buffer);
  }

  @Override
  protected final void encodeBody(final ByteBuffer buffer) {
    final DDF_Fraction frac = getFraction();
    //
    HelperDDF.decimalEncode(priceOpen, frac, buffer, COMMA); // <open>,
    HelperDDF.decimalEncode(priceHigh, frac, buffer, COMMA); // <high>,
    HelperDDF.decimalEncode(priceLow, frac, buffer, COMMA); // <low>,
    HelperDDF.decimalEncode(priceLast, frac, buffer, COMMA); // <last>,
View Full Code Here


    HelperDDF.longEncode(sizeVolume, buffer, NUL); // <volume>,
  }

  @Override
  protected final void decodeBody(final ByteBuffer buffer) {
    final DDF_Fraction frac = getFraction();
    //
    priceOpen = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    priceHigh = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    priceLow = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    priceLast = HelperDDF.decimalDecode(frac, buffer, COMMA); //
View Full Code Here

    check(buffer.get(), COMMA); // (,)
  }

  @Override
  protected final void encodeBody(final ByteBuffer buffer) {
    final DDF_Fraction frac = getFraction();
    //
    HelperDDF.decimalEncode(priceOpen, frac, buffer, COMMA); // <open>,
    HelperDDF.decimalEncode(priceHigh, frac, buffer, COMMA); // <high>,
    HelperDDF.decimalEncode(priceLow, frac, buffer, COMMA); // <low>,
    HelperDDF.decimalEncode(priceLast, frac, buffer, COMMA); // <last>,
View Full Code Here

    HelperDDF.longEncode(sizeVolume, buffer, COMMA); // <cur volume>,
  }

  @Override
  protected final void decodeBody(final ByteBuffer buffer) {
    final DDF_Fraction frac = getFraction();
    //
    priceOpen = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    priceHigh = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    priceLow = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    priceLast = HelperDDF.decimalDecode(frac, buffer, COMMA); //
View Full Code Here

      eCode = Exchanges.NULL_CODE;
    }

    exchangeCode = eCode;

    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(xmlByteDecode(attr, BASE_CODE_DDF, XML_STOP));

    /* price step / increment size / tick size */
    try {
      final long priceStepMantissa = xmlDecimalDecode(frac, attr, PRICE_TICK_INCREMENT, XML_STOP);
      tickSize = VALUES.newPrice(priceStepMantissa, frac.decimalExponent);
View Full Code Here

    symbolArray = xmlDecSymbol(tag, SYMBOL, XML_STOP);

    updateSpread();

    final byte baseCode = xmlByteDecode(tag, FRACTION_DDF, XML_STOP);
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);
    setFraction(frac);

    priceStep = xmlDecimalDecode(frac, tag, PRICE_TICK_INCREMENT, XML_STOP);

    priceTrade = xmlDecimalDecode(frac, tag, PRICE_LAST, XML_STOP);
View Full Code Here

    xmlCheckTagName(tag, TAG);

    xmlAsciiEncode(getSymbolFull(), tag, SYMBOL);

    final DDF_Fraction frac = getFraction();
    xmlByteEncode(frac.baseCode, tag, FRACTION_DDF);

    xmlDecimalEncode(priceStep, frac, tag, PRICE_TICK_INCREMENT);

    xmlDecimalEncode(priceTrade, frac, tag, PRICE_LAST);
View Full Code Here

    final Time expire = xmlTimeDecode(tag, SYMBOL_EXPIRE, XML_PASS);

    // month code for exp of futures contract
    final DDF_TimeZone zone = DDF_TimeZone.fromCode(zoneCode);
    final DDF_Exchange exchange = DDF_Exchange.fromCode(exchCode);
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);
    final long priceStepMantissa = xmlDecimalDecode(frac, tag,
        PRICE_TICK_INCREMENT, XML_STOP);
    final String pricePointString = xmlStringDecode(tag, PRICE_POINT_VALUE,
        XML_PASS);
View Full Code Here

    //

    final DDF_TimeZone zone = DDF_TimeZone.fromCode(zoneCode);
    final DDF_Exchange exchange = DDF_Exchange.fromCode(exchCode);
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(baseCode);
    final long priceStepMantissa = xmlDecimalDecode(frac, ats,
        PRICE_TICK_INCREMENT, XML_STOP);
    final String pricePointString = xmlStringDecode(ats, PRICE_POINT_VALUE,
        XML_PASS);
View Full Code Here

    /* market originating exchange identifier */
    final DDF_Exchange exchange = DDF_Exchange.fromCode(
        xmlByteDecode(ats, EXCHANGE_DDF, XML_PASS));
    builder.setExchangeCode(exchange.name());
   
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(
        xmlByteDecode(ats, BASE_CODE_DDF, XML_STOP));
   
    /* price step / increment size / tick size */
    final long priceStepMantissa = xmlDecimalDecode(frac, ats,
        PRICE_TICK_INCREMENT, XML_STOP);
View Full Code Here

TOP

Related Classes of com.barchart.feed.ddf.util.enums.DDF_Fraction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.