Darwin:Train Order Element: Difference between revisions

From Open Rail Data Wiki
m Tidy up content
EvelynSnow (talk | contribs)
Add examples for trainOrder, make mutual exclusivity of set/clear clearer, clarify that either a RID or train ID will be provided, but never both
Line 7: Line 7:
== Detail ==
== Detail ==


Train order messages are contained in an 'tor' (TrainOrder) element which has TIPLOC, CRS code, and platform attributes.
Train order messages are contained in an 'trainOrder' (TrainOrder type) element which has TIPLOC, CRS code, and platform attributes.


* The TIPLOC is the TIPLOC supplied by the provider of the train order, so it may not be the same as the TIPLOC in the schedules referenced in the message.
* The TIPLOC is the TIPLOC supplied by the provider of the train order, so it may not be the same as the TIPLOC in the schedules referenced in the message.
* The TIPLOC and those referenced in the schedules will have the same CRS code
* The TIPLOC and those referenced in the schedules will have the same CRS code


The train Order message can set a new train order if it contains a 'set' element. Or it can clear the previous train order message if it has the 'clear' element.
The train order message will either set a new train order, if it contains a 'set' element, or it can clear the previous train order message if it contains the 'clear' element instead.


If the message is setting a new train order, the details of the order are in the 'tns' (TrainOrderData) element within the 'set' element. There can be up to three trains in the order, with each train identified by the RID and train ID (headcode).
If the message sets a new train order, the details of the order will be contained within 'first', 'second', and 'third' named TrainOrderData type elements inside the 'set' element. There can be up to three trains in the order, with each train identified either by RID, or by train ID (headcode) if the RID is unavailable. Any combination of 'circular' times (i.e. wta/wtp/wtd, pta/ptd) may be provided within the element's attributes if a RID is provided, but will always be absent for a train ID.
 
== Examples (v16) ==
 
<pre><trainOrder tiploc="NORWDJ" crs="NWD" platform="1">
  <ns9:set>
    <ns9:first>
      <ns9:rid wta="20:53" wtd="20:54" pta="20:53" ptd="20:54">202301157147904</ns9:rid>
    </ns9:first>
    <ns9:second>
      <ns9:rid wta="20:57:30" wtd="20:58:30" pta="20:58" ptd="20:58">202301158861394</ns9:rid>
    </ns9:second>
  </ns9:set>
</trainOrder></pre>
 
<pre><trainOrder tiploc="SINFINN" crs="SIR" platform="1">
  <ns9:set>
    <ns9:first>
      <ns9:trainID>2M11</ns9:trainID>
    </ns9:first>
  </ns9:set>
</trainOrder></pre>
 
<pre><trainOrder tiploc="HGHI" crs="HHY" platform="2">
  <ns9:clear xmlns:ct="http://www.thalesgroup.com/rtti/PushPort/CommonTypes/v3" xmlns:tom="http://www.thalesgroup.com/rtti/PushPort/TrainOrder/v1"/>
</trainOrder></pre>


[[Category:National Rail Enquiries Data Feeds]]
[[Category:National Rail Enquiries Data Feeds]]

Revision as of 23:56, 15 January 2023

Train Order message

Overview

A Train order message indicates the order in which trains are expected to call/pass a station platform.

Detail

Train order messages are contained in an 'trainOrder' (TrainOrder type) element which has TIPLOC, CRS code, and platform attributes.

  • The TIPLOC is the TIPLOC supplied by the provider of the train order, so it may not be the same as the TIPLOC in the schedules referenced in the message.
  • The TIPLOC and those referenced in the schedules will have the same CRS code

The train order message will either set a new train order, if it contains a 'set' element, or it can clear the previous train order message if it contains the 'clear' element instead.

If the message sets a new train order, the details of the order will be contained within 'first', 'second', and 'third' named TrainOrderData type elements inside the 'set' element. There can be up to three trains in the order, with each train identified either by RID, or by train ID (headcode) if the RID is unavailable. Any combination of 'circular' times (i.e. wta/wtp/wtd, pta/ptd) may be provided within the element's attributes if a RID is provided, but will always be absent for a train ID.

Examples (v16)

<trainOrder tiploc="NORWDJ" crs="NWD" platform="1">
  <ns9:set>
    <ns9:first>
      <ns9:rid wta="20:53" wtd="20:54" pta="20:53" ptd="20:54">202301157147904</ns9:rid>
    </ns9:first>
    <ns9:second>
      <ns9:rid wta="20:57:30" wtd="20:58:30" pta="20:58" ptd="20:58">202301158861394</ns9:rid>
    </ns9:second>
  </ns9:set>
</trainOrder>
<trainOrder tiploc="SINFINN" crs="SIR" platform="1">
  <ns9:set>
    <ns9:first>
      <ns9:trainID>2M11</ns9:trainID>
    </ns9:first>
  </ns9:set>
</trainOrder>
<trainOrder tiploc="HGHI" crs="HHY" platform="2">
  <ns9:clear xmlns:ct="http://www.thalesgroup.com/rtti/PushPort/CommonTypes/v3" xmlns:tom="http://www.thalesgroup.com/rtti/PushPort/TrainOrder/v1"/>
</trainOrder>