TD: Difference between revisions

From Open Rail Data Wiki
Created the page with message information and description
 
Added sample messages
Line 29: Line 29:


Contains: to, time, area_id, msg_type, from, descr
Contains: to, time, area_id, msg_type, from, descr
==== Example ====
  {
    "CA_MSG": {
      "to": "0041",
      "time": "1338289664000",
      "area_id": "LB",
      "msg_type": "CA",
      "from": "0033",
      "descr": "2T33"
    }
  }


=== CB ===
=== CB ===


Contains: time, area_id, msg_type, from, descr
Contains: time, area_id, msg_type, from, descr
==== Example ====
  {
    "CB_MSG": {
      "time": "1338289665000",
      "area_id": "SK",
      "msg_type": "CB",
      "from": "4333",
      "descr": "1U29"
    }
  }


=== CC ===
=== CC ===


Contains: to, time, area_id, msg_type, descr
Contains: to, time, area_id, msg_type, descr
==== Example ====
  {
    "CC_MSG": {
      "to": "FN13",
      "time": "1338289665000",
      "area_id": "ZG",
      "msg_type": "CC",
      "descr": "1A40"
    }
  }


=== CT ===
=== CT ===


Contains: time, area_id, msg_type, report_time
Contains: time, area_id, msg_type, report_time
==== Example ====
  {
    "CT_MSG": {
      "time": "1338289669000",
      "area_id": "WJ",
      "msg_type": "CT",
      "report_time": "0842"
    }
  }

Revision as of 21:41, 24 July 2012

Overview

The Train Describer feed contains message about Train movements at the Signal Berth Level. Messages come in 4 types, all in JSON format:

  • CA - Berth Step
  • CB - Berth Cancel
  • CC - Berth Interpost
  • CT - Heartbeat

Messages only exist for trains of headcodes classes, 1, 2 and 9.

Messages

Messages consist of a reference key and then the main JSON string.

The Reference key is the message type followed by _MSG, all in Upper case.

Each message can contain the keys,

  • to
  • time, in Milliseconds
  • area_id, see TD_Areas
  • msg_type
  • from
  • descr, the Train's headcode
  • report_time, eg 0842, is 9:42 in the morning,

CA

Contains: to, time, area_id, msg_type, from, descr

Example

 {
   "CA_MSG": {
     "to": "0041",
     "time": "1338289664000",
     "area_id": "LB",
     "msg_type": "CA",
     "from": "0033",
     "descr": "2T33"
   }
 }

CB

Contains: time, area_id, msg_type, from, descr

Example

 {
   "CB_MSG": {
     "time": "1338289665000",
     "area_id": "SK",
     "msg_type": "CB",
     "from": "4333",
     "descr": "1U29"
   }
 }

CC

Contains: to, time, area_id, msg_type, descr

Example

 {
   "CC_MSG": {
     "to": "FN13",
     "time": "1338289665000",
     "area_id": "ZG",
     "msg_type": "CC",
     "descr": "1A40"
   }
 }

CT

Contains: time, area_id, msg_type, report_time

Example

 {
   "CT_MSG": {
     "time": "1338289669000",
     "area_id": "WJ",
     "msg_type": "CT",
     "report_time": "0842"
   }
 }