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

See ab_gp_site_status.h. More...

#include "ab_gp_site_status.h"
#include <stdio.h>
Include dependency graph for ab_gp_site_status.c:

Go to the source code of this file.

Functions

bool ab_gp_site_status_ready_for_online (const ab_gp_channel_context_t *ctx)
 Whether this channel confirms it is ready to be ONLINE: the Gateway relay delivered a frame within the last 10 cycles (so a train's connect would reach this channel).
void ab_gp_site_status_collect (const ab_gp_channel_context_t *ctx, ab_gp_site_status_t *out)
size_t ab_gp_site_status_append_text (const ab_gp_site_status_t *st, char *buf, size_t size)
 Appends " site_wait=<none|dispatcher|link> site_why=<short reason>" to a status payload.

Detailed Description

See ab_gp_site_status.h.

Definition in file ab_gp_site_status.c.

Function Documentation

◆ ab_gp_site_status_ready_for_online()

bool ab_gp_site_status_ready_for_online ( const ab_gp_channel_context_t * ctx)

Whether this channel confirms it is ready to be ONLINE: the Gateway relay delivered a frame within the last 10 cycles (so a train's connect would reach this channel).

Definition at line 9 of file ab_gp_site_status.c.

◆ ab_gp_site_status_collect()

void ab_gp_site_status_collect ( const ab_gp_channel_context_t * ctx,
ab_gp_site_status_t * out )

Collects the snapshot from the channel context.

Definition at line 19 of file ab_gp_site_status.c.

◆ ab_gp_site_status_append_text()

size_t ab_gp_site_status_append_text ( const ab_gp_site_status_t * st,
char * buf,
size_t size )

Appends " site_wait=<none|dispatcher|link> site_why=<short reason>" to a status payload.

Returns
the number of characters written (0 if it did not fit)

Definition at line 52 of file ab_gp_site_status.c.