Safe Communication Framework 0.1.0 build feea4f9
ERTMS/ETCS safe communication (Subset-037 EuroRadio, Subset-098 RBC/RBC), CENELEC EN 50128 SIL 4 oriented
Loading...
Searching...
No Matches
ale.h
Go to the documentation of this file.
1
24#ifndef SAFECOMM_ALE_H
25#define SAFECOMM_ALE_H
26
27#include <stdbool.h>
28#include <stdint.h>
29
30#include "safecomm/status.h"
32
33#ifdef __cplusplus
34extern "C" {
35#endif
36
38#define SAFECOMM_ALE_MAX_PEERS 64U
39
41typedef struct
42{
43 uint32_t peer_id;
44 char ab_a_host[64];
45 char ab_b_host[64];
46 uint16_t ab_port;
47 bool in_use;
49
51typedef struct
52{
53 char listen_host[64];
54 uint16_t listen_port;
56 uint32_t peer_count;
58
69
75const safecomm_ale_peer_t *safecomm_ale_lookup(const safecomm_ale_t *ale, uint32_t peer_id);
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif /* SAFECOMM_ALE_H */
safecomm_status_t safecomm_ale_from_config(const safecomm_config_t *cfg, safecomm_ale_t *out)
Build an ALE from a loaded config (ale.* keys) + its peer map.
Definition ale.c:72
#define SAFECOMM_ALE_MAX_PEERS
Max concurrent peer connections one ALE instance tracks.
Definition ale.h:38
const safecomm_ale_peer_t * safecomm_ale_lookup(const safecomm_ale_t *ale, uint32_t peer_id)
Resolve a peer id to its A/B endpoint pair.
Definition ale.c:104
File-based configuration for the Safe Communication Framework.
Common status codes for the Safe Communication Framework.
safecomm_status_t
Result of a Safe Communication Framework operation.
Definition status.h:17
One routed peer: external bearer <-> the A/B endpoint pair.
Definition ale.h:42
uint32_t peer_id
Definition ale.h:43
An ALE instance. Caller-allocated, opaque.
Definition ale.h:52
A loaded configuration file. Caller-allocated, opaque in use.
Definition config.h:66