22 #ifndef QOS_MANAGEMENT_H
23 #define QOS_MANAGEMENT_H
30 #define FOUT if(generate_logfile()) (*fout)
44 TRACE_VAR_SC_BIGINT_PTR(QoS_var, TRACE_LV_SIZE);
49 sc_spawn_options method_options;
50 sc_spawn(sc_bind(&QoS_management::QoS_common_thread,
this, services.
getApplications().size(), Monitoring::thread_number++),
"Dynamic_process_QoS_common", &method_options);
54 sc_spawn_options method_options;
55 string process_name(
"Dynamic_process_QoS_");
58 process_name.append(out.str());
60 sc_spawn(sc_bind(&QoS_management::QoS_application_thread,
this, i, services.
getApplications().at(i), Monitoring::thread_number++), process_name.c_str(), &method_options);
71 TRACE_VAR_SC_BIGINT_ALLOCATE(QoS_var, TRACE_LV_SIZE, ApplicationNumber);
75 QOS_APPLICATION_ACTIVATE {
78 QoS_var[applicationID] = 0;
81 QOS_TRACE(QoS_var[applicationID], application.getName() +
".QoS_var", unsigned);
91 cout <<
"Start common application " << endl;
97 cout <<
"NEVER common application " << endl;
109 QOS_APPLICATION_THREAD {
114 int current_hyperperiod = 0;
116 cout <<
"Start application " << application.getName() << endl;
118 wait(application.getGlobalOffset());
124 string hpid_str(Utils::itoa(++current_hyperperiod));
125 QoS_var[applicationID] = ((sc_bigint<TRACE_LV_SIZE>) Utils::string_to_ascii(
"Hyperperiod ") << (hpid_str.size() * 8))
126 + Utils::string_to_ascii(hpid_str);
128 wait(application.getGlobalHypeperiod());
130 cout <<
"QoS check ME for application " << application.getName() << endl;
132 FOUT << sc_time_stamp() <<
": " << name() <<
": QoS check ME for application " << application.getName() << endl;
133 application.checkQoSOnHyperperiod();
Definition: qos_management.h:32
Definition: qos_interface.h:40
virtual vector< Application > & getApplications()=0
Get the list of application(s)