GetWirelessDeviceStatistics
Source:
src/AWS/IoTWireless/GetWirelessDeviceStatistics.ts
Runtime binding for iotwireless:GetWirelessDeviceStatistics — read the
bound wireless device’s operating information (last uplink time, RSSI/SNR
gateway metadata, battery level, device state) from a deployed Lambda or
Task.
Reading Device Statistics
Section titled “Reading Device Statistics”Provide the GetWirelessDeviceStatisticsHttp implementation layer on the
Function effect, bind the device in the init phase, then call the
returned client at runtime.
// initconst getStats = yield* AWS.IoTWireless.GetWirelessDeviceStatistics(device);
// runtimeconst stats = yield* getStats();const lastSeen = stats.LastUplinkReceivedAt;// on the Function effect:// .pipe(Effect.provide(AWS.IoTWireless.GetWirelessDeviceStatisticsHttp))