- Started code for printing the state of the scheduling - Fixed a bug in the copy constructor of DynamicThread git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@794 3ecf2c5c-341e-0410-92b4-d18e462d057c
71 lines
1.6 KiB
C++
71 lines
1.6 KiB
C++
// src/frontend/concrete_simulation.hh - Copyright 2005, 2006, University
|
|
// of Padova, dept. of Pure and Applied
|
|
// Mathematics
|
|
//
|
|
// This file is part of SGPEMv2.
|
|
//
|
|
// This is free software; you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation; either version 2 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// SGPEMv2 is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
// GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License
|
|
// along with SGPEMv2; if not, write to the Free Software
|
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
#ifndef CONCRETE_SIMULATION_HH
|
|
#define CONCRETE_SIMULATION_HH 1
|
|
|
|
#include "simulation.hh"
|
|
#include "concrete_history.hh"
|
|
|
|
namespace sgpem
|
|
{
|
|
class ConcreteSimulation;
|
|
|
|
class ConcreteSimulation : public Simulation
|
|
{
|
|
public:
|
|
ConcreteSimulation();
|
|
|
|
void run() throw(UserInterruptException, NullPolicyException);
|
|
|
|
void pause();
|
|
|
|
void stop();
|
|
|
|
void set_timer(const unsigned int);
|
|
|
|
int get_timer() const;
|
|
|
|
void set_mode(const bool&);
|
|
|
|
bool get_mode() const;
|
|
|
|
state get_state() const;
|
|
|
|
void set_policy(Policy*);
|
|
|
|
ConcreteHistory& get_history();
|
|
|
|
Policy* get_policy();
|
|
|
|
private:
|
|
state _state;
|
|
bool _mode;
|
|
int _timer_interval;
|
|
ConcreteHistory _history;
|
|
Policy* _policy;
|
|
};
|
|
|
|
}
|
|
|
|
|
|
#endif
|
|
|