Hi all,
I'm looking into an way to retrieve some information events in an adhoc datasource.
Searching on Dojo i found: https://community.dataminer.services/question/how-to-create-an-alarmfilter-for-alarm-properties/?hilite=GetAlarmDetailsFromDbMessage
However here its mentioned that https://community.dataminer.services/question/how-to-get-history-of-alarms-in-a-protocol/ GetAlarmDetailsFromDbMessage is going flagged as obsolete.
So the question is how can i pass the Engine.SLNetRaw in use for DatabaseRepositoryRegistryBuilder
var repostoryRegistery = SLDataGateway.API.Repositories.Registry.DatabaseRepositoryRegistryBuilder.Default
.WithConnection(Engine.SLNetRaw)
.Build();
in the withConnection within the GQI Ad hoc datasource
Hi Gerwin,
Some background
At this moment, GQI does not directly provide a Connection object to Ad Hoc data sources yet. The main reason for this is because in general, GQI does not need it. Instead, we have a message callback that is linked to the original client connection, but we do not have a reference or ownership of that connection.
This message callback is also what lies underneath the GQIDMS object provided to the Ad Hoc data sources.
Current solution
In order to get such a Connection object, a separate SLNet connection needs to be established, based on the original client connection.
You can do this by requesting an authentication ticket and authenticating a new connection with that.
You can refer to this example on GitHub for the actual implementation.
! Important note: creating many new connections like this will have an impact the system and they should only be used for queries that are used sparingly to not flood the system.
In the future, we plan on creating and exposing the Connection object directly to the Ad Hoc data sources, so they can be managed, cached, reused etc. efficiently without having to worry about the impact.
Yes indeed, that would require the least effort to use. However, this has relatively low priority. Our main goal at the moment is to provide the means by which any data source can be achieved instead of focusing on specific use cases.
The vision for the future is to let everyone contribute and to make common data sources like that available through GitHub and the DataMiner Catalog.
In the long term, this should become as easy as using a default data source.
Wont it be easier to make information events available as an default source like the alarms?