DUNE: Uniform Navigational Environment
2.4.2
|
Utility class to parse simple plans from DUNE's .ini format.
Static Public Member Functions | |
static void | parse (Parsers::Config &parser, std::string section, IMC::Goto &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::StationKeeping &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::Loiter &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::PopUp &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::Teleoperation &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::IdleManeuver &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::FollowPath &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::Rows &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::YoYo &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::Elevator &maneuver) |
static void | parse (Parsers::Config &parser, std::string section, IMC::CompassCalibration &maneuver) |
static void | parse (Parsers::Config &parser, IMC::PlanSpecification &plan) |
static void | parseActions (Parsers::Config &cfg, const std::vector< std::string > §ions, IMC::MessageList< IMC::Message > &actions) |
template<typename T > | |
static void | parseSpeed (Parsers::Config &parser, std::string section, T &man) |
template<typename T > | |
static void | parseCoordinate (Parsers::Config &parser, std::string section, T &msg) |
template<typename T > | |
static void | parseAngle (Parsers::Config &parser, std::string section, std::string key, T &value, T dfl) |
template<typename T > | |
static void | parseTimeout (Parsers::Config &parser, std::string section, T &man) |
template<typename T > | |
static void | parseDuration (Parsers::Config &parser, std::string section, T &man) |
template<typename T > | |
static void | parseZ (Parsers::Config &parser, std::string section, T &man) |
static void | parseZUnits (Parsers::Config &parser, std::string section, uint8_t &zunits, std::string label="Z Units") |
template<typename Type > | |
static void | parseZUnits (Parsers::Config &parser, std::string section, Type &man, std::string label="Z Units") |
|
static |
Parse a Goto maneuver specification from plan definition file.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver specification. |
References parseCoordinate(), parseSpeed(), parseTimeout(), parseZ(), and parseZUnits().
Referenced by parse().
|
static |
Parse a StationKeeping maneuver specification from plan definition file.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver specification. |
References DUNE::Parsers::Config::get(), parseCoordinate(), parseDuration(), parseSpeed(), parseZ(), parseZUnits(), and DUNE::IMC::StationKeeping::radius.
|
static |
Parse a Loiter maneuver specification from plan definition file.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver specification. |
References DUNE::IMC::Loiter::bearing, DUNE::IMC::Loiter::direction, DUNE::Parsers::Config::get(), DUNE::IMC::Loiter::LD_CCLOCKW, DUNE::IMC::Loiter::LD_CLOCKW, DUNE::IMC::Loiter::length, DUNE::IMC::Loiter::LT_CIRCULAR, DUNE::IMC::Loiter::LT_EIGHT, DUNE::IMC::Loiter::LT_HOVER, DUNE::IMC::Loiter::LT_RACETRACK, parseAngle(), parseCoordinate(), parseDuration(), parseSpeed(), parseTimeout(), parseZ(), parseZUnits(), DUNE::IMC::Loiter::radius, and DUNE::IMC::Loiter::type.
|
static |
Parse a Popup maneuver specification from plan definition file.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver specification. |
References DUNE::IMC::PopUp::flags, DUNE::Parsers::Config::get(), parseCoordinate(), parseDuration(), parseSpeed(), parseTimeout(), parseZ(), parseZUnits(), and DUNE::IMC::PopUp::radius.
|
static |
Parse a Teleoperation maneuver specification from plan definition file.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver specification. |
References DUNE::IMC::Teleoperation::custom, and DUNE::Parsers::Config::get().
|
static |
Parse an Idle Maneuver specification.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver. |
References parseDuration().
|
static |
Parse a FollowPath specification.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver. |
References DUNE::Parsers::Config::get(), parseCoordinate(), parseSpeed(), parseTimeout(), parseZ(), parseZUnits(), DUNE::IMC::FollowPath::points, DUNE::IMC::MessageList< Type >::push_back(), DUNE::Math::Matrix::readFromConfig(), DUNE::Math::Matrix::rows(), DUNE::IMC::PathPoint::x, DUNE::IMC::PathPoint::y, and DUNE::IMC::PathPoint::z.
|
static |
Parse a Rows maneuver specification.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver. |
References DUNE::IMC::Rows::alternation, DUNE::IMC::Rows::bearing, DUNE::IMC::Rows::coff, DUNE::IMC::Rows::cross_angle, DUNE::IMC::Rows::flags, DUNE::Parsers::Config::get(), DUNE::IMC::Rows::hstep, DUNE::IMC::Rows::length, parseAngle(), parseCoordinate(), parseSpeed(), parseZ(), parseZUnits(), and DUNE::IMC::Rows::width.
|
static |
Parse a Yoyo maneuver specification.
[in] | parser | configuration parser handle |
[in] | section | section that contais the maneuver specification |
[out] | maneuver | output maneuver. |
References DUNE::IMC::YoYo::amplitude, DUNE::Parsers::Config::get(), parseAngle(), parseCoordinate(), parseSpeed(), parseZ(), parseZUnits(), and DUNE::IMC::YoYo::pitch.
|
static |
Parse an Elevator maneuver specification.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver. |
References DUNE::IMC::Elevator::end_z, DUNE::IMC::Elevator::end_z_units, DUNE::IMC::Elevator::flags, DUNE::Parsers::Config::get(), parseCoordinate(), parseSpeed(), parseZUnits(), DUNE::IMC::Elevator::radius, DUNE::IMC::Elevator::start_z, and DUNE::IMC::Elevator::start_z_units.
|
static |
Parse a CompassCalibration maneuver specification from plan definition file.
[in] | parser | configuration parser handle. |
[in] | section | section that contains the maneuver specification. |
[out] | maneuver | output maneuver specification. |
References DUNE::IMC::CompassCalibration::amplitude, DUNE::IMC::CompassCalibration::direction, DUNE::Parsers::Config::get(), DUNE::IMC::Loiter::LD_CCLOCKW, DUNE::IMC::Loiter::LD_CLOCKW, parseAngle(), parseCoordinate(), parseDuration(), parseSpeed(), parseTimeout(), parseZ(), parseZUnits(), DUNE::IMC::CompassCalibration::pitch, and DUNE::IMC::CompassCalibration::radius.
|
static |
Parse plan parameters (utility text format).
[in] | parser | configuration parser handle. |
[out] | plan | plan parameters. |
References DUNE::IMC::PlanManeuver::data, DUNE::IMC::PlanTransition::dest_man, DUNE::IMC::PlanManeuver::end_actions, DUNE::IMC::PlanSpecification::end_actions, DUNE::Parsers::Config::get(), DUNE::IMC::PlanManeuver::maneuver_id, DUNE::IMC::PlanSpecification::maneuvers, parse(), parseActions(), DUNE::IMC::PlanSpecification::plan_id, DUNE::IMC::PlanTransition::source_man, DUNE::IMC::PlanManeuver::start_actions, DUNE::IMC::PlanSpecification::start_actions, DUNE::IMC::PlanSpecification::start_man_id, DUNE::IMC::Message::toText(), and DUNE::IMC::PlanSpecification::transitions.
|
static |
Parse actions from a set vector of sections.
[in] | cfg | Config object to use |
[in] | sections | vector of sections to look for and parse |
[out] | actions | message list to fill in with parsed data |
References DUNE::Parsers::Config::get(), DUNE::IMC::EntityParameter::name, DUNE::IMC::SetEntityParameters::name, DUNE::Parsers::Config::options(), DUNE::IMC::SetEntityParameters::params, DUNE::IMC::MessageList< Type >::push_back(), and DUNE::IMC::EntityParameter::value.
Referenced by parse().
|
inlinestatic |
Parse angle.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[in] | key | configuration key. |
[out] | value | value reference. |
[in] | dfl | default value. |
References DUNE::Parsers::Config::get(), DUNE::Math::Angles::radians(), and DUNE::uncastLexical().
Referenced by parse(), and parseCoordinate().
|
inlinestatic |
Parse latitute/longitude specification for a maneuver.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[out] | msg | destination message. |
References DUNE::Coordinates::WGS84::displace(), DUNE::Parsers::Config::get(), and parseAngle().
Referenced by parse().
|
inlinestatic |
Parse duration specification for a maneuver.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[out] | man | destination maneuver. |
References DUNE::Parsers::Config::get().
Referenced by parse().
|
inlinestatic |
Parse speed and speed units for a maneuver.
[in] | parser | configuration parser handle. |
[in] | section | section configuration section. |
[out] | man | destination maneuver. |
References DUNE::Parsers::Config::get(), DUNE::IMC::SUNITS_METERS_PS, DUNE::IMC::SUNITS_PERCENTAGE, and DUNE::IMC::SUNITS_RPM.
Referenced by parse().
|
inlinestatic |
Parse timeout specification for a maneuver.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[out] | man | destination maneuver. |
References DUNE::Parsers::Config::get().
Referenced by parse().
|
inlinestatic |
Parse depth specification for a maneuver.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[out] | man | destination maneuver. |
References DUNE::Parsers::Config::get().
Referenced by parse().
|
inlinestatic |
Parse z units specification for a maneuver.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[out] | zunits | destination variable. |
[in] | label | label. |
References DUNE::Parsers::Config::get(), DUNE::Utils::String::str(), DUNE::IMC::Z_ALTITUDE, DUNE::IMC::Z_DEPTH, DUNE::IMC::Z_HEIGHT, and DUNE::IMC::Z_NONE.
Referenced by parse(), and parseZUnits().
|
inlinestatic |
Parse z units specification for maneuver.
[in] | parser | configuration parser handle. |
[in] | section | configuration section. |
[out] | man | destination maneuver. |
[in] | label | label. |
References parseZUnits().