Go to the documentation of this file.
17 #define BOOST_TEST_MODULE debug - tracer
19 #if BOOST_VERSION >= 105900
20 #include <boost/test/tools/output_test_stream.hpp>
22 #include <boost/test/output_test_stream.hpp>
24 #include <boost/test/unit_test.hpp>
37 m_sigdSIN(
"MyEntity(" +
name +
")::input(double)::in_double"),
40 "MyEntity(" +
name +
")::input(double)::out_double"),
43 "MyEntity(" +
name +
")::input(vector)::out_vector"),
46 "MyEntity(" +
name +
")::input(double)::out2double")
53 virtual void display(std::ostream &os)
const {
54 os <<
"Hello! My name is " <<
getName() <<
" !" << std::endl;
60 const double &aDouble =
m_sigdSIN(inTime);
66 const double &aDouble =
m_sigdSIN(inTime);
68 res << aDouble, 2 * aDouble;
89 std::string rootdir(
"/tmp");
90 std::string basename(
"my-tracer");
91 std::string suffix(
".dat");
94 atracer.
openFiles(rootdir, basename, suffix);
121 aSignalInt.setTime(i);
123 aSignalVector.setTime(i);
virtual void recompute(const Time &t)
virtual void setTime(const Time &t)
virtual void closeFiles()
sigtime_t & recordTrigger(sigtime_t &dummy, const sigtime_t &time)
void addSignalToTraceByName(const std::string &signame, const std::string &filename="")
Vector & updateVector(Vector &res, const sigtime_t &inTime)
virtual const std::string & getClassName() const
double & update(double &res, const sigtime_t &inTime)
This class represents an entity, i.e. a generic computational unit that provides input and output sig...
virtual const T & access(const Time &t)
dynamicgraph::sigtime_t sigtime_t
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(CustomEntity, "CustomEntity")
dynamicgraph::SignalTimeDependent< double, sigtime_t > m_sigdTwoTimeDepSOUT
void clearSignalToTrace()
void addSignalToTrace(const SignalBase< sigtime_t > &sig, const std::string &filename="")
virtual void display(std::ostream &os) const
Display information on the entity inside the output stream os.
const std::string & getName() const
static const std::string CLASS_NAME
dynamicgraph::SignalTimeDependent< double, sigtime_t > m_sigdTimeDepSOUT
dynamicgraph::SignalTimeDependent< Vector, sigtime_t > m_sigVTimeDepSOUT
MyEntity(const std::string &name)
BOOST_AUTO_TEST_CASE(test_tracer)
dynamicgraph::Signal< double, sigtime_t > m_sigdSIN
virtual void setConstant(const T &t)
SignalBase< sigtime_t > & getSignal(const std::string &signalName)
Provides a reference to the signal named signalName.
Tracer plug-in main class.
void signalRegistration(const SignalArray< sigtime_t > &signals)
void openFiles(const std::string &rootdir, const std::string &basename, const std::string &suffix)
Entity * newEntity(const std::string &classname, const std::string &objname) const
Instantiate (and allocate) an entity.
static FactoryStorage * getInstance()
Get pointer to unique object of the class.
dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Fri Aug 2 2024 08:36:38