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_status.c File Reference

See ab_gp_status.h. More...

#include "ab_gp_status.h"
#include "ab_gp_site_status.h"
#include <stdio.h>
#include <string.h>
#include "rte/oal/log/rte_log.h"
#include "rte/redundancy/dual/rte_dual_negotiator.h"
#include "../../common/common_config.h"
#include "../../common/rbc_util_frame.h"
#include "../../common/site_config.h"
Include dependency graph for ab_gp_status.c:

Go to the source code of this file.

Macros

#define AB_GP_STATUS_EVERY_CYCLES   ((uint32_t)RTE_EXAMPLE_STATUS_PERIOD_MS / (uint32_t)RTE_EXAMPLE_AB_CYCLE_PERIOD_MS)

Functions

static uint8_t connected_train_count (const ab_gp_channel_context_t *ctx)
void ab_gp_status_tick (ab_gp_channel_handle_t handle, const ab_gp_channel_context_t *ctx, uint32_t cycle)
 Call once per cyclic-executive cycle from post_execute. Emits a status self line and publishes a STATUS frame on the UTIL relay every RTE_EXAMPLE_STATUS_PERIOD_MS (and on the first cycle).

Variables

static uint8_t s_seq

Detailed Description

See ab_gp_status.h.

Definition in file ab_gp_status.c.

Macro Definition Documentation

◆ AB_GP_STATUS_EVERY_CYCLES

#define AB_GP_STATUS_EVERY_CYCLES   ((uint32_t)RTE_EXAMPLE_STATUS_PERIOD_MS / (uint32_t)RTE_EXAMPLE_AB_CYCLE_PERIOD_MS)

Definition at line 19 of file ab_gp_status.c.

Function Documentation

◆ connected_train_count()

uint8_t connected_train_count ( const ab_gp_channel_context_t * ctx)
static

Definition at line 24 of file ab_gp_status.c.

◆ ab_gp_status_tick()

void ab_gp_status_tick ( ab_gp_channel_handle_t handle,
const ab_gp_channel_context_t * ctx,
uint32_t cycle )

Call once per cyclic-executive cycle from post_execute. Emits a status self line and publishes a STATUS frame on the UTIL relay every RTE_EXAMPLE_STATUS_PERIOD_MS (and on the first cycle).

Parameters
handleThis channel's handle (for ab_gp_channel_send_relay).
ctxThis channel's context (state to report). Must not be NULL.
cyclectx->cyc_cycle.

Definition at line 39 of file ab_gp_status.c.

Variable Documentation

◆ s_seq

uint8_t s_seq
static

Definition at line 22 of file ab_gp_status.c.