Transaction-Level Modeling Framework for Space Applications
#include <sr_signal_in.h>
Public Types | |
typedef void(MODULE::* | t_callback )(const TYPE &value, const sc_core::sc_time &time) |
Public Member Functions | |
signal_in (sc_core::sc_module_name mn=NULL) | |
signal_in (t_callback callback, sc_core::sc_module_name mn=NULL) | |
virtual | ~signal_in () |
Virtual destructor. More... | |
virtual void | bind (signal_out_bind_if< TYPE > &sender, const uint32_t &channel=0) |
virtual void | update (signal_out_if< TYPE > *sender, const sc_core::sc_time &time) |
virtual | operator TYPE () const |
Gets the current signal value. More... | |
virtual void | operator() (signal_out_bind_if< TYPE > &sender) |
Public Member Functions inherited from sr_signal::signal_base< TYPE, MODULE > | |
signal_base (sc_core::sc_module_name mn=NULL) | |
Default constructor. More... | |
virtual | ~signal_base () |
Public Member Functions inherited from sr_signal::signal_in_if< TYPE > | |
virtual | ~signal_in_if () |
Virtual destructor. More... | |
Public Member Functions inherited from sr_signal::signal_if< TYPE > | |
virtual | ~signal_if () |
Virtual destructor. More... | |
virtual const TYPE & | read () |
Read the current signal value. More... | |
operator TYPE () const | |
Call operator to get the current signal value. More... | |
bool | operator== (const TYPE &t) const |
Comparing the current signal value with a variable of the same type TYPE. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from sr_signal::signal_base< TYPE, MODULE > | |
virtual MODULE * | get_module () |
Protected Attributes inherited from sr_signal::signal_if< TYPE > | |
TYPE | m_value |
The signal value. More... | |
sr_signal input signal. This class implements a TLM Signal abstraction of an incomming signal. The signal stores the value and can execute a callback.
typedef void(MODULE::* sr_signal::signal_in< TYPE, MODULE >::t_callback)(const TYPE &value, const sc_core::sc_time &time) |
Input signal callback type. The callback has two parameter.
value | The new value of the signal. |
time | The delay from sc_timestamp() of the propagation. |
|
inline |
Constructor without callback.
mn | Signal name. |
|
inline |
Constructor with callback.
callback | A base class function which gets executed every time the value is chaned. |
mn | Signal name. |
|
inlinevirtual |
Virtual destructor.
|
inlinevirtual |
Input signal bind method. This method implements the binding mechanism with an output signal.
sender | Output interface to bind with. |
channel | The channel which has to be bind. |
Implements sr_signal::signal_in_if< TYPE >.
Referenced by sr_signal::connect(), and sr_signal::signal_in< TYPE, MODULE >::operator()().
|
inlinevirtual |
Gets the current signal value.
References sr_signal::signal_if< TYPE >::m_value.
|
inlinevirtual |
Bind the input signal to an output signal. Calls both bind methods.
sender | The output signal. |
References sr_signal::signal_in< TYPE, MODULE >::bind(), and sr_signal::signal_out_bind_if< TYPE >::bind().
|
inlinevirtual |
This method implements the update meachnism. It sets the new value and calls the callback if needed.
sender | Which calls update. |
time | Delay from sc_timestamp() after which the signal is set. |
Implements sr_signal::signal_in_if< TYPE >.
References sr_signal::signal_base< TYPE, MODULE >::get_module(), sr_signal::signal_if< TYPE >::m_value, and sr_signal::signal_if< TYPE >::read().