|
DUECA/DUSIME
|
A clock synchronisation object. More...
#include <Ticker.hxx>


Public Member Functions | |
| Ticker () | |
| Constructor. | |
| bool | complete () |
| Completion method,. | |
| const char * | getTypeName () |
| Type name information. | |
| ~Ticker () | |
| Destructor. | |
| double | getDT () |
| Time step of basic tick. | |
| double | getTimeGranule () |
| Time value (in seconds) of a unit step in (integer) simulation time. | |
| int | getBaseIncrement () |
| Stepsize of integer simulation time with each tick. | |
| int | getCompatibleIncrement () |
| Stepsize of integer simulation time with each tick. | |
| TimeTickType | getIncrement (double span, bool nonzero=true) |
| Return a time step rounded to granules. | |
| void | dataFromMaster (const TimeTickType &ts, int offset_usecs) |
| Input of timing data from a master node. | |
| void | tickFromMaster (const TimeTickType &ts) |
| Input of strong timing data from a master node. | |
| bool | isSynced () |
| Returns true if synced with the master node. | |
| void | noImplicitSync () |
| Call this to have the ticker sync with the master node. | |
| int64_t | getUsecsSinceTick (const TimeTickType &t) const |
| Returns the number of microseconds elapsed. | |
| int64_t | getUsecsSinceTick (const TimeSpec &ts) const |
| Returns the number of microseconds elapsed. | |
| int | getUsecsSinceLastTick (TimeTickType &tick) const |
| Returns the number of microseconds since the last tick, and the last tick itself. | |
| bool | usingRTAI () const |
| Returns true if using RTAI. | |
| ObjectType | getObjectType () const |
| The ticker is one of the base components of DUECA. | |
Public Member Functions inherited from dueca::NamedObject | |
| const std::string | getEntity () const |
| Returns the "entity" part of the name. | |
| const std::string | getClass () const |
| Returns the "class" part of the name. | |
| const std::string | getPart () const |
| Returns the sub-entity or "part" part of the name. | |
| const NameSet & | getNameSet () const |
| This returns the complete name set. | |
| const GlobalId & | getId () const |
| This returns the id. | |
Public Member Functions inherited from dueca::TriggerPuller | |
| const std::string & | getTriggerName () const |
| Find a name. | |
Static Public Member Functions | |
| static const ParameterTable * | getParameterTable () |
| return the parameter table. | |
| static Ticker * | single () |
| Make sure this class is callable from scheme. | |
Friends | |
| class | Environment |
| ostream & | operator<< (ostream &os, const Ticker &t) |
| Print to stream, for debugging. | |
Additional Inherited Members | |
Protected Types inherited from dueca::TriggerPuller | |
| typedef list< TargetData > | targetlist_type |
| Combination of a target, someone to pull if requested, and the index that target needs to identify this puller. | |
Protected Member Functions inherited from dueca::NamedObject | |
| NamedObject (const GlobalId &id) | |
| Reserve for AssociateObject. | |
| NamedObject (const NameSet &ns) | |
| Normal constructor, protected, because it has no use to create a NamedObject by itself. | |
| virtual | ~NamedObject () |
| Destructor. | |
Protected Member Functions inherited from dueca::TriggerPuller | |
| void | pull (const DataTimeSpec &ts) |
| activate and notify the targets | |
| TriggerPuller (const std::string &name=std::string()) | |
| Constructor. | |
| virtual | ~TriggerPuller () |
| Destructor. | |
| virtual void | addTarget (const boost::intrusive_ptr< TriggerTarget > &target, unsigned id) |
| Add a target to this puller, only called by TriggerTarget's setTrigger. | |
| virtual void | removeTarget (const TriggerTarget *target) |
| Remove a target from the puller, only called by destructor. | |
| virtual void | setTriggerName () |
| Update the name, used by ConditionAnd and ConditionOr. | |
Protected Attributes inherited from dueca::TriggerPuller | |
| targetlist_type | targets |
| List of targets and indices. | |
| std::bitset< MAX_MANAGERS > | activitylevels |
| Index of activitymanager levels. | |
| std::string | name |
| Name, for debugging purposes. | |
A clock synchronisation object.
A ticker is a DUECA module that is runs by an ActivityManager. The difference with normal modules is that the Ticker blocks, waiting for a certain time. The main function of a Ticker is as a time-based trigger. One ticker is used in each DUECA node. The ticker also publishes a (local) time information channel for modules interested in more than just triggering.
| dueca::Ticker::Ticker | ( | ) |
Constructor.
This constructor is normally called from the scheme script.
| TimeTickType dueca::Ticker::getIncrement | ( | double | span, |
| bool | nonzero = true ) |
Return a time step rounded to granules.
| span | Time step to convert to granules |
| nonzero | If true (default), return a minimum of 1 granule. |
| int64_t dueca::Ticker::getUsecsSinceTick | ( | const TimeTickType & | t | ) | const |
Returns the number of microseconds elapsed.
Calculated since the tick given in ts
|
inline |
Returns the number of microseconds elapsed.
Calculated since the tick given in ts
|
inlinestatic |
Make sure this class is callable from scheme.
Return a pointer to the single ticker that works in this node.
|
inlinevirtual |
The ticker is one of the base components of DUECA.
Implements dueca::NamedObject.