3 /* Copyright (c) 2002,2003,2004 Arnaud Legrand. All rights reserved. */
5 /* This program is free software; you can redistribute it and/or modify it
6 * under the terms of the license (GNU LGPL) which comes with this package. */
11 /********************************* Host **************************************/
14 char *name; /* host name if any */
15 void *simdata; /* simulator data */
16 void *data; /* user data */
18 /** \brief Host datatype
19 \ingroup m_datatypes_management
21 A <em>location</em> (or <em>host</em>) is any possible place where
22 a process may run. Thus it is represented as a <em>physical
23 resource with computing capabilities</em>, some <em>mailboxes</em>
24 to enable running process to communicate with remote ones, and
25 some <em>private data</em> that can be only accessed by local
28 \see m_host_management
30 typedef struct s_m_host *m_host_t;
32 /********************************* Task **************************************/
35 char *name; /* host name if any */
36 void *simdata; /* simulator data */
37 void *data; /* user data */
39 /** \brief Task datatype
40 \ingroup m_datatypes_management
42 A <em>task</em> may then be defined by a <em>computing
43 amount</em>, a <em>message size</em> and some <em>private
45 \see m_task_management
47 typedef struct s_m_task *m_task_t;
49 /** \brief Default value for an uninitialized #m_task_t.
50 \ingroup m_datatypes_management
52 #define MSG_TASK_UNINITIALIZED NULL
53 /******************************* Process *************************************/
56 char *name; /* process name if any */
57 void *simdata; /* simulator data */
58 void *data; /* user data */
60 /** \brief Agent datatype
61 \ingroup m_datatypes_management
62 An agent may be defined as a <em>code</em>, with some <em>private
63 data</em>, executing in a <em>location</em>.
64 \see m_process_management
66 typedef struct s_m_process *m_process_t;
67 /** \brief Agent code datatype
68 \ingroup m_datatypes_management
69 The code of an agent is a m_process_code_t, i.e. a function with no arguments
71 \see m_process_management
73 typedef int(*m_process_code_t)(int argc,char *argv[]) ;
75 /********************************** Channel **********************************/
76 /** \brief Channel datatype
77 \ingroup m_datatypes_management
78 A <em>channel</em> is a number and identifies a mailbox type (just as a
80 \see m_channel_management
82 typedef int m_channel_t;
84 /****************************** Error handling *******************************/
85 /** \brief Error handling
87 MSG_OK = 0, /**< Everything is right. Keep on going this way ! */
88 MSG_WARNING, /**< Mmmh! Something must be not perfectly clean. But I
89 may be a paranoid freak... ! */
90 MSG_TRANSFER_FAILURE, /**< There has been a problem during you task
91 transfer. Either the network is down or the remote host has been
93 MSG_HOST_FAILURE, /**< System shutdown. The host on which you are
94 running has just been rebooted. Free your datastructures and
96 MSG_FATAL /**< You've done something wrong. You'd better look at it... */
106 MSG_STORE_AND_FORWARD = 1, /* 0 means uninitialized value */
110 /************************ deprecated *****************************************/
111 /* /\********************************* Link **************************************\/ */
112 /* struct s_m_link { */
113 /* char *name; /\* link name if any *\/ */
114 /* void *simdata; /\* simulator data *\/ */
115 /* void *data; /\* user data *\/ */
118 /* /\** \brief Link datatype */
119 /* \ingroup m_datatypes_management */
121 /* A <em>link</em> is an agglomeration of communicating resources */
122 /* representing a set of physical network links. */
124 /* \see m_link_management */
126 /* typedef struct s_m_link *m_link_t; */