|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
A/B -> Gateway log-event forwarding (Platform_Protocol_JRU/CLAUDE.md's "Wiring" section). Installs an rte_osadapter_log_t that delegates every write() to the real local adapter (unchanged local stderr behaviour) and additionally, once a channel is attached, republishes INFO+ events to Gateway over RBC_UTIL_TOPIC_JRU_LOG - Gateway's status service forwards them on to Platform_Protocol_JRU. More...
#include "rte/utils/status/rte_status.h"#include "rte_osadapter/log/rte_osadapter_log.h"#include "ab_gp_channel.h"Go to the source code of this file.
Functions | |
| rte_status_t | ab_gp_jru_forward_install (const rte_osadapter_log_t *delegate) |
Wraps delegate (the real local log OSAdapter, e.g. rte_posix_osadapter_log()) and registers the wrapper as THE log OSAdapter (rte_osadapter_log_register()). Call once, right after the delegate would otherwise have been registered. | |
| void | ab_gp_jru_forward_set_channel (ab_gp_channel_handle_t handle, uint8_t source_id) |
| Attaches the open AB<->C relay channel: from this call on, write() also republishes INFO+ events to Gateway. Before this is called, write() only delegates locally (same as if forwarding were never installed) - there is no channel to publish over yet during app_main_common_init()'s early OSAdapter bring-up. | |
A/B -> Gateway log-event forwarding (Platform_Protocol_JRU/CLAUDE.md's "Wiring" section). Installs an rte_osadapter_log_t that delegates every write() to the real local adapter (unchanged local stderr behaviour) and additionally, once a channel is attached, republishes INFO+ events to Gateway over RBC_UTIL_TOPIC_JRU_LOG - Gateway's status service forwards them on to Platform_Protocol_JRU.
Non-safety (rte_log, ADR-001 section 4): forwarding is purely diagnostic best-effort, exactly like ab_gp_status.c's own status publish, and can never affect an RBC decision. It runs on the logging thread (the cycle thread for almost every event), so it must not block it either (ISS-020): while the UTIL link is not open (status service absent), at most one open attempt of RTE_EXAMPLE_UTIL_OPEN_ATTEMPT_TIMEOUT_MS runs per RTE_EXAMPLE_UTIL_REOPEN_BACKOFF_MS and every other event is dropped (ab_gp_util_link_gate.h, gated in ab_gp_channel_send_relay()).
Definition in file ab_gp_jru_forward.h.
| rte_status_t ab_gp_jru_forward_install | ( | const rte_osadapter_log_t * | delegate | ) |
Wraps delegate (the real local log OSAdapter, e.g. rte_posix_osadapter_log()) and registers the wrapper as THE log OSAdapter (rte_osadapter_log_register()). Call once, right after the delegate would otherwise have been registered.
| delegate | Non-NULL vtable to delegate every write() to. |
Global variables declarations Global functions
Definition at line 33 of file ab_gp_jru_forward.c.
| void ab_gp_jru_forward_set_channel | ( | ab_gp_channel_handle_t | handle, |
| uint8_t | source_id ) |
Attaches the open AB<->C relay channel: from this call on, write() also republishes INFO+ events to Gateway. Before this is called, write() only delegates locally (same as if forwarding were never installed) - there is no channel to publish over yet during app_main_common_init()'s early OSAdapter bring-up.
| handle | Channel opened by ab_gp_channel_open_link(). |
| source_id | RBC_UTIL_SRC_A or RBC_UTIL_SRC_B (rbc_util_frame.h). |
Definition at line 50 of file ab_gp_jru_forward.c.