RBC_Test_CommServer 0.1.0 build fe9835b
Non-vital customer-network access point in front of the RBC's role-C gateways
Loading...
Searching...
No Matches
cs_config.h
Go to the documentation of this file.
1
8#ifndef CS_CONFIG_H
9#define CS_CONFIG_H
10
11#include <stdint.h>
12
13/* Must be >= the train<->RBC frame size. The role-C train gateway uses
14 * RBC_TRAIN_ENVELOPE_WIRE_SIZE (512) for its netlink link, and the train
15 * sim's SafeCommLink frames to the same 512 - an earlier 256/96 value
16 * here fragmented every train frame and corrupted the stream (M3 / MA
17 * never reached the train). */
18#define CS_MSG_MAX 1024U
19
20typedef struct
21{
22 char west_host[128];
23 uint16_t west_port;
24 char east_host[128];
25 uint16_t east_port;
26 uint16_t message_size;
27 uint32_t connect_timeout_ms;
28 char listen_host[128];
29 uint16_t listen_port;
30 uint32_t idle_ms;
31} cs_cfg_t;
32
40int load_cfg(const char *path, cs_cfg_t *cfg);
41
42#endif /* CS_CONFIG_H */
int load_cfg(const char *path, cs_cfg_t *cfg)
Loads path into cfg, defaults first then overridden by whatever the file actually sets (out-of-range ...
Definition cs_config.c:42