Content-Based Networking Simulation Library Documentation (v. 1.2.1)

Public Member Functions | Protected Member Functions

cbnsim::CBNSimulation Class Reference

Main entry point for running a CBN simulation. More...

#include <CBNSimulation.h>

List of all members.

Public Member Functions

 CBNSimulation ()
 Default constructor.
void add_event_parser (WorkloadEventParser *wep)
 Adds an event parser to the internal WorkloadParser.
void debug_messages (bool debug_on)
 Set the flag that controls the printing of debug messages.
bool debug_messages () const
 Get the debug messages flag.
void dci (double dci)
 Sets the data collection interval in seconds.
double dci () const
 Returns the data collection interval.
void error_messages (bool error_on)
 Set the flag that controls the printing of error messages.
bool error_messages () const
 Get the error messages flag.
void info_messages (bool info_on)
 Set the flag that controls the printing of info messages.
bool info_messages () const
 Get the info messages flag.
void input_fname (const std::string &ifname)
 Set the input file name.
const std::string & input_fname () const
 Get the input file name.
void output_fname (const std::string &ofname)
 Set the output file name.
const std::string & output_fname () const
 Get the output file name.
void run () throw ( std::exception )
 Main entry method for the simulation.
void set_data_collector (DataCollector *data_collector)
 Sets the DataCollector associated with the simulation.
void set_driver (Driver *driver)
 Sets the Driver associated with the simulation.
void set_factory (NodeFactory *node_factory)
 Sets the NodeFactory associated with the simulation.
double time_unit () const
 Returns the time unit of the workload.

Protected Member Functions

virtual void pre_run_simulation_hook () throw ()
 Hook method invoked just before ssim::Sim::run_simulation() is invoked. All setup is completed at this point.
virtual void setup_link_hook (ssim::ProcessId from, ssim::ProcessId to, unsigned int length) throw ()
 Nook method invoked after a link is established between two node processes.
virtual void setup_node_hook (Node *node) throw ()
 Hook method invoked after a new Node is instantiated and activated.
virtual void setup_topology_hook () throw ()
 Hook method invoked after the topology has been set up.

Detailed Description

Main entry point for running a CBN simulation.


Member Function Documentation

void cbnsim::CBNSimulation::input_fname ( const std::string &  ifname)

Set the input file name.

Empty string corresponds to stdin.

const std::string& cbnsim::CBNSimulation::input_fname ( ) const

Get the input file name.

Empty string corresponds to stdin.

void cbnsim::CBNSimulation::output_fname ( const std::string &  ofname)

Set the output file name.

Empty string corresponds to stdout.

const std::string& cbnsim::CBNSimulation::output_fname ( ) const

Get the output file name.

Empty string corresponds to stdout.

void cbnsim::CBNSimulation::set_data_collector ( DataCollector data_collector) [inline]

Sets the DataCollector associated with the simulation.

The CBNSimulation object manages memory for the DataCollector.

void cbnsim::CBNSimulation::set_driver ( Driver driver) [inline]

Sets the Driver associated with the simulation.

The CBNSimulation object manages memory for the Driver.

void cbnsim::CBNSimulation::set_factory ( NodeFactory node_factory) [inline]

Sets the NodeFactory associated with the simulation.

The CBNSimulation object manages memory for the NodeFactory.

virtual void cbnsim::CBNSimulation::setup_link_hook ( ssim::ProcessId  from,
ssim::ProcessId  to,
unsigned int  length 
) throw () [inline, protected, virtual]

Nook method invoked after a link is established between two node processes.

These links are directed in the sense that this method is invoked twice for each pair of nodes that are connected.


The documentation for this class was generated from the following file: