- \ref msg_actions_functions
- \ref msg_gos_functions
- \ref msg_deprecated_functions
- - \ref msg_easier_life
- \ref msg_simulation
Also make sure to visit the page @ref MSG_examples.
*/
-/** @defgroup msg_simulation Main MSG simulation Functions
-* @ingroup MSG_API
-* @brief This section describes the functions you need to know to
-* set up a simulation. You should have a look at \ref MSG_examples
-* to have an overview of their usage.
-*
-* @htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Simulation control" --> @endhtmlonly
+/**
+@defgroup msg_simulation Main MSG simulation Functions
+@ingroup MSG_API
+@brief Describes how to setup and control your simulation.
+
+The basic workflow is the following (check the \ref MSG_examples for
+details).
+
+ -# Initialize the library with #MSG_global_init
+ -# Create a platform (usually by parsing a file with
+ #MSG_create_environment)
+ -# Register the functions that your processes are supposed to run with
+ #MSG_function_register (and maybe #MSG_function_register_default)
+ -# Launch your processes from a deployment file with #MSG_launch_application
+ -# Run the simulation with #MSG_main
+ -# Cleanup the library with #MSG_clean before ending your program
+ (optional).
+
+@htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Simulation control" --> @endhtmlonly
*/
* by a process for handling some task.
*/
-/** @defgroup msg_easier_life Platform and Application management
- * @ingroup MSG_API
- * @brief This section describes functions to manage the platform creation
- * and the application deployment. Please check @ref
- * MSG_examples for an overview of their usage.
- */
/**
@defgroup MSG_LUA Lua bindings
For the latest 2 entries, you have basically 2 ways to give it as an input :
\li You can program it, either using the Lua console (\ref MSG_Lua_funct) or if you're using MSG some
-of its platform and deployments functions(\ref msg_easier_life). If you want to use it, please refer
+of its platform and deployments functions(\ref msg_simulation). If you want to use it, please refer
to its doc. (you can also check the section \ref pf_flexml_bypassing but this is strongly deprecated, as there is a new way to do it properly, but not yet documented).
\li You can use two XML files: a platform description file and a deployment
description one.
#include "xbt/sysdep.h"
#include "xbt/log.h"
-/** \ingroup msg_easier_life
+/** \ingroup msg_simulation
* \brief An application deployer.
*
* Creates the process described in \a file.
return;
}
-/** \ingroup msg_easier_life
+/** \ingroup msg_simulation
* \brief Registers the main function of a process in a global table.
*
* Registers a code function in a global table.
return;
}
-/** \ingroup msg_easier_life
+/** \ingroup msg_simulation
* \brief Registers a function as the default main function of processes.
*
* Registers a code function as being the default value. This function will get used by MSG_launch_application() when there is no registered function of the requested name in.
SIMIX_function_register_default(code);
}
-/** \ingroup msg_easier_life
+/** \ingroup msg_simulation
* \brief Retrieves a registered main function
*
* Registers a code function in a global table.
#include <lualib.h>
#endif
-/** @addtogroup msg_easier_life
- * \htmlonly <!-- DOXYGEN_NAVBAR_LABEL="Platforms and Applications" --> \endhtmlonly
- *
- */
-
/********************************* MSG **************************************/
-/** \ingroup msg_easier_life
- * \brief A name directory service...
- *
- * Finds a m_host_t using its name.
- * \param name the name of an host.
- * \return the corresponding host
- */
-m_host_t MSG_get_host_by_name(const char *name)
-{
- smx_host_t simix_h = NULL;
- simix_h = simcall_host_get_by_name(name);
-
- if (simix_h == NULL)
- return NULL;
-
- return (m_host_t) simcall_host_get_data(simix_h);
-}
-
-/** \ingroup msg_easier_life
+/** \ingroup msg_simulation
* \brief A platform constructor.
*
* Creates a new platform, including hosts, links and the
}
-/** \ingroup msg_easier_life
+/** \ingroup msg_simulation
* \brief A clock (in second).
*/
XBT_INLINE double MSG_get_clock(void)
return host;
}
+/** \ingroup msg_host_management
+ * \brief Finds a m_host_t using its name.
+ *
+ * This is a name directory service
+ * \param name the name of an host.
+ * \return the corresponding host
+ */
+m_host_t MSG_get_host_by_name(const char *name)
+{
+ smx_host_t simix_h = NULL;
+ simix_h = simcall_host_get_by_name(name);
+
+ if (simix_h == NULL)
+ return NULL;
+
+ return (m_host_t) simcall_host_get_data(simix_h);
+}
+
+
/** \ingroup m_host_management
*
* \brief Set the user data of a #m_host_t.