Writing to builder externally #2014
-
Hi, Ex: read request sent -> builder is updated from outside the program -> next read request sent is with updated builder Any insight would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Well, you can add things to a builder. But you can't execute a request from a bullet. You have to have it generate a request first. As soon ss you call the build method, it creates an immutable (unchangeable) request object. You can call the request objects execute method as often as you want, however you can't change that request. If you want to fetch data from a remote plc and use data in that response to read more tags, you need to create a new builder and have that generate a new request object, that you would need to use instead of the old one. However... I think you might even be able to add tags to the old builder, if you still have it and could probably call build on it again and generate the updated request. I'm not 100% sure about that. But I think it might be possible. |
Beta Was this translation helpful? Give feedback.
Well a Tag is totally Protocol dependent. Every protocol brings along its own tag classes and knows how to handle them.
I am not quite sure what you mean with "adding new tags from an external program or project"? Are you possibly referring to "Tag strings" (String representations for a given tag for a given protocol?). It's absolutely possible to for example get a list of tag-addresses from a remote system. I think the Apache StreamPipes, Apache Camel, Apache NiFi (every project we have integrations for) do it this way.