21 #ifndef __PROBEVARIABLE_H__
22 #define __PROBEVARIABLE_H__
26 #include "boost/variant/get.hpp"
27 #include "boost/variant/variant.hpp"
28 #include "boost/smart_ptr.hpp"
36 static const std::string
name;
39 if (args.size() != 3) {
41 "probeVariable expects 3 arguments, " + std::to_string(args.size()) +
" given");
44 var_name_ = boost::get<std::string>(args[0]);
45 id_ = boost::get<double>(args[1]);
50 const std::unique_ptr<ProbeReader> sim_probe(
new ProbeReader(probe_filename_));
53 sim_probe->parseFile();
59 double sim_value = 0.0;
61 sim_probe->getVariableValue(id_,
var_name_, sim_value);
63 std::cout <<
"Exception while getting value "
64 <<
"from Probe file: " << e.
what()
69 return boost::make_tuple(sim_value, is_valid);
std::string probe_filename_
std::vector< argument_t > arguments_t
virtual const char * what() const
Expressions::Result_t operator()(client::function::arguments_t args)
static const std::string name
Inform & endl(Inform &inf)
constexpr double e
The value of .
boost::tuple< double, bool > Result_t
boost::tuple< std::string, int, std::string > argument_types