sink.cc
Go to the documentation of this file.
1 #include "stage.hh"
2 using namespace Stg;
3 
4 unsigned int total = 0;
5 
6 int Delivery(Model *, void *)
7 {
8  total++;
9 
21  return 0; // run again
22 }
23 
24 // Stage calls this when the model starts up
25 extern "C" int Init(Model *mod)
26 {
27  puts("Starting sink controller");
28 
29  // attach callback to be called whenever a flag is added to the sink model
31  mod->Subscribe();
32  return 0; // ok
33 }
Model class
Definition: stage.hh:1651
The Stage library uses its own namespace.
Definition: canvas.hh:8
void Init(int *argc, char **argv[])
Definition: stage.cc:17
int(* model_callback_t)(Model *mod, void *user)
Definition: stage.hh:540
void AddCallback(callback_type_t type, model_callback_t cb, void *user)
int Delivery(Model *, void *)
Definition: sink.cc:6
unsigned int total
Definition: sink.cc:4
void Subscribe()
Definition: model.cc:516


stage
Author(s): Richard Vaughan , Brian Gerkey , Reed Hedges , Andrew Howard , Toby Collett , Pooya Karimian , Jeremy Asher , Alex Couture-Beil , Geoff Biggs , Rich Mattes , Abbas Sadat
autogenerated on Mon Feb 28 2022 23:48:56