Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

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

#include <sr_signal_base.h>

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

Public Member Functions

 signal_base (sc_core::sc_module_name mn=NULL)
 Default constructor. More...
 
virtual ~signal_base ()
 

Protected Member Functions

virtual MODULE * get_module ()
 

Detailed Description

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

Base class for all sr_signal signals. This is needed to hide the direct pointer to the parent model. Each instantiated member signal needs a pointer to it's parent class to provide an instance pointer for callback functions.

To provide these pointer we abuse the sc_object api. sc_object provides a mechanism to get an sc_object instance of the parent object. This is casted back to the type MODULE (template parameter).

Constructor & Destructor Documentation

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

Default constructor.

template<class TYPE, class MODULE>
virtual sr_signal::signal_base< TYPE, MODULE >::~signal_base ( )
inlinevirtual

default destructor. Only declared for virtual functions.

Member Function Documentation

template<class TYPE, class MODULE>
virtual MODULE* sr_signal::signal_base< TYPE, MODULE >::get_module ( )
inlineprotectedvirtual

Returns the MODULE instance of the parent object. It only works if the parent object is an sc_object and from type MODULE.

Referenced by sr_signal::signal_in< TYPE, MODULE >::update().


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