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

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


    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,
View Full Code Here


  private DDF_Fraction getFractionDDF() {
    return DDF_Fraction.fromFraction(get(FRACTION));
  }

  private final String getFractionDescription() {
    final DDF_Fraction frac = getFractionDDF();
    return frac + " (" + frac.fraction.description + ")";
  }
View Full Code Here

    final MarketDoBookEntry[] entries = new MarketDoBookEntry[maximumSize];

    int entryIndex = 0;

    final DDF_Fraction frac = getFraction();

    for (int index = 0; index < countBid; index++) {

      if (sizeBidArray[index] == 0) {
        continue;
View Full Code Here

  }

  @Override
  protected final void encodeBody(final ByteBuffer buffer) {

    final DDF_Fraction frac = getFraction();

    // sizes
    encodeUnsigned_1_book(countBid, buffer);
    encodeUnsigned_1_book(countAsk, buffer);
View Full Code Here

  }

  @Override
  protected final void decodeBody(final ByteBuffer buffer) {

    final DDF_Fraction frac = getFraction();

    // allocate maximum array size
    priceBidArray = new long[DDF_BOOK_LIMIT];
    priceAskArray = new long[DDF_BOOK_LIMIT];
    sizeBidArray = new long[DDF_BOOK_LIMIT];
View Full Code Here

    symbolName = xmlAsciiDecode(tag, SYMBOL_NAME, XML_PASS);

    exchangeExtra = xmlAsciiDecode(tag, EXCHANGE_EXTRA, XML_PASS);

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

    // FIXME, MDEX ddfexchange code missing
    final byte exchCode = xmlByteDecode(tag, EXCHANGE_DDF, XML_PASS);
    final DDF_Exchange exch = DDF_Exchange.fromCode(exchCode);
View Full Code Here

    xmlAsciiEncode(symbolName, tag, SYMBOL_NAME);

    xmlAsciiEncode(exchangeExtra, tag, EXCHANGE_EXTRA);

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

    final DDF_Exchange exch = getExchange();
    xmlByteEncode(exch.code, tag, EXCHANGE_DDF);
View Full Code Here

   *
   * ||<day><session><etx>||<time stamp>
   */
  @Override
  protected final void encodeBody(final ByteBuffer buffer) {
    final DDF_Fraction frac = getFraction();
    //
    HelperDDF.decimalEncode(priceBid, frac, buffer, COMMA); // <bid price>,
    HelperDDF.longEncode(sizeBid, buffer, COMMA); // <bid size>,
    HelperDDF.decimalEncode(priceAsk, frac, buffer, COMMA); // <ask price>,
    HelperDDF.longEncode(sizeAsk, buffer, COMMA); // <ask size>,
View Full Code Here

    HelperDDF.longEncode(sizeAsk, buffer, COMMA); // <ask size>,
  }

  @Override
  protected final void decodeBody(final ByteBuffer buffer) {
    final DDF_Fraction frac = getFraction();
    //
    priceBid = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    sizeBid = HelperDDF.longDecode(buffer, COMMA); //
    priceAsk = HelperDDF.decimalDecode(frac, buffer, COMMA); //
    sizeAsk = HelperDDF.longDecode(buffer, COMMA); //
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, tag,
        PRICE_TICK_INCREMENT, XML_STOP);

    final String pricePointString = xmlStringDecode(tag, PRICE_POINT_VALUE,
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.