#include "lua_private.hpp"
#include "simgrid/kernel/routing/NetPoint.hpp"
+#include "src/kernel/resource/profile/Profile.hpp"
#include "src/surf/network_interface.hpp"
+#include "src/surf/surf_private.hpp"
#include "src/surf/xml/platf_private.hpp"
-#include <cctype>
-#include <cstring>
-#include <lauxlib.h>
-
-#include "src/surf/surf_private.hpp"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <simgrid/s4u/Engine.hpp>
#include <simgrid/s4u/Host.hpp>
+
+#include <cctype>
+#include <cstring>
#include <string>
#include <vector>
+#include <lauxlib.h>
+
XBT_LOG_NEW_DEFAULT_CATEGORY(lua_platf, "Lua bindings (platform module)");
-#define PLATF_MODULE_NAME "simgrid.engine"
-#define AS_FIELDNAME "__simgrid_as"
+constexpr char PLATF_MODULE_NAME[] = "simgrid.engine";
+constexpr char AS_FIELDNAME[] = "__simgrid_as";
/* ********************************************************************************* */
/* simgrid.platf API */
lua_gettable(L, -2);
const char *filename = lua_tostring(L, -1);
if (filename)
- host.speed_trace = tmgr_trace_new_from_file(filename);
+ host.speed_trace = simgrid::kernel::profile::Profile::from_file(filename);
lua_pop(L, 1);
//get trace state
lua_gettable(L, -2);
filename = lua_tostring(L, -1);
if (filename)
- host.state_trace = tmgr_trace_new_from_file(filename);
+ host.state_trace = simgrid::kernel::profile::Profile::from_file(filename);
lua_pop(L, 1);
sg_platf_new_host(&host);
lua_gettable(L, -2);
const char *filename = lua_tostring(L, -1);
if (filename)
- link.bandwidth_trace = tmgr_trace_new_from_file(filename);
+ link.bandwidth_trace = simgrid::kernel::profile::Profile::from_file(filename);
lua_pop(L, 1);
//get latency_trace value
lua_gettable(L, -2);
filename = lua_tostring(L, -1);
if (filename)
- link.latency_trace = tmgr_trace_new_from_file(filename);
+ link.latency_trace = simgrid::kernel::profile::Profile::from_file(filename);
lua_pop(L, 1);
//get state_trace value
lua_gettable(L, -2);
filename = lua_tostring(L, -1);
if (filename)
- link.state_trace = tmgr_trace_new_from_file(filename);
+ link.state_trace = simgrid::kernel::profile::Profile::from_file(filename);
lua_pop(L, 1);
//get policy value