<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Request list of object properties]]></title><description><![CDATA[<p dir="auto">I'm trying to get a list of all the properties defined in an object  on a remote device.</p>
<pre><code>RequestUtils.getProperty( localDevice, remoteDevice, AnalogInRef, PropertyIdentifier.propertyList);
</code></pre>
<p dir="auto">But it just throws and returns</p>
<pre><code>com.serotonin.bacnet4j.exception.BACnetErrorException: device: other
  at com.serotonin.bacnet4j.util.RequestUtils.getProperty(RequestUtils.java:104)
  at test.main(test.java:101)
</code></pre>
<p dir="auto">Same for PropertyIdentifier.listOfObjectPropertyReferences<br />
So I am not sure how to go about this.<br />
I'm using YABE (Yet Another BACnet Explorer) to run a simulator.</p>
]]></description><link>https://forum.mango-os.com/topic/4003/request-list-of-object-properties</link><generator>RSS for Node</generator><lastBuildDate>Tue, 17 Nov 2026 17:24:43 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/4003.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Jan 2019 07:17:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Request list of object properties on Tue, 15 Jan 2019 00:36:05 GMT]]></title><description><![CDATA[<p dir="auto">Wish I knew about that before! Thanks heaps for the reference.<br />
Gonna put my function here for any future references too. Feel free to point out any improvements.</p>
<pre><code>public Map&lt;PropertyIdentifier, Encodable&gt; getObjectPropertyListNotNull(RemoteDevice d, ObjectIdentifier obj) throws BACnetException{

        List&lt;ObjectPropertyTypeDefinition&gt; propsDefs = ObjectProperties.getObjectPropertyTypeDefinitions(obj.getObjectType());
        ArrayList&lt;PropertyIdentifier&gt; props = new ArrayList&lt;PropertyIdentifier&gt;(propsDefs.size());
        Map&lt;PropertyIdentifier, Encodable&gt; propValuesFinal = new HashMap&lt;&gt;();
        
        for(ObjectPropertyTypeDefinition prop : propsDefs){props.add(prop.getPropertyTypeDefinition().getPropertyIdentifier());}
        
        
        if(d.getObject(obj) == null){
            Map&lt;PropertyIdentifier, Encodable&gt; propValues = RequestUtils.getProperties(localDevice, d, obj, null, props.toArray(new PropertyIdentifier[props.size()]));
            propValues.forEach((pid, val) -&gt; {
                if(val instanceof ErrorClassAndCode)
                    return;
                propValuesFinal.put(pid, val);
                d.setObjectProperty(obj, pid, val);
            });
        }
        else{
            for(PropertyIdentifier pid : props){
                Encodable val = d.getObject(obj).getProperty(pid);
                if(val != null){
                    propValuesFinal.put(pid, val);
                }
            }
        }
        return propValuesFinal;
    }
</code></pre>
]]></description><link>https://forum.mango-os.com/post/20979</link><guid isPermaLink="true">https://forum.mango-os.com/post/20979</guid><dc:creator><![CDATA[Daniel McKinnell]]></dc:creator><pubDate>Tue, 15 Jan 2019 00:36:05 GMT</pubDate></item><item><title><![CDATA[Reply to Request list of object properties on Mon, 14 Jan 2019 20:33:10 GMT]]></title><description><![CDATA[<p dir="auto">Have you seen the ObjectProperties class? It would at least narrow down what properties typically exist on an object type, <a href="https://github.com/infiniteautomation/BACnet4J/blob/master/src/main/java/com/serotonin/bacnet4j/obj/ObjectProperties.java" rel="nofollow ugc">https://github.com/infiniteautomation/BACnet4J/blob/master/src/main/java/com/serotonin/bacnet4j/obj/ObjectProperties.java</a></p>
<p dir="auto">But no, I do not think there is a simple way to get the list of properties supported by an object other than reading its propertyList property (which wasn't working in your initial post, although perhaps the reason is other than there isn't such a property on that object?)</p>
]]></description><link>https://forum.mango-os.com/post/20978</link><guid isPermaLink="true">https://forum.mango-os.com/post/20978</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 14 Jan 2019 20:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to Request list of object properties on Mon, 14 Jan 2019 20:26:48 GMT]]></title><description><![CDATA[<p dir="auto">I was hoping there was a simple way to just get the objects property list since there are nearly 500 defined properties making try-catching a bit inefficient.<br />
When using YABE I noticed how when you view a devices object it lists only the properties it has instead of a defined list of the same properties for every object of that type.</p>
]]></description><link>https://forum.mango-os.com/post/20977</link><guid isPermaLink="true">https://forum.mango-os.com/post/20977</guid><dc:creator><![CDATA[Daniel McKinnell]]></dc:creator><pubDate>Mon, 14 Jan 2019 20:26:48 GMT</pubDate></item><item><title><![CDATA[Reply to Request list of object properties on Mon, 14 Jan 2019 14:32:37 GMT]]></title><description><![CDATA[<p dir="auto">Hi Daniel, welcome to the forum!</p>
<p dir="auto">Hmm, I don't recognize that BACnetErrorException message's meaning. I'd have to guess it doesn't have the property on the object? Is there a reason try-catching when you figure out what properties will work on that device isn't the solution?</p>
]]></description><link>https://forum.mango-os.com/post/20968</link><guid isPermaLink="true">https://forum.mango-os.com/post/20968</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Mon, 14 Jan 2019 14:32:37 GMT</pubDate></item></channel></rss>