How Can I get a specific data in a data point of serial data source
-
@phildunlap Thank you very much !!!
-
Hello, I can get to specific data now with your help, but when I use point identifier in the data piont, I can't recived data. How can I filter data if my identifier message is: 007000116 in the next message
ST300STT;007000116;40;312;20180305;18:22:02;c93121;+04.684003;-074.050968;000.000;270.30;10;1;29;12.07;000000;1;0035
-
Did you modify the regex on the data source to select for that ID and capture group?
-
This is my configuration in the data source
I don't modify the regex.
I have a question. I have differents devices that can conect to my data source to TCP/IP protocol. Do I need a data source to device or can I filter devices in similar data source with point identifier?
-
Because this is a serial data source, you can only have one serial data source serving one serial transport media. You can parse this data into many points, but you have to use the message regex on the data source to figure out which point to then use the value regex on.
Currently your point identifier group is 1, which is a capture of nothing
()[^ ]+
so if something else was in the capture group in the message regex, that would have to exactly match the point identifier configured on the point. -
I use the message regex in my data point, but, i don't understand the relation between Message regex and point identifier group.
-
The message regex sees if you have received a message. And, if you have, what is the point identifier (which is configurable in the data point) contained in the message. This is where the regex capture group comes in, and that needs an index to identify which group it is. So, in your message regex the only capture group is index 1, which is () yielding a point identifier of "". Group index 0 is the whole match, otherwise groups are enumerated as they are opened.
Were something inside the capturing group 1, the (), then that portion of the message would have to exactly match the point identifier of the point whose value regex was to be applied to the message.
-
@phildunlap Thank you. Now I understand for example:
My message is:
ST300STT;007000116;40;312;20180305;18:22:02;c93121;+04.684003;-074.050968;000.000;270.30;10;1;29;12.07;000000;1;0035
in this case I make the configuration of my data source:
Message regex: ([0-9A-Z;]{18}).*
point identifier group 1Now the configuration of my data point is this:
When arrive my message is going to match with my point identifier. That is good. because I can identifier my device and event. Now if I need identifier in a data point only firsts 5 chars how can I do this if in my data source I defined that the point identifier is of 18 chars.
-
Now if I need identifier in a data point only firsts 5 chars how can I do this if in my data source I defined that the point identifier is of 18 chars.
You can't, that's not how it works. If you define the point identifier to be 18 characters in the message regex, then it must be. If you define it to be a variable length capture group, then whatever is captured must match the point identifier of a data point that is to receive that value exactly.
-
@phildunlap Ummm, isn't possible in the message regex created ([A-Z]{18}) ([0-9]{5}).* with value group 2 to in a data point match 18 chars with the group 1 and in other data point match 5 chars with the group 2?
-
Perhaps I didn't understand your question. Yes you can write the regex you have there, and yes you are correct about the group numbering. But, because the point identifier group is set on the data source, you can't have one point use group 1 and another use group 2, you have to always capture the point identifier into the same group number.
-
@phildunlap I´m sorry by ask a lot. I thought that if I define the group in my data point, my data point go to do match with specific message regex, I mean that if I defined group 1 in my data point "a" it can do match with first expresion () and if I define my data point "b" with group 2, It goes to do match with second expresion (), but now see that I have a concept mistake.