Skip to main content

Module format

Module format 

Source
Expand description

The one value formatter the TUI, the one-shot CLI and the MCP server share: property values as read, turned into the text the browser, the watch list, the write previews and the CLI’s tables show, and into the typed Datum the CLI’s JSON carries.

It knows the object type, so a constructed value (timestamps, schedule days, references) is split with the element table from bacnet_encoding::constructed::property_element and shown decoded, and a binary or multi-state value is named by its state, with the object’s own state text when that was read.

Style, the same on every screen (decision D4 of #1887): enumerations, bit names and units in kebab case, objects as analog-input 1. Floats come in two forms (decision D2): Floats::Display for the browser and the watch list, at most six significant digits, and Floats::Exact for the write previews, the ledger, the CSV log and the one-shot CLI, which keep every digit. The compact places cut a long list short; the CLI shows it whole (ValueFormat::whole_lists).

Modules§

alarms
Alarm and event summaries as typed data and as table text (#2077): a GetEventInformation answer, a GetAlarmSummary entry and a GetEnrollmentSummary entry, with states, event types and notify types named, transition bits named, timestamps rendered and objects as objects. The CLI’s tables and JSON, the terminal UI and the MCP server share them.
log_records
Event Log and Audit Log records’ notifications as typed data (#2103): an event notification (Clause 12.27.13: the notification’s parameters, its event values through EventValues) and an audit notification (Clause 12.64.10), every field a Datum with its enumerations named, objects as objects and timestamps rendered.
notification
An event notification’s values (its event_values, the BACnetNotificationParameters choice) for every event type the stack decodes (#2073): as text, exceeding value 101.5, flags in-alarm, deadband 1, limit 100, and as typed data with each field by name. The CLI’s Event Log records, the terminal UI and the MCP server share them.

Structs§

Fields
The named fields of a Datum::Constructed, in their wire order; JSON writes them as an object keyed by name in snake case, {"time_delay": 30, "low_limit": 10}.
LogColumns
What each column of a log samples: one column for a Trend Log, one per member for a Trend Log Multiple, None where the reference is empty; and, once read, the state texts of the objects whose states columns sample. The default names no column.
LoggedProperty
The property a log column samples, from its Log_DeviceObjectProperty reference.
StateTexts
The object’s own names for its states, when they were read.
ValueFormat
Formats the values of one object.

Enums§

Datum
A property value as typed data. Serialized untagged, so each form is told apart by its JSON type and keys.
Floats
How floats are written.
RowError
Why one property of a read has no value. Structured, so a front end can report the device’s error class and code as data, not only as text.

Constants§

MAX_NAME_CHARS
Longest name kept, in characters; a device’s longer name is cut.
MAX_STATE_TEXT_OBJECTS
The most objects one read of a log reads state texts for: a Trend Log needs one, and a Trend Log Multiple with more state members than this names the rest by number, as before (#2122).
PLAIN_ELEMENTS
Constructed elements whose text the formatter writes from numbers, names, times and dates only: references, timestamps, addresses, scales and the like. Any other kind may quote a character string.

Functions§

clean_name
A device’s name (or other short text) for display: clean_text cut to at most MAX_NAME_CHARS characters.
clean_text
Device text for display, whole: each control character and line or paragraph separator as a space, so it can’t move the cursor or break a row, and each character is_hidden_on_screen matches dropped, so it can’t reorder or hide what follows. The one-shot CLI’s table and text output shows every device string this way (#2144); nothing marks a changed one.
decode_all
Every application-tagged value in data, or None if any part of it doesn’t decode. A context tag decodes as ApplicationData.
format_property_value
A PropertyValue as plain text, with no property context: the capture decode tree and the CLI’s tag views use it; read values go through ValueFormat, which knows the property.
name_text
An encoded Object_Name as text (see clean_name); None unless it is one character string.
object_name
The Object_Name among properties as read; None when the device answered it with an error or left it out. See name_text.
raw_text
Octets that don’t decode, as every front end writes them: [raw 0e 0f].
units
The Units among properties as read.

Type Aliases§

RawRow
A property as read: its raw application-tagged value, or why the device gave none.