Subscribing write

Hi,

If I want to write to the same set of tags defined using writepaths.add method defined only once and only their values will change every time I write. How can I achieve it? Presently I have to create the write-paths including their values every time and then call the write method.

writepaths.add(new BasicAsyncWriteRequest(TagPathParser.parse(…the Tag-path string…),value string);

How can I reuse the same tagpath list once defined only onced and only changing its values?

regards
PRAMANJ

Hi Kevin,

I hope you understood my problem and requirement? The writepaths.add method requires creation of list of tags along with their values every time I want to write new values from my module to Ignition server. If my list of tags are fixed and only I have to update their values cyclically is there any seperate API available for write? My worry is it would be wasteful of cpu time and garbage collection to recreate the same list of TagPaths using the follwing API. If I could only update the values for the list created only once.

writepaths.add(new BasicAsyncWriteRequest(TagPathParser.parse(…the Tag-path string…),value string);

I would appreciate your early reply to my query. Please let me know if my double is clear to you or I am imagining a problem?

regards
PRAMANJ

There’s no separate API.

I don’t think what you’re doing isn’t as wasteful as you’re imagining it to be, just carry on :thumb_right:

Dear Kevin,
Thanks, let me first go ahead in this way then we will see if there is any performance issue. I am always apprehensive or paranoid about repetitive memory allocation and relying totally on JVM to do the garbage collection, lest it should lead to memory leaks! I try to avoid Garbage generation as far as possible!

Let me corss the bridge when I come to the it.

best regards
PRAMANJ