Skip to main content

Module rules

Module rules 

Source
Expand description

The rule catalogue.

One table, from which cargo xtask render-rules writes the published catalogue. Every rule quotes the sentence it implements, so a disagreement with another implementation can be settled by reading rather than by arguing.

Severity is a judgement about the specification, not about the message. A rule is an Error when the standard states the requirement plainly, and a Warning when the text is ambiguous, silent, or contradicts itself — with the issue number or the E number in the citation. That is what keeps this crate from refusing traffic that another conforming implementation is entitled to send.

Structs§

Rule
One entry of the catalogue.

Constants§

ABNORMAL_ONLY
An abnormal-condition-only mode, transition or range needs abnormal_condition
APPLICATION_REFUSED
The receiving application refused the message through its inbound policy
ARRAY_BOUNDS
An array must respect the schema’s minItems and maxItems
BLOCKED_BY_TIMER
The instructed transition is blocked by a timer that has not finished
COMMODITY_WITHOUT_POWER_RANGE
Every operation mode should publish a power range for each commodity the actuator supports
CONTROL_TYPE_NOT_OFFERED
The CEM may only select a control type the resource offers
CURRENCY_REQUIRED
A resource that publishes costs should declare a currency
DDBC_FORECAST_NOT_OFFERED
A demand forecast may only be sent if the system description offers one
DDBC_TRANSITION_REFERENCES
A transition must name operation modes and timers of its own actuator
DDBC_UNKNOWN_ACTUATOR
An instruction must name an actuator the system description declares
DDBC_UNKNOWN_MODE
An instruction must name an operation mode that actuator has
DECODE_FAILED
The frame could not be decoded into an S2 message
DUPLICATE_ID
Identifiers must be unique within the scope the standard names
DUPLICATE_INSTRUCTION_ID
An instruction identifier must not be reused within a session
DUPLICATE_MESSAGE_ID
A message_id should not repeat within a session
DUPLICATE_ROLE
A resource should declare each role once per commodity
DUPLICATE_SUPPORTED_COMMODITY
An actuator should list each supported commodity once
FACTOR_RANGE
An operation-mode factor must be within [0, 1]
FORECAST_NOT_OFFERED
A forecast may only be sent by a resource that said it provides forecasts
FRBC_ELEMENTS_CONTIGUOUS
An operation mode’s fill-level bands must be contiguous
FRBC_FILL_LEVEL_OUT_OF_RANGE
The reported fill level is outside the range the storage described
FRBC_LEAKAGE_CONTIGUOUS
Leakage bands must be contiguous
FRBC_NOT_OFFERED
Leakage, usage forecast and target profile may only be sent if the storage offers them
FRBC_TRANSITION_REFERENCES
A transition must name operation modes and timers of its own actuator
FRBC_UNKNOWN_ACTUATOR
An instruction must name an actuator the system description declares
FRBC_UNKNOWN_MODE
An instruction must name an operation mode that actuator has
HANDSHAKE_UNDER_CONNECT
Handshake messages are redundant under S2 Connect
MEASUREMENT_NOT_OFFERED
A measurement may only use a quantity the resource said it provides
NON_FINITE
Every number must be finite
NOT_ALLOWED_FOR_ROLE
The message is not allowed from this role
NOT_ALLOWED_IN_STATE
The message is not allowed in the session’s current state
NO_SELECTION_OFFERED
NO_SELECTION is not something a resource can offer
NO_SUCH_TRANSITION
No transition is described from the active operation mode to the instructed one
OMBC_TRANSITION_REFERENCES
A transition must name operation modes and timers of its own description
OMBC_UNKNOWN_MODE
An instruction must name an operation mode the system description declares
ONE_VALUE_PER_QUANTITY
At most one value per CommodityQuantity
PEBC_BOTH_LIMITS
Power constraints need at least one upper and one lower allowed range
PEBC_ENERGY_ORDER
The lower average power must not exceed the upper
PEBC_ENVELOPE_LIMIT_ORDER
An envelope element’s lower limit must not exceed its upper limit
PEBC_ONE_ENVELOPE_PER_QUANTITY
At most one envelope per CommodityQuantity
PEBC_OUTSIDE_ALLOWED
An envelope limit must lie within an allowed range for its quantity
PEBC_UNKNOWN_CONSTRAINTS
An instruction must reference power constraints that are published and in force
PEBC_VALIDITY_WINDOW
valid_from must precede valid_until
PERCENTILE_ORDER
Confidence bands should be ordered from the lower limit to the upper
PHASE_EXCLUSIVITY
Per-phase and three-phase-symmetric quantities should not be mixed
PPBC_NOT_INTERRUPTIBLE
Only a sequence that says it is interruptible may be interrupted
PPBC_PROGRESS
A status for a sequence that has started must report its progress
PPBC_PROGRESS_UNEXPECTED
Progress was reported for a sequence that has not started
PPBC_SEQUENCE_NOT_NAMED
A status that says a sequence was selected must name which one
PPBC_STATUS_COVERAGE
A profile status must cover every container of the profile
PPBC_UNKNOWN_SEQUENCE
An instruction must resolve profile, container and sequence together
PPBC_WINDOW
A profile’s start must not be after its end
PPBC_WINDOW_TOO_SHORT
The window is shorter than the shortest sequence offered
PREVIOUS_MODE_MISSING
A status after the first for the same actuator should name the previous mode
PROFILE_FIELD
A field must be present exactly when the negotiated wire profile defines it
RANGE_ORDER
A range’s start must not be after its end
RANGE_STRICT_ORDER
A fill-level band’s start must be strictly below its end
REVOKE_ROLE_MISMATCH
The revoked object type is not one this sender owns
REVOKE_UNKNOWN
The revoked object was never published on this session
ROLE_REQUIRED_FIELD
A field that is optional in general is mandatory for this sender’s role
STATUS_REGRESSION
An instruction’s status should not move backwards
TIMESTAMP_SKEW
A timestamp is further from the local clock than its meaning allows
UNKNOWN_INSTRUCTION
An InstructionStatusUpdate must name an instruction that was sent
UNKNOWN_PROPERTY
A property the schema does not define was removed before decoding
UNKNOWN_TIMER
A timer status must name a timer the description declares

Statics§

RULES
Every rule, in identifier order.