コード例 #1
0
ファイル: Time.java プロジェクト: vishalishere/iotsys
 //
 // Reading and writing
 //
 public Time(ByteQueue queue) {
   readTag(queue);
   hour = queue.popU1B();
   minute = queue.popU1B();
   second = queue.popU1B();
   hundredth = queue.popU1B();
 }
コード例 #2
0
ファイル: NPCI.java プロジェクト: vishalishere/iotsys
  public NPCI(ByteQueue queue) {
    version = queue.popU1B();
    control = BigInteger.valueOf(queue.popU1B());

    if (control.testBit(5)) {
      destinationNetwork = queue.popU2B();
      destinationLength = queue.popU1B();
      if (destinationLength > 0) {
        destinationAddress = new byte[destinationLength];
        queue.pop(destinationAddress);
      }
    }

    if (control.testBit(3)) {
      sourceNetwork = queue.popU2B();
      sourceLength = queue.popU1B();
      sourceAddress = new byte[sourceLength];
      queue.pop(sourceAddress);
    }

    if (control.testBit(5)) hopCount = queue.popU1B();

    if (control.testBit(7)) {
      messageType = queue.popU1B();
      if (messageType >= 80) vendorId = queue.popU2B();
    }
  }