Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Types | Public Member Functions | List of all members
sr_signal::signal_in< TYPE, MODULE > Class Template Reference

#include <sr_signal_in.h>

Inheritance diagram for sr_signal::signal_in< TYPE, MODULE >:
Collaboration diagram for sr_signal::signal_in< TYPE, MODULE >:

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...
 

Detailed Description

template<class TYPE, class MODULE>
class sr_signal::signal_in< TYPE, MODULE >

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.

Member Typedef Documentation

template<class TYPE, class MODULE>
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.

Parameters
valueThe new value of the signal.
timeThe delay from sc_timestamp() of the propagation.

Constructor & Destructor Documentation

template<class TYPE, class MODULE>
sr_signal::signal_in< TYPE, MODULE >::signal_in ( sc_core::sc_module_name  mn = NULL)
inline

Constructor without callback.

Parameters
mnSignal name.
template<class TYPE, class MODULE>
sr_signal::signal_in< TYPE, MODULE >::signal_in ( t_callback  callback,
sc_core::sc_module_name  mn = NULL 
)
inline

Constructor with callback.

Parameters
callbackA base class function which gets executed every time the value is chaned.
mnSignal name.
template<class TYPE, class MODULE>
virtual sr_signal::signal_in< TYPE, MODULE >::~signal_in ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

template<class TYPE, class MODULE>
virtual void sr_signal::signal_in< TYPE, MODULE >::bind ( signal_out_bind_if< TYPE > &  sender,
const uint32_t channel = 0 
)
inlinevirtual

Input signal bind method. This method implements the binding mechanism with an output signal.

Parameters
senderOutput interface to bind with.
channelThe 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()().

template<class TYPE, class MODULE>
virtual sr_signal::signal_in< TYPE, MODULE >::operator TYPE ( ) const
inlinevirtual

Gets the current signal value.

References sr_signal::signal_if< TYPE >::m_value.

template<class TYPE, class MODULE>
virtual void sr_signal::signal_in< TYPE, MODULE >::operator() ( signal_out_bind_if< TYPE > &  sender)
inlinevirtual

Bind the input signal to an output signal. Calls both bind methods.

Parameters
senderThe output signal.

References sr_signal::signal_in< TYPE, MODULE >::bind(), and sr_signal::signal_out_bind_if< TYPE >::bind().

Here is the call graph for this function:

template<class TYPE, class MODULE>
virtual void sr_signal::signal_in< TYPE, MODULE >::update ( signal_out_if< TYPE > *  sender,
const sc_core::sc_time &  time 
)
inlinevirtual

This method implements the update meachnism. It sets the new value and calls the callback if needed.

Parameters
senderWhich calls update.
timeDelay 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().

Here is the call graph for this function:


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