Difference between revisions of "Darwin:Train Order Element"

From Open Rail Data Wiki
Jump to navigation Jump to search
m (Tidy up content)
m (Add RID link)
 
(One intermediate revision by one other user not shown)
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]]

Latest revision as of 09:10, 28 October 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>