|
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 ERTMS Subset-026 §5.3 Communication Session Management. More...
#include "ab_gp_proc_session.h"#include "../state_machines/ab_gp_dispatch.h"#include "rte/oal/memory/rte_mem_util.h"Go to the source code of this file.
Macros | |
| #define | RBC_SUPPORTED_ETCS_BASELINE_2 0x10U |
| #define | RBC_SUPPORTED_ETCS_BASELINE_3 0x20U |
Functions | |
| void | ab_gp_proc_session_init (ab_gp_ertms_train_context_t *ctx, uint8_t train_id, uint32_t nid_engine) |
| Initializes the ERTMS procedure context for a train slot. | |
| bool | ab_gp_proc_session_handle_initiation (ab_gp_ertms_train_context_t *ctx, uint32_t cycle, uint32_t timestamp_ms) |
| Handles session initiation request (Msg 155 / P0). | |
| bool | ab_gp_proc_session_handle_established (ab_gp_ertms_train_context_t *ctx, uint8_t m_version, uint32_t timestamp_ms) |
| Handles session established confirmation (Msg 159). | |
| bool | ab_gp_proc_session_handle_termination (ab_gp_ertms_train_context_t *ctx, ab_gp_db_t *db) |
| Handles session termination (Msg 156 / Msg 41). | |
| bool | ab_gp_proc_session_check_timeout (ab_gp_ertms_train_context_t *ctx, uint32_t elapsed_ms, uint32_t timeout_limit_ms, ab_gp_db_t *db) |
| Supervises the communication contact timer (T_NVCONTACT). | |
Implementation of ERTMS Subset-026 §5.3 Communication Session Management.
Implements SIL 4 C99 session state machine according to UNISIG Subset-026 §5.3.
Definition in file ab_gp_proc_session.c.
| #define RBC_SUPPORTED_ETCS_BASELINE_2 0x10U |
Definition at line 13 of file ab_gp_proc_session.c.
| #define RBC_SUPPORTED_ETCS_BASELINE_3 0x20U |
Definition at line 14 of file ab_gp_proc_session.c.
| void ab_gp_proc_session_init | ( | ab_gp_ertms_train_context_t * | ctx, |
| uint8_t | train_id, | ||
| uint32_t | nid_engine ) |
Initializes the ERTMS procedure context for a train slot.
| [out] | ctx | Train ERTMS context to initialize. Must not be NULL. |
| [in] | train_id | 1..RTE_EXAMPLE_MAX_TRAINS connection slot. |
| [in] | nid_engine | ETCS Engine identifier. |
Definition at line 16 of file ab_gp_proc_session.c.
| bool ab_gp_proc_session_handle_initiation | ( | ab_gp_ertms_train_context_t * | ctx, |
| uint32_t | cycle, | ||
| uint32_t | timestamp_ms ) |
Handles session initiation request (Msg 155 / P0).
| [in,out] | ctx | Train ERTMS context. |
| [in] | cycle | Current RTE execution cycle. |
| [in] | timestamp_ms | Current timestamp in milliseconds. |
Definition at line 28 of file ab_gp_proc_session.c.
| bool ab_gp_proc_session_handle_established | ( | ab_gp_ertms_train_context_t * | ctx, |
| uint8_t | m_version, | ||
| uint32_t | timestamp_ms ) |
Handles session established confirmation (Msg 159).
| [in,out] | ctx | Train ERTMS context. |
| [in] | m_version | ETCS baseline version reported by on-board. |
| [in] | timestamp_ms | Current timestamp in milliseconds. |
Definition at line 50 of file ab_gp_proc_session.c.
| bool ab_gp_proc_session_handle_termination | ( | ab_gp_ertms_train_context_t * | ctx, |
| ab_gp_db_t * | db ) |
Handles session termination (Msg 156 / Msg 41).
| [in,out] | ctx | Train ERTMS context. |
| [in,out] | db | A/B Train/Route database to clean up. |
Definition at line 83 of file ab_gp_proc_session.c.
| bool ab_gp_proc_session_check_timeout | ( | ab_gp_ertms_train_context_t * | ctx, |
| uint32_t | elapsed_ms, | ||
| uint32_t | timeout_limit_ms, | ||
| ab_gp_db_t * | db ) |
Supervises the communication contact timer (T_NVCONTACT).
| [in,out] | ctx | Train ERTMS context. |
| [in] | elapsed_ms | Elapsed time since last cycle in ms. |
| [in] | timeout_limit_ms | Maximum allowed silence before timeout. |
| [in,out] | db | A/B database. |
Definition at line 129 of file ab_gp_proc_session.c.