RaxolSensor (Raxol Sensor v2.6.0)

Copy Markdown View Source

Sensor fusion framework for Elixir built on OTP.

Poll sensors at configurable intervals, buffer readings, fuse data with weighted averaging and configurable thresholds, and render real-time HUD widgets (gauges, sparklines, threat indicators, minimaps).

Quick Start

defmodule CpuSensor do
  @behaviour Raxol.Sensor.Behaviour

  @impl true
  def read(_opts) do
    # Return a sensor reading
    {:ok, %Raxol.Sensor.Reading{
      sensor_id: :cpu,
      value: get_cpu_usage(),
      unit: :percent,
      timestamp: System.monotonic_time(:millisecond)
    }}
  end
end

# Start the sensor supervisor, then register sensors
Raxol.Sensor.Feed.start_link(sensor: CpuSensor, interval: 1000)

Architecture

Optional Nx Backend

When {:nx, "~> 0.9"} is available, vectorized fusion operations use Nx tensors for batch processing sensor readings.

Documentation

See the Sensor Fusion guide.

Summary

Functions

Returns the version of RaxolSensor.

Functions

version()

Returns the version of RaxolSensor.