#include "xbt/graph.h"
#include "xbt/misc.h"
#include "xbt/config.h"
-#include "src/portable.h"
+#include "src/internal_config.h"
#include "surf/surf_routing.h"
#include "surf/datatypes.h"
#include "xbt/lib.h"
extern XBT_PRIVATE int sg_network_crosstraffic;
extern XBT_PRIVATE xbt_dynar_t surf_path;
-typedef enum {
- SURF_NETWORK_ELEMENT_HOST=1, /* host type */
- SURF_NETWORK_ELEMENT_ROUTER, /* router type */
- SURF_NETWORK_ELEMENT_AS /* AS type */
-} e_surf_network_element_type_t;
-
#ifdef __cplusplus
namespace simgrid {
class Action;
class ActionLmm;
class StorageActionLmm;
+}
+namespace routing {
class RoutingPlatf;
}
}
typedef simgrid::surf::Action surf_Action;
typedef simgrid::surf::ActionLmm surf_ActionLmm;
typedef simgrid::surf::StorageActionLmm surf_StorageActionLmm;
-typedef simgrid::surf::RoutingPlatf surf_RoutingPlatf;
+typedef simgrid::routing::RoutingPlatf surf_RoutingPlatf;
#else
/** \brief Resource model description
*/
-typedef struct surf_model_description {
+struct surf_model_description {
const char *name;
const char *description;
void_f_void_t model_init_preparse;
-} s_surf_model_description_t, *surf_model_description_t;
+};
+typedef struct surf_model_description s_surf_model_description_t;
+typedef struct surf_model_description* surf_model_description_t;
XBT_PUBLIC(int) find_model_description(s_surf_model_description_t * table, const char *name);
XBT_PUBLIC(void) model_help(const char *category, s_surf_model_description_t * table);
-/** @ingroup SURF_interface
- * @brief Action states
- *
- * @see Action
- */
-typedef enum {
- SURF_ACTION_READY = 0, /**< Ready */
- SURF_ACTION_RUNNING, /**< Running */
- SURF_ACTION_FAILED, /**< Task Failure */
- SURF_ACTION_DONE, /**< Completed */
- SURF_ACTION_TO_FREE, /**< Action to free in next cleanup */
- SURF_ACTION_NOT_IN_THE_SYSTEM /**< Not in the system anymore. Why did you ask ? */
-} e_surf_action_state_t;
-
-/** @ingroup SURF_vm_interface
- *
- *
- */
+/** @ingroup SURF_vm_interface */
/* FIXME: Where should the VM state be defined? */
typedef enum {
SURF_VM_STATE_CREATED, /**< created, but not yet started */
*/
XBT_PUBLIC(surf_action_t) surf_network_model_communicate(surf_network_model_t model, sg_host_t src, sg_host_t dst, double size, double rate);
-/**
- * @brief Get the name of a surf resource (cpu, host, network, …)
- *
- * @param resource The surf resource
- * @return The name of the surf resource
- */
-XBT_PUBLIC(const char * ) surf_resource_name(surf_cpp_resource_t resource);
-
-/** @brief Get the available speed of cpu associated to a host */
-XBT_PUBLIC(double) surf_host_get_available_speed(sg_host_t host);
-
/** @brief Create a sleep action on the given host */
XBT_PUBLIC(surf_action_t) surf_host_sleep(sg_host_t host, double duration);
XBT_PUBLIC(surf_action_t) surf_host_write(sg_host_t host, surf_file_t fd, sg_size_t size);
/**
- * @brief Get the informations of a file descriptor
+ * @brief Get the information of a file descriptor
* @details The returned xbt_dynar_t contains:
* - the size of the file,
* - the mount point,
*
* @param host The surf host
* @param fd The file descriptor
- * @return An xbt_dynar_t with the file informations
+ * @return An xbt_dynar_t with the file information
*/
XBT_PUBLIC(xbt_dynar_t) surf_host_get_info(sg_host_t host, surf_file_t fd);
/* Implementations of model object */
/**************************************/
-XBT_PUBLIC_DATA(int) autoload_surf_cpu_model;
XBT_PUBLIC_DATA(void_f_void_t) surf_cpu_model_init_preparse;
/** \ingroup SURF_models
*/
XBT_PUBLIC(void) surf_network_model_init_CM02(void);
-#ifdef HAVE_NS3
+#if HAVE_NS3
/** \ingroup SURF_models
* \brief Initializes the platform with the network model NS3
*