-S4U (Simgrid for you) is the next interface of SimGrid, expected to be released with SimGrid 4.0.
-
-Even if it is not completely rock stable yet, it may well already fit
-your needs. You are welcome to try it and report any interface
-glitches that you see. Be however warned that the interface may change
-until the final release. You will have to adapt your code on the way.
-
-This file follows the Doxygen syntax to be included in the
-documentation, but it should remain readable directly.
+// S4U (Simgrid for you) is the next interface of SimGrid, expected to be released with SimGrid 4.0.
+//
+// Even if it is not completely rock stable yet, it may well already fit
+// your needs. You are welcome to try it and report any interface
+// glitches that you see. Be however warned that the interface may change
+// until the final release. You will have to adapt your code on the way.
+//
+// This file follows the Doxygen syntax to be included in the
+// documentation, but it should remain readable directly.
/**
@defgroup s4u_examples S4U examples
@ref examples/s4u/exec-dvfs/s4u-exec-dvfs.cpp and
@ref examples/platforms/energy_platform.xml @n
Show how define a set of pstatesfor a host in the XML, and how the current
- pstate can be accessed/changed with @ref simgrid::s4u::Host::getPstateSpeed and @ref simgrid::s4u::Host::setPstate.
+ pstate can be accessed/changed with @ref simgrid::s4u::Host::get_pstate_speed and @ref simgrid::s4u::Host::set_pstate.
- <b>Parallel tasks</b>
@ref examples/s4u/exec-ptask/s4u-exec-ptask.cpp@n
@ref examples/platforms/prop.xml @n
You can attach arbitrary information to most platform elements from
the XML file, and then interact with these values from your
- program. Note that the changes are not written into the XML file: they
- will only last until the end of your simulation.
- - simgrid::s4u::Actor::getProperty() and simgrid::s4u::Actor::setProperty()
- - simgrid::s4u::Host::getProperty() and simgrid::s4u::Host::setProperty()
- - simgrid::s4u::Link::getProperty() and simgrid::s4u::Link::setProperty()
- - simgrid::s4u::NetZone::getProperty() and simgrid::s4u::NetZone::setProperty()
+ program. Note that the changes are not written permanently on disk,
+ in the XML file nor anywhere else. They only last until the end of
+ your simulation.
+ - simgrid::s4u::Actor::get_property() and simgrid::s4u::Actor::set_property()
+ - simgrid::s4u::Host::get_property() and simgrid::s4u::Host::set_property()
+ - simgrid::s4u::Link::get_property() and simgrid::s4u::Link::set_property()
+ - simgrid::s4u::NetZone::get_property() and simgrid::s4u::NetZone::set_property()
@section s4u_ex_energy Simulating the energy consumption
Shows how to implement a classical communication pattern, where a token is exchanged along a ring to reach every
participant.
- - <b>Master Workers:</b> @ref examples/s4u/app-masterworker/s4u-app-masterworker.cpp @n
+ - <b>Master Workers:</b> @ref examples/s4u/app-masterworkers/s4u-app-masterworkers-class.cpp
+ @ref examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp @n
Another good old example, where one Master process has a bunch of task to dispatch to a set of several Worker
- processes.
+ processes. This example comes in two equivalent variants, one
+ where the actors are specified as simple functions (which is easier to
+ understand for newcomers) and one where the actors are specified
+ as classes (which is more powerful for the users wanting to build
+ their own projects upon the example).
@subsection s4u_ex_app_data Data diffusion
@example examples/s4u/async-waitany/s4u-async-waitany.cpp
@example examples/s4u/app-bittorrent/s4u-bittorrent.cpp
@example examples/s4u/app-chainsend/s4u-app-chainsend.cpp
-@example examples/s4u/app-masterworker/s4u-app-masterworker.cpp
+@example examples/s4u/app-masterworkers/s4u-app-masterworkers-class.cpp
+@example examples/s4u/app-masterworkers/s4u-app-masterworkers-fun.cpp
@example examples/s4u/app-pingpong/s4u-app-pingpong.cpp
@example examples/s4u/app-token-ring/s4u-app-token-ring.cpp
@example examples/s4u/dht-chord/s4u-dht-chord.cpp