Commit b6d5e9cb authored by Philip Carns's avatar Philip Carns

add stub for loggp method

- just a copy of simplenet with variables and functions renamed for now
parent a0754d04
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
typedef struct simplenet_param simplenet_param; typedef struct simplenet_param simplenet_param;
typedef struct dragonfly_param dragonfly_param; typedef struct dragonfly_param dragonfly_param;
typedef struct torus_param torus_param; typedef struct torus_param torus_param;
typedef struct loggp_param loggp_param;
typedef struct mn_stats mn_stats; typedef struct mn_stats mn_stats;
enum NETWORKS enum NETWORKS
...@@ -41,6 +42,12 @@ struct mn_stats ...@@ -41,6 +42,12 @@ struct mn_stats
long max_event_size; long max_event_size;
}; };
/* structs for initializing a network/ specifying network parameters */
struct loggp_param
{
char* net_config_file; /* file with loggp parameter table */
};
/* structs for initializing a network/ specifying network parameters */ /* structs for initializing a network/ specifying network parameters */
struct simplenet_param struct simplenet_param
{ {
......
...@@ -11,5 +11,6 @@ src_libcodes_net_a_SOURCES = \ ...@@ -11,5 +11,6 @@ src_libcodes_net_a_SOURCES = \
src/models/networks/model-net/model-net.c \ src/models/networks/model-net/model-net.c \
src/models/networks/model-net/simplenet-upd.c \ src/models/networks/model-net/simplenet-upd.c \
src/models/networks/model-net/torus.c \ src/models/networks/model-net/torus.c \
src/models/networks/model-net/dragonfly.c src/models/networks/model-net/dragonfly.c \
src/models/networks/model-net/loggp.c
This diff is collapsed.
...@@ -17,10 +17,11 @@ ...@@ -17,10 +17,11 @@
extern struct model_net_method simplenet_method; extern struct model_net_method simplenet_method;
extern struct model_net_method torus_method; extern struct model_net_method torus_method;
extern struct model_net_method dragonfly_method; extern struct model_net_method dragonfly_method;
extern struct model_net_method loggp_method;
/* Global array initialization, terminated with a NULL entry */ /* Global array initialization, terminated with a NULL entry */
static struct model_net_method* method_array[] = static struct model_net_method* method_array[] =
{&simplenet_method, &torus_method, &dragonfly_method, NULL}; {&simplenet_method, &torus_method, &dragonfly_method, &loggp_method, NULL};
static int model_net_get_msg_sz(int net_id); static int model_net_get_msg_sz(int net_id);
...@@ -219,6 +220,16 @@ int model_net_set_params() ...@@ -219,6 +220,16 @@ int model_net_set_params()
net_params.net_bw_mbps = net_bw_mbps; net_params.net_bw_mbps = net_bw_mbps;
net_id = model_net_setup("simplenet", packet_size, (const void*)&net_params); /* Sets the network as simplenet and packet size 512 */ net_id = model_net_setup("simplenet", packet_size, (const void*)&net_params); /* Sets the network as simplenet and packet size 512 */
} }
else if(strcmp("loggp",mn_name)==0)
{
char net_config_file[256];
loggp_param net_params;
configuration_get_value(&config, "PARAMS", "net_config_file", net_config_file, 256);
net_params.net_config_file = net_config_file;
net_id = model_net_setup("loggp", packet_size, (const void*)&net_params); /* Sets the network as loggp and packet size 512 */
}
else if(strcmp("dragonfly", mn_name)==0) else if(strcmp("dragonfly", mn_name)==0)
{ {
dragonfly_param net_params; dragonfly_param net_params;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment