I’m trying to write a historical query from a component in a module I’m developing. I’m using the standard gateway interface “runTagHistoryQuery” function. It’s all working very well, except I have to set it up with a fully qualified tag path in the client (histprov:historian:/drv:ignition-cody-pc:default:/tag:tags/ramp/ramp0). Obviously I think this is far from intuitive for someone to use so I’d like to whittle my tag path down to one or all of the following:
[ul]
- tags/ramp/ramp0
- [~]tags/ramp/ramp0
- [historian/ignition-cody-pc:default]tags/ramp/ramp0
[/ul]
Now my question is, how do I take a less than fully qualified tag path from the client and turn it into the a fully qualified historical tag path. I can retrieve the default data source and default tag provider from the client context with:
ClientContext context = getAppContext();
defaultDatasource = context.getDefaultDatasourceName();
defaultTagProvider = context.getDefaultSQLTagsProviderName();
But I’m missing the system name. So I guess my question is
[ul]
- What java Class would I use to get the system name?
- Am I even approaching this the right way or is there already a class to do this? (I’ve found classes to parse SQL tag paths but not historical).
[/ul]
Thanks!