Class RtzVersions
The RTZ versions this library reads and writes, and their namespaces.
public static class RtzVersions
- Inheritance
-
RtzVersions
- Inherited Members
Remarks
- 1.0 (IEC 61174 Ed. 4.0:2015 Annex S): schedule elements are
spelled
sheduleElement, windows and stay arexsd:time, andextensionsholds any elements. - 1.1 (the STM extended Annex S) and 1.2 (IEC PAS
61174-1:2021):
scheduleElement,xsd:durationwindows,extensionsholdsextensionelements with a manufacturer and name. 1.2 lets legs carry extensions too and makes the waypointrevisionmandatory.
Fields
Latest
The newest version, which the writer uses by default.
public const string Latest = "1.2"
Field Value
V1_0
RTZ 1.0.
public const string V1_0 = "1.0"
Field Value
V1_1
RTZ 1.1.
public const string V1_1 = "1.1"
Field Value
V1_2
RTZ 1.2.
public const string V1_2 = "1.2"
Field Value
Properties
Supported
The supported versions, newest first.
public static IReadOnlyList<string> Supported { get; }
Property Value
Methods
IsRtzNamespace(XNamespace)
Whether ns is an RTZ namespace of any version.
public static bool IsRtzNamespace(XNamespace ns)
Parameters
nsXNamespaceA namespace.
Returns
- bool
trueforhttp://www.cirm.org/RTZ/m/n.
IsSupported(string?)
Whether version is one of Supported.
public static bool IsSupported(string? version)
Parameters
versionstringA version, e.g.
"1.1".
Returns
- bool
truewhen it's supported.
NamespaceOf(string)
The RTZ namespace of version, e.g. http://www.cirm.org/RTZ/1/0.
public static XNamespace NamespaceOf(string version)
Parameters
versionstringA version as
"major.minor".
Returns
- XNamespace
The namespace.
Sniff(string)
Recognises an RTZ file from its first few kilobytes: a route
root in an RTZ namespace. The version comes from the namespace.
public static string? Sniff(string head)
Parameters
headstringThe start of the file, as text.
Returns
- string
The version the file declares, or
nullwhen it isn't RTZ.
VersionOf(XNamespace)
The version an RTZ namespace names, or null when it isn't one.
public static string? VersionOf(XNamespace ns)
Parameters
nsXNamespaceA namespace.
Returns
- string
The version, e.g.
"1.2".