|
RTE RBC 2oo2 Reference Application 0.1.0 build 0006685
SIL 4 2oo2 Dual-Site Fault-Tolerant ERTMS Radio Block Centre Reference Architecture
|
Stage-then-commit output queue - see ab_gp_channel_stage.h. More...
#include "ab_gp_channel_stage.h"#include <string.h>#include "rte/oal/memory/rte_mem_util.h"#include "rte/utils/safestate/rte_safestate.h"Go to the source code of this file.
Functions | |
| static rte_status_t | stage_entry (ab_gp_channel_context_t *ctx, ab_gp_stage_dest_kind_t dest_kind, rte_example_relay_kind_t relay_kind, uint8_t relay_index, const uint8_t *bytes, size_t size) |
| void | ab_gp_channel_stage_reset (ab_gp_channel_handle_t handle) |
| Clears this cycle's pending-send queue. | |
| rte_status_t | ab_gp_channel_stage_peer (ab_gp_channel_handle_t handle, const uint8_t *bytes, size_t size) |
| Queues a peer-link send for this cycle - does not transmit yet. | |
| rte_status_t | ab_gp_channel_stage_crosscompare (ab_gp_channel_handle_t handle, uint8_t kind, const uint8_t *payload, size_t size) |
| Queues a crosscompare-link send for this cycle - does not transmit yet. | |
| rte_status_t | ab_gp_channel_stage_relay (ab_gp_channel_handle_t handle, rte_example_relay_kind_t kind, uint8_t index, const uint8_t *bytes, size_t size) |
| Queues a relay-link send for this cycle - does not transmit yet. | |
| rte_status_t | ab_gp_channel_commit_pending_sends (ab_gp_channel_handle_t handle) |
| Transmits every send queued this cycle (through the real ab_gp_channel_send_peer()/_send_relay()), then clears the queue. | |
| void | ab_gp_channel_discard_pending_sends (ab_gp_channel_handle_t handle) |
| Discards every send queued this cycle without transmitting it, then clears the queue. | |
Stage-then-commit output queue - see ab_gp_channel_stage.h.
Definition in file ab_gp_channel_stage.c.
|
static |
Local makros Local types declarations Local variables declarations Global variables declarations Local function declarations
Definition at line 135 of file ab_gp_channel_stage.c.
| void ab_gp_channel_stage_reset | ( | ab_gp_channel_handle_t | handle | ) |
Clears this cycle's pending-send queue.
Global functions
Call once per cycle, before any ab_gp_channel_stage_peer()/ ab_gp_channel_stage_relay() call this cycle - see ab_gp_channel_pre_execute()'s own call site (the natural per-cycle reset point, ahead of anything this cycle might stage).
Definition at line 26 of file ab_gp_channel_stage.c.
| rte_status_t ab_gp_channel_stage_peer | ( | ab_gp_channel_handle_t | handle, |
| const uint8_t * | bytes, | ||
| size_t | size ) |
Queues a peer-link send for this cycle - does not transmit yet.
Definition at line 37 of file ab_gp_channel_stage.c.
| rte_status_t ab_gp_channel_stage_crosscompare | ( | ab_gp_channel_handle_t | handle, |
| uint8_t | kind, | ||
| const uint8_t * | payload, | ||
| size_t | size ) |
Queues a crosscompare-link send for this cycle - does not transmit yet.
Definition at line 48 of file ab_gp_channel_stage.c.
| rte_status_t ab_gp_channel_stage_relay | ( | ab_gp_channel_handle_t | handle, |
| rte_example_relay_kind_t | kind, | ||
| uint8_t | index, | ||
| const uint8_t * | bytes, | ||
| size_t | size ) |
Queues a relay-link send for this cycle - does not transmit yet.
Definition at line 64 of file ab_gp_channel_stage.c.
| rte_status_t ab_gp_channel_commit_pending_sends | ( | ab_gp_channel_handle_t | handle | ) |
Transmits every send queued this cycle (through the real ab_gp_channel_send_peer()/_send_relay()), then clears the queue.
Call from ab_gp_channel_on_checkpoint_result() when committed == true.
Definition at line 76 of file ab_gp_channel_stage.c.
| void ab_gp_channel_discard_pending_sends | ( | ab_gp_channel_handle_t | handle | ) |
Discards every send queued this cycle without transmitting it, then clears the queue.
Call from ab_gp_channel_on_checkpoint_result() when committed == false (this cycle's checkpoint did not confirm both channels took the same program path - see ADR-034).
Definition at line 124 of file ab_gp_channel_stage.c.