-/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#ifndef SURF_SURF_H
#define SURF_SURF_H
-#include "simgrid/datatypes.h"
#include "simgrid/forward.h"
#include "src/internal_config.h"
#include "xbt/config.h"
namespace simgrid {
namespace surf {
-class Model;
class CpuModel;
class HostModel;
class NetworkModel;
class StorageModel;
class NetworkCm02Link;
-class Action;
}
}
* Generic data structure for a model. The hosts,
* the CPUs and the network links are examples of models.
*/
-typedef simgrid::surf::Model* surf_model_t;
typedef simgrid::surf::CpuModel* surf_cpu_model_t;
typedef simgrid::surf::HostModel* surf_host_model_t;
typedef simgrid::surf::NetworkModel* surf_network_model_t;
typedef simgrid::surf::StorageModel* surf_storage_model_t;
-/** @ingroup SURF_c_bindings
- * \brief Action structure
- *
- * Never create s_surf_action_t by yourself ! The actions are created
- * on the fly when you call execute or communicate on a model.
- *
- * \see e_surf_action_state_t
- */
-typedef simgrid::surf::Action* surf_action_t;
SG_BEGIN_DECL()
/* Actions and models are highly connected structures... */
* @param model The model from which the action is extracted
* @return An action in done state
*/
-XBT_PUBLIC(surf_action_t) surf_model_extract_done_action_set(surf_model_t model);
+XBT_PUBLIC(simgrid::kernel::resource::Action*)
+surf_model_extract_done_action_set(simgrid::kernel::resource::Model* model);
/**
* @brief Pop an action from the failed actions set
* @param model The model from which the action is extracted
* @return An action in failed state
*/
-XBT_PUBLIC(surf_action_t) surf_model_extract_failed_action_set(surf_model_t model);
+XBT_PUBLIC(simgrid::kernel::resource::Action*)
+surf_model_extract_failed_action_set(simgrid::kernel::resource::Model* model);
/**
* @brief Get the size of the running action set of a model
* @param model The model
* @return The size of the running action set
*/
-XBT_PUBLIC(int) surf_model_running_action_set_size(surf_model_t model);
+XBT_PUBLIC(int) surf_model_running_action_set_size(simgrid::kernel::resource::Model* model);
/**
* @brief [brief description]
* @param action The surf cpu action
* @param bound [description]
*/
-XBT_PUBLIC(void) surf_cpu_action_set_bound(surf_action_t action, double bound);
-
-/**
- * @brief [brief description]
- * @details [long description]
- *
- * @param action The surf network action
- */
-XBT_PUBLIC(double) surf_network_action_get_latency_limited(surf_action_t action);
+XBT_PUBLIC(void) surf_cpu_action_set_bound(simgrid::kernel::resource::Action* action, double bound);
/** @} */
XBT_PUBLIC(void) parse_platform_file(const char* file);
/********** Tracing **********/
-/* from surf_instr.c */
-void TRACE_surf_action(surf_action_t surf_action, const char* category);
/* instr_routing.c */
void instr_routing_define_callbacks();
-int instr_platform_traced();
xbt_graph_t instr_routing_platform_graph();
void instr_routing_platform_graph_export_graphviz(xbt_graph_t g, const char* filename);