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 /********************************* Link **************************************/
34 char *name; /* link name if any */
35 void *simdata; /* simulator data */
36 void *data; /* user data */
39 /** \brief Link datatype
40 \ingroup m_datatypes_management
42 A <em>link</em> is an agglomeration of communicating resources
43 representing a set of physical network links.
45 \see m_link_management
47 typedef struct s_m_link *m_link_t;
49 /********************************* Task **************************************/
52 char *name; /* host name if any */
53 void *simdata; /* simulator data */
54 void *data; /* user data */
56 /** \brief Task datatype
57 \ingroup m_datatypes_management
59 A <em>task</em> may then be defined by a <em>computing
60 amount</em>, a <em>message size</em> and some <em>private
62 \see m_task_management
64 typedef struct s_m_task *m_task_t;
66 /** \brief Default value for an uninitialized #m_task_t.
67 \ingroup m_datatypes_management
69 #define MSG_TASK_UNINITIALIZED NULL
70 /******************************* Process *************************************/
73 char *name; /* process name if any */
74 void *simdata; /* simulator data */
75 void *data; /* user data */
77 /** \brief Agent datatype
78 \ingroup m_datatypes_management
79 An agent may be defined as a <em>code</em>, with some <em>private
80 data</em>, executing in a <em>location</em>.
81 \see m_process_management
83 typedef struct s_m_process *m_process_t;
84 /** \brief Agent code datatype
85 \ingroup m_datatypes_management
86 The code of an agent is a m_process_code_t, i.e. a function with no arguments
88 \see m_process_management
90 typedef int(*m_process_code_t)(int argc,char *argv[]) ;
92 /********************************** Channel **********************************/
93 /** \brief Channel datatype
94 \ingroup m_datatypes_management
95 A <em>channel</em> is a number and identifies a mailbox type (just as a
97 \see m_channel_management
99 typedef int m_channel_t;
101 /****************************** Error handling *******************************/
102 /** \brief Error handling
104 MSG_OK = 0, /**< Everything is right. Keep on going this way ! */
105 MSG_WARNING, /**< Mmmh! Something must be not perfectly clean. But I
106 may be a paranoid freak... ! */
107 MSG_TRANSFER_FAILURE, /**< There has been a problem during you task
108 transfer. Either the network is down or the remote host has been
110 MSG_HOST_FAILURE, /**< System shutdown. The host on which you are
111 running has just been rebooted. Free your datastructures and
113 MSG_FATAL /**< You've done something wrong. You'd better look at it... */
123 MSG_STORE_AND_FORWARD = 1, /* 0 means uninitialized value */