RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
Loading...
Searching...
No Matches
ab_gp_ertms_train_messages.h
Go to the documentation of this file.
1
15
16#ifndef AB_GP_ERTMS_TRAIN_MESSAGES_H
17#define AB_GP_ERTMS_TRAIN_MESSAGES_H
18
21
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* ========================================================================= */
28/* Standard Track-to-Train Message IDs (NID_MESSAGE) - Subset-026 Ch. 8 */
29/* ========================================================================= */
30#define RBC_MSG_TRACK_TO_TRAIN_SR_AUTHORISATION 2U
31#define RBC_MSG_TRACK_TO_TRAIN_MOVEMENT_AUTHORITY 3U
32#define RBC_MSG_TRACK_TO_TRAIN_RECOGNITION_EXIT_SR 6U
33#define RBC_MSG_TRACK_TO_TRAIN_ACK_TRAIN_DATA 8U
34#define RBC_MSG_TRACK_TO_TRAIN_REQUEST_SHORTEN_MA 9U
35#define RBC_MSG_TRACK_TO_TRAIN_CONDITIONAL_EMERGENCY_STOP 15U
36#define RBC_MSG_TRACK_TO_TRAIN_UNCONDITIONAL_EMERGENCY_STOP 16U
37#define RBC_MSG_TRACK_TO_TRAIN_REVOCATION_EMERGENCY_STOP 18U
38#define RBC_MSG_TRACK_TO_TRAIN_GENERAL_MESSAGE 24U
39#define RBC_MSG_TRACK_TO_TRAIN_SH_REFUSED 27U
40#define RBC_MSG_TRACK_TO_TRAIN_SH_AUTHORISED 28U
41#define RBC_MSG_TRACK_TO_TRAIN_RBC_TRANSITION_ORDER 33U
42#define RBC_MSG_TRACK_TO_TRAIN_TRACK_AHEAD_FREE_REQUEST 34U
43#define RBC_MSG_TRACK_TO_TRAIN_SESSION_TERMINATION_ORDER 41U
44
45/* ========================================================================= */
46/* Standard Train-to-Track Message IDs (NID_MESSAGE) - Subset-026 Ch. 8 */
47/* ========================================================================= */
48#define RBC_MSG_TRAIN_TO_TRACK_VALIDATED_TRAIN_DATA 129U
49#define RBC_MSG_TRAIN_TO_TRACK_REQUEST_FOR_SHUNTING 130U
50#define RBC_MSG_TRAIN_TO_TRACK_MA_REQUEST 132U
51#define RBC_MSG_TRAIN_TO_TRACK_POSITION_REPORT 136U
52#define RBC_MSG_TRAIN_TO_TRACK_ACKNOWLEDGEMENT 146U
53#define RBC_MSG_TRAIN_TO_TRACK_ACK_EMERGENCY_STOP 147U
54#define RBC_MSG_TRAIN_TO_TRACK_END_OF_MISSION 150U
55#define RBC_MSG_TRAIN_TO_TRACK_INIT_SESSION 155U
56#define RBC_MSG_TRAIN_TO_TRACK_TERMINATE_SESSION 156U
57#define RBC_MSG_TRAIN_TO_TRACK_SESSION_ESTABLISHED 159U
58
59/* ========================================================================= */
60/* Common Track-to-Train Radio Header (Subset-026 Section 8.4.1) */
61/* ========================================================================= */
70
71/* ========================================================================= */
72/* Common Train-to-Track Radio Header (Subset-026 Section 8.4.2) */
73/* ========================================================================= */
74typedef struct rbc_train_to_track_header_s
75{
76 uint8_t nid_message;
77 uint16_t l_message;
81
82/* ========================================================================= */
83/* MESSAGES: TRACK TO TRAIN (RBC -> Train) */
84/* ========================================================================= */
85
94
107
110typedef struct rbc_msg_6_recognition_exit_trip_s
111{
114
121
124typedef struct rbc_msg_9_request_shorten_ma_s
125{
129
140
147
149typedef struct rbc_msg_18_ces_revocation_s
150{
154
172
180
190
203
214
218typedef struct rbc_msg_41_session_termination_order_s
219{
222
223/* ========================================================================= */
224/* MESSAGES: TRAIN TO TRACK (Train -> RBC) */
225/* ========================================================================= */
226
238
248
256
275
282
290
298
300typedef struct rbc_msg_155_init_session_s
301{
304
306typedef struct rbc_msg_156_terminate_session_s
307{
310
312typedef struct rbc_msg_159_session_established_s
313{
315 uint8_t m_version;
317
318#ifdef __cplusplus
319}
320#endif
321
322#endif /* RBC_TRAIN_MESSAGES_H */
rbc_m_ack_t
Acknowledgement Request Qualifier (M_ACK) Subset-026 Section 7.5.1.75.
rbc_q_scale_t
Distance Scale Qualifier (Q_SCALE) Subset-026 Section 7.5.1.134: 0 = 10 cm (0.1 m) 1 = 1 m 2 = 10 m.
uint32_t rbc_distance_m_t
Distance offset in meters.
uint16_t rbc_nid_c_t
Unique Country / Region Identifier (10 bits in ETCS).
uint8_t rbc_nid_em_t
Emergency Stop Identifier (8 bits).
rbc_q_dir_t
Direction Qualifier (Q_DIR) Subset-026 Section 7.5.1.15: 0 = Reverse 1 = Nominal 2 = Both directions.
uint16_t rbc_nid_rbc_t
Radio Block Centre Unique Identifier (14 bits in ETCS).
uint64_t rbc_timestamp_ms_t
Timestamp in milliseconds (POSIX or ETCS T_TRAIN / T_RBC scale).
uint32_t rbc_nid_engine_t
ETCS On-board Engine Identifier / Train ID (24 bits in ETCS).
uint16_t rbc_speed_kmh_t
Speed in km/h (5 km/h ETCS granularity or exact integer).
rbc_q_marqstreason_t
Movement Authority Request Reason (Q_MARQSTREASON) Subset-026 Section 7.5.1.28.
rbc_packet_0_position_report_t position_report
Msg 130: Request for Shunting (Subset-026 8.6.2) - header plus a position report, same bare (no leadi...
rbc_packet_0_position_report_t position_report
Msg 132: Movement Authority Request.
rbc_packet_0_position_report_t position_report
rbc_train_to_track_header_t header
Msg 136: Train Position Report - carries Packet 0 OR Packet 1 (Subset-026 8.6.4: "Packet 0 or 1"),...
rbc_packet_0_position_report_t position_report
rbc_packet_1_position_report_2bg_t packet1
Msg 146: Acknowledgement.
rbc_train_to_track_header_t header
Msg 147: Emergency Stop Acknowledgement.
Msg 150: End of Mission (Subset-026 8.6.10).
rbc_packet_0_position_report_t position_report
Msg 155: Initiation of a Communication Session.
rbc_train_to_track_header_t header
Msg 156: Termination of a Communication Session.
Msg 15: Conditional Emergency Stop (CES).
rbc_track_to_train_header_t header
Msg 16: Unconditional Emergency Stop (UES).
rbc_track_to_train_header_t header
Msg 18: Revocation of Emergency Stop.
rbc_track_to_train_header_t header
Msg 24: General Message (National Values, TSRs, Text, Parameters).
rbc_packet_3_national_values_t national_values
rbc_packet_66_tsr_revoke_t tsr_revoke
rbc_packet_57_ma_request_params_t ma_request_params
rbc_packet_72_text_message_t text_message
Msg 27: SH Refused (Subset-026 8.7.10) - answers a Msg 130 Request for Shunting; carries the T_TRAIN ...
rbc_track_to_train_header_t header
Msg 28: SH Authorised (Subset-026 8.7.11) - carries the T_TRAIN of the authorised Msg 130,...
rbc_track_to_train_header_t header
Msg 2: SR Authorisation (Subset-026 8.7.1).
rbc_track_to_train_header_t header
Msg 33: RBC Transition Order (this codebase's own numbering - see ab_gp_ertms_train_message_codec....
Msg 34: Track Ahead Free Request (Subset-026 8.7.14).
Msg 3: Movement Authority (with optional packets).
rbc_packet_21_gradient_profile_t gradient
Msg 41 (this codebase's own numbering - see codec's own encode-case comment for the Subset-026 confor...
Msg 6: Recognition of exit from TRIP mode (Subset-026 8.7.3) - header only, no message-specific field...
Msg 8: Acknowledgement of Train Data (Subset-026 8.7.4).
rbc_track_to_train_header_t header
Msg 9: Request to Shorten MA (Subset-026 8.7.5) - carries a shortened Level 2 MA (Packet 15),...
Last Relevant Balise Group (Country + BG identifier).