Package se.sics.cooja

Examples of se.sics.cooja.ConvertedRadioPacket


    byte originalData[] = new byte[originalLen];
    System.arraycopy(data, 6, originalData, 0, originalLen);
    if (len < 0) {
      logger.fatal("Negative length radio packet. Conversion failed.");
      return new ConvertedRadioPacket(new byte[0], originalData);
    }
    byte convertedData[] = new byte[len];
    System.arraycopy(data, pos, convertedData, 0, len);
    return new ConvertedRadioPacket(convertedData, originalData);
  }
View Full Code Here


    byte originalData[] = new byte[originalLen];
    System.arraycopy(data, 6 /* skipping preamble+synch+len */, originalData, 0, originalLen);
    if (len < 0) {
      /*logger.warn("No cross-level conversion available: negative packet length");*/
      return new ConvertedRadioPacket(new byte[0], originalData);
    }
    byte convertedData[] = new byte[len];
    System.arraycopy(data, pos, convertedData, 0, len);
    return new ConvertedRadioPacket(convertedData, originalData);
  }
View Full Code Here

        byte originalData[] = new byte[originalLen];
        System.arraycopy(data, 6, originalData, 0, originalLen);
        if (len < 0) {
            logger.warn("No cross-level conversion available: negative packet length");
            return new ConvertedRadioPacket(new byte[0], originalData);
        }
        byte convertedData[] = new byte[len];
        System.arraycopy(data, pos, convertedData, 0, len);
        return new ConvertedRadioPacket(convertedData, originalData);
    }
View Full Code Here

TOP

Related Classes of se.sics.cooja.ConvertedRadioPacket

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.