Commit a45bf390 authored by Steffen Lackner's avatar Steffen Lackner
Browse files

[code] Send configuration of time sharing to scheduler

parent d7bf6725
......@@ -46,6 +46,7 @@ void JsonProtocolWriter::append_requested_call(double date)
void JsonProtocolWriter::append_simulation_begins(Machines & machines,
const Document & configuration,
bool allow_time_sharing,
double date)
{
/* {
......@@ -63,6 +64,7 @@ void JsonProtocolWriter::append_simulation_begins(Machines & machines,
Value data(rapidjson::kObjectType);
data.AddMember("nb_resources", Value().SetInt(machines.nb_machines()), _alloc);
data.AddMember("allow_time_sharing", Value().SetBool(allow_time_sharing), _alloc);
data.AddMember("config", config, _alloc);
Value resources(rapidjson::kArrayType);
......
......@@ -78,6 +78,7 @@ public:
*/
virtual void append_simulation_begins(Machines & machines,
const rapidjson::Document & configuration,
bool allow_time_sharing,
double date) = 0;
/**
......@@ -196,6 +197,7 @@ public:
*/
void append_simulation_begins(Machines & machines,
const rapidjson::Document & configuration,
bool allow_time_sharing,
double date);
/**
......
......@@ -34,7 +34,9 @@ int server_process(int argc, char *argv[])
// Let's tell the Decision process that the simulation is about to begin
// (and that some data can be read from the data storage)
context->proto_writer->append_simulation_begins(context->machines,
context->config_file, MSG_get_clock());
context->config_file,
context->allow_time_sharing,
MSG_get_clock());
RequestReplyProcessArguments * req_rep_args = new RequestReplyProcessArguments;
req_rep_args->context = context;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment