Skip to main content

Module bmopf

Module bmopf 

Source
Expand description

The draft BMOPF task force JSON schema (frederikgeth/bmopf-report).

Everything is explicit SI: volts, watts, vars, ohms, siemens, meters, radians, string bus ids and terminal names. The schema sets additionalProperties: false on every element, so the strict writer drops what the schema cannot carry and says so per field; the dropped data stays in the model’s extras, never in the emitted JSON.

Structs§

BmopfWriteOptions
Options for BMOPF JSON output.

Constants§

BMOPF_SCHEMA_ID
The $id of the BMOPF schema this writer targets, and the value it stamps into meta.$schema. The upstream $id is not version pinned, so use it together with BMOPF_SCHEMA_VERSION.
BMOPF_SCHEMA_VERSION
The version field of the vendored BMOPF schema (tests/data/dist/bmopf/draft_bmopf_schema.json). Upstream can change the schema without a version bump, so use it together with BMOPF_SCHEMA_ID.

Functions§

parse_bmopf_file
parse_bmopf_str
write_bmopf_json
Writes the strict BMOPF document. Every field the schema cannot carry is reported in the warnings.
write_bmopf_json_with_options
Writes BMOPF JSON with explicit options.