Examples of Ucode


Examples of com.dadfha.uid.Ucode

  /**
   * Initialize mock-up db data
   */
  public void initMockDbData() {
   
    DataFile file1 = new DataFile(new Ucode(0x0efffec000000000L, 0x0000000000040000L), new Ucode(0xffffffffffffffffL, 0xffffffffffff0000L), CascadeMode.UIDC_NOCSC);
   
    DataFile file2 = new DataFile(new Ucode(0x0efffec000000000L, 0x0000000000050000L), new Ucode(0xffffffffffffffffL, 0xffffffffffff0000L), CascadeMode.UIDC_CSC);
   
    try {
     
      file2.addDataEntry( new DataEntry( new Ucode(0x0efffec000000000L, 0x0000000000050100L),
          new Ucode(0xffffffffffffffffL, 0xffffffffffffff00L)
          DataAttribute.UIDC_ATTR_RS,
          (short) 1,
          3600,
          DataType.UIDC_DATATYPE_UCODE_IPV4,
          "172.26.30.78") );     
     
      /*
      // For cascade resolution testing purpose this may be commented instead of the prior item
      file2.addDataEntry( new DataEntry( new Ucode(0x0efffec000000000L, 0x0000000000050100L),
                        new Ucode(0xffffffffffffffffL, 0xffffffffffffff00L), 
                        DataAttribute.UIDC_ATTR_SS,
                        (short) 1,
                        0,
                        DataType.UIDC_DATATYPE_UCODE_URL,
                        "http://www.uidcenter.org") );
      */
   
      file2.addDataEntry( new DataEntry( new Ucode(0x0efffec000000000L, 0x0000000000050200L),
          new Ucode(0xffffffffffffffffL, 0xffffffffffffff00L)
          DataAttribute.UIDC_ATTR_RS,
          (short) 1,
          3600,
          DataType.UIDC_DATATYPE_UCODE_IPV4,
          "192.168.10.1") )
     
      file2.addDataEntry( new DataEntry( new Ucode(0x0efffec000000000L, 0x0000000000050300L),
          new Ucode(0xffffffffffffffffL, 0xffffffffffffff00L)
          DataAttribute.UIDC_ATTR_RS,
          (short) 2,
          0,
          DataType.UIDC_DATATYPE_UCODE_IPV4,
          "192.168.10.2") );     
View Full Code Here

Examples of com.dadfha.uid.Ucode

   * Check if a ucode is in range of any managed Data File(s)
   * @param ucode
   * @return Ucode The DB ucode of first Data File found covering the supplied ucode or null if not found
   */
  public final Ucode isInSpace(Ucode ucode) {
    Ucode dbUcode = null;
    DataFile df = null;
    Iterator<DataFile> i = ucodeSpace.values().iterator();
    while( i.hasNext() ) {
      df = i.next();
      if( df.isInSpace(ucode) ) {
View Full Code Here

Examples of com.dadfha.uid.Ucode

  public UC() {}
  
  public static void main(String[] args) {
   
    UC client = new UC();
    Ucode code = client.readUcode();
    Ucode mask = new Ucode(new long[] { 0xffffffffffffffffL, 0xffffffffffffffffL }, UcodeType.UID_128);
   
    // Construct query packet
    //ResUcdQuery ruqPacket = new ResUcdQuery(QueryMode.UIDC_RSMODE_RESOLUTION, QueryAttribute.UIDC_ATTR_SS, code.getUcodeType());
   
    // ...Or construct the cascade resolution request
View Full Code Here

Examples of com.dadfha.uid.Ucode

  /**
   * Read ucode either from QR code, RFID Tag, etc.
   * @return
   */
  public final Ucode readUcode() {
    return new Ucode(new long[] { 0x0efffec000000000L, 0x0000000000050123L }, UcodeType.UID_128);
  }
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.