Transaction-Level Modeling Framework for Space Applications
#include <sr_signal_infield.h>
Public Types | |
typedef void(MODULE::* | t_callback )(const TYPE &value, const uint32_t &channel, const sc_core::sc_time &time) |
Public Member Functions | |
signal_infield (sc_core::sc_module_name mn=NULL) | |
signal_infield (t_callback callback, sc_core::sc_module_name mn=NULL) | |
virtual | ~signal_infield () |
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) |
TYPE | read (const uint32_t &channel) const |
TYPE | read (const uint32_t &channel, const TYPE &default_value) const |
TYPE | operator[] (const uint32_t &channel) const |
Gets the value of a specific channel. More... | |
void | operator() (signal_out_bind_if< TYPE > &sender, uint32_t channel) |
Connect the infield with an output on a specific channel. More... | |
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... | |
This signal is an input signal which can be connected to multiple output signals. But altered from the input signal the infield has knowlage about the source of the arriving signal. Each output signal can be bound to a infield channel. Each hannel has its own value and the callback method can identiefy the seender.
typedef void(MODULE::* sr_signal::signal_infield< TYPE, MODULE >::t_callback)(const TYPE &value, const uint32_t &channel, const sc_core::sc_time &time) |
Callback method type The callback method must be a function with 3 parameters:
value | The new value of the signal. |
channel | The input channel of the signal. |
time | The delay of the signal. |
|
inline |
Constructor without callback
mn | SystemC Signal Name |
|
inline |
Constructor with callback
callback | Callback in the base class to be executed each time a value changes. |
mn | SystemC Signal Name |
|
inlinevirtual |
Virtual destructor.
|
inlinevirtual |
Bind method. This method binds a specific input channel to a corresponding output. Each channel can be bind multiple times.
sender | Input interface to bind with. |
channel | The channel which has to be bind. |
Implements sr_signal::signal_in_if< TYPE >.
|
inline |
Connect the infield with an output on a specific channel.
References sr_signal::signal_out_bind_if< TYPE >::bind().
|
inline |
Gets the value of a specific channel.
References pysc::api::cci::read().
|
inline |
Read the value of a specific channel. If the channel not exists –> error
channel | The channel to read from. |
|
inline |
Safe read reads the value of a channel. If the channel not exists return default value.
channel | The channel to read from. |
default_value | The default value to read in case of an error. |
|
inlinevirtual |
Update method. Updates the value of a channel and executes the callback.
sender | Wich calls update. |
time | Delay from sc_timestamp() after which the signal is set. |
Implements sr_signal::signal_in_if< TYPE >.
References sr_signal::signal_if< TYPE >::read().