GHS
Leader Election Based on GHS Minimum Spanning Tree
|
#define MAX_N
The maximum number of agents the demo can accomodate.
Definition: ghs-demo-config.h:44
int test
A bool to determine if we should do a test-and-die routine or not.
Definition: ghs-demo-config.h:76
enum demo::Config::@0 command
A special command enumeration.
bool cfg_is_ok(Config config)
Definition: ghs-demo-inireader.cpp:184
#define N_UNSET
A special value for N that means "not set yet".
Definition: ghs-demo-config.h:50
@ START
Start MST construction after specified delay.
Definition: ghs-demo-config.h:85
Definition: ghs-demo-clireader.cpp:44
void read_cfg_file(const char *fname, Config *c)
Definition: ghs-demo-inireader.cpp:59
@ TEST
run test-and-die routine
Definition: ghs-demo-config.h:84
int my_id
This agent's id.
Definition: ghs-demo-config.h:79
bool retry_connections
If we fail to dial up an agent, should we retry later (true) or drop the message (false)
Definition: ghs-demo-config.h:90
A struct that holds the union of all configuration variables.
Definition: ghs-demo-config.h:64
void read_cfg_stdin(Config *c)
Definition: ghs-demo-inireader.cpp:211
char endpoints[MAX_N][MAX_ENDPOINT_SZ]
The endpoint for each agent, as read from the config.
Definition: ghs-demo-config.h:73
#define ID_UNSET
A special value for an ID that means "not set yet".
Definition: ghs-demo-config.h:53
@ LOAD
Load config and do nothing else.
Definition: ghs-demo-config.h:83
int n_agents
The number of agents currently loaded.
Definition: ghs-demo-config.h:70
void read_cfg_cli(int argc, char **argv, Config *config)
Definition: ghs-demo-clireader.cpp:94
#define MAX_ENDPOINT_SZ
The max strlen() of the endpoint.
Definition: ghs-demo-config.h:47
float wait_s
The time to wait before starting the main algorithm.
Definition: ghs-demo-config.h:67