orca-sim
TimedModel.hpp
Go to the documentation of this file.
1 /******************************************************************************
2  * This file is part of project ORCA. More information on the project
3  * can be found at the following repositories at GitHub's website.
4  *
5  * http://https://github.com/andersondomingues/orca-sim
6  * http://https://github.com/andersondomingues/orca-software
7  * http://https://github.com/andersondomingues/orca-mpsoc
8  * http://https://github.com/andersondomingues/orca-tools
9  *
10  * Copyright (C) 2018-2020 Anderson Domingues, <ti.andersondomingues@gmail.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License along
23  * with this program; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 ******************************************************************************/
26 #ifndef ORCASIM_BASE_INCLUDE_TIMEDMODEL_HPP_
27 #define ORCASIM_BASE_INCLUDE_TIMEDMODEL_HPP_
28 
29 #include <string>
30 
31 // own api includes
32 #include "Model.hpp"
33 #include "SimulationTime.hpp"
34 
35 namespace orcasim::base {
36 
42 class TimedModel : public Model{
43  public:
45  explicit TimedModel(std::string name);
46 
50  virtual SimulationTime Run() = 0;
51 
54  virtual ~TimedModel() = 0;
55 
59  virtual void Reset() = 0;
60 };
61 
62 } // namespace orcasim::base
63 #endif // ORCASIM_BASE_INCLUDE_TIMEDMODEL_HPP_
This class models a TimedModel.
Definition: TimedModel.hpp:42
Models a generic hardware model.
Definition: Model.hpp:40
TimedModel(std::string name)
Default Ctor.
Definition: TimedModel.cpp:31
uint32_t SimulationTime
virtual void Reset()=0
Resets the instance to its starting state.
virtual ~TimedModel()=0
Dtor.
Definition: TimedModel.cpp:35
virtual SimulationTime Run()=0
Method which is called by the simulator when during the execution of the TimedModel.