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_proc_text_message.h File Reference

ERTMS Subset-026 §5.12 Plain Text Message to Driver (Packet 72) Procedure. More...

Include dependency graph for ab_gp_proc_text_message.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ab_gp_proc_text_message_init (ab_gp_ertms_train_context_t *ctx)
 Initializes text message tracking for a train context.
bool ab_gp_proc_text_message_send (ab_gp_ertms_train_context_t *ctx, 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)
 Dispatches a plain text message to the driver DMI (Subset-026 §5.12 / Packet 72).
bool ab_gp_proc_text_message_handle_ack (ab_gp_ertms_train_context_t *ctx, uint8_t nid_textmessage, uint32_t timestamp_ms)
 Handles driver acknowledgement of a text message (Msg 146 / Msg 158).
bool ab_gp_proc_text_message_is_pending_ack (const ab_gp_ertms_train_context_t *ctx)
 Checks if a driver text message acknowledgement is currently pending.

Detailed Description

ERTMS Subset-026 §5.12 Plain Text Message to Driver (Packet 72) Procedure.

Implements SIL 4 C99 Driver Text Message management, Packet 72 generation, display criteria supervision, and driver acknowledgement handling (Msg 146/158).

Definition in file ab_gp_proc_text_message.h.

Function Documentation

◆ ab_gp_proc_text_message_init()

void ab_gp_proc_text_message_init ( ab_gp_ertms_train_context_t * ctx)

Initializes text message tracking for a train context.

Parameters
[in,out]ctxTrain ERTMS context.

Definition at line 11 of file ab_gp_proc_text_message.c.

◆ ab_gp_proc_text_message_send()

bool ab_gp_proc_text_message_send ( ab_gp_ertms_train_context_t * ctx,
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 )

Dispatches a plain text message to the driver DMI (Subset-026 §5.12 / Packet 72).

Parameters
[in,out]ctxTrain ERTMS context.
[in]nid_textmessageUnique message identifier (1..255).
[in]q_textclassClass: 1 = Important, 0 = Auxiliary.
[in]q_textconfirmConfirmation required: 1 = Ack requested, 0 = No ack.
[in]duration_sDisplay duration in seconds.
[in]textNull-terminated ASCII text string.
[out]out_p72Destination Packet 72 structure.
Returns
true if message successfully queued and formatted, false on error.

Definition at line 28 of file ab_gp_proc_text_message.c.

◆ ab_gp_proc_text_message_handle_ack()

bool ab_gp_proc_text_message_handle_ack ( ab_gp_ertms_train_context_t * ctx,
uint8_t nid_textmessage,
uint32_t timestamp_ms )

Handles driver acknowledgement of a text message (Msg 146 / Msg 158).

Parameters
[in,out]ctxTrain ERTMS context.
[in]nid_textmessageMessage ID being acknowledged.
[in]timestamp_msRTE timestamp when ack arrived.
Returns
true if matches pending message, false otherwise.

Definition at line 66 of file ab_gp_proc_text_message.c.

◆ ab_gp_proc_text_message_is_pending_ack()

bool ab_gp_proc_text_message_is_pending_ack ( const ab_gp_ertms_train_context_t * ctx)

Checks if a driver text message acknowledgement is currently pending.

Parameters
[in]ctxTrain ERTMS context.
Returns
true if awaiting driver confirmation.

Definition at line 87 of file ab_gp_proc_text_message.c.