|
Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
|
Example: How users configure channels for online/standby redundancy. More...
#include <stdint.h>#include <stdbool.h>#include <string.h>#include <stdio.h>#include "rte/channel_link/rte_channel.h"#include "rte/voter/rte_voter.h"#include "rte/status/rte_status.h"Go to the source code of this file.
Data Structures | |
| struct | tcp_channel_config_t |
| struct | udp_channel_config_t |
| struct | shm_channel_config_t |
| struct | fifo_channel_config_t |
| struct | channel_wrapper_t |
Enumerations | |
| enum | channel_type_t { CHANNEL_TYPE_TCP , CHANNEL_TYPE_UDP , CHANNEL_TYPE_SHM , CHANNEL_TYPE_FIFO } |
Functions | |
| static rte_status_t | app_backend_send (void *channel, const void *data, size_t size) |
| Dispatcher send callback Routes to appropriate transport based on channel type. | |
| static rte_status_t | app_backend_recv (void *channel, void *data, size_t size, uint32_t timeout_ms) |
| Dispatcher receive callback Routes to appropriate transport based on channel type. | |
| void | example_tcp_based_redundancy (void) |
| void | example_local_redundancy (void) |
| void | example_hybrid_configuration (void) |
| int | main (void) |
Example: How users configure channels for online/standby redundancy.
This example shows:
User responsibility: Provide configuration values (IPs, ports, paths) Framework responsibility: Voting, health tracking, safe-state OS integrator responsibility: Actual send/recv implementations
Definition in file channel_configuration_example.c.
| enum channel_type_t |
Definition at line 85 of file channel_configuration_example.c.
|
static |
Dispatcher send callback Routes to appropriate transport based on channel type.
Definition at line 110 of file channel_configuration_example.c.
|
static |
Dispatcher receive callback Routes to appropriate transport based on channel type.
Definition at line 152 of file channel_configuration_example.c.
| void example_tcp_based_redundancy | ( | void | ) |
Definition at line 195 of file channel_configuration_example.c.
| void example_local_redundancy | ( | void | ) |
Definition at line 400 of file channel_configuration_example.c.
| void example_hybrid_configuration | ( | void | ) |
Definition at line 432 of file channel_configuration_example.c.
| int main | ( | void | ) |
Definition at line 446 of file channel_configuration_example.c.