Table of Contents

Class ElementSpec

Namespace
Pamoja.Profile
Assembly
Pamoja.Profile.dll

A custom sensor or node stat a profile contributes to the dashboard.

public sealed record ElementSpec : IEquatable<ElementSpec>
Inheritance
ElementSpec
Implements
Inherited Members

Constructors

ElementSpec(string, string, string, Viz)

A custom sensor or node stat a profile contributes to the dashboard.

public ElementSpec(string Key, string Unit, string Label, Viz Viz)

Parameters

Key string

The stable, language-neutral element key, such as water_turbidity.

Unit string

The canonical unit name, such as ntu, ph, or count.

Label string

A human-readable fallback label, shown when no localized label applies.

Viz Viz

The graphic this element is drawn with.

Properties

Band

Gets the safe band as [low, high] in the element's unit.

public float[]? Band { get; init; }

Property Value

float[]

Key

The stable, language-neutral element key, such as water_turbidity.

public string Key { get; init; }

Property Value

string

Label

A human-readable fallback label, shown when no localized label applies.

public string Label { get; init; }

Property Value

string

Labels

Gets the per-locale labels, keyed by locale tag.

public IReadOnlyDictionary<string, string>? Labels { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Scope

Gets the link kinds whose groups this element is offered on, such as ["mesh"]; null means every group.

[JsonConverter(typeof(ScopeConverter))]
public IReadOnlyList<string>? Scope { get; init; }

Property Value

IReadOnlyList<string>

Span

Gets whether the element's tile spans two columns.

public bool Span { get; init; }

Property Value

bool

Stat

Gets whether this is a node or network stat rather than a measurement of the world.

public bool Stat { get; init; }

Property Value

bool

State

Gets a starting discrete state code, such as state.closed, for a non-numeric element.

public string? State { get; init; }

Property Value

string

Unit

The canonical unit name, such as ntu, ph, or count.

public string Unit { get; init; }

Property Value

string

Value

Gets a starting numeric value for the add-sensor dialog.

public float? Value { get; init; }

Property Value

float?

Viz

The graphic this element is drawn with.

public Viz Viz { get; init; }

Property Value

Viz