Hi,
I'd like to be able to process the telemetry data contained within the telemetry and telemetryField tables within C:\Users\<user>\AppData\Local\UGCS\db\sqlite\telemetry.db.
Unfortunately, my sqlite client is telling me the "value" column of the telemetry table is in varbinary format, which can't be displayed directly or used within SQL as it's not a valid numeric type. Is there any way of doing a SELECT to retrieve the value in a datatype that SQLite understands, so that I can do further processing using SQLite without external conversion?
BTW, I am using the .Net SDK, so an alternative may be to pull the telemetry using the GetTelemetryRequest call, if that does the conversion automatically when it provides the data to the SDK client. However, can somebody provide the parameters to that call that I should use, please?
Thanks,
Stevod
Replies
Many thanks, Igor.
Hi Stevod
Here example of GetTelemetryRequest:
DateTime utcTime = DateTime.Now.ToUniversalTime();
DateTime posixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
TimeSpan span = utcTime - posixEpoch;
var beginningMilliseconds = (long)span.TotalMilliseconds;
GetTelemetryRequest telemetryRequest = new GetTelemetryRequest
{
ClientId = clientId,
FromTime = beginningMilliseconds,
Limit = 10, //Limit of telemetry chunks received from server
Vehicle = new Vehicle() { Id = 1 }
};
var responseTelemetry = messageExecutor.Submit<GetTelemetryResponse>(telemetryRequest);
responseTelemetry.Wait();
The same example you can see on github:
https://github.com/ugcs/ugcs-dotnet-sdk/blob/master/UGCS.Example/UG...
BTW, I am using the .Net SDK, so an alternative may be to pull the telemetry using the GetTelemetryRequest call, if that does the conversion automatically when it provides the data to the SDK client. However, can somebody provide the parameters to that call that I should use, please?