• C
    carnecro

    I defined some proprietary properties on the analog-value object and when I disable the ReadPropertyMultiple requests the Bacnet4J server returns all properties to the client (for testing I am using MBS BACeye). Obviously, the client reads the properties one by one based on the property-list.

    With ReadPropertyMultiple enabled the proprietary properties must be queried manually. I noticed, that the client sends the request with PropertyIdentifier.all (#8).

    ReadPropertyMultipleRequest [listOfReadAccessSpecs=[ReadAccessSpecification [objectIdentifier=analog-value 45, listOfPropertyReferences=[PropertyReference [propertyIdentifier=all, propertyArrayIndex=null]]]]]
    

    Should I as application developer create the response with the List of Read Access Results (Bacnet 15.7.1.2.1) od does it Bacnet4J automaticaly for me? I checked the answer using this code snippet and it looks like the Bacnet4J response does not contain the proprietary properties,

    public void requestReceived(Address from, Service service) {
             super.requestReceived(from, service);
    
             if (service.getChoiceId() == 14) {
    
                 ReadPropertyMultipleRequest req = (ReadPropertyMultipleRequest) service;
                 CommLogger.info("REQ: " + req.toString());
    
                 SequenceOf<ReadAccessSpecification> ras = req.getListOfReadAccessSpecs();
                 try {
                     final ReadPropertyMultipleAck ack = (ReadPropertyMultipleAck) new ReadPropertyMultipleRequest(
                             ras).handle(executor.getLocalDevice(), from);
                     CommLogger.info("RSP: " + ack.toString());
                 } catch (BACnetException e) {
                     e.printStackTrace();
                 }
             }
         }
    

    Robert

    posted in BACnet4J general discussion read more
  • C
    carnecro

    Thank you, the right hint! The framework can do it without source code modification:

    DeviceObject deviceObject = localDevice.getDeviceObject();
    ServicesSupported servicesSupported = deviceObject.readProperty(PropertyIdentifier.protocolServicesSupported);
    servicesSupported.setReadPropertyMultiple(false);
    

    Robert

    posted in BACnet4J general discussion read more
  • C
    carnecro

    What is the right way for BACnet4J server to tell the client, that it does not support Read Property Multiple to force clients sending ReadProperty one by one? I know that BACnet4J supports Read Property Multiple but in my case, I need the device does not support this feature

    posted in BACnet4J general discussion read more
  • C
    carnecro

    I purchased the license because I am using it in my closed project. The question is if I am allowed to make changes in the code I purchased. I will clear it with the sales.

    posted in BACnet4J general discussion read more
  • C
    carnecro

    OK, maybe this was the motivation to close the add() methods. But I purchased the library to implement it in my own device where I need the proprietary properties. Looks like I have to contact the author if I am even entitled to make a change in the source code.

    posted in BACnet4J general discussion read more
  • C
    carnecro

    I found a way, how to add my own proprietary identifier! The static method PropertyIdentifier.forId adds the new id into the idMap when the id does not exist. Unfortunatelly, the new property name is not added into the nameMap and prettyMap, so I added the names directly.

    public class MyPropertyIdentifier extends PropertyIdentifier {
    
        public static final PropertyIdentifier myProperty = PropertyIdentifier.forId(2048);
    
        public MyPropertyIdentifier(ByteQueue queue) throws BACnetErrorException {
            super(queue);
        }
    
        static {
    
            // Enumerated.init(MyPropertyIdentifier.class, idMap, nameMap, prettyMap);
            getNameMap().put("my-property", myProperty);
            getPrettyMap().put(2048, "my-property");
        }
    }
    

    However, adding the new property identifier to an object is not possible because the add methods are private. The library, without source code modifications, is not conform with the chapter 23 of the BACnet specification.

    posted in BACnet4J general discussion read more
  • C
    carnecro

    And ObjectProperties.add() has private access in com.serotonin.bacnet4j.obj.ObjectProperties.

    Making a gateway I need to map a proprietary point attributes to BACnet point properties. However, some of the attributes do not have a standard equivalent on the BACnet side. For example, we have multiple alarm levels on the analog value object (HiLevel1=warning, HiLevel2=alarm, HiLevel3=fault), etc. I really did not find any way how to add proprietary (custom) properties to a standard BACnet object except to modify the original code.

    posted in BACnet4J general discussion read more
  • C
    carnecro

    Not so easy, PropertyIdentifier, that is the most important for me, has private constructor.

    posted in BACnet4J general discussion read more
  • C
    carnecro

    Did you find a solution? I have exactly the same problem.

    posted in BACnet4J general discussion read more