Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated sample state

...

Code Block
languagejs
titleSample status
collapsetrue
<<OUTDATED>>

{"msgType":"status",
	    "data":{
		        "debug":false,
		        "cleanup":false,
		        "pause":false,
		        "trainCount":8,
		        "trains":[
			            {"trainNum":0, "waitTime":0, "waiting":falsespdSlow":40, "spdCaution":60, "spdNormal":100, "currentIndex":1, "schedule":[9,13,17,21,25,27,33,35]},
            {"trainNum":1, "waitTime":02500, "spdSlow":4041, "spdCaution":6061, "spdNormal":100101, "currentIndex":2, "schedule":[8, 10, 25, 29, 41, 43]},
			{"trainNum":1, "waiting":true9,13,17,21,25,27,33,35]},
            {"trainNum":2, "waitTime":0, "spdSlow":42, "spdCaution":62, "spdNormal":102, "currentIndex":3, "schedule":[9,13,17,21,25,27,33,35]},
            {"trainNum":3, "waitTime":0, "spdSlow":43, "spdCaution":63, "spdNormal":103, "currentIndex":4, "schedule":[9,13,17,21,25,27,33,35]},
            {"trainNum":4, "waitTime":0, "spdSlow":44, "spdCaution":64, "spdNormal":104, "currentIndex":5, "schedule":[9,13,17,21,25,27,33,35]},
            {"trainNum":5, "waitTime":123454566710000, "spdSlow":5045, "spdCaution":7065, "spdNormal":100105, "currentIndex":6, "schedule":[9,13,17,21,25,27,33,35]},
            {"trainNum":6, "waitTime":0, "spdSlow":46, "spdCaution":66, "spdNormal":106, "currentIndex":7, "schedule":[9,13,17,21,25,27,33,35]},
            {"trainNum":7, "waitTime":0, "spdSlow":47, "spdCaution":67, "spdNormal":107, "currentIndex":8, "schedule":[9,13,17,21,25,27,33,35]},
			...            ],
		        "locks":[-1, -1, -1, -1, -1, 0, -1, -1, 2, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, -1, 5, -1, -1, -1, 2, 103, 3, 7, 7, -1, -1, -1, -1, -1, -1, ...6, -1, -1]}, 
        "tickTime":[50, 60, 70],
        "overallTime":[70, 80, 90]}

[One line to test via netcat]
{"msgType":"status", "data":{"debug":false, "cleanup":false, "pause":false, "trainCount":8, "trains":[ {"trainNum":0, "waiting":false, "waitTime":0, "spdSlow":40, "spdCaution":60, "spdNormal":100, "currentIndex":21, "schedule":[1, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":1, "waiting":true, "waitTime":99999999992500, "spdSlow":5141, "spdCaution":7161, "spdNormal":101, "currentIndex":02, "schedule":[2, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":2, "waiting":false, "waitTime":0, "spdSlow":5242, "spdCaution":7262, "spdNormal":102, "currentIndex":13, "schedule":[3, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":3, "waiting":false, "waitTime":0, "spdSlow":5343, "spdCaution":7363, "spdNormal":103, "currentIndex":14, "schedule":[4, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":4, "waiting":false, "waitTime":0, "spdSlow":5444, "spdCaution":7464, "spdNormal":104, "currentIndex":25, "schedule":[5, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":5, "waiting":false, "waitTime":010000, "spdSlow":5545, "spdCaution":7565, "spdNormal":105, "currentIndex":36, "schedule":[6, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":6, "waiting":false, "waitTime":0, "spdSlow":5646, "spdCaution":7666, "spdNormal":106, "currentIndex":17, "schedule":[7, 1, 11, 14, 69,13,17,21,25,27,33,35]}, {"trainNum":7, "waiting":false, "waitTime":0, "spdSlow":5747, "spdCaution":7767, "spdNormal":107, "currentIndex":08, "schedule":[8, 1, 11, 14, 6]}], 9,13,17,21,25,27,33,35]},],"locks":[-1, -1, -1, 5-1, -1, 0, -1, 2-1, 32, -1, -1, -1, -1, 6-1, -1, -1, -1, -1, -1, -1, 4-1, -1, -1, -1, -1, 04, -1, -1, -1, -1, -1, 5, -1, -1, -1, -13, 3, 7, -17, -1, -1, -1, -1, -1, -1, 76, -1, -1]}, "tickTime":[50, -160, -170],"overallTime":[70, -180, -190]}}

Messages received by controller

...