Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 0f72ec239f
Fetching contributors…

Cannot retrieve contributors at this time

38 lines (27 sloc) 0.77 kB
#include "stage.hh"
using namespace Stg;
unsigned int total = 0;
int Delivery( Model* mod, void* dummy )
{
// satisfy the compiler
(void)dummy;
total++;
/**
printf( "Delivery: %.2f %d %.2f %.2f\n",
mod->GetWorld()->SimTimeNow() / 1e6,
//mod->GetFlagCount(),
total,
// dynamic_cast<WorldGui*>(mod->GetWorld())->EnergyString().c_str() );
Stg::PowerPack::global_input / 1e3,
Stg::PowerPack::global_dissipated / 1e3 );
*/
return 0; // run again
}
// Stage calls this when the model starts up
extern "C" int Init( Model* mod )
{
// attach callback to be called whenever a flag is added to the sink model
mod->AddCallback( Model::CB_FLAGINCR, (model_callback_t)Delivery, NULL );
mod->Subscribe();
return 0; //ok
}
Jump to Line
Something went wrong with that request. Please try again.