DUNE: Uniform Navigational Environment  2019.02.0
DUNE::Tasks::Parameter Class Reference

Classes

struct  ValuesIf
 

Public Types

enum  Visibility { VISIBILITY_USER, VISIBILITY_DEVELOPER }
 
enum  Scope { SCOPE_GLOBAL, SCOPE_IDLE, SCOPE_PLAN, SCOPE_MANEUVER }
 

Public Member Functions

 Parameter (const std::string &param_name, const std::string &type_name)
 
 ~Parameter (void)
 
void reader (AbstractParameterParser *r)
 
void read (const std::string &val)
 
bool commit (void)
 
std::string name (void) const
 
std::string value (void) const
 
std::string defaultValue (void) const
 
ParameterdefaultValue (const std::string &val)
 
ParametervaluesIf (const std::string &if_param, const std::string &if_value, const std::string &a_values)
 
Units::Types units (void) const
 
Parameterunits (Units::Types val)
 
std::string description (void) const
 
Parameterdescription (const std::string &val)
 
ParameterminimumValue (const std::string &min_value)
 
ParametermaximumValue (const std::string &max_value)
 
Parametersize (int size_value)
 
ParameterminimumSize (unsigned min_size)
 
ParametermaximumSize (unsigned max_size)
 
Parametervalues (const std::string &list)
 
Parametervisibility (Visibility a_visibility)
 
Parametervisibility (const std::string &a_visibility)
 
Parameterscope (Scope a_scope)
 
Parameterscope (const std::string a_scope)
 
void writeXML (std::ostream &os) const
 
bool changed (void)
 
void setChanged (bool enabled=true)
 
Visibility getVisibility (void) const
 
Scope getScope (void) const
 

Static Public Member Functions

static Visibility visibilityFromString (const std::string &v)
 
static const char * visibilityToString (Visibility v)
 
static Scope scopeFromString (const std::string &s)
 
static const char * scopeToString (Scope s)
 

Protected Attributes

std::string m_name
 
std::string m_type_name
 
std::string m_desc
 
std::string m_default
 
Units::Types m_units
 
std::string m_value
 
std::string m_values
 
unsigned m_min_size
 
unsigned m_max_size
 
std::string m_min_value
 
std::string m_max_value
 
std::vector< ValuesIf * > m_values_if
 
AbstractParameterParserm_reader
 
bool m_changed
 
Visibility m_visibility
 
Scope m_scope
 

Member Enumeration Documentation

Parameter scope.

Enumerator
SCOPE_GLOBAL 

Parameter can be changed in all system states.

SCOPE_IDLE 

Parameter can only be changed when the system is not performing plans/maneuvers.

SCOPE_PLAN 

Parameter can be changed on a per plan basis.

SCOPE_MANEUVER 

Parameter can be changed on a per maneuver basis.

Parameter visibility.

Enumerator
VISIBILITY_USER 

Parameter is visible to the user.

VISIBILITY_DEVELOPER 

Parameter is visible only to developers.

Constructor & Destructor Documentation

DUNE::Tasks::Parameter::Parameter ( const std::string &  param_name,
const std::string &  type_name 
)

Constructor.

DUNE::Tasks::Parameter::~Parameter ( void  )

Destructor.

References m_reader, and m_values_if.

Member Function Documentation

bool DUNE::Tasks::Parameter::changed ( void  )
inline

References m_changed.

bool DUNE::Tasks::Parameter::commit ( void  )
inline
std::string DUNE::Tasks::Parameter::defaultValue ( void  ) const
inline

References m_default.

Referenced by DUNE::Control::BasicAutopilot::BasicAutopilot(), DUNE::Navigation::BasicNavigation::BasicNavigation(), DUNE::Control::BasicRemoteOperation::BasicRemoteOperation(), DUNE::Tasks::Task::paramActive(), DUNE::Control::PathController::PathController(), DUNE::Control::ProxyPathController::ProxyPathController(), DUNE::Tasks::ParameterTable::set(), DUNE::Tasks::SimpleTransport::SimpleTransport(), Transports::Fragments::Task::Task(), Sensors::GillWindObserverII::Task::Task(), Control::ASV::RemoteOperation::Task::Task(), Sensors::DataStore::Task::Task(), Simulators::UAVAutopilot::Task::Task(), Transports::Cache::Task::Task(), Sensors::XchangeSV::Task::Task(), Sensors::MiniSVS::Task::Task(), Supervisors::Reporter::Task::Task(), Transports::SerialOverTCP::Task::Task(), Autonomy::TextActions::Task::Task(), Transports::Discovery::Task::Task(), Control::Path::VectorField::Task::Task(), Vision::UAVCamera::Task::Task(), Supervisors::Entities::Task::Task(), Transports::LoggingDigest::Task::Task(), Vision::FrameGrabber::Task::Task(), Simulators::AcousticModem::Task::Task(), Control::UAV::LOS::Task::Task(), Sensors::CyclopsC7::Task::Task(), Sensors::EmulatedGPS::Task::Task(), Supervisors::UAV::LostComms::Task::Task(), Control::Path::ILOS::Task::Task(), Control::ROV::Depth::Task::Task(), Control::Path::LOSnSMC::Task::Task(), Navigation::General::GPSNavigation::Task::Task(), Autonomy::TREX::Task::Task(), Actuators::PWM::Task::Task(), Vision::PhotoTrigger::Task::Task(), Control::AUV::RemoteOperation::Task::Task(), Transports::IridiumSBD::Task::Task(), Sensors::AIM104MultiIO::Task::Task(), Monitors::Emergency::Task::Task(), Sensors::AIS::Task::Task(), Control::AUV::LMI::Task::Task(), Monitors::Clock::Task::Task(), Sensors::SW100::Task::Task(), Maneuver::VehicleFormation::Test::Task::Task(), Autonomy::OnEvent::Task::Task(), Transports::Replay::Task::Task(), Supervisors::AUV::LostComms::Task::Task(), Sensors::DMS::Task::Task(), Control::ROV::HorizontalPlane::Task::Task(), Monitors::FuelLevel::Task::Task(), Monitors::Entities::Task::Task(), Navigation::General::ROV::Task::Task(), Sensors::MTi::Task::Task(), Sensors::SADC::Task::Task(), Supervisors::Vehicle::Task::Task(), Monitors::Medium::Task::Task(), Transports::Announce::Task::Task(), Power::CPMB::Task::Task(), Plan::DB::Task::Task(), Power::APD::Task::Task(), Supervisors::AUV::Assist::Task::Task(), Power::CPMBv2::Task::Task(), Power::BATMANv2::Task::Task(), Transports::UAN::Task::Task(), Control::AUV::Allocator::Task::Task(), Vision::UI2210MGL::Task::Task(), DUNE::Tasks::Task::Task(), Control::ROV::RemoteOperation::Task::Task(), Monitors::OperationalLimits::Task::Task(), Control::AUV::Speed::Task::Task(), Transports::UDP::Task::Task(), Sensors::OS4000::Task::Task(), Power::OPCON::Task::Task(), Power::LUEMB::Task::Task(), Simulators::UAV::Task::Task(), Actuators::LED4R::Task::Task(), Plan::Engine::Task::Task(), Sensors::OEMX::Task::Task(), Sensors::XR620CTD::Task::Task(), Transports::GSM::Task::Task(), Sensors::IFOG::Task::Task(), Transports::Radio::Task::Task(), Vision::Lumenera::Task::Task(), Sensors::Microstrain3DMGX1::Task::Task(), Sensors::Microstrain3DMGX3::Task::Task(), Control::AUV::Attitude::Task::Task(), Transports::Seatrac::Task::Task(), Sensors::MetrecX::Task::Task(), Sensors::MLBLTracker::Task::Task(), Vision::DFK51BG02H::Task::Task(), Control::UAV::PX4::Task::Task(), Maneuver::VehicleFormation::Coordinator::Task::Task(), Navigation::AUV::Navigation::Task::Task(), Sensors::Imagenex881A::Task::Task(), Control::UAV::Ardupilot::Task::Task(), Actuators::MCD4R::Task::Task(), Sensors::MLBL::Task::Task(), and Maneuver::VehicleFormation::FormCollAvoid::Task::Task().

Parameter& DUNE::Tasks::Parameter::defaultValue ( const std::string &  val)
inline

References m_default.

Parameter& DUNE::Tasks::Parameter::description ( const std::string &  val)
inline

References m_desc.

Scope DUNE::Tasks::Parameter::getScope ( void  ) const
inline

References m_scope.

Visibility DUNE::Tasks::Parameter::getVisibility ( void  ) const
inline

References m_visibility.

Parameter& DUNE::Tasks::Parameter::maximumSize ( unsigned  max_size)
inline
Parameter& DUNE::Tasks::Parameter::minimumSize ( unsigned  min_size)
inline
std::string DUNE::Tasks::Parameter::name ( void  ) const
inline

References m_name.

Referenced by writeXML().

void DUNE::Tasks::Parameter::reader ( AbstractParameterParser r)

References m_reader.

Referenced by DUNE::Tasks::ParameterTable::add().

Parameter & DUNE::Tasks::Parameter::scope ( const std::string  a_scope)

References m_scope, and scopeFromString().

Parameter::Scope DUNE::Tasks::Parameter::scopeFromString ( const std::string &  s)
static

Referenced by scope().

const char * DUNE::Tasks::Parameter::scopeToString ( Scope  s)
static
void DUNE::Tasks::Parameter::setChanged ( bool  enabled = true)
inline

References m_changed.

Referenced by DUNE::Tasks::ParameterTable::set().

Parameter& DUNE::Tasks::Parameter::units ( Units::Types  val)
inline

References m_units.

std::string DUNE::Tasks::Parameter::value ( void  ) const
inline

References m_value.

Parameter& DUNE::Tasks::Parameter::valuesIf ( const std::string &  if_param,
const std::string &  if_value,
const std::string &  a_values 
)
inline
Parameter & DUNE::Tasks::Parameter::visibility ( const std::string &  a_visibility)

Set parameter's visibility.

Parameters
[in]a_visibilitydesired visibility.
Returns
parameter reference.

References m_visibility, and visibilityFromString().

Parameter::Visibility DUNE::Tasks::Parameter::visibilityFromString ( const std::string &  v)
static

Referenced by visibility().

const char * DUNE::Tasks::Parameter::visibilityToString ( Visibility  v)
static

Member Data Documentation

bool DUNE::Tasks::Parameter::m_changed
protected

True if the value of this parameter changed.

Referenced by changed(), and setChanged().

std::string DUNE::Tasks::Parameter::m_default
protected

Default value.

Referenced by defaultValue(), and writeXML().

std::string DUNE::Tasks::Parameter::m_desc
protected

Description.

Referenced by description(), and writeXML().

unsigned DUNE::Tasks::Parameter::m_max_size
protected

Maximum size.

Referenced by maximumSize(), and writeXML().

std::string DUNE::Tasks::Parameter::m_max_value
protected

Maximum value.

Referenced by maximumValue(), and writeXML().

unsigned DUNE::Tasks::Parameter::m_min_size
protected

Minimum size.

Referenced by minimumSize(), and writeXML().

std::string DUNE::Tasks::Parameter::m_min_value
protected

Minimum value.

Referenced by minimumValue(), and writeXML().

std::string DUNE::Tasks::Parameter::m_name
protected

Name.

Referenced by name(), read(), and writeXML().

AbstractParameterParser* DUNE::Tasks::Parameter::m_reader
protected
Scope DUNE::Tasks::Parameter::m_scope
protected

Parameter scope.

Referenced by getScope(), scope(), and writeXML().

std::string DUNE::Tasks::Parameter::m_type_name
protected

Type name.

Referenced by writeXML().

Units::Types DUNE::Tasks::Parameter::m_units
protected

Units.

Referenced by units(), and writeXML().

std::string DUNE::Tasks::Parameter::m_value
protected

Current value.

Referenced by read(), value(), and writeXML().

std::string DUNE::Tasks::Parameter::m_values
protected

Comma separated list of valid values.

Referenced by values(), and writeXML().

std::vector<ValuesIf*> DUNE::Tasks::Parameter::m_values_if
protected

Conditional comma separated list of valid values.

Referenced by valuesIf(), writeXML(), and ~Parameter().

Visibility DUNE::Tasks::Parameter::m_visibility
protected

Parameter visibility.

Referenced by getVisibility(), visibility(), and writeXML().

Collaboration diagram for DUNE::Tasks::Parameter:
Collaboration graph