<?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[Serial data source set data point to numeric]]></title><description><![CDATA[<p dir="auto">Hi All,<br />
I am using the serial data source to process a string of values from a sensor node. e.g. CL 221.035BV=([0-9]+.[0-9]+)\r<br />
CL is the node type, 221.035 is its address, BV is the point type and the value is a numeral with decimal point preceded by a "=" and terminated with \r.<br />
I am using the following regex for the data point CL 221.035BV=([0-9]+.[0-9]+)\r</p>
<p dir="auto">The problem is I am unable to set the point type to anything but alphanumeric.<br />
Do I need to modify my regex or is this a current limitation in the serial data source?</p>
<p dir="auto">Cheers,<br />
Matt.</p>
]]></description><link>https://forum.mango-os.com/topic/1592/serial-data-source-set-data-point-to-numeric</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Apr 2026 13:51:37 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/1592.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Jul 2014 01:35:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Serial data source set data point to numeric on Wed, 23 Jul 2014 00:03:35 GMT]]></title><description><![CDATA[<p dir="auto">Thanks Phillip,<br />
I hope camping was good. It's snow down to sea level here.<br />
Brrrrr...</p>
]]></description><link>https://forum.mango-os.com/post/8817</link><guid isPermaLink="true">https://forum.mango-os.com/post/8817</guid><dc:creator><![CDATA[mattonfarm]]></dc:creator><pubDate>Wed, 23 Jul 2014 00:03:35 GMT</pubDate></item><item><title><![CDATA[Reply to Serial data source set data point to numeric on Tue, 22 Jul 2014 20:31:07 GMT]]></title><description><![CDATA[<p dir="auto">Hey Matt, sorry it took me so long to reply, I did a little camping this weekend...</p>
<p dir="auto">Ah, I understand. It looks like this was the case in the point settings and for whatever reason I was reading that as a data source problem. I found the issue in the code and have corrected it I believe, and thanks for bringing this to our attention:</p>
<p dir="auto">Attachment: <a href="http://archive.infiniteautomation.com/forum/posts/downloadAttach/305.page" rel="nofollow ugc">download link</a></p>
]]></description><link>https://forum.mango-os.com/post/8812</link><guid isPermaLink="true">https://forum.mango-os.com/post/8812</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Tue, 22 Jul 2014 20:31:07 GMT</pubDate></item><item><title><![CDATA[Reply to Serial data source set data point to numeric on Fri, 18 Jul 2014 07:55:25 GMT]]></title><description><![CDATA[<p dir="auto">Hi Philip.<br />
I am getting decimal formatted alphanumeric strings (see attached).<br />
The problem is I set the data point type to numeric and as soon as I click save it switches to alphanumeric. This is before any data is processed.</p>
<p dir="auto">Matt.</p>
<p dir="auto">Attachment: <a href="http://archive.infiniteautomation.com/forum/posts/downloadAttach/303.page" rel="nofollow ugc">download link</a></p>
]]></description><link>https://forum.mango-os.com/post/8794</link><guid isPermaLink="true">https://forum.mango-os.com/post/8794</guid><dc:creator><![CDATA[mattonfarm]]></dc:creator><pubDate>Fri, 18 Jul 2014 07:55:25 GMT</pubDate></item><item><title><![CDATA[Reply to Serial data source set data point to numeric on Fri, 18 Jul 2014 06:57:27 GMT]]></title><description><![CDATA[<p dir="auto">When set to alphanumeric, what sorts of values is the point getting? When set to other types what happens? It appears right in the code: <a href="https://github.com/infiniteautomation/ma-modules-public/blob/master/Serial%20Data%20Source/src/com/infiniteautomation/serial/rt/SerialDataSourceRT.java" rel="nofollow ugc">https://github.com/infiniteautomation/ma-modules-public/blob/master/Serial Data Source/src/com/infiniteautomation/serial/rt/SerialDataSourceRT.java</a></p>
<pre><code>//Switch on the type
switch(plVo.getDataTypeId()){
case DataTypes.ALPHANUMERIC:
newValue = new PointValueTime(value,new Date().getTime());
break;
case DataTypes.NUMERIC:
newValue = new PointValueTime(Double.parseDouble(value),new Date().getTime());
break;
case DataTypes.MULTISTATE:
newValue = new PointValueTime(Integer.parseInt(value),new Date().getTime());
break;
case DataTypes.BINARY:
newValue = new PointValueTime(Boolean.parseBoolean(value),new Date().getTime());
break;
default:
throw new ShouldNeverHappenException("Uknown Data type for point");
}
</code></pre>
]]></description><link>https://forum.mango-os.com/post/8793</link><guid isPermaLink="true">https://forum.mango-os.com/post/8793</guid><dc:creator><![CDATA[phildunlap]]></dc:creator><pubDate>Fri, 18 Jul 2014 06:57:27 GMT</pubDate></item></channel></rss>