Public Types | Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | Private Member Functions | List of all members
dynamicgraph::Signal< T, Time > Class Template Reference

Signals link I/O ports of entities. They can be constant-valued signals, or copy the value of a heap variable, or evaluated as a function. See SignalPtr and SignalTimeDependent for other types of signals, and SignalArray for a way of grouping them. More...

#include <fwd.hh>

Inheritance diagram for dynamicgraph::Signal< T, Time >:
Inheritance graph
[legend]

Public Types

typedef int * Mutex
 
typedef int * MutexError
 

Public Member Functions

virtual const T & access (const Time &t)
 
virtual const T & accessCopy () const
 
virtual void checkCompatibility ()
 
virtual std::ostream & display (std::ostream &os) const
 
virtual void get (std::ostream &value) const
 
virtual void getClassName (std::string &aClassName) const
 
bool getKeepReference ()
 
 operator const T & () const
 
virtual const T & operator() (const Time &t)
 
virtual Signal< T, Time > & operator= (const T &t)
 
virtual void recompute (const Time &t)
 
virtual void set (std::istringstream &value)
 
virtual void setConstant (const T &t)
 
virtual void setFunction (boost::function2< T &, T &, Time > t, Mutex *mutexref=NULL)
 
void setKeepReference (const bool &b)
 
virtual void setReference (const T *t, Mutex *mutexref=NULL)
 
virtual void setReferenceNonConstant (T *t, Mutex *mutexref=NULL)
 
 Signal (std::string name)
 
virtual void trace (std::ostream &os) const
 
virtual ~Signal ()
 
- Public Member Functions inherited from dynamicgraph::SignalBase< Time >
 SignalBase (std::string name="")
 
virtual ~SignalBase ()
 
virtual const Time & getTime () const
 
virtual void setTime (const Time &t)
 
const bool & getReady () const
 
const std::string & getName () const
 
void getClassName (std::string &aClassName) const
 
virtual void setPeriodTime (const Time &)
 
virtual Time getPeriodTime () const
 
virtual void addDependency (const SignalBase< Time > &)
 
virtual void removeDependency (const SignalBase< Time > &)
 
virtual void clearDependencies ()
 
virtual bool needUpdate (const Time &) const
 
void setReady (const bool sready=true)
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual std::ostream & displayDependencies (std::ostream &os, const int=-1, std::string space="", std::string next1="", std::string="") const
 
virtual void plug (SignalBase< Time > *sigarg)
 
virtual void unplug ()
 
virtual bool isPlugged () const
 
virtual SignalBase< Time > * getPluged () const
 
virtual void setConstantDefault ()
 
std::string shortName () const
 
virtual void ExtractNodeAndLocalNames (std::string &LocalName, std::string &NodeName) const
 

Protected Types

enum  SignalType { CONSTANT, REFERENCE, REFERENCE_NON_CONST, FUNCTION }
 

Protected Attributes

bool copyInit
 
bool keepReference
 
MutexproviderMutex
 
SignalType signalType
 
T * Tcopy
 
Tcopy1
 
Tcopy2
 
boost::function2< T &, T &, Time > Tfunction
 
const T * Treference
 
T * TreferenceNonConst
 
- Protected Attributes inherited from dynamicgraph::SignalBase< Time >
std::string name
 
bool ready
 
Time signalTime
 

Static Protected Attributes

static const bool KEEP_REFERENCE_DEFAULT = false
 
static const SignalType SIGNAL_TYPE_DEFAULT = CONSTANT
 

Private Member Functions

T & getTwork ()
 
const T & getTwork () const
 
const T & setTcopy (const T &t)
 
const T & switchTcopy ()
 

Detailed Description

template<class T, class Time>
class dynamicgraph::Signal< T, Time >

Signals link I/O ports of entities. They can be constant-valued signals, or copy the value of a heap variable, or evaluated as a function. See SignalPtr and SignalTimeDependent for other types of signals, and SignalArray for a way of grouping them.

There are several ways to specify the value output by a signal:

Definition at line 42 of file fwd.hh.

Member Typedef Documentation

◆ Mutex

template<class T, class Time>
typedef int* dynamicgraph::Signal< T, Time >::Mutex

Definition at line 63 of file include/dynamic-graph/signal.h.

◆ MutexError

template<class T, class Time>
typedef int* dynamicgraph::Signal< T, Time >::MutexError

Definition at line 64 of file include/dynamic-graph/signal.h.

Member Enumeration Documentation

◆ SignalType

template<class T, class Time>
enum dynamicgraph::Signal::SignalType
protected
Enumerator
CONSTANT 
REFERENCE 
REFERENCE_NON_CONST 
FUNCTION 

Definition at line 43 of file include/dynamic-graph/signal.h.

Constructor & Destructor Documentation

◆ Signal()

template<class T , class Time >
dynamicgraph::Signal< T, Time >::Signal ( std::string  name)

Definition at line 24 of file signal.t.cpp.

◆ ~Signal()

template<class T, class Time>
virtual dynamicgraph::Signal< T, Time >::~Signal ( )
inlinevirtual

Definition at line 77 of file include/dynamic-graph/signal.h.

Member Function Documentation

◆ access()

template<class T , class Time>
const T & dynamicgraph::Signal< T, Time >::access ( const Time &  t)
virtual

◆ accessCopy()

template<class T , class Time >
const T & dynamicgraph::Signal< T, Time >::accessCopy ( ) const
virtual

◆ checkCompatibility()

template<class T, class Time>
virtual void dynamicgraph::Signal< T, Time >::checkCompatibility ( )
inlinevirtual

checkCompatibility is used to get the object contained in the signal. This used to verify if a dynamic cast is possible or not.

Reimplemented from dynamicgraph::SignalBase< Time >.

Reimplemented in dynamicgraph::SignalPtr< T, Time >, and dynamicgraph::SignalPtr< double, int >.

Definition at line 112 of file include/dynamic-graph/signal.h.

◆ display()

template<class T , class Time >
std::ostream & dynamicgraph::Signal< T, Time >::display ( std::ostream &  os) const
virtual

◆ get()

template<class T , class Time >
void dynamicgraph::Signal< T, Time >::get ( std::ostream &  value) const
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 37 of file signal.t.cpp.

◆ getClassName()

template<class T, class Time>
virtual void dynamicgraph::Signal< T, Time >::getClassName ( std::string &  aClassName) const
inlinevirtual

Definition at line 105 of file include/dynamic-graph/signal.h.

◆ getKeepReference()

template<class T, class Time>
bool dynamicgraph::Signal< T, Time >::getKeepReference ( )
inline

Definition at line 91 of file include/dynamic-graph/signal.h.

◆ getTwork() [1/2]

template<class T , class Time >
T & dynamicgraph::Signal< T, Time >::getTwork ( )
private

Definition at line 71 of file signal.t.cpp.

◆ getTwork() [2/2]

template<class T , class Time >
const T & dynamicgraph::Signal< T, Time >::getTwork ( ) const
private

Definition at line 79 of file signal.t.cpp.

◆ operator const T &()

template<class T, class Time>
dynamicgraph::Signal< T, Time >::operator const T & ( ) const
inline

Definition at line 104 of file include/dynamic-graph/signal.h.

◆ operator()()

template<class T, class Time>
virtual const T& dynamicgraph::Signal< T, Time >::operator() ( const Time &  t)
inlinevirtual

◆ operator=()

template<class T, class Time >
Signal< T, Time > & dynamicgraph::Signal< T, Time >::operator= ( const T &  t)
virtual

◆ recompute()

template<class T, class Time>
virtual void dynamicgraph::Signal< T, Time >::recompute ( const Time &  t)
inlinevirtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 96 of file include/dynamic-graph/signal.h.

◆ set()

template<class T , class Time >
void dynamicgraph::Signal< T, Time >::set ( std::istringstream &  value)
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 32 of file signal.t.cpp.

◆ setConstant()

template<class T, class Time >
void dynamicgraph::Signal< T, Time >::setConstant ( const T &  t)
virtual

◆ setFunction()

template<class T, class Time>
void dynamicgraph::Signal< T, Time >::setFunction ( boost::function2< T &, T &, Time >  t,
Mutex mutexref = NULL 
)
virtual

Definition at line 124 of file signal.t.cpp.

◆ setKeepReference()

template<class T, class Time>
void dynamicgraph::Signal< T, Time >::setKeepReference ( const bool &  b)
inline

Definition at line 92 of file include/dynamic-graph/signal.h.

◆ setReference()

template<class T, class Time >
void dynamicgraph::Signal< T, Time >::setReference ( const T *  t,
Mutex mutexref = NULL 
)
virtual

Definition at line 105 of file signal.t.cpp.

◆ setReferenceNonConstant()

template<class T, class Time >
void dynamicgraph::Signal< T, Time >::setReferenceNonConstant ( T *  t,
Mutex mutexref = NULL 
)
virtual

Definition at line 114 of file signal.t.cpp.

◆ setTcopy()

template<class T, class Time >
const T & dynamicgraph::Signal< T, Time >::setTcopy ( const T &  t)
private

Definition at line 56 of file signal.t.cpp.

◆ switchTcopy()

template<class T , class Time >
const T & dynamicgraph::Signal< T, Time >::switchTcopy ( )
private

Definition at line 87 of file signal.t.cpp.

◆ trace()

template<class T , class Time >
void dynamicgraph::Signal< T, Time >::trace ( std::ostream &  os) const
virtual

Reimplemented from dynamicgraph::SignalBase< Time >.

Definition at line 42 of file signal.t.cpp.

Member Data Documentation

◆ copyInit

template<class T, class Time>
bool dynamicgraph::Signal< T, Time >::copyInit
protected

Definition at line 49 of file include/dynamic-graph/signal.h.

◆ KEEP_REFERENCE_DEFAULT

template<class T, class Time>
const bool dynamicgraph::Signal< T, Time >::KEEP_REFERENCE_DEFAULT = false
staticprotected

Definition at line 56 of file include/dynamic-graph/signal.h.

◆ keepReference

template<class T, class Time>
bool dynamicgraph::Signal< T, Time >::keepReference
protected

Definition at line 55 of file include/dynamic-graph/signal.h.

◆ providerMutex

template<class T, class Time>
Mutex* dynamicgraph::Signal< T, Time >::providerMutex
protected

Definition at line 68 of file include/dynamic-graph/signal.h.

◆ SIGNAL_TYPE_DEFAULT

template<class T, class Time>
const SignalType dynamicgraph::Signal< T, Time >::SIGNAL_TYPE_DEFAULT = CONSTANT
staticprotected

Definition at line 44 of file include/dynamic-graph/signal.h.

◆ signalType

template<class T, class Time>
SignalType dynamicgraph::Signal< T, Time >::signalType
protected

Definition at line 46 of file include/dynamic-graph/signal.h.

◆ Tcopy

template<class T, class Time>
T* dynamicgraph::Signal< T, Time >::Tcopy
protected

Definition at line 48 of file include/dynamic-graph/signal.h.

◆ Tcopy1

template<class T, class Time>
T dynamicgraph::Signal< T, Time >::Tcopy1
protected

Definition at line 47 of file include/dynamic-graph/signal.h.

◆ Tcopy2

template<class T, class Time>
T dynamicgraph::Signal< T, Time >::Tcopy2
protected

Definition at line 47 of file include/dynamic-graph/signal.h.

◆ Tfunction

template<class T, class Time>
boost::function2<T &, T &, Time> dynamicgraph::Signal< T, Time >::Tfunction
protected

Definition at line 53 of file include/dynamic-graph/signal.h.

◆ Treference

template<class T, class Time>
const T* dynamicgraph::Signal< T, Time >::Treference
protected

Definition at line 51 of file include/dynamic-graph/signal.h.

◆ TreferenceNonConst

template<class T, class Time>
T* dynamicgraph::Signal< T, Time >::TreferenceNonConst
protected

Definition at line 52 of file include/dynamic-graph/signal.h.


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


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03