#[non_exhaustive]pub enum Edition {
Ed1,
Ed2,
Ed2_1,
}Expand description
The IEC 61850 edition a server implements.
Edition is a property of a server (it is what its SCL file declares), never of an
association. It drives attribute sets (RCB ResvTms/Owner), object-reference length
limits, the GOOSE test/simulation naming and the enumerations that grew between
editions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ed1
IEC 61850 Edition 1 (2003/2004).
Ed2
IEC 61850 Edition 2 (2009–2011).
Ed2_1
IEC 61850 Edition 2.1 (2010/2011 + AMD1:2020) — the default.
Implementations§
Source§impl Edition
impl Edition
Sourcepub const fn max_object_reference_len(self) -> usize
pub const fn max_object_reference_len(self) -> usize
Maximum length of an object reference (VisString65 in Ed1, VisString129 from Ed2).
Sourcepub const fn scl_version(self) -> &'static str
pub const fn scl_version(self) -> &'static str
The SCL schema namespace revision this edition corresponds to.
Sourcepub fn from_scl_version(version: &str) -> Edition
pub fn from_scl_version(version: &str) -> Edition
The edition an SCL file declares, from its version+revision+release string.
This is the whole of “edition is a property of the server, and the server’s edition is
what its file says”: 2003 is Edition 1, 2007A/2007B through release 3 is
Edition 2, and 2007B4 (IEC 61850-6:2009+AMD1) or anything later — 2007C, the
Ed 2.2 schema — is Edition 2.1. An unrecognised string is read as the newest rather
than the oldest: a file from a schema this crate has not seen is more likely to be
ahead of it than behind, and reading a modern file as Edition 1 would silently drop
ResvTms and Owner from every report control block.
Sourcepub const fn has_rcb_reservation(self) -> bool
pub const fn has_rcb_reservation(self) -> bool
Whether a report control block has ResvTms (buffered) and Owner.
Both arrived with Edition 2 (IEC 61850-7-2 §17.2). An Edition 1 server that publishes them is claiming a reservation service it does not have, and a client that reads the block positionally then reads every field after them at the wrong offset.