#include <Task.h>
Inheritance diagram for DREAM::Channel:

Public Member Functions | |
| Channel (const std::string &id, DREAM::Thread *thread_ptr, uint delay, uint buffersize) | |
| Constructor. | |
| Channel (const std::string &id, DREAM::Thread *thread_ptr, uint delay, uint bcdelay, uint buffersize) | |
| Constructor. | |
| Channel (const DREAM::Channel &channel) | |
| Copy constructor for Channels. | |
| virtual | ~Channel () |
| Destructor. | |
| virtual void | add_dependent (DREAM::Node *node_ptr) throw (DREAM::Exception) |
| Adds a dependent Node to the current Channel. | |
| virtual uint | bcet () const |
| Returns the best case delay. | |
| virtual void | branching_point () |
| Sets the new execution time if branching points were found. | |
| virtual DREAM::Context | context () const |
| Returns whether the Channel uses the best case or worst case delay for the simulation. | |
| virtual void | context (DREAM::Context context) |
| Sets the Channel to use the specified context (e.g. | |
| virtual void | clock_exec_reset () |
| Reset execution clock value - clock_exec_. | |
| virtual void | clock_step (double clock_step) |
| Models the passing of time. | |
| virtual void | consume () |
| Consumes an event received from an event source. | |
| virtual bool | idle_dependents () const |
| Returns true if all the dependents are idle. | |
| virtual double | next_event () |
| Tells when the Channel will generate the next event. | |
| virtual void | next_et (double next_et) |
| Sets the next execution time when the context is branchingpoint. | |
| virtual void | publish () |
| Publishes an event to dependent tasks. | |
| virtual void | reset () |
| Resets Timer (when restarting the simulation). | |
| virtual void | take_transitions () |
| Takes state transitions. | |
| virtual void | visitor_map (DREAM::NODE_MAP *task_map, DREAM::NODE_MAP *channel_map, DREAM::NODE_MAP *timer_map) |
| This function fills the IDs (names) of tasks, channels and timers to the parameter lists. | |
| virtual void | visitor_uppaal (DREAM::NODE_MAP *task_map, DREAM::NODE_MAP *channel_map, DREAM::NODE_MAP *timer_map, std::ofstream &f_stream) |
| This function is part of the Uppaal system description generator. | |
| virtual uint | wcet () const |
| Returns delay_. | |
Private Types | |
| enum | State { idle, wait } |
| State of the Channel as specified by the DRE Semantic Domain. More... | |
Private Attributes | |
| uint | bcdelay_ |
| Best case delay. | |
| DREAM::Context | context_ |
| Specifies whether best case, worst case, or a random value is used for the execution time during the simulation. | |
| uint | buffer_ |
| Buffer of the event channel storing events. | |
| uint | buffersize_ |
| Specifies the size of the buffer. | |
| uint | delay_ |
| Worst case delay of the event channel. | |
| double | et_ |
| The execution time. | |
| double | next_et_ |
| The next execution time when the context is branchingpoint. | |
| DREAM::Node * | source_ptr_ |
| Reference to the event source. | |
| enum DREAM::Channel::State | state_ |
| State of the Channel as specified by the DRE Semantic Domain. | |
This class is the implementation of the Channel in the DRE Semantic Domain.
Definition at line 646 of file Task.h.
enum DREAM::Channel::State [private] |
| DREAM::Channel::Channel | ( | const std::string & | id, | |
| DREAM::Thread * | thread_ptr, | |||
| uint | delay, | |||
| uint | buffersize | |||
| ) |
Constructor.
| id | specifies the name of the event channel. | |
| thread_ptr | defines the mapping of the Channel to a platform processor. | |
| delay | is the delay of the event channel. | |
| buffersize | specifies the size of the event channel buffer. Use '0' for no limit. |
| DREAM::Channel::Channel | ( | const std::string & | id, | |
| DREAM::Thread * | thread_ptr, | |||
| uint | delay, | |||
| uint | bcdelay, | |||
| uint | buffersize | |||
| ) |
Constructor.
| id | specifies the name of the event channel. | |
| thread_ptr | defines the mapping of the Channel to a platform processor. | |
| delay | is the worst case delay of the event channel. | |
| bcdelay | is the best case delay of the event channel. | |
| buffersize | specifies the size of the event channel buffer. Use '0' for no limit. |
| DREAM::Channel::Channel | ( | const DREAM::Channel & | channel | ) |
| void DREAM::Channel::add_dependent | ( | DREAM::Node * | node_ptr | ) | throw (DREAM::Exception) [virtual] |
| uint DREAM::Channel::bcet | ( | ) | const [inline, virtual] |
Returns the best case delay.
bcet () name is used to provide a unique interface for DREAM::Node inherited classes.
Reimplemented from DREAM::Node.
| void DREAM::Channel::branching_point | ( | ) | [inline, virtual] |
Sets the new execution time if branching points were found.
Reimplemented from DREAM::Node.
Definition at line 928 of file Task.cpp.
References DREAM::bestcase, and DREAM::branchingpoint.
| DREAM::Context DREAM::Channel::context | ( | ) | const [inline, virtual] |
Returns whether the Channel uses the best case or worst case delay for the simulation.
Reimplemented from DREAM::Node.
| void DREAM::Channel::context | ( | DREAM::Context | context | ) | [inline, virtual] |
Sets the Channel to use the specified context (e.g.
in the simulation).
| context | is the context assumed. |
Reimplemented from DREAM::Node.
| void DREAM::Channel::clock_exec_reset | ( | ) | [inline, virtual] |
Reset execution clock value - clock_exec_.
Reimplemented from DREAM::Node.
Definition at line 945 of file Task.cpp.
References bcdelay_, DREAM::bestcase, DREAM::Node::clock_exec_, context_, delay_, et_, DREAM::random(), DREAM::randomcase, and DREAM::worstcase.
Referenced by reset().
| void DREAM::Channel::clock_step | ( | double | clock_step | ) | [inline, virtual] |
Models the passing of time.
Increments local clock clock_exec_.
| clock_step | specifies by how much do we have to increment the time. |
Reimplemented from DREAM::Node.
Definition at line 958 of file Task.cpp.
References bcdelay_, Option::branching_, DREAM::branchingpoint, buffer_, DREAM::Node::clock_exec_, context_, delay_, DREAM::Node::id_, next_et_, DREAM::System::relevant_event(), DREAM::Node::remote_dep_, DREAM::Thread::scheduler(), DREAM::Scheduler::system(), DREAM::Node::thread_ptr_, DREAM::Thread::trace(), and DREAM::worstcase.
| void DREAM::Channel::consume | ( | ) | [inline, virtual] |
Consumes an event received from an event source.
This function is called by the publish () function of the event source and triggers state transitions. The take_transitions () function will take the enabled transitions.
Reimplemented from DREAM::Node.
Definition at line 993 of file Task.cpp.
References DREAM::idle.
| bool DREAM::Channel::idle_dependents | ( | ) | const [inline, virtual] |
| double DREAM::Channel::next_event | ( | ) | [inline, virtual] |
Tells when the Channel will generate the next event.
Reimplemented from DREAM::Node.
Definition at line 1048 of file Task.cpp.
References buffer_, DREAM::Node::clock_exec_, et_, state_, and wait.
| void DREAM::Channel::next_et | ( | double | next_et | ) | [inline, virtual] |
| void DREAM::Channel::publish | ( | ) | [inline, virtual] |
Publishes an event to dependent tasks.
This function models synchronous event propagation by calling the consume () functions of all the dependent Nodes.
Reimplemented from DREAM::Node.
Definition at line 1071 of file Task.cpp.
References Option::verbose1_.
| void DREAM::Channel::reset | ( | ) | [inline, virtual] |
Resets Timer (when restarting the simulation).
Reimplemented from DREAM::Node.
Definition at line 1087 of file Task.cpp.
References buffer_, clock_exec_reset(), idle, and state_.
| void DREAM::Channel::take_transitions | ( | ) | [inline, virtual] |
Takes state transitions.
This function implements the state transitions of a Channel as specified by the DRE Semantic Domain. Transitions can be triggered by events coming from other Tasks, Timers or Schedulers.
Reimplemented from DREAM::Node.
Definition at line 1098 of file Task.cpp.
References DREAM::idle.
| void DREAM::Channel::visitor_map | ( | DREAM::NODE_MAP * | task_map, | |
| DREAM::NODE_MAP * | channel_map, | |||
| DREAM::NODE_MAP * | timer_map | |||
| ) | [virtual] |
This function fills the IDs (names) of tasks, channels and timers to the parameter lists.
The function is used to generate output for model checkers.
| task_map | stores the Task pointers. | |
| channel_map | stores the Channel pointers. | |
| timer_map | stores the Timer pointers. |
Reimplemented from DREAM::Node.
| void DREAM::Channel::visitor_uppaal | ( | DREAM::NODE_MAP * | task_map, | |
| DREAM::NODE_MAP * | channel_map, | |||
| DREAM::NODE_MAP * | timer_map, | |||
| std::ofstream & | f_stream | |||
| ) | [virtual] |
This function is part of the Uppaal system description generator.
| task_map | stores the Task pointers. | |
| channel_map | stores the Channel pointers. | |
| timer_map | stores the Timer pointers. | |
| f_stream | is the output stream to be written to. |
Reimplemented from DREAM::Node.
| uint DREAM::Channel::wcet | ( | ) | const [inline, virtual] |
Returns delay_.
wcet () name is used to provide a unique interface for DREAM::Node inherited classes.
Reimplemented from DREAM::Node.
uint DREAM::Channel::bcdelay_ [private] |
Best case delay.
This construct can be used to model event channels which have delays within a given interval.
Definition at line 818 of file Task.h.
Referenced by clock_exec_reset(), and clock_step().
DREAM::Context DREAM::Channel::context_ [private] |
Specifies whether best case, worst case, or a random value is used for the execution time during the simulation.
Definition at line 821 of file Task.h.
Referenced by clock_exec_reset(), and clock_step().
uint DREAM::Channel::buffer_ [private] |
Buffer of the event channel storing events.
Definition at line 824 of file Task.h.
Referenced by clock_step(), next_event(), and reset().
uint DREAM::Channel::buffersize_ [private] |
uint DREAM::Channel::delay_ [private] |
Worst case delay of the event channel.
Definition at line 832 of file Task.h.
Referenced by clock_exec_reset(), and clock_step().
double DREAM::Channel::et_ [private] |
The execution time.
This value is from the interval [bcet, wcet] and is set according to the context.
Definition at line 837 of file Task.h.
Referenced by clock_exec_reset(), and next_event().
double DREAM::Channel::next_et_ [private] |
The next execution time when the context is branchingpoint.
This value is from the interval [bcet, wcet].
Definition at line 843 of file Task.h.
Referenced by clock_step().
DREAM::Node* DREAM::Channel::source_ptr_ [private] |
enum DREAM::Channel::State DREAM::Channel::state_ [private] |
State of the Channel as specified by the DRE Semantic Domain.
Referenced by next_event(), and reset().
1.5.1