1 #ifndef __PROBEVARIABLE_H__
2 #define __PROBEVARIABLE_H__
6 #include "boost/variant/get.hpp"
7 #include "boost/variant/variant.hpp"
8 #include "boost/smart_ptr.hpp"
16 static const std::string
name;
19 if (args.size() != 3) {
21 "probeVariable expects 3 arguments, " + std::to_string(args.size()) +
" given");
24 var_name_ = boost::get<std::string>(args[0]);
25 id_ = boost::get<double>(args[1]);
30 boost::scoped_ptr<ProbeReader> sim_probe(
new ProbeReader(probe_filename_));
33 sim_probe->parseFile();
39 double sim_value = 0.0;
41 sim_probe->getVariableValue(id_,
var_name_, sim_value);
43 std::cout <<
"Exception while getting value "
44 <<
"from Probe file: " << e.
what()
49 return boost::make_tuple(sim_value, is_valid);
virtual const char * what() const
constexpr double e
The value of .
static const std::string name
boost::tuple< double, bool > Result_t
std::string probe_filename_
boost::tuple< std::string, int, std::string > argument_types
std::vector< argument_t > arguments_t
Expressions::Result_t operator()(client::function::arguments_t args)
Inform & endl(Inform &inf)