C Class Messages: Difference between revisions

From Open Rail Data Wiki
No edit summary
m →‎Message Fields: Change bullets to ticks
 
(3 intermediate revisions by 3 users not shown)
Line 31: Line 31:
== Message Format ==
== Message Format ==


Messages are sent in JSON format, as follows:
Messages are sent in JSON format:


* {"CA_MSG":{"time":"1349696911000", "area_id":"SK", "msg_type":"CA", "from":"3647", "to":"3649", "descr":"1F42"}}
<pre>
* {"CB_MSG":{"time":"1349696911000", "area_id":"G1", "msg_type":"CB", "from":"G669", "descr":"2J01"}}
{"CA_MSG":{"time":"1349696911000", "area_id":"SK", "msg_type":"CA", "from":"3647", "to":"3649", "descr":"1F42"}}
* {"CC_MSG":{"time":"1349696911000", "area_id":"G1", "msg_type":"CC", "descr":"2J01", "to":"G669"}}
{"CB_MSG":{"time":"1349696911000", "area_id":"G1", "msg_type":"CB", "from":"G669", "descr":"2J01"}}
* {"CT_MSG":{"time":"1349696911000", "area_id":"SA", "msg_type":"CT", "report_time":"1249"}}
{"CC_MSG":{"time":"1349696911000", "area_id":"G1", "msg_type":"CC", "descr":"2J01", "to":"G669"}}
{"CT_MSG":{"time":"1349696911000", "area_id":"SA", "msg_type":"CT", "report_time":"1249"}}
</pre>


== Message Fields ==
== Message Fields ==
Line 49: Line 51:
|-
|-
|time
|time
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|Message time
|Message time
UNIX timestamp ''in milliseconds'' since the UNIX epoch
UNIX timestamp ''in milliseconds'' since the UNIX epoch
|-
|-
|area_id
|area_id
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|Alphanumeric code representing the TD area that the message originates from (see [[List_of_Train_Describers|list of train describers]])
|Alphanumeric code representing the TD area that the message originates from (see [[List_of_Train_Describers|list of train describers]])
|-
|-
|msg_type
|msg_type
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|Type of message
|Type of message
Can be CA_MSG, CB_MSG, CC_MSG or CT_MSG
Can be CA, CB, CC or CT
|-
|-
|from
|from
|&bull;
|&#10004;
|&bull;
|&#10004;
|
|
|
|
Line 79: Line 81:
|-
|-
|to
|to
|&bull;
|&#10004;
|
|
|&bull;
|&#10004;
|
|
|''To'' berth (see [[TD_Berths|TD berths]] page)
|''To'' berth (see [[TD_Berths|TD berths]] page)
|-
|-
|descr
|descr
|&bull;
|&#10004;
|&bull;
|&#10004;
|&bull;
|&#10004;
|
|
|Train description
|Train description
Line 97: Line 99:
|
|
|
|
|&bull;
|&#10004;
|Reporting time
|Reporting time
|-
|-
|}
|}
= Working with C-Class data =
In order help working with this data Network Rail have agreed to release a number of technical documents for each TD which will provide the information you require. While this process has begun it will take some time to complete - you should check the [[List_of_Train_Describers|list of train describers]] for any information that may already have been released or user contributions.
* Block Schematics - These are a visual representation of all the berths in a TD area. They show the stepping flow for every berth. It should be noted that not all berths shown are sent to the NROD platform.
* Stepping Tables - These are the set of conditions which must be met in order for a description to step from one berth to another. (such as routes set, track circuits occupied etc.)


{{Navtable-DataFeeds}}
{{Navtable-DataFeeds}}

Latest revision as of 13:01, 30 December 2018

C-Class train describer messages provide updates relating to the stepping of train descriptions between TD berths.

There are four types of C-Class message:

Type Name Details
CA Berth Step The CA message is a 'step' message.

This moves the description from the 'from' berth, in to the 'to' berth, cancelling the description in the 'from' berth and overwriting any description in the 'to' berth.

CB Berth Cancel The CB message is a 'cancel' message.

This cancels the description in the 'from' berth.

CC Berth Interpose The CC message is an 'interpose' message.

This inserts the description in to the 'to' berth, overwriting any description in the 'to' berth.

CT Heartbeat The CT message is a 'heartbeat' message, periodically sent from a train describer.

Message Format

Messages are sent in JSON format:

{"CA_MSG":{"time":"1349696911000", "area_id":"SK", "msg_type":"CA", "from":"3647", "to":"3649", "descr":"1F42"}}
{"CB_MSG":{"time":"1349696911000", "area_id":"G1", "msg_type":"CB", "from":"G669", "descr":"2J01"}}
{"CC_MSG":{"time":"1349696911000", "area_id":"G1", "msg_type":"CC", "descr":"2J01", "to":"G669"}}
{"CT_MSG":{"time":"1349696911000", "area_id":"SA", "msg_type":"CT", "report_time":"1249"}}

Message Fields

Field CA CB CC CT Details
time Message time

UNIX timestamp in milliseconds since the UNIX epoch

area_id Alphanumeric code representing the TD area that the message originates from (see list of train describers)
msg_type Type of message

Can be CA, CB, CC or CT

from From berth (see TD berths page)
to To berth (see TD berths page)
descr Train description

Four-letter alphanumeric code representing the headcode or description of the train

report_time Reporting time

Working with C-Class data

In order help working with this data Network Rail have agreed to release a number of technical documents for each TD which will provide the information you require. While this process has begun it will take some time to complete - you should check the list of train describers for any information that may already have been released or user contributions.

  • Block Schematics - These are a visual representation of all the berths in a TD area. They show the stepping flow for every berth. It should be noted that not all berths shown are sent to the NROD platform.
  • Stepping Tables - These are the set of conditions which must be met in order for a description to step from one berth to another. (such as routes set, track circuits occupied etc.)


Network Rail Open Data Feeds
Data Feeds About the Feeds Account States Durable Subscriptions Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced UsesFAQ Release Notes
RTPPM RTPPM Feed
Train Movements Train Movements Feed Train Activation Train Cancellation Train Movement Train Reinstatement Change of Origin Change of Identity Change of Location TSPEED Field Planned Cancellations Cancellation Codes
TD TD Feed C-Class Messages S-Class Messages Train Describers TD Berths
VSTP VSTP Feed
TSR TSR Feed Route Codes
SCHEDULE SCHEDULE Feed TIPLOC Records Schedule and Location Records Association Records CIF Codes How Scheduling Works Allowances
Reference Data Reference Data Feed TOC Codes CIF Codes Delay Attribution Codes Identifying Locations (STANOX, TIPLOC, NLC and 3-Alpha Codes) STANOX Geographical Areas Train Planning data (BPLAN)