pub struct LuaFlowStatisticsGetFlowCountParams {
pub category: String,
pub count: bool,
pub name: LuaAny,
pub precision_index: String,
pub sample_index: u16,
}Expand description
Gets the flow count value for the given time frame. If sample_index is not provided, then the value returned is the average across the provided precision time period. These are the values shown in the bottom section of the statistics GUIs.
Use sample_index to access the data used to generate the statistics graphs. Each precision level contains 300 samples of data so at a precision of 1 minute, each sample contains data averaged across 60s / 300 = 0.2s = 12 ticks.
All return values are normalized to be per-tick for electric networks and per-minute for all other types.
Fields§
§category: StringThe statistics category to read from. Valid choices are "input", "output" and "storage".
count: boolIf true, the count of items/fluids/entities is returned instead of the per-time-frame value.
name: LuaAnyThe prototype ID.
precision_index: StringThe precision to read.
sample_index: u16The sample index to read from within the precision range. If not provided, the entire precision range is read. Must be between 1 and 300 where 1 is the most recent sample and 300 is the oldest.
Trait Implementations§
Source§impl Clone for LuaFlowStatisticsGetFlowCountParams
impl Clone for LuaFlowStatisticsGetFlowCountParams
Source§fn clone(&self) -> LuaFlowStatisticsGetFlowCountParams
fn clone(&self) -> LuaFlowStatisticsGetFlowCountParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more