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 **************************************/
13 typedef struct sim_data_host *sim_data_host_t;
14 typedef struct m_host {
15 char *name; /* host name if any */
16 sim_data_host_t simdata; /* simulator data */
17 void *data; /* user data */
19 /** \brief Host datatype
20 \ingroup m_datatypes_management
22 A <em>location</em> (or <em>host</em>) is any possible place where
23 a process may run. Thus it is represented as a <em>physical
24 resource with computing capabilities</em>, some <em>mailboxes</em>
25 to enable running process to communicate with remote ones, and
26 some <em>private data</em> that can be only accessed by local
29 \see m_host_management
31 typedef s_m_host_t *m_host_t;
33 /********************************* Task **************************************/
35 typedef struct sim_data_task *sim_data_task_t;
36 typedef struct m_task {
37 char *name; /* host name if any */
38 sim_data_task_t simdata; /* simulator data */
39 void *data; /* user data */
42 /** \brief Task datatype
43 \ingroup m_datatypes_management
45 A <em>task</em> may then be defined by a <em>computing
46 amount</em>, a <em>message size</em> and some <em>private
48 \see m_task_management
50 typedef s_m_task_t *m_task_t;
52 /** \brief Default value for an uninitialized #m_task_t.
53 \ingroup m_datatypes_management
55 #define MSG_TASK_UNINITIALIZED NULL
57 /******************************* Process *************************************/
58 typedef struct sim_data_process *sim_data_process_t;
59 typedef struct m_process {
60 char *name; /* process name if any */
61 sim_data_process_t simdata; /* simulator data */
62 void *data; /* user data */
64 /** \brief Agent datatype
65 \ingroup m_datatypes_management
66 An agent may be defined as a <em>code</em>, with some <em>private
67 data</em>, executing in a <em>location</em>.
68 \see m_process_management
70 typedef s_m_process_t *m_process_t;
71 /** \brief Agent code datatype
72 \ingroup m_datatypes_management
73 The code of an agent is a m_process_code_t, i.e. a function with no arguments
75 \see m_process_management
77 typedef int(*m_process_code_t)(int argc,char *argv[]) ;
79 /********************************** Channel **********************************/
80 /** \brief Channel datatype
81 \ingroup m_datatypes_management
82 A <em>channel</em> is a number and identifies a mailbox type (just as a
84 \see m_channel_management
86 typedef int m_channel_t;
88 /****************************** Error handling *******************************/
89 /** \brief Error handling
91 MSG_OK = 0, /**< Everything is right. Keep on going this way ! */
92 MSG_WARNING, /**< Mmmh! Something must be not perfectly clean. But I
93 may be a paranoid freak... ! */
94 MSG_TRANSFER_FAILURE, /**< There has been a problem during you task
95 transfer. Either the network is down or the remote host has been
97 MSG_HOST_FAILURE, /**< System shutdown. The host on which you are
98 running has just been rebooted. Free your datastructures and
100 MSG_FATAL /**< You've done something wrong. You'd better look at it... */
110 MSG_STORE_AND_FORWARD = 1, /* 0 means uninitialized value */
114 /************************ deprecated *****************************************/
115 /* /\********************************* Link **************************************\/ */
116 /* struct s_m_link { */
117 /* char *name; /\* link name if any *\/ */
118 /* void *simdata; /\* simulator data *\/ */
119 /* void *data; /\* user data *\/ */
122 /* /\** \brief Link datatype */
123 /* \ingroup m_datatypes_management */
125 /* A <em>link</em> is an agglomeration of communicating resources */
126 /* representing a set of physical network links. */
128 /* \see m_link_management */
130 /* typedef struct s_m_link *m_link_t; */