31 #include "configurator.hh" 45 LINFO(
plog,
"Attempting to cancel" );
50 int main(
int argc,
char** argv )
54 scarab::param_node t_default_config;
55 t_default_config.add(
"ip", scarab::param_value(
"127.0.0.1" ) );
56 t_default_config.add(
"port", scarab::param_value( 23530 ) );
57 t_default_config.add(
"interface", scarab::param_value(
"eth1" ) );
59 scarab::configurator t_configurator( argc, argv, t_default_config );
61 std::string t_ip( t_configurator.get< std::string >(
"ip" ) );
62 unsigned t_port = t_configurator.get<
unsigned >(
"port" );
63 std::string t_interface( t_configurator.get< std::string >(
"interface" ) );
64 bool t_use_fpa( t_configurator.config().has(
"fpa" ) );
66 LINFO(
plog,
"Creating and configuring nodes" );
68 midge::diptera* t_root =
new midge::diptera();
74 t_pck_rec->set_name(
"pck_rec" );
75 t_pck_rec->set_length( 10 );
76 t_pck_rec->set_port( t_port );
77 t_pck_rec->interface() = t_interface;
78 t_root->add( t_pck_rec );
81 LERROR(
plog,
"FPA was requested, but is only available on a Linux machine" );
88 t_pck_rec->set_name(
"pck_rec" );
89 t_pck_rec->set_length( 10 );
90 t_pck_rec->set_port( t_port );
91 t_pck_rec->ip() = t_ip;
92 t_root->add( t_pck_rec );
97 t_tfr_rec->set_name(
"tfr_rec" );
98 t_tfr_rec->set_time_length( 10 );
99 t_tfr_rec->set_start_paused(
false );
100 t_root->add( t_tfr_rec );
103 t_tmon->set_name(
"tmon" );
104 t_root->add( t_tmon );
107 t_fmon->set_name(
"fmon" );
108 t_root->add( t_fmon );
110 LINFO(
plog,
"Connecting nodes" );
112 t_root->join(
"pck_rec.out_0:tfr_rec.in_0" );
113 t_root->join(
"tfr_rec.out_0:tmon.in_0" );
114 t_root->join(
"tfr_rec.out_1:fmon.in_0" );
116 LINFO(
plog,
"Exit with ctrl-c" );
121 LINFO(
plog,
"Executing" );
123 std::exception_ptr t_e_ptr = t_root->run(
"pck_rec:tfr_rec:tmon:fmon" );
125 if( t_e_ptr ) std::rethrow_exception( t_e_ptr );
127 LINFO(
plog,
"Execution complete" );
136 catch( std::exception& e )
138 LERROR(
plog,
"Exception caught: " << e.what() );
static scarab::logger plog("batch_executor")
A consumer to check the continuity of the freq-packet stream from a ROACH.
A consumer to check the continuity of the time-packet stream from a ROACH.
A producer to receive UDP packets via the standard socket interface and write them as raw blocks of m...
A producer to receive UDP packets via the fast-packet-acquisition interface and write them as raw blo...
int main(int argc, char **argv)
A transformer to receive raw blocks of memory, parse them, and distribute them as time and frequency ...
LOGGER(plog, "egg_writer")
scarab::cancelable * f_cancelable