• Recent
    • Tags
    • Popular
    • Register
    • Login
    1. Home
    2. Jbacnet

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 14
    • Best 0
    • Controversial 0
    • Groups 0

    Jbacnet

    @Jbacnet

    0
    Reputation
    513
    Profile views
    14
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Jbacnet Unfollow Follow

    Latest posts made by Jbacnet

    • RE: For Backup a device

      Thanks

      but strange that my property identifiers number are differents

      posted in BACnet4J general discussion
      J
      Jbacnet
    • For Backup a device

      Before starting a backup procedure, device A shall read the Backup_Preparation_Time property, if present, from device
      B's Device object. If the property is not present in device B, the value shall be assumed to be 0.

      To do that :

      in class property indentifier:

      
          public static final PropertyIdentifier backupandrestorestate = new PropertyIdentifier(314);
          public static final PropertyIdentifier backuppreparationtime = new PropertyIdentifier(315);
          public static final PropertyIdentifier restorepreparationtime = new PropertyIdentifier(316);
      
      
      if (type == backupandrestorestate.intValue())
                  return "Backup And Restore State";
              if (type == backuppreparationtime.intValue())
                  return "Backup Prepartion Time";
              if (type == restorepreparationtime.intValue())
                  return "Restore Preparation Time";
      
      
      

      in class object properties :

      
      //add by jose
              add(ObjectType.device, PropertyIdentifier.backupandrestorestate, UnsignedInteger.class, false, false, null);
              add(ObjectType.device, PropertyIdentifier.backuppreparationtime, UnsignedInteger.class, false, false, null);
              add(ObjectType.device, PropertyIdentifier.restorepreparationtime, UnsignedInteger.class, false, false, null);
      
      
      

      Say me if it's ok . thanks

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: For Backup a device

      Before starting a backup procedure, device A shall read the Backup_Preparation_Time property, if present, from device
      B's Device object. If the property is not present in device B, the value shall be assumed to be 0.

      To do that :

      in class property indentifier:

      
          public static final PropertyIdentifier backupandrestorestate = new PropertyIdentifier(314);
          public static final PropertyIdentifier backuppreparationtime = new PropertyIdentifier(315);
          public static final PropertyIdentifier restorepreparationtime = new PropertyIdentifier(316);
      
      
      if (type == backupandrestorestate.intValue())
                  return "Backup And Restore State";
              if (type == backuppreparationtime.intValue())
                  return "Backup Prepartion Time";
              if (type == restorepreparationtime.intValue())
                  return "Restore Preparation Time";
      
      
      

      in class object properties :

      
      //add by jose
              add(ObjectType.device, PropertyIdentifier.backupandrestorestate, UnsignedInteger.class, false, false, null);
              add(ObjectType.device, PropertyIdentifier.backuppreparationtime, UnsignedInteger.class, false, false, null);
              add(ObjectType.device, PropertyIdentifier.restorepreparationtime, UnsignedInteger.class, false, false, null);
      
      
      

      Say me if it's ok . thanks

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: Read a encodable value in a array

      Thanks it's help !

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: Read a encodable value in a array

      This is my wireshark capture

      see #21 in this capture.

      Thanks

      Attachment: download link

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: Read a encodable value in a array

      Yes Monday (or tomorrow) i can send you the full byte stream (I have not the station here sorry)

      Thanks for help and good week-end !

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: Read a encodable value in a array

      Please see the attached file that show the equipement answer.

      The error is created by the stack, because of the PriorityArray is not a sequence

       add(ObjectType.analogOutput, PropertyIdentifier.priorityArray, PriorityArray.class, false, true,  new PriorityArray());
      
      

      Attachment: download link

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: Read a encodable value in a array

      but i suppose you need to request the object without an index

      I need just one value , the value Priorityarray.get(index)

      Bacnet4j should be able to do that ?

      posted in BACnet4J general discussion
      J
      Jbacnet
    • RE: Read a encodable value in a array
      
      #alias		device	device ip				obj-type	instance	property	index	format	priority
      dp1			525		192.168.10.149:47808	0			1019		85			NONE	real	8
      dp2			525		192.168.10.149:47808	0			1113		85			NONE	real	8
      dp3 		525		192.168.10.149:47808	1			1000		85			NONE	real	8
      dp3_prio8 	525		192.168.10.149:47808	1			1000		87			8		real	8
      noti1_size	525		192.168.10.149:47808	15			1			1			0		unsigned	8
      noti1_1		525		192.168.10.149:47808	15			1			1			1		unsigned	8
      noti1_2		525		192.168.10.149:47808	15			1			1			2		unsigned	8
      noti1_3		525		192.168.10.149:47808	15			1			1			3		unsigned	8
      

      dp3_prio8 is the analog output index 8
      noti1 the notification class (all index)

      posted in BACnet4J general discussion
      J
      Jbacnet
    • Read a encodable value in a array

      Hello ,
      I try to read encodable value in a array with

      
      ReadPropertyRequest(ObjectIdentifier objectIdentifier, PropertyIdentifier propertyIdentifier,
                  UnsignedInteger propertyArrayIndex)
      
      

      For an ack requred in notification class i get

      [list]
      com.serotonin.bacnet4j.exception.ErrorAPDUException: ErrorAPDU(choice=12, errorClass=Property, errorCode=Property is not an array)
      at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:434)
      at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:415)
      at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:408)
      at com.sauter_controls.jbacnet.Test.read(Test.java:432)
      at com.sauter_controls.jbacnet.Test.startTest(Test.java:312)
      at com.sauter_controls.jbacnet.Test.<init>(Test.java:94)
      at com.sauter_controls.jbacnet.Test.main(Test.java:75)
      Exception in thread "main" java.lang.NullPointerException
      at com.sauter_controls.jbacnet.Test.read(Test.java:445)
      at com.sauter_controls.jbacnet.Test.startTest(Test.java:312)
      at com.sauter_controls.jbacnet.Test.<init>(Test.java:94)
      at com.sauter_controls.jbacnet.Test.main(Test.java:75)
      [/list]

      For an priority array in Analog output i get

      [list]

      com.serotonin.bacnet4j.exception.BACnetErrorException: Property: Property is not a list
      at com.serotonin.bacnet4j.type.Encodable.readEncodable(Encodable.java:307)
      at com.serotonin.bacnet4j.service.acknowledgement.ReadPropertyAck.<init>(ReadPropertyAck.java:88)
      at com.serotonin.bacnet4j.service.acknowledgement.AcknowledgementService.createAcknowledgementService(AcknowledgementService.java:46)
      at com.serotonin.bacnet4j.apdu.ComplexACK.parseServiceData(ComplexACK.java:191)
      at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.waitForAck(IpMessageControl.java:681)
      at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.send(IpMessageControl.java:300)
      at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.send(IpMessageControl.java:280)
      at com.serotonin.bacnet4j.npdu.ip.IpMessageControl.send(IpMessageControl.java:237)
      at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:425)
      at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:415)
      at com.serotonin.bacnet4j.LocalDevice.send(LocalDevice.java:408)
      at com.sauter_controls.jbacnet.Test.read(Test.java:432)
      at com.sauter_controls.jbacnet.Test.startTest(Test.java:312)
      at com.sauter_controls.jbacnet.Test.<init>(Test.java:94)
      at com.sauter_controls.jbacnet.Test.main(Test.java:75)

      [/list]

      In the class encodable is that ok ?

      
      
              if (propertyArrayIndex != null && !def.isSequence())
              	//return readWrapped(queue, def.getClazz(), contextId);
                  throw new BACnetErrorException(ErrorClass.property, ErrorCode.propertyIsNotAList);
      
      
      

      My code :

      
      		int deviceID = dataForTestAliases.getDev().getInstanceNumber();
      		int objectID = dataForTestAliases.getRo().getObjectIdentifier().getInstanceNumber();
      		int property = dataForTestAliases.getProperty();
      		String index = dataForTestAliases.getIndex();
      		PropertyIdentifier pid = new PropertyIdentifier(property);
      		Encodable value ;
      		ReadPropertyAck readAck = null;
      		try {
      			if (!index.equals("NONE")){	
      				readAck = (ReadPropertyAck) bnet.getLocalDevice().send(dataForTestAliases.getDev(), 
      					new ReadPropertyRequest(dataForTestAliases.getRo().getObjectIdentifier(), pid,
      							new UnsignedInteger(Integer.parseInt(dataForTestAliases.getIndex()))));
      			}
      			else {
      				
      				readAck = (ReadPropertyAck) bnet.getLocalDevice().send(dataForTestAliases.getDev(), 
      						new ReadPropertyRequest(dataForTestAliases.getRo().getObjectIdentifier(), pid));
      			}
      		} catch (BACnetException e2) {
      			// TODO Auto-generated catch block
      			e2.printStackTrace();
      		}
      		value = readAck.getValue();
      

      Thanks for your help

      posted in BACnet4J general discussion
      J
      Jbacnet