Retrieve "History Driver" and "History Provider" for Remote Tag Providers

From within an Ignition module (in Java), In order to query the correct tagids in the SQL Historian where a Remote Tag Provider is involved, my understanding is that you must know the "History Driver" and "History Provider" values that can be seen in the settings below. What is the supported way of retrieving these values, if there is one?

If there's not an officially supported way, then I'd like to resort to reflection. I can see in the debugger that these values ARE available on the RemoteTagProvider object, they are in the "settings" field as part of an array. Does the offset into this array change or can I assume that these values are always at indexes 7 and 8?

I'm pretty sure the order of those are "stable" unless we happened to re-order the fields in RemoteTagProviderSettings, which seems unlikely.

See this topic for a detailed discussion:

@pturmel -- what specific reflection did you end up doing? Did you access the "settings" field and use a hard-coded offset?

I did not look at the settings record at all, just the live RTP object retrieved from the gateway context. See that topic's linked Exchange Resource for actual code examples.

@pturmel I think you're talking about this comment Remote Tag Provider History Queries - #29 by pturmel which links to this site https://www.automation-pros.com/TagReportUtility/ which has a ZIP file in it. I downloaded the ZIP file and I see what looks to be some Java-like code in some Python files... I looked in providers/code.py but I'm not seeing the obvious place that you're retrieving "History Driver" and "History Provider".

I apologize if I'm being dense... could you be a bit more specific on what code retrieves these?

Start with line 37 for the reflection setup. Look at line 204 for the reflection usage.

Consider importing the project and running it to get a feel for how it works.

(That comment also links to a complete topic describing the whole resource.)

Thanks, now I see. That code appears to retrieve the "Gateway" and "Provider" values within the "Remote Gateway" section of the configuration, which I was already doing but which I have since found to be incorrect for the purposes of reliably querying the SQL database directly. I'm trying to retrieve the "History Driver" and "History Provider" under "History Settings".

Given @Kevin.Herron's reply, I'm going to try my luck with the "settings" field.

The fields I target in the running remote tag provider come directly from the columns in the IDB you are targetting. The former are easier to target, and will likely still work when v8.3 comes out. The IDB will not.