PPNet.Message.Ping (pp_net v0.1.5)

Copy Markdown View Source

This module defines the PPNet.Message.Ping struct and provides functions to parse a binary or list representation of a Ping message into this struct.

Summary

Types

t()

@type t() :: %PPNet.Message.Ping{
  cpu: float(),
  datetime: DateTime.t(),
  extra: %{optional(String.t()) => any()},
  location: %{lat: float(), lon: float(), accuracy: integer()},
  session_id: String.t(),
  storage: %{total: integer(), used: integer()},
  temperature: float(),
  tpu_memory_percent: integer(),
  tpu_ping_ms: integer(),
  uptime_ms: integer(),
  wifi: [%{mac: String.t(), rssi: integer()}]
}

The PPNet.Message.Ping struct

Fields

  • session_id - Session ID
  • temperature - CPU/board temperature in Celsius
  • uptime_ms - Device uptime in milliseconds
  • location - GPS location in WGS 84 (EPSG:4326): lat and lon in decimal degrees, accuracy in meters
  • cpu - CPU usage as a float between 0.0 and 1.0
  • tpu_memory_percent - TPU memory usage percentage (0-100)
  • tpu_ping_ms - TPU round-trip ping time in milliseconds
  • wifi - List of visible WiFi networks, each with mac (string) and rssi (integer, dBm)
  • storage - Disk usage in kilobytes (KB): total and used
  • datetime - Timestamp of the ping message
  • extra - Optional arbitrary key/value data

Functions

is_valid_pack_input(temperature, uptime_ms, lat, lon, accuracy, cpu, tpu_memory_percent, tpu_ping_ms, wifi, total, used, extra)

(macro)

valid_wifi_lingh(wifi)

(macro)