<?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[Bug in SequenceOf?]]></title><description><![CDATA[<p dir="auto">Hello.</p>
<p dir="auto">I think there is a bug in SequenceOf constructor.</p>
<pre><code>
    public SequenceOf(ByteQueue queue, Class&lt;E&gt; clazz) throws BACnetException {
        values = new ArrayList&lt;E&gt;();
        while (peekTagNumber(queue) != -1)
            values.add(read(queue, clazz));
    }

</code></pre>
<p dir="auto">I used ObjectProperties to add property reference for my own bacnet object.</p>
<pre><code> 		add(new ObjectType(146), new PropertyIdentifier(552), GSMPersons.class, false, false, null);
</code></pre>
<p dir="auto">GSMPersons is a property, that contains SequenceOf&lt;CharacterString&gt; <strong>without</strong> any context id.</p>
<p dir="auto">When I'm trying to read this property:</p>
<pre><code>0000   00 23 54 ed 8d 5d 08 60 6e 79 44 75 08 00 45 00  .#T..].`nyDu..E.
0010   00 3e 12 51 00 00 ff 11 fa bd c0 a8 16 cf c0 a8  .&gt;.Q............
0020   16 80 ba c0 ba c1 00 2a 10 5c 81 0a 00 22 01 00  .......*.\..."..
0030   30 a4 0c 0c 24 80 00 00 1a 02 28 3e 75 0d 00 2b  0...$.....(&gt;u..+
0040   37 39 32 36 31 33 31 34 31 30 33 3f              79261314103?
</code></pre>
<p dir="auto">it reads one element of sequence ("+79261314103") and then I get an exception, because ByteQueue contains only "3F", that is closing context tag of property value in read property request. And peekTagNumber(queue) is not -1.</p>
]]></description><link>https://forum.mango-os.com/topic/1262/bug-in-sequenceof</link><generator>RSS for Node</generator><lastBuildDate>Tue, 15 Sep 2026 06:11:27 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1262.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 11 Feb 2013 14:47:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bug in SequenceOf? on Thu, 14 Feb 2013 21:27:14 GMT]]></title><description><![CDATA[<p dir="auto">Maybe the SequenceOf&lt;CharacterString&gt; should just have a context id?</p>
]]></description><link>https://forum.mango-os.com/post/7509</link><guid isPermaLink="true">https://forum.mango-os.com/post/7509</guid><dc:creator><![CDATA[mlohbihler]]></dc:creator><pubDate>Thu, 14 Feb 2013 21:27:14 GMT</pubDate></item><item><title><![CDATA[Reply to Bug in SequenceOf? on Mon, 11 Feb 2013 15:23:25 GMT]]></title><description><![CDATA[<p dir="auto">I changed constructor, now it works.</p>
<pre><code>	public SequenceOf(ByteQueue queue, Class&lt;E&gt; clazz) throws BACnetException {
		values = new ArrayList&lt;E&gt;();

		int tagNumber = -1;
		while ((tagNumber = peekTagNumber(queue)) != -1
				&amp;&amp; matchNonEndTag(queue, tagNumber))
			values.add(read(queue, clazz));
	}

</code></pre>
]]></description><link>https://forum.mango-os.com/post/7493</link><guid isPermaLink="true">https://forum.mango-os.com/post/7493</guid><dc:creator><![CDATA[niatzeni]]></dc:creator><pubDate>Mon, 11 Feb 2013 15:23:25 GMT</pubDate></item></channel></rss>