Package net.sf.myway.gps.garmin.parser

Examples of net.sf.myway.gps.garmin.parser.DataType.parseData()


    for (final GarminMessage m : seq) {
      DataTypeName mType = linkProtocol.getType(m);
      if (mType.equals(DataTypeName.RTE_WPT_DATA))
        mType = DataTypeName.WPT_DATA;
      final DataType dt = _dataType.get(mType);
      r[i++] = dt.parseData(m.getData());
    }
    if (_name.equals(CommandName.TRANSFER_WAYPOINTS)
      || _name.equals(CommandName.TRANSFER_PROXIMITY)) {
      final Waypoint[] wpt = new Waypoint[r.length];
      System.arraycopy(r, 0, wpt, 0, r.length);
View Full Code Here


      if (mType.equals(DataTypeName.RTE_WPT_DATA))
        mType = DataTypeName.WPT_DATA;
      final DataType dt = _dataTypes.get(mType);
      if (dt == null)
        throw new IllegalArgumentException("no datatype for " + mType + " in " + _name);
      r[i++] = dt.parseData(m.getData());
    }
    return r;
  }

  /**
 
View Full Code Here

            GarminHelper.ubyte(data[i + 1]) + (data[i + 2] << 8)));
        _usb.close();
      }
      if (response.getPacketType() == 20 && response.getPacketId() == 149) {
        final DataType dataType = DataType.get("D1001");
        System.out.println(dataType.parseData(new GarminData(response.getData())));
      }
      if (response.getPacketType() == 20 && response.getPacketId() == 12) {
        System.out.println("transmission terminated");
        _usb.close();
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.