|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
Implementation of Unified ERTMS Subset-026 Chapter 5 Operational Procedure Orchestrator. More...
Go to the source code of this file.
Functions | |
| void | ab_gp_ertms_engine_init (ab_gp_db_t *db) |
| Initializes the ERTMS procedure engine and all train contexts. | |
| ab_gp_ertms_train_context_t * | ab_gp_ertms_engine_get_train_context (uint8_t train_id) |
| Retrieves the ERTMS procedure context for a given train slot. | |
| void | ab_gp_ertms_engine_step (ab_gp_db_t *db, uint32_t cycle, uint32_t timestamp_ms, uint32_t elapsed_ms) |
| Executes one cyclic evaluation of all active ERTMS train procedures. | |
| bool | ab_gp_ertms_calc_ma_for_route (uint8_t train_id, uint16_t route_id, uint32_t ma_seq) |
| Computes a Movement Authority for a train on a given route. | |
| bool | ab_gp_ertms_extend_ma_for_route (uint8_t train_id, uint16_t route_id) |
| Extends an existing Movement Authority with an additional route. | |
| bool | ab_gp_ertms_validate_train_data (uint8_t train_id, uint32_t l_train_m, uint32_t v_maxtrain_kmh, uint8_t m_axleload, uint8_t m_loadinggauge, bool m_airtight, uint32_t timestamp_ms) |
| Validates train characteristics against site route topology. | |
| bool | ab_gp_ertms_update_train_position (uint8_t train_id, uint32_t nid_lrbg, uint32_t d_lrbg_m, rbc_q_dirlrbg_t q_dirlrbg, uint32_t v_train_kmh, uint32_t m_mode, uint32_t m_level, uint32_t cycle, uint32_t timestamp_ms) |
| Updates train position and evaluates segment/route occupancy. | |
| bool | ab_gp_ertms_trigger_emergency_stop (uint8_t train_id, bool is_conditional, uint8_t nid_em, uint32_t d_ref_m, uint32_t d_es_m) |
| Triggers an emergency stop (UES or CES) for a train. | |
| bool | ab_gp_ertms_revoke_emergency_stop (uint8_t train_id, uint8_t nid_em) |
| Revokes an active emergency stop for a train. | |
| bool | ab_gp_ertms_request_shunting (uint8_t train_id) |
| Requests shunting authorization for a train. | |
| bool | ab_gp_ertms_authorize_shunting (uint8_t train_id, bool authorized) |
| Authorizes or rejects shunting mode for a train. | |
| bool | ab_gp_ertms_terminate_mission (uint8_t train_id, ab_gp_db_t *db) |
| Handles End of Mission teardown for a train. | |
| bool | ab_gp_ertms_add_tsr (uint8_t train_id, uint8_t nid_tsr, uint32_t v_tsr_kmh, uint32_t d_start_m, uint32_t d_end_m) |
| Adds a Temporary Speed Restriction (Packet 65) for a train path. | |
| bool | ab_gp_ertms_remove_tsr (uint8_t train_id, uint8_t nid_tsr) |
| Removes an active Temporary Speed Restriction (Packet 66) for a train path. | |
| bool | ab_gp_ertms_send_text_message (uint8_t train_id, uint8_t nid_textmessage, uint8_t q_textclass, uint8_t q_textconfirm, uint32_t duration_s, const char *text, rbc_packet_72_text_message_t *out_p72) |
| Sends a Driver Text Message (Packet 72) to a train. | |
| bool | ab_gp_ertms_handle_text_ack (uint8_t train_id, uint8_t nid_textmessage, uint32_t timestamp_ms) |
| Handles driver acknowledgement of a text message (Msg 146/158). | |
| bool | ab_gp_ertms_announce_handover (uint8_t train_id, uint16_t target_nid_c, uint16_t target_nid_rbc, uint64_t target_nid_radio, uint32_t d_rbctr_m) |
| Announces an RBC handover transition order (Packet 131) for a train. | |
| bool | ab_gp_ertms_complete_handover (uint8_t train_id) |
| Completes the RBC handover procedure for a train. | |
Variables | |
| static ab_gp_ertms_train_context_t | s_train_contexts [RTE_EXAMPLE_MAX_TRAINS] |
Implementation of Unified ERTMS Subset-026 Chapter 5 Operational Procedure Orchestrator.
Definition in file ab_gp_ertms_engine.c.
| void ab_gp_ertms_engine_init | ( | ab_gp_db_t * | db | ) |
Initializes the ERTMS procedure engine and all train contexts.
| [in,out] | db | Train/Route database. |
Definition at line 11 of file ab_gp_ertms_engine.c.
| ab_gp_ertms_train_context_t * ab_gp_ertms_engine_get_train_context | ( | uint8_t | train_id | ) |
Retrieves the ERTMS procedure context for a given train slot.
| [in] | train_id | 1..RTE_EXAMPLE_MAX_TRAINS index. |
Definition at line 28 of file ab_gp_ertms_engine.c.
| void ab_gp_ertms_engine_step | ( | ab_gp_db_t * | db, |
| uint32_t | cycle, | ||
| uint32_t | timestamp_ms, | ||
| uint32_t | elapsed_ms ) |
Executes one cyclic evaluation of all active ERTMS train procedures.
| [in,out] | db | Train/Route database. |
| [in] | cycle | Current RTE execution cycle. |
| [in] | timestamp_ms | Current timestamp in milliseconds. |
| [in] | elapsed_ms | Elapsed milliseconds since previous cycle. |
Definition at line 37 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_calc_ma_for_route | ( | uint8_t | train_id, |
| uint16_t | route_id, | ||
| uint32_t | ma_seq ) |
Computes a Movement Authority for a train on a given route.
| [in] | train_id | Train identifier (1..RTE_EXAMPLE_MAX_TRAINS). |
| [in] | route_id | Interlocking route ID. |
| [in] | ma_seq | MA sequence counter. |
Definition at line 87 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_extend_ma_for_route | ( | uint8_t | train_id, |
| uint16_t | route_id ) |
Extends an existing Movement Authority with an additional route.
| [in] | train_id | Train identifier (1..RTE_EXAMPLE_MAX_TRAINS). |
| [in] | route_id | Additional route ID. |
Definition at line 106 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_validate_train_data | ( | uint8_t | train_id, |
| uint32_t | l_train_m, | ||
| uint32_t | v_maxtrain_kmh, | ||
| uint8_t | m_axleload, | ||
| uint8_t | m_loadinggauge, | ||
| bool | m_airtight, | ||
| uint32_t | timestamp_ms ) |
Validates train characteristics against site route topology.
Definition at line 125 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_update_train_position | ( | uint8_t | train_id, |
| uint32_t | nid_lrbg, | ||
| uint32_t | d_lrbg_m, | ||
| rbc_q_dirlrbg_t | q_dirlrbg, | ||
| uint32_t | v_train_kmh, | ||
| uint32_t | m_mode, | ||
| uint32_t | m_level, | ||
| uint32_t | cycle, | ||
| uint32_t | timestamp_ms ) |
Updates train position and evaluates segment/route occupancy.
Definition at line 142 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_trigger_emergency_stop | ( | uint8_t | train_id, |
| bool | is_conditional, | ||
| uint8_t | nid_em, | ||
| uint32_t | d_ref_m, | ||
| uint32_t | d_es_m ) |
Triggers an emergency stop (UES or CES) for a train.
Definition at line 161 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_revoke_emergency_stop | ( | uint8_t | train_id, |
| uint8_t | nid_em ) |
Revokes an active emergency stop for a train.
Definition at line 183 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_request_shunting | ( | uint8_t | train_id | ) |
Requests shunting authorization for a train.
Definition at line 194 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_authorize_shunting | ( | uint8_t | train_id, |
| bool | authorized ) |
Authorizes or rejects shunting mode for a train.
Definition at line 205 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_terminate_mission | ( | uint8_t | train_id, |
| ab_gp_db_t * | db ) |
Handles End of Mission teardown for a train.
Definition at line 216 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_add_tsr | ( | uint8_t | train_id, |
| uint8_t | nid_tsr, | ||
| uint32_t | v_tsr_kmh, | ||
| uint32_t | d_start_m, | ||
| uint32_t | d_end_m ) |
Adds a Temporary Speed Restriction (Packet 65) for a train path.
Definition at line 227 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_remove_tsr | ( | uint8_t | train_id, |
| uint8_t | nid_tsr ) |
Removes an active Temporary Speed Restriction (Packet 66) for a train path.
Definition at line 242 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_send_text_message | ( | uint8_t | train_id, |
| uint8_t | nid_textmessage, | ||
| uint8_t | q_textclass, | ||
| uint8_t | q_textconfirm, | ||
| uint32_t | duration_s, | ||
| const char * | text, | ||
| rbc_packet_72_text_message_t * | out_p72 ) |
Sends a Driver Text Message (Packet 72) to a train.
Definition at line 253 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_handle_text_ack | ( | uint8_t | train_id, |
| uint8_t | nid_textmessage, | ||
| uint32_t | timestamp_ms ) |
Handles driver acknowledgement of a text message (Msg 146/158).
Definition at line 270 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_announce_handover | ( | uint8_t | train_id, |
| uint16_t | target_nid_c, | ||
| uint16_t | target_nid_rbc, | ||
| uint64_t | target_nid_radio, | ||
| uint32_t | d_rbctr_m ) |
Announces an RBC handover transition order (Packet 131) for a train.
Definition at line 283 of file ab_gp_ertms_engine.c.
| bool ab_gp_ertms_complete_handover | ( | uint8_t | train_id | ) |
Completes the RBC handover procedure for a train.
Definition at line 298 of file ab_gp_ertms_engine.c.
|
static |
Definition at line 9 of file ab_gp_ertms_engine.c.