This class represents an entity, i.e. More...
#include <dynamic-graph/entity.h>
Public Types | |
typedef std::map< std::string, SignalBase< int > * > | SignalMap |
typedef std::map< const std::string, command::Command * > | CommandMap_t |
Public Member Functions | |
Entity (const std::string &name) | |
virtual | ~Entity () |
const std::string & | getName () const |
virtual const std::string & | getClassName () const |
virtual std::string | getDocString () const |
bool | hasSignal (const std::string &signame) const |
SignalBase< int > & | getSignal (const std::string &signalName) |
const SignalBase< int > & | getSignal (const std::string &signalName) const |
std::ostream & | displaySignalList (std::ostream &os) const |
virtual std::ostream & | writeGraph (std::ostream &os) const |
virtual std::ostream & | writeCompletionList (std::ostream &os) const |
virtual void | display (std::ostream &os) const |
virtual SignalBase< int > * | test () |
virtual void | test2 (SignalBase< int > *) |
const std::string & | getCommandList () const |
CommandMap_t | getNewStyleCommandMap () |
command::Command * | getNewStyleCommand (const std::string &cmdName) |
SignalMap | getSignalMap () const |
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 . 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) |
void | entityRegistration () |
void | entityDeregistration () |
void | signalRegistration (const SignalArray< int > &signals) |
void | signalDeregistration (const std::string &name) |
Protected Attributes | |
std::string | name |
SignalMap | signalMap |
CommandMap_t | commandMap |
Logger | logger_ |
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.
typedef std::map<const std::string, command::Command *> dynamicgraph::Entity::CommandMap_t |
typedef std::map<std::string, SignalBase<int> *> dynamicgraph::Entity::SignalMap |
|
explicit |
|
virtual |
|
protected |
|
virtual |
Reimplemented in dynamicgraph::Tracer, and dynamicgraph::TracerRealTime.
std::ostream& dynamicgraph::Entity::displaySignalList | ( | std::ostream & | os | ) | const |
|
protected |
|
protected |
|
inlinevirtual |
const std::string& dynamicgraph::Entity::getCommandList | ( | ) | const |
|
virtual |
|
inline |
Get the logger's verbosity level.
|
inline |
command::Command* dynamicgraph::Entity::getNewStyleCommand | ( | const std::string & | cmdName | ) |
CommandMap_t dynamicgraph::Entity::getNewStyleCommandMap | ( | ) |
SignalBase<int>& dynamicgraph::Entity::getSignal | ( | const std::string & | signalName | ) |
const SignalBase<int>& dynamicgraph::Entity::getSignal | ( | const std::string & | signalName | ) | const |
SignalMap dynamicgraph::Entity::getSignalMap | ( | ) | const |
|
inline |
Get the period of the stream period.
|
inline |
Get the time sample.
bool dynamicgraph::Entity::hasSignal | ( | const std::string & | signame | ) | const |
|
inline |
|
inline |
References dynamicgraph::MSG_TYPE_INFO.
void dynamicgraph::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.
|
inline |
Specify the verbosity level of the logger.
|
inline |
Set the period of the stream period.
|
inline |
Set the time sample.
|
protected |
|
protected |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |