20#ifndef NM_MADICO_LAUNCHER_H
21#define NM_MADICO_LAUNCHER_H
23#include <Padico/Topology.h>
24#include <Padico/NetSelector.h>
35 nm_drv_vect_t p_drvs = nm_drv_vect_copy(&
p_gates->p_gates[i].
drvs);
48 const char*nmad_driver = padico_getenv(
"NMAD_DRIVER");
51 struct nm_component_hashtable_s loaded_components;
52 nm_component_hashtable_init(&loaded_components);
54 for(i = 0; i < p_gates->
size; i++)
57 const puk_component_t component_1 =
58 padico_ns_serial_selector(p_peers[i],
"trk_small", puk_iface_NewMad_minidriver());
59 const puk_component_t component_2 =
60 padico_ns_serial_selector(p_peers[i],
"trk_large", puk_iface_NewMad_minidriver());
61 assert(component_1 != NULL);
62 assert(component_2 != NULL);
64 nm_drv_t p_drv1 = nm_component_hashtable_lookup(&loaded_components, component_1);
68 nm_component_hashtable_insert(&loaded_components, component_1, p_drv1);
70 nm_drv_vect_push_back(&p_gates->
p_gates[i].
drvs, p_drv1);
71 nm_drv_t p_drv2 = nm_component_hashtable_lookup(&loaded_components, component_2);
75 nm_component_hashtable_insert(&loaded_components, component_2, p_drv2);
77 nm_drv_vect_push_back(&p_gates->
p_gates[i].
drvs, p_drv2);
80 nm_component_hashtable_destroy(&loaded_components);
nm_drv_t nm_launcher_add_driver(puk_component_t component, nm_trk_kind_t kind)
Add a driver to the session.
void nm_launcher_set_selector(nm_launcher_selector_t selector, void *_arg)
Declare the selector to use to establish connections.
static void nm_launcher_gates_populate_ns(struct nm_launcher_gates_s *p_gates, padico_topo_node_t *p_peers)
use PadicoTM NetSelector to populate gates with driver.
static nm_drv_vect_t nm_madico_launcher_default_selector(const char *url, void *_arg)
nm_len_t size
size of the onsided data (not incuding target-side completion)
@ nm_trk_small
small packets with headers & parsing
@ nm_trk_large
large packets with rdv, no header
struct nm_drv_vect_s drvs
a set of gates to manage connection establishment by launcher
struct nm_launcher_gate_s * p_gates