This class represents an entity, i.e. a generic computational unit that provides input and output signals. More...
#include <entity.h>

Public Types | |
| typedef std::map< const std::string, command::Command * > | CommandMap_t |
| typedef std::map< std::string, SignalBase< int > * > | SignalMap |
Public Member Functions | |
| virtual void | display (std::ostream &os) const |
| Display information on the entity inside the output stream os. More... | |
| std::ostream & | displaySignalList (std::ostream &os) const |
| Display the list of signals of this entity in output stream os. More... | |
| Entity (const std::string &name) | |
| virtual const std::string & | getClassName () const |
| const std::string & | getCommandList () const |
| virtual std::string | getDocString () const |
| Returns the Entity documentation. More... | |
| const std::string & | getName () const |
| command::Command * | getNewStyleCommand (const std::string &cmdName) |
| Provides the pointer towards the Command object cmdName. More... | |
| CommandMap_t | getNewStyleCommandMap () |
| Provides the std::map where all the commands are registered. More... | |
| SignalBase< int > & | getSignal (const std::string &signalName) |
| Provides a reference to the signal named signalName. More... | |
| const SignalBase< int > & | getSignal (const std::string &signalName) const |
| Provides a const reference to the signal named signalName. More... | |
| SignalMap | getSignalMap () const |
| Provides a map of all the signals. More... | |
| bool | hasSignal (const std::string &signame) const |
| Test if a signal of name signame is present. More... | |
| virtual SignalBase< int > * | test () |
| virtual void | test2 (SignalBase< int > *) |
| virtual std::ostream & | writeCompletionList (std::ostream &os) const |
| This method is used write in the output stream os the signals names and the commands of the entity. More... | |
| virtual std::ostream & | writeGraph (std::ostream &os) const |
| This method is used to write down in os the edges of the graph by calling the signals writeGraph method. More... | |
| virtual | ~Entity () |
Logger related methods | |
| Logger & | logger () |
| Logger const & | logger () const |
| void | sendMsg (const std::string &msg, MsgType t=MSG_TYPE_INFO, const std::string &lineId="") |
Send messages msg with level t. Add string file and line to message. More... | |
| void | setLoggerVerbosityLevel (LoggerVerbosity lv) |
| Specify the verbosity level of the logger. More... | |
| LoggerVerbosity | getLoggerVerbosityLevel () |
| Get the logger's verbosity level. More... | |
| bool | setTimeSample (double t) |
| Set the time sample. More... | |
| double | getTimeSample () |
| Get the time sample. More... | |
| bool | setStreamPrintPeriod (double t) |
| Set the period of the stream period. More... | |
| double | getStreamPrintPeriod () |
| Get the period of the stream period. More... | |
Protected Member Functions | |
| void | addCommand (const std::string &name, command::Command *command) |
| Add a command to Entity. More... | |
| void | entityDeregistration () |
| void | entityRegistration () |
| void | signalDeregistration (const std::string &name) |
| void | signalRegistration (const SignalArray< int > &signals) |
Protected Attributes | |
| CommandMap_t | commandMap |
| Logger | logger_ |
| std::string | name |
| SignalMap | signalMap |
This class represents an entity, i.e. a generic computational unit that provides input and output signals.
These signals link the entities together to form a complete computation graph. To declare a new entity, please see the DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN macro in factory.h.
Definition at line 52 of file include/dynamic-graph/entity.h.
| typedef std::map<const std::string, command::Command *> dynamicgraph::Entity::CommandMap_t |
Definition at line 55 of file include/dynamic-graph/entity.h.
| typedef std::map<std::string, SignalBase<int> *> dynamicgraph::Entity::SignalMap |
Definition at line 54 of file include/dynamic-graph/entity.h.
|
explicit |
Definition at line 33 of file src/dgraph/entity.cpp.
|
virtual |
Definition at line 47 of file src/dgraph/entity.cpp.
|
protected |
Add a command to Entity.
Definition at line 187 of file src/dgraph/entity.cpp.
|
virtual |
Display information on the entity inside the output stream os.
Reimplemented in dynamicgraph::Tracer, dynamicgraph::MyEntity, dynamicgraph::TracerRealTime, MyEntity, and CustomEntity.
Definition at line 166 of file src/dgraph/entity.cpp.
| std::ostream & Entity::displaySignalList | ( | std::ostream & | os | ) | const |
Display the list of signals of this entity in output stream os.
| os | the output stream where to display the list of signals. |
Definition at line 131 of file src/dgraph/entity.cpp.
|
protected |
Definition at line 29 of file src/dgraph/entity.cpp.
|
protected |
Definition at line 25 of file src/dgraph/entity.cpp.
|
inlinevirtual |
Reimplemented in dynamicgraph::MyEntity, dynamicgraph::CustomEntity, MyEntity, dynamicgraph::CustomEntity, dynamicgraph::CustomEntity, dynamicgraph::CustomEntity, dynamicgraph::CustomEntity, CustomEntity, and dynamicgraph::CustomEntity.
Definition at line 61 of file include/dynamic-graph/entity.h.
| const std::string & Entity::getCommandList | ( | ) | const |
Definition at line 182 of file src/dgraph/entity.cpp.
|
virtual |
Returns the Entity documentation.
Definition at line 104 of file src/dgraph/entity.cpp.
|
inline |
Get the logger's verbosity level.
Definition at line 147 of file include/dynamic-graph/entity.h.
|
inline |
Definition at line 60 of file include/dynamic-graph/entity.h.
| Command * Entity::getNewStyleCommand | ( | const std::string & | cmdName | ) |
Provides the pointer towards the Command object cmdName.
| cmdName | Name of the command |
Definition at line 202 of file src/dgraph/entity.cpp.
| std::map< const std::string, Command * > Entity::getNewStyleCommandMap | ( | ) |
Provides the std::map where all the commands are registered.
Return the list of command objects.
Definition at line 198 of file src/dgraph/entity.cpp.
| SignalBase<int>& dynamicgraph::Entity::getSignal | ( | const std::string & | signalName | ) |
Provides a reference to the signal named signalName.
| signalName | Name of the signal |
| const SignalBase<int>& dynamicgraph::Entity::getSignal | ( | const std::string & | signalName | ) | const |
Provides a const reference to the signal named signalName.
| signalName | Name of the signal |
| Entity::SignalMap Entity::getSignalMap | ( | ) | const |
Provides a map of all the signals.
Definition at line 175 of file src/dgraph/entity.cpp.
|
inline |
Get the period of the stream period.
Definition at line 161 of file include/dynamic-graph/entity.h.
|
inline |
Get the time sample.
Definition at line 153 of file include/dynamic-graph/entity.h.
| bool Entity::hasSignal | ( | const std::string & | signame | ) | const |
Test if a signal of name signame is present.
Definition at line 119 of file src/dgraph/entity.cpp.
|
inline |
Definition at line 135 of file include/dynamic-graph/entity.h.
|
inline |
Definition at line 136 of file include/dynamic-graph/entity.h.
| void Entity::sendMsg | ( | const std::string & | msg, |
| MsgType | t = MSG_TYPE_INFO, |
||
| const std::string & | lineId = "" |
||
| ) |
Send messages msg with level t. Add string file and line to message.
Definition at line 211 of file src/dgraph/entity.cpp.
|
inline |
Specify the verbosity level of the logger.
Definition at line 144 of file include/dynamic-graph/entity.h.
|
inline |
Set the period of the stream period.
Definition at line 156 of file include/dynamic-graph/entity.h.
|
inline |
Set the time sample.
Definition at line 150 of file include/dynamic-graph/entity.h.
|
protected |
Definition at line 89 of file src/dgraph/entity.cpp.
|
protected |
Definition at line 59 of file src/dgraph/entity.cpp.
|
inlinevirtual |
Definition at line 111 of file include/dynamic-graph/entity.h.
|
inlinevirtual |
Definition at line 113 of file include/dynamic-graph/entity.h.
|
virtual |
This method is used write in the output stream os the signals names and the commands of the entity.
| os | The output stream where to write the list of objects related to the entity. |
Definition at line 155 of file src/dgraph/entity.cpp.
|
virtual |
This method is used to write down in os the edges of the graph by calling the signals writeGraph method.
| os | The output stream where to write the informations. |
Definition at line 146 of file src/dgraph/entity.cpp.
|
protected |
Definition at line 176 of file include/dynamic-graph/entity.h.
|
protected |
Definition at line 177 of file include/dynamic-graph/entity.h.
|
protected |
Definition at line 174 of file include/dynamic-graph/entity.h.
|
protected |
Definition at line 175 of file include/dynamic-graph/entity.h.