orca-sim
Public Member Functions | List of all members
orcasim::base::TimedModel Class Referenceabstract

This class models a TimedModel. More...

#include <TimedModel.hpp>

Inheritance diagram for orcasim::base::TimedModel:
orcasim::base::Model orcasim::modeling::ProcessorBase< T > orcasim::models::hermes::HermesRouter orcasim::models::orca::DmaNetif orcasim::models::orca::NetBridge orcasim::gdbrsp::GdbProcessorBase< T >

Public Member Functions

 TimedModel (std::string name)
 Default Ctor. More...
 
virtual SimulationTime Run ()=0
 Method which is called by the simulator when during the execution of the TimedModel. More...
 
virtual ~TimedModel ()=0
 Dtor. More...
 
virtual void Reset ()=0
 Resets the instance to its starting state. More...
 
a name that identifies the model, advisably not empty.

Default ctor.

std::string GetName ()
 Getter method for the <_name> field. More...
 
void SetName (std::string s)
 Setter method for the <_name> field. More...
 

Detailed Description

This class models a TimedModel.

In this project, a TimedModel is an abstraction which can execute an action in a given point in time. For example, hardware can be modeled as TimedModeles that execute cycles given some period.

Definition at line 42 of file TimedModel.hpp.

Constructor & Destructor Documentation

§ TimedModel()

TimedModel::TimedModel ( std::string  name)
explicit

Default Ctor.

Definition at line 31 of file TimedModel.cpp.

31  : Model(name) {
32  // nothing to do
33 }
Model(std::string name)
Definition: Model.cpp:30

§ ~TimedModel()

TimedModel::~TimedModel ( )
pure virtual

Dtor.

Must be implemented by subclasses.

Definition at line 35 of file TimedModel.cpp.

35  {
36  // nothing to do
37 }

Member Function Documentation

§ GetName()

std::string Model::GetName ( )
inherited

Getter method for the <_name> field.

Definition at line 34 of file Model.cpp.

34  {
35  return _name;
36 }
std::string _name
A name for the model.
Definition: Model.hpp:47

§ Reset()

virtual void orcasim::base::TimedModel::Reset ( )
pure virtual

Resets the instance to its starting state.

Must be implemented by subclasses

Implemented in orcasim::models::orca::NetBridge, orcasim::models::orca::DmaNetif, and orcasim::models::hermes::HermesRouter.

§ Run()

virtual SimulationTime orcasim::base::TimedModel::Run ( )
pure virtual

Method which is called by the simulator when during the execution of the TimedModel.

Must be implemented by subclasses.

Implemented in orcasim::models::orca::NetBridge, orcasim::models::orca::DmaNetif, orcasim::models::hermes::HermesRouter, orcasim::modeling::ProcessorBase< T >, and orcasim::gdbrsp::GdbProcessorBase< T >.

§ SetName()

void Model::SetName ( std::string  s)
inherited

Setter method for the <_name> field.

Parameters
sValue to be set

Definition at line 38 of file Model.cpp.

38  {
39  _name = name;
40 }
std::string _name
A name for the model.
Definition: Model.hpp:47

The documentation for this class was generated from the following files: