dataflow_declare_add_sources-snippet.h 505 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
  Producer<int>
    producer1(1),
    producer2(2),
    producer3(3),
    producer4(4);

  Network::Source<int>
    source1(
      embb::base::MakeFunction(producer1, &Producer<int>::Run) ),
    source2(
      embb::base::MakeFunction(producer2, &Producer<int>::Run) ),
    source3(
      embb::base::MakeFunction(producer3, &Producer<int>::Run) ),
    source4(
      embb::base::MakeFunction(producer4, &Producer<int>::Run) );

  nw.Add(source1);
  nw.Add(source2);
  nw.Add(source3);
  nw.Add(source4);