Table of Contents

Class RtzVersions

Namespace
EncDotNet.S100.Routes.Rtz
Assembly
EncDotNet.S100.Routes.Rtz.dll

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 are xsd:time, and extensions holds any elements.
  • 1.1 (the STM extended Annex S) and 1.2 (IEC PAS 61174-1:2021): scheduleElement, xsd:duration windows, extensions holds extension elements with a manufacturer and name. 1.2 lets legs carry extensions too and makes the waypoint revision mandatory.

Fields

Latest

The newest version, which the writer uses by default.

public const string Latest = "1.2"

Field Value

string

V1_0

RTZ 1.0.

public const string V1_0 = "1.0"

Field Value

string

V1_1

RTZ 1.1.

public const string V1_1 = "1.1"

Field Value

string

V1_2

RTZ 1.2.

public const string V1_2 = "1.2"

Field Value

string

Properties

Supported

The supported versions, newest first.

public static IReadOnlyList<string> Supported { get; }

Property Value

IReadOnlyList<string>

Methods

IsRtzNamespace(XNamespace)

Whether ns is an RTZ namespace of any version.

public static bool IsRtzNamespace(XNamespace ns)

Parameters

ns XNamespace

A namespace.

Returns

bool

true for http://www.cirm.org/RTZ/m/n.

IsSupported(string?)

Whether version is one of Supported.

public static bool IsSupported(string? version)

Parameters

version string

A version, e.g. "1.1".

Returns

bool

true when 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

version string

A 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

head string

The start of the file, as text.

Returns

string

The version the file declares, or null when 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

ns XNamespace

A namespace.

Returns

string

The version, e.g. "1.2".