Advanced Peripherals Energy Detector Source ​
lua
telem.input.advancedPeripherals.energyDetector (
peripheralID: string,
categories?: string[] | '*'
)
Mod Dependencies
Requires Advanced Peripherals.
This adapter produces metrics for the transfer rate and limit of an attached Energy Detector. By default, the metrics are limited to an opinionated basic list, but this can be expanded with the categories
parameter at initialization.
See the Usage section for a complete list of the metrics in each category.
Name | Type | Default |
---|---|---|
peripheralID | string | nil |
Peripheral ID of the Energy Detector | ||
categories | string[] | "*" | { "basic" } |
List of metric categories to query. The value lua
|
Usage ​
lua
local telem = require 'telem'
local backplane = telem.backplane()
:addInput('my_energy', telem.input.advancedPeripherals.energyDetector('right'))
:cycleEvery(1)()
Given an Energy Detector peripheral on the right
side of the computer, this appends the following metrics to the backplane:
Name | Value | Unit |
---|---|---|
apenergy:transfer_rate | 0 - inf | FE/t |
apenergy:transfer_rate_limit | 0 - inf | FE/t |