PigTracks.Sensors
16.1.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package PigTracks.Sensors --version 16.1.0
NuGet\Install-Package PigTracks.Sensors -Version 16.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PigTracks.Sensors" Version="16.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PigTracks.Sensors --version 16.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: PigTracks.Sensors, 16.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PigTracks.Sensors as a Cake Addin #addin nuget:?package=PigTracks.Sensors&version=16.1.0 // Install PigTracks.Sensors as a Cake Tool #tool nuget:?package=PigTracks.Sensors&version=16.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
PigTracks Sensors .NET Client
Usage
Register the PigTracks Sensor Client with your services:
services.AddSensorsClient(new SensorsClientConfiguration
{
PigTracksSensorsGraphQlEndpoint = "https://sensors-api.pigtracks.com/graphql"
});
Inject in the ISensorClient:
private readonly ISensorsClient _sensorsClient;
public MyClass(ISensorsClient sensorsClient)
{
_sensorsClient = sensorsClient;
}
Make a call to PigTracks Sensors:
await _sensorsClient.UpdateDevice(new UpdateDeviceInput
{
VendorId = vendorId,
DeviceId = deviceId,
LastUpdated = mostRecentHeartbeat.HeartbeatTimeStamp.AsUtc(),
LastLatitude = mostRecentHeartbeat.Lat.ToDecimalWhereZeroIsNull(),
LastLongitude = mostRecentHeartbeat.Lon.ToDecimalWhereZeroIsNull(),
LastBatteryStrength = mostRecentHeartbeat.Battery,
LastSatelliteSignalStrength = mostRecentHeartbeat.IsIridium.HasValue && mostRecentHeartbeat.IsIridium.Value ? mostRecentHeartbeat.SignalStrength : null,
LastCellSignalStrength = !mostRecentHeartbeat.IsIridium.HasValue || !mostRecentHeartbeat.IsIridium.Value ? mostRecentHeartbeat.SignalStrength : null,
Temperature = mostRecentHeartbeat.Temperature,
IsGeophoneConnected = mostRecentHeartbeat.GeophoneConnected,
});
Updating the GraphQL Schema
cd PigTracks.Sensors.Client/SensorsApi
dotnet graphql update
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- InfluxDB.Client (>= 4.17.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Http (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
16.2.2 | 84 | 10/11/2024 |
16.2.1 | 85 | 10/10/2024 |
16.2.0 | 85 | 10/10/2024 |
16.1.3 | 86 | 10/10/2024 |
16.1.2 | 81 | 10/4/2024 |
16.1.1 | 85 | 9/30/2024 |
16.1.0 | 112 | 9/2/2024 |
16.0.0 | 105 | 8/30/2024 |
15.2.0 | 888 | 1/18/2024 |
15.1.0 | 352 | 1/12/2024 |
15.0.0 | 404 | 1/8/2024 |
14.0.0 | 385 | 1/4/2024 |
12.0.1 | 428 | 12/11/2023 |
12.0.0 | 390 | 12/11/2023 |
11.0.0 | 429 | 12/8/2023 |
10.0.0 | 376 | 12/8/2023 |
9.0.0 | 393 | 12/7/2023 |
8.0.0 | 509 | 11/20/2023 |
7.0.0 | 971 | 11/14/2023 |
6.2.1 | 404 | 11/13/2023 |
6.2.0 | 418 | 11/10/2023 |
6.1.2 | 373 | 11/10/2023 |
6.1.1 | 389 | 11/10/2023 |
6.1.0 | 370 | 11/10/2023 |
6.0.0 | 390 | 11/10/2023 |