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 File Reference

CommServer's own config parsing (cs_cfg_t + load_cfg()), extracted from main.c (2026-09-24) purely for unit-testability - a main()-owning translation unit can't also be linked into a separate test executable without a name collision. No logic changed from the code this replaces. More...

#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  cs_cfg_t

Macros

#define CS_MSG_MAX   1024U

Functions

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 values are logged to stderr and the default kept - see cs_config.c's own cfg_u32()).

Detailed Description

CommServer's own config parsing (cs_cfg_t + load_cfg()), extracted from main.c (2026-09-24) purely for unit-testability - a main()-owning translation unit can't also be linked into a separate test executable without a name collision. No logic changed from the code this replaces.

Definition in file cs_config.h.

Macro Definition Documentation

◆ CS_MSG_MAX

#define CS_MSG_MAX   1024U

Definition at line 18 of file cs_config.h.

Function Documentation

◆ load_cfg()

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 values are logged to stderr and the default kept - see cs_config.c's own cfg_u32()).

Returns
0 on success, -1 if the file itself could not be loaded (safecomm_config_load() failure) - cfg is still fully defaulted in that case, never left uninitialized.

Definition at line 42 of file cs_config.c.