From 3805620a2f78c59fe285a1bf9ea2411a35d7f0b4 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 20 Dec 2012 16:17:07 +0100 Subject: [PATCH 1/1] improve the doc to include MSG_config --- doc/doxygen/options.doc | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/doc/doxygen/options.doc b/doc/doxygen/options.doc index 31dff235f8..66d988e7d2 100644 --- a/doc/doxygen/options.doc +++ b/doc/doxygen/options.doc @@ -38,23 +38,28 @@ file: \verbatim \endverbatim A last solution is to pass your configuration directly using the C -interface. Unfortunately, this path is not really easy to use right -now, and you mess directly with surf internal variables as follows. Check the -\ref XBT_config "relevant page" for details on all the functions you -can use in this context, \c _surf_cfg_set being the only configuration set -currently used in SimGrid. \code +interface. If you happen to use the MSG interface, this is very easy +with the MSG_config() function. If you do not use MSG, that's a bit +more complex, as you have to mess with the internal configuration set +directly as follows. Check the \ref XBT_config "relevant page" for +details on all the functions you can use in this context, \c +_surf_cfg_set being the only configuration set currently used in +SimGrid. + +@code #include -extern xbt_cfg_t _surf_cfg_set; +extern xbt_cfg_t _sg_cfg_set; int main(int argc, char *argv[]) { - MSG_init(&argc, argv); + SD_init(&argc, argv); - xbt_cfg_set_parse(_surf_cfg_set,"Item:Value"); + /* Prefer MSG_config() if you use MSG!! */ + xbt_cfg_set_parse(_sg_cfg_set,"Item:Value"); // Rest of your code } -\endcode +@endcode \section options_model Configuring the platform models -- 2.20.1