|
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
|
Communication Functional Module — SKELETON. More...
Go to the source code of this file.
Functions | |
| safecomm_status_t | safecomm_cfm_from_config (const safecomm_config_t *cfg, const safecomm_transport_t *lower, safecomm_cfm_t *out) |
| Build a CFM from a loaded config (cfm.* keys). | |
| safecomm_status_t | safecomm_cfm_transport (safecomm_cfm_t *cfm, safecomm_transport_t *out) |
| Expose the CFM to the SFM above it as a transport. | |
Communication Functional Module — SKELETON.
safecomm_cfm_from_config() parses+range-checks the cfm.* config keys; the connection management and the upward transport are stubs.
Definition in file cfm.c.
| safecomm_status_t safecomm_cfm_from_config | ( | const safecomm_config_t * | cfg, |
| const safecomm_transport_t * | lower, | ||
| safecomm_cfm_t * | out ) |
Build a CFM from a loaded config (cfm.* keys).
Reads cfm.profile, cfm.peer_host, cfm.peer_port, cfm.bind_port, cfm.retry_ms; range-checks each; leaves out ready but not connected.
| cfg | loaded configuration. Non-NULL. |
| lower | the bearer the CFM sends/receives over (for the SS-037 stub this is the Gateway-relay transport; for SS-098 it is an OAL/TCP transport). Non-NULL, .send/.recv non-NULL. |
| out | receives the CFM. Non-NULL. |
| safecomm_status_t safecomm_cfm_transport | ( | safecomm_cfm_t * | cfm, |
| safecomm_transport_t * | out ) |
Expose the CFM to the SFM above it as a transport.
The returned transport's send/recv carry whole SaF PDUs; the CFM handles framing, keep-alive and reconnect underneath.
| cfm | a CFM from safecomm_cfm_from_config(). Non-NULL. |
| out | receives the upward-facing transport. Non-NULL. |