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

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


  public final void encodeXML(final Element tag) {

    xmlCheckTagName(tag, TAG);

    final DDF_Exchange exch = getExchange();
    final DDF_Fraction frac = getFraction();

    //

    xmlStringEncode(getIndicator().code, tag, SESSION_INDICATOR);
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

   * <date>,<open>,<high>,<low>,<last>,<volume><etx>
   */

  @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

    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 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

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.