Difference between revisions of "C Class Messages"

From Open Rail Data Wiki
Jump to navigation Jump to search
Line 101: Line 101:
[[Category:Train Describer Data]]
[[Category:Train Describer Data]]
[[Category:C Class Messages]]
[[Category:C Class Messages]]

Revision as of 18:27, 23 May 2013

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, as follows:

  • {"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


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

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
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
TSR TSR Feed Route Codes
SCHEDULE SCHEDULE Feed 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