Maybe someone could help me out on this.
I have written a driver that extends AbstractTagDriver. I add tags (approx. 15k) dinamically as data is coming in if the tag does not yet exist. Otherwise I set the tag value.
When the driver is running I noticed that the thread “[my driver] - ScheduledTagReads” eats a lot of CPU cycles.
Also, when I disable the driver in the gateway interface it takes several minutes to stop the driver. During the stop process I notice that the same task (thread) which eats up CPU, “[my driver] - ScheduledTagReads” is the one causing the delay (hang). Sometimes the thread won’t exit at all, causing the driver stopping process to effectively hang. I also noticed a lot of Clock Drift, degraded performance log lines.
As I mentioned there are around 15k tags, updating at a rate of maybe 10tags/sec.
Since this is a subscription model, I wonder where these ScheduledTagReads come from? I assume, since this much CPU load, ther must be some kind of loop reading tags?
The basic plot of my tag feeder is:
tag = findDriverTag(_tagpath_);
if (tag == null) {
tag = new DriverTag(_tagname_,_uatype_);
addDriverTag(tag)
}
tag.setValue(_value_,_status_,_time_);
Except for the high load and the problems described, the driver works as expected. I also noticed that there is the “buildNode()” method. I haven’t used it in my driver because I don’t understand the meaning of it. Should I also call buildNode() in addition to addDriverTag()?
A short example (or sketch) of how the AbstractTagDriver class works would be much appreciated.
I have a feeling that I may me missing something.
Can anyone of the developers shed light on this?
Thank you very much.