Go to the documentation of this file.
24 #ifndef GOBY_MOOS_MIDDLEWARE_FRONTSEAT_FRONTSEAT_GATEWAY_PLUGIN_H
25 #define GOBY_MOOS_MIDDLEWARE_FRONTSEAT_FRONTSEAT_GATEWAY_PLUGIN_H
31 #include <MOOS/libMOOS/Comms/MOOSMsg.h>
32 #include <boost/algorithm/string/predicate.hpp>
33 #include <boost/algorithm/string/trim.hpp>
55 class GobyMOOSGatewayConfig;
79 std::vector<std::string> desired_buffer_params(
80 {
"SPEED",
"HEADING",
"DEPTH",
"PITCH",
"ROLL",
"Z_RATE",
"ALTITUDE"});
81 for (
const auto& var : desired_buffer_params)
moos().
add_buffer(
"DESIRED_" + var);
83 [
this](
const CMOOSMsg& ) { convert_desired_setpoints(); });
87 std::string sval =
msg.GetString();
89 if (boost::iequals(sval,
"drive"))
91 else if (boost::iequals(sval,
"park"))
102 void convert_desired_setpoints();
The global namespace for the Goby project.
void set_state(::goby::middleware::frontseat::protobuf::HelmState value)
constexpr goby::middleware::Group helm_state
FrontSeatTranslation(const goby::apps::moos::protobuf::GobyMOOSGatewayConfig &cfg)
void convert_and_publish_node_status(const goby::middleware::frontseat::protobuf::NodeStatus &status, CMOOSCommClient &moos_comms)
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions, ::google::protobuf::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg
constexpr goby::middleware::Group node_status
void add_trigger(const std::string &moos_var, const std::function< void(const CMOOSMsg &)> &func)
std::pair< size_t, size_t > trim(const char *b, const char *e, size_t left, size_t right)
util::FlexOstream glog
Access the Goby logger through this object.
ThreadType< goby::apps::moos::protobuf::GobyMOOSGatewayConfig > & goby()
void add_buffer(const std::string &moos_var)