Private Types | Private Member Functions | Private Attributes | List of all members
dynamicgraph::sot::Event Class Reference

#include <event.hh>

Inheritance diagram for dynamicgraph::sot::Event:
Inheritance graph
[legend]

Private Types

typedef SignalBase< sigtime_t > * Trigger_t
 
typedef std::vector< Trigger_tTriggers_t
 

Private Member Functions

void addSignal (const std::string &signal)
 
bool & check (bool &ret, const int64_t &time)
 
 DYNAMIC_GRAPH_ENTITY_DECL ()
 
 Event (const std::string &name)
 
virtual std::string getDocString () const
 Header documentation of the python class. More...
 
std::string getSignalsByName () const
 
void repeat (const sigtime_t &nbIterations)
 
 ~Event ()
 

Private Attributes

Signal< bool, sigtime_tcheckSOUT
 
SignalPtr< bool, sigtime_tconditionSIN
 
bool lastVal_
 
sigtime_t repeatAfterNIterations_
 
sigtime_t timeSinceUp_
 
Triggers_t triggers
 

Additional Inherited Members

- Public Types inherited from dynamicgraph::Entity
typedef std::map< const std::string, command::Command * > CommandMap_t
 
typedef std::map< std::string, SignalBase< sigtime_t > * > SignalMap
 
- Public Member Functions inherited from dynamicgraph::Entity
virtual void display (std::ostream &os) const
 
std::ostream & displaySignalList (std::ostream &os) const
 
 Entity (const std::string &name)
 
virtual const std::string & getClassName () const
 
const std::string & getCommandList () const
 
LoggerVerbosity getLoggerVerbosityLevel ()
 
LoggerVerbosity getLoggerVerbosityLevel ()
 
const std::string & getName () const
 
command::CommandgetNewStyleCommand (const std::string &cmdName)
 
CommandMap_t getNewStyleCommandMap ()
 
SignalBase< sigtime_t > & getSignal (const std::string &signalName)
 
const SignalBase< sigtime_t > & getSignal (const std::string &signalName) const
 
SignalMap getSignalMap () const
 
double getStreamPrintPeriod ()
 
double getStreamPrintPeriod ()
 
double getTimeSample ()
 
double getTimeSample ()
 
bool hasSignal (const std::string &signame) const
 
Loggerlogger ()
 
Loggerlogger ()
 
const Loggerlogger () const
 
const Loggerlogger () const
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 
void sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="")
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
void setLoggerVerbosityLevel (LoggerVerbosity lv)
 
bool setStreamPrintPeriod (double t)
 
bool setStreamPrintPeriod (double t)
 
bool setTimeSample (double t)
 
bool setTimeSample (double t)
 
virtual SignalBase< sigtime_t > * test ()
 
virtual void test2 (SignalBase< sigtime_t > *)
 
virtual std::ostream & writeCompletionList (std::ostream &os) const
 
virtual std::ostream & writeGraph (std::ostream &os) const
 
virtual ~Entity ()
 
- Protected Member Functions inherited from dynamicgraph::Entity
void addCommand (const std::string &name, command::Command *command)
 
void entityDeregistration ()
 
void entityRegistration ()
 
void signalDeregistration (const std::string &name)
 
void signalRegistration (const SignalArray< sigtime_t > &signals)
 
- Protected Attributes inherited from dynamicgraph::Entity
CommandMap_t commandMap
 
Logger logger_
 
std::string name
 
SignalMap signalMap
 

Detailed Description

Event

This entity detects changes in value of an input boolean signal

The input signal is

The output signal is

Output value is true if value of input signal changes with respect to the previous evaluation.

Method addSignal stores signals that are recomputed each time the output signal is recomputed and the value is true. One typical use case of this feature consists in plugging the output signal to a ROS topic using dynamicgraph::RosPublish entity (see dynamic_graph_bridge) and to call addSignal with the trigger signal of the RosPublish entity as the input. Thus each time the output signal changes value, the new value is published to the ROS topic.

If command setOnlyUp is called with true as input, signals are recomputed only if the output value switches from false to true.

Definition at line 44 of file event.hh.

Member Typedef Documentation

◆ Trigger_t

Definition at line 110 of file event.hh.

◆ Triggers_t

typedef std::vector<Trigger_t> dynamicgraph::sot::Event::Triggers_t
private

Definition at line 111 of file event.hh.

Constructor & Destructor Documentation

◆ Event()

dynamicgraph::sot::Event::Event ( const std::string &  name)
inlineprivate

Definition at line 47 of file event.hh.

◆ ~Event()

dynamicgraph::sot::Event::~Event ( )
inlineprivate

Definition at line 80 of file event.hh.

Member Function Documentation

◆ addSignal()

void dynamicgraph::sot::Event::addSignal ( const std::string &  signal)
inlineprivate

Definition at line 89 of file event.hh.

◆ check()

bool & dynamicgraph::sot::Event::check ( bool &  ret,
const int64_t &  time 
)
private

Definition at line 11 of file event.cpp.

◆ DYNAMIC_GRAPH_ENTITY_DECL()

dynamicgraph::sot::Event::DYNAMIC_GRAPH_ENTITY_DECL ( )
private

◆ getDocString()

virtual std::string dynamicgraph::sot::Event::getDocString ( ) const
inlineprivatevirtual

Header documentation of the python class.

Reimplemented from dynamicgraph::Entity.

Definition at line 83 of file event.hh.

◆ getSignalsByName()

std::string dynamicgraph::sot::Event::getSignalsByName ( ) const
inlineprivate

Definition at line 95 of file event.hh.

◆ repeat()

void dynamicgraph::sot::Event::repeat ( const sigtime_t nbIterations)
inlineprivate

Definition at line 105 of file event.hh.

Member Data Documentation

◆ checkSOUT

Signal<bool, sigtime_t> dynamicgraph::sot::Event::checkSOUT
private

Definition at line 115 of file event.hh.

◆ conditionSIN

SignalPtr<bool, sigtime_t> dynamicgraph::sot::Event::conditionSIN
private

Definition at line 118 of file event.hh.

◆ lastVal_

bool dynamicgraph::sot::Event::lastVal_
private

Definition at line 120 of file event.hh.

◆ repeatAfterNIterations_

sigtime_t dynamicgraph::sot::Event::repeatAfterNIterations_
private

Definition at line 121 of file event.hh.

◆ timeSinceUp_

sigtime_t dynamicgraph::sot::Event::timeSinceUp_
private

Definition at line 121 of file event.hh.

◆ triggers

Triggers_t dynamicgraph::sot::Event::triggers
private

Definition at line 117 of file event.hh.


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


sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:32