X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/60894e585d7f494d9ad32afd452a57f8849ceff6..e40d8a3c090b9106352693e52ea61e63ecbbe93d:/doc/module-gras.doc diff --git a/doc/module-gras.doc b/doc/module-gras.doc index a43fec7b1a..2bf717ed3d 100644 --- a/doc/module-gras.doc +++ b/doc/module-gras.doc @@ -5,7 +5,7 @@ /** \addtogroup GRAS_API \section GRAS_funct Offered functionnalities - - Communication facilities: Exchanging messages between peers + - \ref GRAS_comm: Exchanging messages between peers - \ref GRAS_dd : any data which may transit on the network must be described beforehand so that GRAS can handle the platform heterogeneity and convert them if needed. @@ -17,7 +17,7 @@ - \ref GRAS_timer : this is how to program repetitive and delayed tasks, not unlike cron(8) and at(1). This cannot be used to timeout a function (like setitimer(2) or signal(2) games could do). - - Virtualization: Running both on top of the simulator and on + - \ref GRAS_run: Running both on top of the simulator and on top of real platforms, and portability support. - \ref GRAS_virtu : You naturally don't want to call the gettimeofday(2) function in simulation mode since it would give @@ -31,7 +31,7 @@ - \ref GRAS_emul : Support to emulate code excution (ie, reporting execution time into the simulator and having code sections specific to simulation or to real mode). - - Project management tools: Here are some tools which may help + - \ref GRAS_code: Here are some tools which may help you setting up a GRAS project.\n Setting up and building a GRAS application is complicated by the library schizoid. The code to setup the environment differs @@ -52,12 +52,40 @@ - \ref GRAS_ex_ping - \ref GRAS_ex_mmrpc - \ref GRAS_ex_timer - + + @{ */ + /** @defgroup GRAS_comm Communication facilities */ + /** @defgroup GRAS_run Virtualization */ + /** @defgroup GRAS_code Project and code management */ + /** @defgroup GRAS_ex Examples */ +/** @} */ +##################################################################### +/** @addtogroup GRAS_comm + + Here are the communication facilities. GRAS allows you to exchange + messages on sockets (which can be seen as pipes between + processes). On reception, messages start callbacks (that's the + default communication mode, not the only one). All messages of a given + type convey the same kind of data, and you have to describe it + beforehand. + + Timers are also seen as a mean of communication (with yourself). It + allows you to run a repetitive task ("do this every N second until I tell + you to stop"), or to deffer a treatment ("do this in 3 sec"). + @{ */ /** @defgroup GRAS_dd Data description */ /** @defgroup GRAS_sock Sockets */ /** @defgroup GRAS_msg Messages */ /** @defgroup GRAS_timer Timers */ + +/** @} */ +##################################################################### +/** @addtogroup GRAS_run + + Virtualization facilities allow your code to run both on top of the simulator or in real setting. + + @{ */ /** @defgroup GRAS_globals Globals */ /** @defgroup GRAS_emul Emulation support */ @@ -65,6 +93,42 @@ /** @} */ +##################################################################### +/** @addtogroup GRAS_code + + Here is how to setup your code when you want to use GRAS. You will also + learn how to get the most repetitive parts of your code generated + automatically. + + (use the tabs on top of the page to navigate) + + \htmlonly \endhtmlonly +*/ + +##################################################################### +/** @addtogroup GRAS_ex + + There is for now rather few examples of GRAS, but it's better than + nothing, isn't it? + + - \ref GRAS_ex_ping + - \ref GRAS_ex_mmrpc + - \ref GRAS_ex_timer + + \htmlonly \endhtmlonly + + There is some more examples in the distribution, under the directory + examples/gras. +*/ + ##################################################################### ######################### EXTRA PAGES ############################## ##################################################################### @@ -73,9 +137,7 @@ --------------------- main() generation ----------------------------- --------------------------------------------------------------------- -/** \page GRAS_main_generation main() and GRAS - -
[\ref GRAS_API]
+/** \page GRAS_main_generation main function \section GRAS_maingen_toc Table of content @@ -151,9 +213,7 @@ ------------------------- Compiling --------------------------------- --------------------------------------------------------------------- -/** \page GRAS_compile Compiling your GRAS project - -
[\ref GRAS_API]
+/** \page GRAS_compile Compiling your project As explained in section \ref GRAS_main_generation, the gras_stub_generator tool can be used to generate the system @@ -251,8 +311,6 @@ /** \page GRAS_ex_ping The classical Ping-Pong in GRAS -
[\ref GRAS_API]
- This example implements the very classical ping-pong in GRAS. It involves a client (initiating the ping-pong) and a server (answering to client's requests). @@ -357,8 +415,6 @@ /** \page GRAS_ex_mmrpc A simple RPC for matrix multiplication -
[\ref GRAS_API]
- This example implements a remote matrix multiplication. It involves a client (creating the matrices and sending the multiplications requests) and a server (computing the multiplication on client's behalf). @@ -407,7 +463,7 @@ The messages involved in this example do use structures as payload, so we have to declare it to GRAS. Hopefully, this can be done easily by enclosing - the structure declaration within a GRAS_DEFINE macro call. It will then copy this + the structure declaration within a \ref GRAS_DEFINE_TYPE macro call. It will then copy this declaration into an hidden string variable, which can be automatically parsed at run time. Of course, the declaration is also copied unmodified by this macro, so that it gets parsed by the compiler also. @@ -424,14 +480,14 @@ imply. If you want to use it yourself, you'd better use the exact right syntax, which is detailed in the \ref GRAS_dd section. - \skip GRAS_DEFINE + \skip GRAS_DEFINE_TYPE \until matrix_t \subsection GRAS_ex_mmrpc_msgregister 1.c) Register the messages This function, called by both the client and the server is in charge of declaring the existing messages to GRAS. Note the use of the \ref gras_datadesc_by_symbol - function to parse and retrieve the structure declaration which were passed to \ref GRAS_DEFINE + function to parse and retrieve the structure declaration which were passed to \ref GRAS_DEFINE_TYPE above. The datatype description builded that way can then be used to build an array datatype or @@ -486,8 +542,6 @@ /** \page GRAS_ex_timer Some timer games -
[\ref GRAS_API]
- This example fools around with the GRAS timers (\ref GRAS_timer). It is mainly a regression test, since it uses almost all timer features.