I was wondering if it would be possible to open-source the SimpleTagProvider code, or the com.inductiveautomation.ignition.gateway.sqltags.simple package.
The reason is, that this is a very useful class but for more advanced drivers it is hard to extend. I think that id there is nothing too proprietary in the implementation, that it could be a useful example/starting point for implementing advanced tag providers.
Cheers
Ivan
Hi,
I’ve attached that package, hopefully you’ll find it useful. Fundamentally, it’s just an example of how you might implement the TagProvider interface. Because the tag values are all driven by an outside entity, it is a bit simpler than if you were trying to allow other types of tags (opc, expressions, etc). I don’t have a full idea of what you want to do, but going off your other post, if you just want the simple tag provider with more direct access to storing/loading tags, you should be able to modify this and do it.
Basically, you’ll cut out the “SimpleTagProvider” wrapper, and just use “SimpleTagProviderInternal” directly. You may also want to wrap it up as an extension point, so that you can commission them from the gateway, but I suppose that’s optional. If you only wanted one, you could do some bookkeeping on your own (that is, to mainly store your tagstore id) and call SQLTagsManager.registerTagProvider().
Regards,
SimpleTagProvider.zip (13.9 KB)
Hey Colby,
Many thanks, I think this will be very helpful. BTW I think both the SimpleTagProvider and UA Driver APIs are great, and I’ll produce “simple” versions of the module using those. It’s just that we have some unique requirements that will need some more tweaking.
Thank you for answering all these questions so promptly.
Cheers
Ivan
PS: I’m also posting questions in separate posts so that it’s easier to follow for other people who are browsing
No problem. There’s also plenty of room for us to grow and refine the platform/api, so don’t be afraid to offer suggestions as you come across things.
Regards,