From 93cdf2806f1b01f205897e8fd6434be1b0ee0141 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Mon, 16 May 2016 07:19:44 +0200 Subject: [PATCH] done reformating the doc of MSG examples. Many examples remain undocumented --- examples/msg/README.doc | 56 +++++++------------ examples/msg/dht-chord/dht-chord.c | 1 - .../platform-properties/platform-properties.c | 11 +--- examples/msg/task-priority/task-priority.c | 10 +--- 4 files changed, 21 insertions(+), 57 deletions(-) diff --git a/examples/msg/README.doc b/examples/msg/README.doc index ff47a2e31b..1ee4a2e5da 100644 --- a/examples/msg/README.doc +++ b/examples/msg/README.doc @@ -244,18 +244,31 @@ also the tesh files in the example directories for details. constituting a fully working non-trivial example. This implementation is also very efficient, as demonstrated in http://hal.inria.fr/inria-00602216/ - - - @ref examples/msg/task-priority/task-priority.c \n - - @ref examples/msg/properties/properties.c \n +@section msg_ex_misc Miscellaneous + + - Task priorities. + @ref examples/msg/task-priority/task-priority.c \n + Demonstrates the use of @ref MSG_task_set_priority to change the + computation priority of a given task. + + - User-defined properties. + @ref examples/msg/platform-properties/platform-properties.c \n + Attaching arbitrary information to host, processes and + such, and retrieving them with @ref MSG_host_get_properties, + @ref MSG_host_get_property_value, @ref MSG_process_get_properties, and + @ref MSG_process_get_property_value. Also make sure to read the + platform and deployment XML files to see how to declare these data. + +TODO: Document the many other examples that we have */ As a human, you can stop reading at this point. The rest is garbage: Every example must be listed in the following, but it's not possible -to move this content upper as each @example directive seems to eat the -next doxygen commands (and the content is placed at the top of the -example file). +to move this content upper as each @example directive seems to eat +everything until the next */ marker (and the content is placed at the +top of the example file). /** @@ -299,34 +312,3 @@ example file). */ -Basic examples and features -=========================== - - * properties/msg_prop.c Attaching arbitrary information to host, - processes and such, and retrieving them with - MSG_host_get_properties(), MSG_host_get_property_value(), - MSG_process_get_properties() and MSG_process_get_property_value(). - Also make sure to read the platform and deployment XML files to see - how to declare these data. - - * parallel_task/parallel_task.c: Demonstrates the use of - MSG_parallel_task_create(), to create special tasks that run on - several hosts at the same time. The resulting simulations are very - close to what can be achieved in SimDag, but still allows to use - the other features of MSG (it'd be cool to be able to mix - interfaces, but it's not possible ATM). - - * priority/priority.c: Demonstrates the use of - MSG_task_set_priority() to change the computation priority of a - given task. - -Examples of full applications -============================= - - * chord/chord.c: Classical Chord P2P protocol This example implements - the well known Chord P2P protocol. Its main advantage is that it - constitute a fully working non-trivial example. In addition, its - implementation is rather efficient, as demonstrated in - [57]http://hal.inria.fr/inria-00602216/ - - diff --git a/examples/msg/dht-chord/dht-chord.c b/examples/msg/dht-chord/dht-chord.c index b8928e7bff..e51439c1e3 100644 --- a/examples/msg/dht-chord/dht-chord.c +++ b/examples/msg/dht-chord/dht-chord.c @@ -6,7 +6,6 @@ #include "simgrid/msg.h" #include "simgrid/modelchecker.h" #include -#include "src/mc/mc_replay.h" // FIXME: this is an internal header XBT_LOG_NEW_DEFAULT_CATEGORY(msg_chord, "Messages specific for this msg example"); diff --git a/examples/msg/platform-properties/platform-properties.c b/examples/msg/platform-properties/platform-properties.c index 47bde8cf15..375b03b72c 100644 --- a/examples/msg/platform-properties/platform-properties.c +++ b/examples/msg/platform-properties/platform-properties.c @@ -1,19 +1,10 @@ -/* Copyright (c) 2007-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ #include "simgrid/msg.h" -/** @addtogroup MSG_examples - * - * - User-defined properties: properties/properties.c Attaching arbitrary information to host, processes and - * such, and retrieving them with @ref MSG_host_get_properties, @ref MSG_host_get_property_value, - * @ref MSG_process_get_properties, and @ref MSG_process_get_property_value. Also make sure to read the platform and - * deployment XML files to see how to declare these data. - */ - XBT_LOG_NEW_DEFAULT_CATEGORY(test, "Property test"); static void test_host(const char*hostname) diff --git a/examples/msg/task-priority/task-priority.c b/examples/msg/task-priority/task-priority.c index cb463b712a..d852f521ea 100644 --- a/examples/msg/task-priority/task-priority.c +++ b/examples/msg/task-priority/task-priority.c @@ -1,5 +1,4 @@ -/* Copyright (c) 2007-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -7,13 +6,6 @@ #include "simgrid/msg.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); -/** @addtogroup MSG_examples - * - * @section msg_ex_misc Miscellaneous - * - Task priorities: task-priority/task-priority.c. This examples demonstrates the use of - * @ref MSG_task_set_priority to change the computation priority of a given task. - */ - static int test(int argc, char *argv[]) { double computation_amount = xbt_str_parse_double(argv[1], "Invalid argument: %s"); -- 2.20.1