Skip to content

ResultList

Types

resultStatus

The result status of a competitor.

rescript
type resultStatus =
  | @as("OK") Ok
  | @as("Finished") Finished
  | @as("MissingPunch") MissingPunch
  | @as("Disqualified") Disqualified
  | @as("DidNotFinish") DidNotFinish
  | @as("Active") Active
  | @as("Inactive") Inactive
  | @as("OverTime") OverTime
  | @as("SportingWithdrawal") SportingWithdrawal
  | @as("NotCompeting") NotCompeting
  | @as("Moved") Moved
  | @as("MovedUp") MovedUp
  | @as("DidNotStart") DidNotStart
  | @as("DidNotEnter") DidNotEnter
  | @as("Cancelled") Cancelled

Constructors:

  • Ok
  • Finished
  • MissingPunch
  • Disqualified
  • DidNotFinish
  • Active
  • Inactive
  • OverTime
  • SportingWithdrawal
  • NotCompeting
  • Moved
  • MovedUp
  • DidNotStart
  • DidNotEnter
  • Cancelled

splitTimeStatus

The status of a split time.

rescript
type splitTimeStatus =
  | @as("OK") SplitOk
  | @as("Missing") Missing
  | @as("Additional") Additional

Constructors:

  • SplitOk
  • Missing
  • Additional

resultListStatus

The completeness status of a result list.

rescript
type resultListStatus =
  | @as("Complete") Complete
  | @as("Delta") Delta
  | @as("Snapshot") Snapshot

Constructors:

  • Complete
  • Delta
  • Snapshot

splitTime

A split time at a single control during a race.

rescript
type splitTime = {
  controlCode: string,
  time: option<int>,
  status: option<splitTimeStatus>,
}

Fields:

  • controlCode: string — The control code at which the split time was registered.
  • time: option&lt;int&gt; — The elapsed time in seconds from start to this control.
  • status: option&lt;splitTimeStatus&gt; — The status of the split, e.g. Missing if the control was not punched.

personResultData

The core result data for a person in a single race.

See: PersonRaceResult in the IOF XML 3.0 XSD

rescript
type personResultData = {
  startTime: option<string>,
  finishTime: option<string>,
  time: option<int>,
  timeBehind: option<int>,
  position: option<int>,
  status: resultStatus,
  splitTimes: array<splitTime>,
  controlCard: option<string>,
  raceNumber: option<int>,
  bibNumber: option<string>,
}

Fields:

  • startTime: option&lt;string&gt; — The start time of the person, as an ISO 8601 datetime.
  • finishTime: option&lt;string&gt; — The finish time of the person, as an ISO 8601 datetime.
  • time: option&lt;int&gt; — The total race time in seconds.
  • timeBehind: option&lt;int&gt; — The time behind the winner in seconds.
  • position: option&lt;int&gt; — The finishing position in the class.
  • status: resultStatus — The result status of the person, e.g. Ok, MissingPunch, DidNotFinish, Disqualified, DidNotStart.
  • splitTimes: array&lt;splitTime&gt;
  • controlCard: option&lt;string&gt; — The control card number used, if included in the result.
  • raceNumber: option&lt;int&gt; — The ordinal number of the race this result belongs to in a multi-race event.
  • bibNumber: option&lt;string&gt; — The competitor's bib number.

personResult

Result information for a single person.

See: PersonResult in the IOF XML 3.0 XSD

rescript
type personResult = {
  person: IofXml.IofPerson.t,
  organisations: array<IofXml.IofOrganisation.t>,
  controlCard: option<IofXml.IofControlCard.t>,
  results: array<personResultData>,
  entryId: option<string>,
}

Fields:

  • person: IofXml.IofPerson.t
  • organisations: array&lt;IofXml.IofOrganisation.t&gt;
  • controlCard: option&lt;IofXml.IofControlCard.t&gt;
  • results: array&lt;personResultData&gt; — All race results for this person (one per race in multi-race events).
  • entryId: option&lt;string&gt; — Entry identifier, linking back to an entry list record.

teamMemberResult

Result data for a single team member in a relay race.

rescript
type teamMemberResult = {
  person: IofXml.IofPerson.t,
  organisations: array<IofXml.IofOrganisation.t>,
  leg: option<int>,
  legOrder: option<int>,
  bibNumber: option<string>,
  result: option<personResultData>,
}

Fields:

  • person: IofXml.IofPerson.t
  • organisations: array&lt;IofXml.IofOrganisation.t&gt;
  • leg: option&lt;int&gt; — The leg number this team member ran.
  • legOrder: option&lt;int&gt; — The leg order, for legs that can be run by multiple alternatives.
  • bibNumber: option&lt;string&gt; — The bib number.
  • result: option&lt;personResultData&gt;

teamResult

Result for a team in a relay class.

rescript
type teamResult = {
  name: option<string>,
  organisations: array<IofXml.IofOrganisation.t>,
  bibNumber: option<string>,
  result: option<personResultData>,
  teamMemberResults: array<teamMemberResult>,
}

Fields:

  • name: option&lt;string&gt; — The name of the team.
  • organisations: array&lt;IofXml.IofOrganisation.t&gt;
  • bibNumber: option&lt;string&gt; — The bib number for the team.
  • result: option&lt;personResultData&gt; — The aggregate result for the team as a whole.
  • teamMemberResults: array&lt;teamMemberResult&gt; — Results for individual team members.

classResult

The result list for a single class.

See: ClassResult in the IOF XML 3.0 XSD

rescript
type classResult = {
  class_: IofXml.IofClass.t,
  courses: array<IofXml.IofCourse.t>,
  personResults: array<personResult>,
  teamResults: array<teamResult>,
}

Fields:

  • class_: IofXml.IofClass.t
  • courses: array&lt;IofXml.IofCourse.t&gt; — All courses for this class (one per race in multi-race events).
  • personResults: array&lt;personResult&gt;
  • teamResults: array&lt;teamResult&gt;

t

Result lists for all classes in an event.

See: ResultList in the IOF XML 3.0 XSD

rescript
type t = {
  event: option<IofXml.IofEvent.t>,
  classResults: array<classResult>,
  status: option<resultListStatus>,
  iofVersion: string,
  createTime: option<string>,
  creator: option<string>,
}

Fields:

  • event: option&lt;IofXml.IofEvent.t&gt;
  • classResults: array&lt;classResult&gt;
  • status: option&lt;resultListStatus&gt; — The status of the result list: Complete (official final results), Snapshot (current standings mid-race), or Delta (changes since last list).
  • iofVersion: string — The IOF XML version, should be "3.0" for version-3 documents.
  • createTime: option&lt;string&gt; — The time the result list was created, as an ISO 8601 datetime.
  • creator: option&lt;string&gt; — The name of the software that created the result list.

Values

parseResultStatus

rescript
let parseResultStatus: string => resultStatus

parseSplitTimeStatus

rescript
let parseSplitTimeStatus: string => splitTimeStatus

parseResultListStatus

rescript
let parseResultListStatus: string => resultListStatus

resultStatusToString

rescript
let resultStatusToString: resultStatus => string

splitTimeStatusToString

rescript
let splitTimeStatusToString: splitTimeStatus => string

resultListStatusToString

rescript
let resultListStatusToString: resultListStatus => string

parseSplitTime

rescript
let parseSplitTime: IofXml.XmlUtils.xmlElement => option<splitTime>

parsePersonResultData

rescript
let parsePersonResultData: IofXml.XmlUtils.xmlElement => option<personResultData>

parsePersonResult

rescript
let parsePersonResult: IofXml.XmlUtils.xmlElement => option<personResult>

parseTeamMemberResult

rescript
let parseTeamMemberResult: IofXml.XmlUtils.xmlElement => option<teamMemberResult>

parseTeamResult

rescript
let parseTeamResult: IofXml.XmlUtils.xmlElement => option<teamResult>

parseClassResult

rescript
let parseClassResult: IofXml.XmlUtils.xmlElement => option<classResult>

parse

Parse an IOF XML 3.0 ResultList document string into a typed structure.

rescript
let parse: string => result<t, string>

serializeSplitTime

rescript
let serializeSplitTime: splitTime => string

serializePersonResultData

rescript
let serializePersonResultData: personResultData => string

serializePerson

rescript
let serializePerson: IofXml.IofPerson.t => string

serializeOrg

rescript
let serializeOrg: IofXml.IofOrganisation.t => string

serializePersonResult

rescript
let serializePersonResult: personResult => string

serializeCourse

rescript
let serializeCourse: IofXml.IofCourse.t => string

serializeTeamMemberResult

rescript
let serializeTeamMemberResult: teamMemberResult => string

serializeTeamResult

rescript
let serializeTeamResult: teamResult => string

serializeClassResult

rescript
let serializeClassResult: classResult => string

serializeEvent

rescript
let serializeEvent: IofXml.IofEvent.t => string

serialize

Serialize a ResultList structure to an IOF XML 3.0 document string.

rescript
let serialize: t => string