A type of signal that enforces a time dependency between other signals, making sure its inputs are up to date on access, using a incrementing time tick as reference. More...
#include <dynamic-graph/signal-time-dependent.h>


Public Member Functions | |
| SignalTimeDependent (std::string name="") | |
| SignalTimeDependent (const SignalArray_const< Time > &arr, std::string name="") | |
| SignalTimeDependent (boost::function2< T &, T &, Time > t, const SignalArray_const< Time > &sig, std::string name="") | |
| const T & | access (const Time &t1) |
| virtual void | addDependency (const SignalBase< Time > &signal) |
| virtual void | clearDependencies () |
| std::ostream & | displayDependencies (std::ostream &os, const int depth=-1, std::string space="", std::string next1="", std::string next2="") const |
| virtual Time | getPeriodTime () const |
| virtual bool | needUpdate (const Time &t) const |
| const T & | operator() (const Time &t1) |
| virtual void | removeDependency (const SignalBase< Time > &signal) |
| virtual void | setPeriodTime (const Time &p) |
| std::ostream & | writeGraph (std::ostream &os) const |
Public Member Functions inherited from Signal< T, Time > | |
| Signal (std::string name) | |
| 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 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) |
| virtual void | trace (std::ostream &os) const |
Public Member Functions inherited from SignalBase< Time > | |
| SignalBase (std::string name="") | |
| 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 |
| void | setReady (const bool sready=true) |
| 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 |
Public Member Functions inherited from TimeDependency< Time > | |
| TimeDependency (SignalBase< Time > *sig, const DependencyType dep=DEPENDENCY_TYPE_DEFAULT) | |
| TimeDependency (SignalBase< Time > *sig, const SignalArray_const< Time > &arr, const DependencyType dep=DEPENDENCY_TYPE_DEFAULT) | |
| void | addDependencies (const SignalArray_const< Time > &arr) |
| void | addDependency (const SignalBase< Time > &sig) |
| void | clearDependency () |
| std::ostream & | displayDependencies (std::ostream &os, const int depth=-1, std::string space="", std::string next1="", std::string next2="") const |
| bool | getNeedUpdateFromAllChildren () const |
| Time | getPeriodTime () const |
| bool | needUpdate (const Time &t1) const |
| void | removeDependency (const SignalBase< Time > &sig) |
| void | setDependencyType (DependencyType dep) |
| void | setNeedUpdateFromAllChildren (const bool b=true) |
| void | setPeriodTime (const Time &p) |
Additional Inherited Members | |
Public Types inherited from Signal< T, Time > | |
| typedef int * | Mutex |
| typedef int * | MutexError |
Public Types inherited from TimeDependency< Time > | |
| typedef std::list< const SignalBase< Time > * > | Dependencies |
| enum | DependencyType { TIME_DEPENDENT, BOOL_DEPENDENT, ALWAYS_READY } |
Public Attributes inherited from TimeDependency< Time > | |
| Dependencies | dependencies |
| DependencyType | dependencyType |
| Time | lastAskForUpdate |
| SignalBase< Time > & | leader |
| Time | periodTime |
| bool | updateFromAllChildren |
Static Public Attributes inherited from TimeDependency< Time > | |
| static const bool | ALL_READY_DEFAULT = false |
| static const DependencyType | DEPENDENCY_TYPE_DEFAULT = TIME_DEPENDENT |
| static const Time | PERIOD_TIME_DEFAULT = 1 |
Protected Types inherited from Signal< T, Time > | |
| enum | SignalType { CONSTANT, REFERENCE, REFERENCE_NON_CONST, FUNCTION } |
Protected Attributes inherited from Signal< T, Time > | |
| bool | copyInit |
| bool | keepReference |
| Mutex * | providerMutex |
| SignalType | signalType |
| T * | Tcopy |
| T | Tcopy1 |
| T | Tcopy2 |
| boost::function2< T &, T &, Time > | Tfunction |
| const T * | Treference |
| T * | TreferenceNonConst |
Protected Attributes inherited from SignalBase< Time > | |
| std::string | name |
| bool | ready |
| Time | signalTime |
Static Protected Attributes inherited from Signal< T, Time > | |
| static const bool | KEEP_REFERENCE_DEFAULT = false |
| static const SignalType | SIGNAL_TYPE_DEFAULT = CONSTANT |
A type of signal that enforces a time dependency between other signals, making sure its inputs are up to date on access, using a incrementing time tick as reference.
It works this way. For a given SignalTimeDependent S,
Thus, the value of dependent signals can be accessed quickly and repeatedly through the Signal::accessCopy () function.
An example: