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

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


      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


   * <date>,<open>,<high>,<low>,<last><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.decimalEncode(priceLast, frac, buffer, COMMA); // <last>,
  }

  @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

    if(eCode == null || eCode.isEmpty()) {
      eCode = Exchanges.NULL_CODE;
    }
    builder.setExchangeCode(eCode);
   
    final DDF_Fraction frac = DDF_Fraction.fromBaseCode(
        xmlByteDecode(tag, BASE_CODE_DDF, XML_STOP));
   
    /* price step / increment size / tick size */
    try {
      final long priceStepMantissa = xmlDecimalDecode(frac, tag,
View Full Code Here

      if(eCode == null || eCode.isEmpty()) {
        eCode = Exchanges.NULL_CODE;
      }
      builder.setExchangeCode(eCode);
     
      final DDF_Fraction frac = DDF_Fraction.fromBaseCode(
          xmlByteDecode(ats, BASE_CODE_DDF, XML_STOP));
     
      /* price step / increment size / tick size */
      try {
        final long priceStepMantissa = xmlDecimalDecode(frac, ats,
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);

    //

    countBid = xmlIntegerDecode(tag, BID_COUNT, XML_STOP);
View Full Code Here

    xmlCheckTagName(tag, TAG);

    xmlAsciiEncode(getSymbolFull(), tag, SYMBOL);

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

    xmlIntegerEncode(countBid, tag, BID_COUNT);

    xmlIntegerEncode(countAsk, tag, ASK_COUNT);
View Full Code Here

  public final void decodeXML(final Element tag) {

    xmlCheckTagName(tag, TAG);

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

    //

    final String indCode = xmlStringDecode(tag, SESSION_INDICATOR, XML_STOP);
    setIndicator(DDF_Indicator.fromCode(indCode));
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.