Normally these files shouldn't change. This directory includes implementations of the following:
- Main event loop and related helper functions, global variables, main() function to determine which experiment to run:
main.cpp- Note: deciding which experiment to run will eventually be moved to the
run/directory, probably toexperiment.cpp.
- Note: deciding which experiment to run will eventually be moved to the
- Core event implementations (
Event,FlowArrivalEvent,FlowFinishedEvent, etc):event.cpp. - Representation of the topology:
node.cpp,topology.cpp - Queueing behavior. This is a basis for extension; the default implementation is FIFO-dropTail:
queue.cpp. - Flows and packets. This is also a basis for extension; default is TCP:
packet.cppandflow.cpp. - Random variables used in flow generation. Used as a library by the flow generation code:
random_variable.cpp.
This is where you implement your favorite protocol.
- Generally extensions are created by subclassing one or more aspects of classes defined in
coresim/. - Once an extension is defined, it should be added to
factory.cppso it can be run.- Currently,
factory.cppsupports changing the flow, queue, and host-scheduling implementations.
- Currently,
- Methods in
coresim/call theget_...methods infactory.cppto initialize the simulation with the correct implementation. - Which implementation to use from
factory.cppis determined by the config file, parsed byrun/params.cpp.- You should give your extension an identifier in
factory.hso it can be uniquely identified in the config file.
- You should give your extension an identifier in
- Experiment setup, running, and post-analysis:
experiment.cpp - Flow generation models:
flow_generator.cpp - Parsing of config file:
params.cpp- Configuration parameters for your extension should be added to
params.handparams.cpp. - These can then be accessed with
params.<your_parameter>
- Configuration parameters for your extension should be added to
This can be useful if:
- You are running many experiments in parallel.
- You want to easily generate configuration files.
To compile, the Automake and Autoconf files are included: configure.ac and Makefile.am. The makefile will produce two targets: simulator and simdebug.
simdebug is equivalent to simulator, except compiler optimzations are turned off to make debugging easier.
- Gautam Kumar
- Akshay Narayan
- Peter Gao
