Skip to content

IofCourse

Types

courseControl

A single control visit on a course, referencing a control by id.

rescript
type courseControl = {
  controlId: string,
  controlType: option<string>,
  order: option<int>,
}

Fields:

  • controlId: string — The id of the referenced control.
  • controlType: option&lt;string&gt; — The type of control, e.g. "Start", "Finish", or "Control".
  • order: option&lt;int&gt; — The visiting order of this control on the course.

t

Defines a course — its name, length, climb, and the ordered sequence of controls.

See: Course in the IOF XML 3.0 XSD

rescript
type t = {
  id: option<string>,
  name: option<string>,
  length: option<float>,
  climb: option<float>,
  numberOfControls: option<int>,
  controls: array<courseControl>,
}

Fields:

  • id: option&lt;string&gt; — The identifier of the course.
  • name: option&lt;string&gt; — The name of the course.
  • length: option&lt;float&gt; — The length of the course in metres.
  • climb: option&lt;float&gt; — The climb of the course in metres.
  • numberOfControls: option&lt;int&gt; — The number of controls on the course, excluding start and finish.
  • controls: array&lt;courseControl&gt; — The ordered sequence of controls on the course.

Values

parse

rescript
let parse: IofXml.XmlUtils.xmlElement => option<t>