Protocols

How flexibility maps UFTP, EEBUS, S2, OpenADR 3, CSIP-AUS, IEC 104 and CLS.EEDI into limits and settlements: lossless or refusing.

On this page

Every protocol in the grid speaks about the same few things — a cap, a range, a plan, a measurement — in its own units, sign and time model. A converter translates one protocol into this crate's shapes and back. Each is a Cargo feature, off by default, built on its protocol crate, and none of them does I/O: the protocol crate parses and sends; the converter maps values.

flexibility = { version = "0.4", features = ["s2", "openadr"] }

Which converter for which job#

FeatureProtocolWho sends itBecomesPage
uftpUFTP 3.1 (Shapeshifter)a DSO and an aggregator trading flexibilitydeviation envelopes, ordered deviations, settlement itemsUFTP
eebusEEBUS LPC / LPPa control box or energy manager to a deviceconsumption and feed-in caps, both waysEEBUS and metering
meteringGerman metering rulesthe meter operator's datathe § 14a minimum as a guarantee; Lastgang energy as powerEEBUS and metering
s2S2 (EN 50491-12-2)an energy manager and a devicePEBC envelopes both ways; PPBC sequences as schedulesS2 and OpenADR
openadrOpenADR 3a VTN (utility) to a VEN (site)capacity caps over their own intervals, both ways; usage as powerS2 and OpenADR
csipCSIP-AUS (IEEE 2030.5)a utility server to a connection pointan envelope per quarter hour, by CSIP's own rulesIEC 104, CLS and CSIP-AUS
iec104IEC 60870-5-104a control centre to a plant or siteactive-power caps, both waysIEC 104, CLS and CSIP-AUS
clsCLS.EEDIa grid backend, through a smart meter gatewaycontrol-box caps and failsafes, both waysIEC 104, CLS and CSIP-AUS

A site energy manager typically combines several: the operator's caps over OpenADR or CSIP-AUS, the § 14a minimum from metering, a heat pump's limit over EEBUS, a PV inverter over S2. All of them become limits in one envelope, and the envelope says which one set every bound.

The rules every converter keeps#

  • Lossless or refusing. What both sides can express round-trips — a property test holds it where a converter goes both ways. What the target cannot express is an Error::Unrepresentable naming the protocol, the field and the value, never a silent drop.
  • The sign changes at the boundary and nowhere else. Protocols that send magnitudes (an EEBUS LPP limit, an OpenADR export limit, a CLS production limit) become feed-in caps of the right sign; each converter has a test with a known consumption and one with a known feed-in.
  • Exact numbers. Decimals stay decimals. A binary float on the wire (an S2 number, an IEC 104 short float) is read once, through its shortest decimal: the value the sender wrote. A fraction of a watt is refused unless you name a rounding.
  • Time is the protocol's, translated once. A limit keeps its own window; applied to an envelope, a window that covers part of a quarter hour constrains the whole quarter hour, so a plan inside the envelope keeps every limit.
  • Units are never guessed. Where a protocol makes the unit a separate field (OpenADR), it is required. Where the meaning lives outside the message (an IEC 104 point list, an S2 commodity quantity), you pass it.
  • No clock. A duration that starts "on receipt" (EEBUS, CLS) takes the receipt instant as an argument, so the same message gives the same limit in a test and in a replay.