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>
25 using boost::test_tools::output_test_stream;
37 m_sigdSIN(
"MyEntity(" +
name +
")::input(double)::in_double"),
40 "MyEntity(" +
name +
")::input(double)::out_double"),
43 "MyEntity(" +
name +
")::input(double)::out2double")
50 const double &aDouble =
m_sigdSIN(inTime);
68 std::string rootdir(
"/tmp");
69 std::string basename(
"my-tracer");
70 std::string suffix(
".dat");
75 atracer.
openFiles(rootdir,
"invalid/filename", suffix);
81 atracer.
openFiles(rootdir, basename, suffix);
96 std::string emptybuf_cmd_str(
"empty");
100 in_double.setTime(i);
105 output_test_stream output;
116 BOOST_CHECK(output.is_equal(
117 "TracerRealTime my-tracer [mode=play] : \n"
119 " -> MyEntity(my-entity)::input(double)::out_double (in output)"
virtual void recompute(const Time &)
sigtime_t & recordTrigger(sigtime_t &dummy, const sigtime_t &time)
void addSignalToTraceByName(const std::string &signame, const std::string &filename="")
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...
DYNAMICGRAPH_FACTORY_ENTITY_PLUGIN(CustomEntity, "CustomEntity")
dynamicgraph::SignalTimeDependent< double, sigtime_t > m_sigdTwoTimeDepSOUT
void clearSignalToTrace()
void setBufferSize(const int &SIZE)
static const std::string CLASS_NAME
dynamicgraph::SignalTimeDependent< double, sigtime_t > m_sigdTimeDepSOUT
MyEntity(const std::string &name)
virtual void closeFiles()
command::Command * getNewStyleCommand(const std::string &cmdName)
Provides the pointer towards the Command object cmdName.
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.
Value execute()
Execute the command after checking parameters.
void display(std::ostream &os) const
Display information on the entity inside the output stream os.
void signalRegistration(const SignalArray< sigtime_t > &signals)
Exceptions raised when an error related to traces happen.
Main class of the tracer real-time plug-in.
void openFiles(const std::string &rootdir, const std::string &basename, const std::string &suffix)
BOOST_AUTO_TEST_CASE(test_tracer)
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