#include <UppaalInterpreter.h>
Public Member Functions | |
UppaalInterpreter (DREAM::System *system_ptr) | |
Constructor. | |
~UppaalInterpreter () | |
Destructor. | |
void | visitor_uppaal (char *outputFile) |
Generates the Uppaal XML system description. | |
void | visitor_uppaaltemplate (char *outputFile) |
Generates the Uppaal XML templates. | |
Private Member Functions | |
std::string | create_fixedpriority_guard (NODE_MAP *node_map, std::string scheduler_id, const DREAM::Node *const node) |
Creates guard condition to model fixed-priority scheduling based on priorities. | |
bool | highestpriority (DREAM::Node *task_ptr) |
Determines whether the Task is the highest priority Task in the Scheduler. | |
bool | lowestpriority (DREAM::Node *task_ptr) |
Determines whether the Task is the lowest priority Task in the Scheduler. | |
Private Attributes | |
DREAM::System * | system_ptr_ |
Pointer to store the DREAM system. | |
std::string | filename_ |
String storing the name of the generated file. |
Definition at line 60 of file UppaalInterpreter.h.
DREAM::UppaalInterpreter::UppaalInterpreter | ( | DREAM::System * | system_ptr | ) |
Constructor.
system_ptr | is the pointer to the system to be output. |
Definition at line 56 of file UppaalInterpreter.cpp.
DREAM::UppaalInterpreter::~UppaalInterpreter | ( | ) |
void DREAM::UppaalInterpreter::visitor_uppaal | ( | char * | outputFile | ) |
Generates the Uppaal XML system description.
It uses the visitor pattern to get the data from the DREAM models.
outputFile | specifies the output file to be generated. |
Definition at line 111 of file UppaalInterpreter.cpp.
Referenced by main().
void DREAM::UppaalInterpreter::visitor_uppaaltemplate | ( | char * | outputFile | ) |
Generates the Uppaal XML templates.
It uses the visitor pattern to get the data from the DREAM models.
outputFile | specifies the output file to be generated. |
Definition at line 190 of file UppaalInterpreter.cpp.
Referenced by main().
std::string DREAM::UppaalInterpreter::create_fixedpriority_guard | ( | NODE_MAP * | node_map, | |
std::string | scheduler_id, | |||
const DREAM::Node *const | node | |||
) | [private] |
Creates guard condition to model fixed-priority scheduling based on priorities.
node_map | contains the Nodes in the Scheduler. | |
scheduler_id | specifies the Scheduler id. | |
node | is used to calculate the priority level used in the guard. |
Definition at line 65 of file UppaalInterpreter.cpp.
References DREAM::Node::id(), DREAM::Node::priority(), and DREAM::Node::subpriority().
bool DREAM::UppaalInterpreter::highestpriority | ( | DREAM::Node * | task_ptr | ) | [private] |
Determines whether the Task is the highest priority Task in the Scheduler.
Used to reduce state space caused by preemptions.
task_ptr | is a pointer to the Task to be checked. |
Definition at line 101 of file UppaalInterpreter.cpp.
References DREAM::Scheduler::highestpriority(), and DREAM::Node::scheduler().
bool DREAM::UppaalInterpreter::lowestpriority | ( | DREAM::Node * | task_ptr | ) | [private] |
Determines whether the Task is the lowest priority Task in the Scheduler.
Used to reduce state space caused by preemptions.
task_ptr | is a pointer to the Task to be checked. |
Definition at line 106 of file UppaalInterpreter.cpp.
References DREAM::Scheduler::lowestpriority(), and DREAM::Node::scheduler().
std::string DREAM::UppaalInterpreter::filename_ [private] |