![]() |
DUNE: Uniform Navigational Environment
2016.03.0
|
Public Member Functions | |
| Task (const std::string &name, Tasks::Context &ctx) | |
| void | onUpdateParameters (void) |
| void | onEntityReservation (void) |
| void | onEntityResolution (void) |
| void | onResourceAcquisition (void) |
| void | onResourceInitialization (void) |
| void | onResourceRelease (void) |
| void | consume (const IMC::IoEvent *msg) |
| void | consume (const IMC::VehicleMedium *msg) |
| void | consume (const IMC::DevDataText *msg) |
| void | consume (const IMC::Aborted *msg) |
| void | consume (const IMC::PlanControl *msg) |
| void | consume (const IMC::SoundSpeed *msg) |
| void | consume (const IMC::Salinity *msg) |
| void | consume (const IMC::Temperature *msg) |
| void | consume (const IMC::Conductivity *msg) |
| void | consume (const IMC::PlanDB *msg) |
| void | consume (const IMC::EstimatedState *msg) |
| std::string | lookupSystemName (unsigned addr) |
| void | handlePlanListGet (const PlanListGet *cmd) |
| void | sendPlanList (unsigned destination) |
| void | handlePositionGet (const PositionGet *cmd) |
| void | sendPosition (unsigned destination) |
| void | handlePlanStart (const PlanStart *cmd) |
| void | sendPlanStarted (unsigned destination, const std::string &plan_name) |
| void | handlePlanStop (const PlanStop *cmd) |
| void | handlePlanAdd (const PlanAdd *cmd) |
| void | sendPlanAdded (unsigned destination, const std::string &plan_name) |
| void | handlePlanGet (const PlanGet *cmd) |
| void | sendPlan (unsigned destination) |
| void | handlePlanDelete (const PlanDelete *cmd) |
| void | sendPlanDeleted (unsigned destination, const std::string &plan_name) |
| void | handleRange (const Range *cmd) |
| void | sendPlanStopped (unsigned destination, const std::string &plan_name) |
| void | handleAbort (const Abort *cmd) |
| void | sendAborted (unsigned destination) |
| void | sendFailure (unsigned destination, FailureType fail) |
| void | sendError (unsigned destination, ErrorType error) |
| void | sendOk (const std::string &command) |
| void | handleSensorListGet (const SensorListGet *cmd) |
| void | handleSensorInfoGet (const SensorInfoGet *cmd) |
| void | handleSensorSampleGet (const SensorSampleGet *cmd) |
| void | sendSensorSample (const std::string &name, unsigned sensor_id, unsigned destination) |
| void | handleParam (const Param *cmd) |
| void | handleCommand (const std::string &line) |
| void | sendCommand (AbstractCommand &cmd) |
| double | getLoopDelay (void) const |
| void | updateScheduler (void) |
| void | requestNodeId (void) |
| void | setTxPower (unsigned level) |
| void | keepAlive (void) |
| void | onMain (void) |
Public Member Functions inherited from DUNE::Tasks::Task | |
| Task (const std::string &name, Context &context) | |
| virtual | ~Task (void) |
| const char * | getName (void) const |
| const char * | getSystemName (void) const |
| unsigned int | getSystemId (void) const |
| unsigned int | getEntityId (void) const |
| unsigned int | resolveEntity (const std::string &label) const |
| std::string | resolveEntity (unsigned int id) const |
| DebugLevel | getDebugLevel (void) const |
| uint16_t | getActivationTime (void) const |
| uint16_t | getDeactivationTime (void) const |
| unsigned int | resolveSystemName (const std::string &name) const |
| const char * | resolveSystemId (unsigned int id) const |
| void | loadConfig (void) |
| void | setPriority (unsigned int value) |
| unsigned int | getPriority (void) const |
| void | inf (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void | war (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void void | err (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void void void | cri (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void void void void | debug (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void void void void void | trace (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void void void void void void | spew (const char *format,...) DUNE_PRINTF_FORMAT(2 |
| void void void void void void void void | dispatch (IMC::Message *msg, unsigned int flags=0) |
| void | dispatch (IMC::Message &msg, unsigned int flags=0) |
| void | dispatchReply (const IMC::Message &original, IMC::Message &msg, unsigned int flags=0) |
| void | receive (const IMC::Message *msg) |
| void | reserveEntities (void) |
| void | resolveEntities (void) |
| void | acquireResources (void) |
| void | releaseResources (void) |
| void | initializeResources (void) |
| void | updateParameters (bool act_deact=true) |
| void | writeParamsXML (std::ostream &os) const |
| const char * | getEntityLabel (void) const |
| void | setEntityLabel (const std::string &label) |
Public Member Functions inherited from DUNE::Tasks::AbstractTask | |
| AbstractTask (void) | |
| virtual | ~AbstractTask (void) |
Public Member Functions inherited from DUNE::Concurrency::Thread | |
| Thread (void) | |
| virtual | ~Thread (void) |
| int | getProcessorUsage (void) |
Public Member Functions inherited from DUNE::Concurrency::Runnable | |
| Runnable (void) | |
| virtual | ~Runnable (void) |
| void | start (void) |
| void | stop (void) |
| void | join (void) |
| void | stopAndJoin (void) |
| void | setPriority (Scheduler::Policy policy, unsigned priority) |
| State | getState (void) |
| bool | isCreated (void) |
| bool | isStopping (void) |
| bool | isRunning (void) |
| bool | isStarting (void) |
| bool | isDead (void) |
Public Attributes | |
| MapName | m_modem_names |
| MapAddr | m_modem_addrs |
| std::vector< std::string > | m_plan_list |
| unsigned | m_addr_local |
| unsigned | m_addr_bcast |
| bool | m_aborted |
| uint8_t | m_bfr [128] |
| std::string | m_line |
| Link * | m_link |
| Sensors * | m_sensors |
| Scheduler * | m_scheduler |
| Position | m_position |
| Counter< double > | m_wdog |
| Counter< double > | m_kalive |
| IMC::VehicleMedium | m_medium |
| Arguments | m_args |
| IMC::PlanControl | m_pc |
| IMC::PlanSpecification | m_plan_spec |
| bool | m_plan_added |
| bool | m_plan_deleted |
Additional Inherited Members | |
Public Types inherited from DUNE::Concurrency::Runnable | |
| enum | State { StateStarting, StateRunning, StateStopping, StateDead, StateUnknown } |
Protected Member Functions inherited from DUNE::Tasks::Task | |
| void | setEntityState (IMC::EntityState::StateEnum state, Status::Code code) |
| void | setEntityState (IMC::EntityState::StateEnum state, const std::string &description) |
| IMC::EntityState::StateEnum | getEntityState (void) const |
| unsigned int | reserveEntity (const std::string &label) |
| template<typename E > | |
| E * | reserveEntity (const std::string &label) |
| bool | stopping (void) |
| bool | isActive (void) const |
| bool | isActivating (void) const |
| bool | isDeactivating (void) const |
| void | waitForMessages (double timeout) |
| void | consumeMessages (void) |
| template<typename T > | |
| Parameter & | param (const std::string &name, T &var) |
| template<typename Y , typename T > | |
| Parameter & | param (const std::string &name, T &var) |
| template<typename T > | |
| bool | paramChanged (T &var) |
| void | paramActive (Parameter::Scope def_scope, Parameter::Visibility def_visibility, bool def_value=false) |
| void | setParamSectionEditor (const std::string &name) |
| template<typename M , typename T > | |
| void | bind (T *task_obj, void(T::*consumer)(const M *)=&T::consume) |
| template<typename T > | |
| void | bind (T *task_obj, const std::vector< uint32_t > &list) |
| template<typename T , typename M > | |
| void | bind (T *task_obj, const std::vector< uint32_t > &list, void(T::*consumer)(const M *)=&T::consume) |
| template<typename T > | |
| void | bind (T *task_obj, const std::vector< std::string > &list) |
| void | requestActivation (void) |
| void | requestDeactivation (void) |
| void | activate (void) |
| void | activationFailed (const std::string &reason) |
| void | deactivate (void) |
| void | deactivationFailed (const std::string &reason) |
| virtual bool | onWriteParamsXML (std::ostream &os) const |
| virtual void | onReportEntityState (void) |
| virtual void | onRequestActivation (void) |
| virtual void | onRequestDeactivation (void) |
| virtual void | onActivation (void) |
| virtual void | onDeactivation (void) |
| virtual void | onQueryEntityParameters (const IMC::QueryEntityParameters *msg) |
| virtual void | onSetEntityParameters (const IMC::SetEntityParameters *msg) |
| virtual void | onPushEntityParameters (const IMC::PushEntityParameters *msg) |
| virtual void | onPopEntityParameters (const IMC::PopEntityParameters *msg) |
Protected Member Functions inherited from DUNE::Concurrency::Thread | |
| void | startImpl (void) |
| void | stopImpl (void) |
| void | joinImpl (void) |
| void | setPriorityImpl (Scheduler::Policy policy, unsigned priority) |
Protected Attributes inherited from DUNE::Tasks::Task | |
| Context & | m_ctx |
| std::vector < Entities::BasicEntity * > | m_entities |
|
inline |
Constructor.
| [in] | name | task name. |
| [in] | ctx | context. |
References DUNE::Tasks::Parameter::defaultValue(), DUNE::Tasks::Parameter::description(), DUNE::Tasks::Task::getSystemName(), m_args, m_medium, m_modem_addrs, m_modem_names, DUNE::Tasks::Task::param(), DUNE::Tasks::Parameter::scope(), Transports::SUNSET::Arguments::sensors, Transports::SUNSET::Arguments::src_level_control, Transports::SUNSET::Arguments::src_level_underwater, Transports::SUNSET::Arguments::src_level_unknown, Transports::SUNSET::Arguments::src_level_water, Transports::SUNSET::Arguments::tcp_addr, Transports::SUNSET::Arguments::tcp_port, and DUNE::Tasks::Parameter::visibility().
|
inline |
References DUNE::Tasks::Task::getEntityId(), and DUNE::Tasks::Task::getSystemId().
|
inline |
|
inline |
References DUNE::Tasks::Task::getEntityId(), and handleCommand().
|
inline |
References m_aborted.
|
inline |
References DUNE::Tasks::Task::getSystemId(), and m_pc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References m_plan_added, m_plan_deleted, m_plan_list, and m_plan_spec.
|
inline |
References Transports::SUNSET::PositionType::altitude, Transports::SUNSET::PositionType::depth, DUNE::Tasks::Task::getSystemId(), Transports::SUNSET::Position::heading, Transports::SUNSET::PositionType::latitude, Transports::SUNSET::PositionType::longitude, m_position, Transports::SUNSET::Position::timestamp, and Transports::SUNSET::Position::value.
|
inline |
References Transports::SUNSET::Scheduler::getRemaining(), and m_scheduler.
Referenced by onMain().
|
inline |
|
inline |
References DUNE::Tasks::Task::debug(), Transports::SUNSET::Factory::decode(), Transports::SUNSET::AbstractCommand::getName(), handleAbort(), handleParam(), handlePlanAdd(), handlePlanDelete(), handlePlanGet(), handlePlanListGet(), handlePlanStart(), handlePlanStop(), handlePositionGet(), handleRange(), handleSensorInfoGet(), handleSensorListGet(), handleSensorSampleGet(), m_kalive, DUNE::Time::Counter< T >::reset(), and sendOk().
Referenced by consume().
|
inline |
|
inline |
References DUNE::Tasks::Task::dispatch(), Transports::SUNSET::FAIL_INTERNAL_ERROR, Transports::SUNSET::AbstractCommand::getSource(), m_plan_added, Transports::SUNSET::PlanAdd::maneuver_list, Transports::SUNSET::newManeuverIMC(), Transports::SUNSET::PlanAdd::plan_name, sendFailure(), sendPlanAdded(), and DUNE::Tasks::Task::waitForMessages().
Referenced by handleCommand().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References Transports::SUNSET::FAIL_INVALID_REQUEST, Transports::SUNSET::Sensors::getSensorInfoList(), Transports::SUNSET::AbstractCommand::getSource(), m_addr_local, m_sensors, Transports::SUNSET::SensorInfoGet::measurement_name, sendCommand(), sendFailure(), Transports::SUNSET::AbstractCommand::setDestination(), Transports::SUNSET::AbstractCommand::setSource(), and Transports::SUNSET::SensorInfo::tuples.
Referenced by handleCommand().
|
inline |
References Transports::SUNSET::Sensors::getMeasurementList(), Transports::SUNSET::AbstractCommand::getSource(), m_addr_local, m_sensors, Transports::SUNSET::SensorList::measurement_names, sendCommand(), Transports::SUNSET::AbstractCommand::setDestination(), and Transports::SUNSET::AbstractCommand::setSource().
Referenced by handleCommand().
|
inline |
References Transports::SUNSET::ERR_INVALID_REQUEST, Transports::SUNSET::Sensors::exists(), Transports::SUNSET::AbstractCommand::getName(), Transports::SUNSET::AbstractCommand::getSource(), m_scheduler, m_sensors, Transports::SUNSET::SensorSampleGet::measurement_name, Transports::SUNSET::SensorSampleGet::sampling_frequency, sendError(), sendOk(), Transports::SUNSET::SensorSampleGet::sensor_identifier, and Transports::SUNSET::Scheduler::setSchedule().
Referenced by handleCommand().
|
inline |
References m_kalive, DUNE::Time::Counter< T >::overflow(), requestNodeId(), and DUNE::Time::Counter< T >::reset().
Referenced by onMain().
|
inline |
References m_modem_addrs.
Referenced by handleRange().
|
inlinevirtual |
Reserve entity identifiers.
Reimplemented from DUNE::Tasks::Task.
|
inlinevirtual |
Resolve entity names.
Reimplemented from DUNE::Tasks::Task.
|
inlinevirtual |
Main loop.
Implements DUNE::Tasks::Task.
References getLoopDelay(), keepAlive(), DUNE::Tasks::Task::stopping(), updateScheduler(), and DUNE::Tasks::Task::waitForMessages().
|
inlinevirtual |
Acquire resources.
Reimplemented from DUNE::Tasks::Task.
References m_args, m_link, m_scheduler, m_sensors, Transports::SUNSET::Arguments::sensors, DUNE::Tasks::Task::setEntityState(), Transports::SUNSET::Arguments::tcp_addr, and Transports::SUNSET::Arguments::tcp_port.
|
inlinevirtual |
Initialize resources.
Reimplemented from DUNE::Tasks::Task.
References m_kalive, and DUNE::Time::Counter< T >::setTop().
|
inlinevirtual |
Release resources.
Reimplemented from DUNE::Tasks::Task.
References m_link, m_scheduler, and m_sensors.
|
inlinevirtual |
Update internal state with new parameter values.
Reimplemented from DUNE::Tasks::Task.
|
inline |
References m_addr_local, Transports::SUNSET::ParamGet::name, Transports::SUNSET::NODE_ID, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by keepAlive().
|
inline |
References sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by handleAbort().
|
inline |
References Transports::SUNSET::AbstractCommand::encode(), m_addr_local, m_link, Transports::SUNSET::AbstractCommand::setSource(), and Transports::SUNSET::Link::write().
Referenced by handleSensorInfoGet(), handleSensorListGet(), requestNodeId(), sendAborted(), sendError(), sendFailure(), sendOk(), sendPlan(), sendPlanAdded(), sendPlanDeleted(), sendPlanList(), sendPlanStarted(), sendPlanStopped(), sendPosition(), sendSensorSample(), and setTxPower().
|
inline |
|
inline |
References Transports::SUNSET::CommandFailure::failure_reason, m_addr_local, sendCommand(), Transports::SUNSET::CommandFailure::sequence_number, Transports::SUNSET::AbstractCommand::setDestination(), and Transports::SUNSET::AbstractCommand::setSource().
Referenced by handlePlanAdd(), handlePlanDelete(), handlePlanGet(), handlePlanListGet(), handlePlanStart(), handlePlanStop(), handleSensorInfoGet(), and sendPlan().
|
inline |
|
inline |
|
inline |
References Transports::SUNSET::PlanAdded::plan_name, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by handlePlanAdd().
|
inline |
References Transports::SUNSET::PlanDeleted::plan_name, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by handlePlanDelete().
|
inline |
References m_plan_list, Transports::SUNSET::PlanList::plan_names, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by handlePlanListGet().
|
inline |
References Transports::SUNSET::PlanStarted::plan_name, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by handlePlanStart().
|
inline |
References Transports::SUNSET::PlanStopped::plan_name, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by handlePlanStop().
|
inline |
References m_position, sendCommand(), and Transports::SUNSET::AbstractCommand::setDestination().
Referenced by updateScheduler().
|
inline |
References Transports::SUNSET::Sensors::getMeasurement(), m_sensors, Transports::SUNSET::SensorSample::measurement_name, and sendCommand().
Referenced by updateScheduler().
|
inline |
|
inline |
References Transports::SUNSET::Scheduler::dequeuePending(), Transports::SUNSET::ScheduleKey::destination, Transports::SUNSET::Scheduler::hasPending(), m_scheduler, Transports::SUNSET::ScheduleKey::measure_name, sendPosition(), sendSensorSample(), Transports::SUNSET::ScheduleKey::sensor_id, and Transports::SUNSET::Scheduler::update().
Referenced by onMain().
| bool Transports::SUNSET::Task::m_aborted |
True if Aborted message was received.
Referenced by consume(), and handleAbort().
| unsigned Transports::SUNSET::Task::m_addr_bcast |
Broadcast address.
Referenced by handleParam().
| unsigned Transports::SUNSET::Task::m_addr_local |
Local node address.
Referenced by consume(), handleParam(), handleSensorInfoGet(), handleSensorListGet(), requestNodeId(), sendCommand(), sendError(), sendFailure(), sendOk(), and setTxPower().
| Arguments Transports::SUNSET::Task::m_args |
Task arguments.
Referenced by consume(), onResourceAcquisition(), and Task().
| uint8_t Transports::SUNSET::Task::m_bfr[128] |
Internal buffer.
| Counter<double> Transports::SUNSET::Task::m_kalive |
Keep-alive timer.
Referenced by handleCommand(), keepAlive(), and onResourceInitialization().
| std::string Transports::SUNSET::Task::m_line |
Command line being parsed.
| Link* Transports::SUNSET::Task::m_link |
Command link.
Referenced by onResourceAcquisition(), onResourceRelease(), and sendCommand().
| MapAddr Transports::SUNSET::Task::m_modem_addrs |
Map of Evologics modems by address.
Referenced by lookupSystemName(), and Task().
| MapName Transports::SUNSET::Task::m_modem_names |
| IMC::PlanControl Transports::SUNSET::Task::m_pc |
Last received PlanControl message.
Referenced by consume(), handlePlanStart(), and handlePlanStop().
| bool Transports::SUNSET::Task::m_plan_added |
Plan added.
Referenced by consume(), and handlePlanAdd().
| bool Transports::SUNSET::Task::m_plan_deleted |
Plan deleted.
Referenced by consume(), and handlePlanDelete().
| std::vector<std::string> Transports::SUNSET::Task::m_plan_list |
Plan list.
Referenced by consume(), handlePlanListGet(), and sendPlanList().
| IMC::PlanSpecification Transports::SUNSET::Task::m_plan_spec |
Last received plan specification.
Referenced by consume(), handlePlanGet(), and sendPlan().
| Position Transports::SUNSET::Task::m_position |
Last position.
Referenced by consume(), and sendPosition().
| Scheduler* Transports::SUNSET::Task::m_scheduler |
Command scheduler.
Referenced by getLoopDelay(), handlePositionGet(), handleSensorSampleGet(), onResourceAcquisition(), onResourceRelease(), and updateScheduler().
| Sensors* Transports::SUNSET::Task::m_sensors |
Sensor table.
Referenced by consume(), handleSensorInfoGet(), handleSensorListGet(), handleSensorSampleGet(), onResourceAcquisition(), onResourceRelease(), and sendSensorSample().
| Counter<double> Transports::SUNSET::Task::m_wdog |
Watchdog.
