DUNE: Uniform Navigational Environment
2.5.0
|
Task.
Public Member Functions | |
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 |
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 |
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) |
Protected Member Functions | |
const char * | getEntityLabel (void) const |
void | setEntityLabel (const std::string &label) |
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) |
unsigned int | resolveEntity (const std::string &label) const |
std::string | resolveEntity (unsigned int id) const |
bool | stopping (void) |
bool | isActive (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 > | |
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 void | onEntityReservation (void) |
virtual void | onEntityResolution (void) |
virtual void | onReportEntityState (void) |
virtual void | onResourceAcquisition (void) |
virtual void | onResourceRelease (void) |
virtual void | onResourceInitialization (void) |
virtual void | onUpdateParameters (void) |
virtual void | onRequestActivation (void) |
virtual void | onRequestDeactivation (void) |
virtual void | onActivation (void) |
virtual void | onDeactivation (void) |
virtual void | onMain (void)=0 |
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 | |
Context & | m_ctx |
Additional Inherited Members | |
Public Types inherited from DUNE::Concurrency::Runnable | |
enum | State { StateStarting, StateRunning, StateStopping, StateDead, StateUnknown } |
DUNE::Tasks::Task::Task | ( | const std::string & | name, |
Context & | context | ||
) |
Construct a task object.
[in] | name | name of the task. |
[in] | context | task context. |
References DUNE::Status::CODE_INIT, DUNE::Tasks::Parameter::defaultValue(), DUNE::IMC::EntityActivationState::EAS_INACTIVE, DUNE::IMC::EntityState::ESTA_BOOT, param(), DUNE::Tasks::Recipient, setEntityState(), and DUNE::IMC::EntityActivationState::state.
|
inlinevirtual |
Destructor.
Reimplemented in Actuators::MCD4R::Task, Vision::DFK51BG02H::Task, Sensors::MLBLTracker::Task, Transports::UDP::Task, Sensors::IFOG::Task, Actuators::LED4R::Task, Plan::Engine::Task, Transports::Announce::Task, Transports::Replay::Task, Transports::UAN::Task, Sensors::MTi::Task, Transports::IridiumSBD::Task, Transports::Noptilus::Task, Transports::LoggingDigest::Task, Transports::Cache::Task, Transports::SerialOverTCP::Task, and Simulators::UAVAutopilot::Task.
void DUNE::Tasks::Task::acquireResources | ( | void | ) |
Acquire resources whose configuration depends on dynamic parameters.
References DUNE::Tasks::ParameterTable::end(), DUNE::Tasks::ParameterTable::find(), onResourceAcquisition(), and DUNE::Tasks::Parameter::SCOPE_MANEUVER.
|
protected |
Derived classes should use this function to signal that activation was completed successfully.
References dispatch(), DUNE::IMC::EntityActivationState::EAS_ACT_DONE, DUNE::IMC::EntityActivationState::EAS_ACT_IP, DUNE::IMC::EntityActivationState::EAS_ACTIVE, onActivation(), requestDeactivation(), DUNE::Tasks::ParameterTable::set(), spew(), and DUNE::IMC::EntityActivationState::state.
Referenced by Vision::Lumenera::Task::checkActivation(), Sensors::Imagenex881A::Task::checkActivationProgress(), Monitors::Entities::Task::consume(), Vision::DFK51BG02H::Task::consume(), and onRequestActivation().
|
protected |
Derived classes should use this function to signal that activation failed.
[in] | reason | reason for activation failure. |
References dispatch(), DUNE::IMC::EntityActivationState::EAS_ACT_FAIL, DUNE::IMC::EntityActivationState::EAS_INACTIVE, DUNE::IMC::EntityActivationState::error, spew(), and DUNE::IMC::EntityActivationState::state.
Referenced by Sensors::Imagenex881A::Task::checkActivationProgress().
|
inlineprotected |
Bind a message to a consumer method.
task_obj | consumer task. |
consumer | consumer method. |
Referenced by bind(), DUNE::Tasks::SimpleTransport::onMain(), Transports::LoggingDigest::Task::onUpdateParameters(), and Transports::UDP::Task::onUpdateParameters().
|
inlineprotected |
Bind multiple messages to a default consumer method.
task_obj | consumer object. |
list | list of message identifiers. |
References bind().
|
inlineprotected |
Bind multiple messages to a default consumer method.
task_obj | consumer task. |
list | list of message abbreviations. |
References bind(), and DUNE::IMC::Factory::getIdFromAbbrev().
|
inlineprotected |
Call the consumers of all messages currently in the receiving queue.
References DUNE::Tasks::Recipient::runCallBacks().
Referenced by Sensors::MLBL::Task::fullAcousticReport(), Sensors::XR620CTD::Task::getCalibration(), DUNE::Tasks::SimpleTransport::onMain(), Sensors::PPS::Task::onMain(), Sensors::MiniSVS::Task::onMain(), Sensors::XchangeSV::Task::onMain(), Vision::PhotoTrigger::Task::onMain(), Sensors::AIS::Task::onMain(), Sensors::WorkhorseNavigator::Task::onMain(), Transports::FlightGear::Task::onMain(), Transports::ArdupilotSITL::Task::onMain(), Sensors::IFOG::Task::onMain(), Transports::Replay::Task::onMain(), UserInterfaces::RCViaArdupilot::Task::onMain(), Autonomy::TREX::Task::onMain(), Transports::Iridium::Task::onMain(), Sensors::XR620CTD::Task::onMain(), Sensors::OS4000::Task::onMain(), Transports::Announce::Task::onMain(), Vision::DFK51BG02H::Task::onMain(), Vision::Lumenera::Task::onMain(), Sensors::Imagenex881A::Task::onMain(), Sensors::MLBLTracker::Task::onMain(), Control::UAV::Ardupilot::Task::onMain(), Sensors::MLBL::Task::processInput(), Sensors::OS4000::Task::readString(), Sensors::XR620CTD::Task::setParameters(), Sensors::XR620CTD::Task::stopSampling(), Simulators::UAVAutopilot::Task::task(), Sensors::Microstrain3DMGX3::Task::task(), Simulators::UAV::Task::task(), and Maneuver::VehicleFormation::FormCollAvoid::Task::task().
void DUNE::Tasks::Task::cri | ( | const char * | format, |
... | |||
) |
Send an human-readable critical error message to all configured output channels and files.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::IMC::LogBookEntry::LBET_CRITICAL.
|
protected |
Derived classes should use this function to signal that deactivation was completed successfully.
References dispatch(), DUNE::IMC::EntityActivationState::EAS_DEACT_DONE, DUNE::IMC::EntityActivationState::EAS_DEACT_IP, DUNE::IMC::EntityActivationState::EAS_INACTIVE, onDeactivation(), requestActivation(), DUNE::Tasks::ParameterTable::set(), spew(), and DUNE::IMC::EntityActivationState::state.
Referenced by onRequestDeactivation().
|
protected |
Derived classes should use this function to signal that deactivation failed.
[in] | reason | reason for deactivation failure. |
References dispatch(), DUNE::IMC::EntityActivationState::EAS_ACTIVE, DUNE::IMC::EntityActivationState::EAS_DEACT_FAIL, DUNE::IMC::EntityActivationState::error, spew(), and DUNE::IMC::EntityActivationState::state.
void DUNE::Tasks::Task::debug | ( | const char * | format, |
... | |||
) |
Send an human-readable debug message to all configured output channels and files.
The message will only be processed if the configured log level is DEBUG_LEVEL_DEBUG or greater.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::Tasks::DEBUG_LEVEL_DEBUG, and DUNE::IMC::LogBookEntry::LBET_DEBUG.
Referenced by Control::AUV::RemoteOperation::Task::actuate(), Plan::DB::Task::answer(), Sensors::OS4000::Task::changeCalibrationState(), Plan::Engine::Task::changeMode(), Sensors::Imagenex881A::Task::checkActivationProgress(), Plan::Engine::Task::closeDB(), Transports::Fragments::Task::consume(), Simulators::UAVAutopilot::Task::consume(), DUNE::Control::PathController::consume(), DUNE::Control::BasicAutopilot::consume(), Control::PTU::Task::consume(), Transports::IridiumSBD::Task::consume(), Control::AUV::Allocator::Task::consume(), Transports::Iridium::Task::consume(), Control::AUV::Speed::Task::consume(), Plan::Engine::Task::consume(), Supervisors::Vehicle::Task::consume(), Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), Control::UAV::Ardupilot::Task::consume(), Transports::IridiumSBD::Task::dequeueTxRequest(), Transports::Replay::Task::displayStats(), Monitors::Entities::Task::enableDefaults(), Supervisors::AUV::LostComms::Task::getPlanSpec(), UserInterfaces::RCViaArdupilot::Task::handleArdupilotData(), Control::UAV::Ardupilot::Task::handleArdupilotData(), Sensors::MLBLTracker::Task::handleCARXD(), Control::UAV::Ardupilot::Task::handleCmdAckPacket(), Transports::FlightGear::Task::handleFlightGearData(), Control::UAV::Ardupilot::Task::handleHeartbeatPacket(), Control::UAV::Ardupilot::Task::handleMissionAckPacket(), Control::UAV::Ardupilot::Task::handleNavControllerPacket(), UserInterfaces::RCViaArdupilot::Task::handleRCChannelsRawPacket(), UserInterfaces::RCViaArdupilot::Task::handleStatusTextPacket(), Control::UAV::Ardupilot::Task::handleStatusTextPacket(), Transports::IridiumSBD::Task::invalidateTxRequest(), Control::UAV::Ardupilot::Task::loiterHere(), Transports::Fragments::Task::messageRipper(), Supervisors::Vehicle::Task::onDisabledControlLoops(), Supervisors::Vehicle::Task::onEnabledControlLoops(), Transports::Iridium::Task::onMain(), Vision::Lumenera::Task::onMain(), Control::ROV::RemoteOperation::Task::onRemoteActions(), Transports::IridiumSBD::Task::onResourceAcquisition(), Transports::GSM::Task::onResourceAcquisition(), Simulators::UAV::Task::onResourceAcquisition(), Maneuver::VehicleFormation::FormCollAvoid::Task::onResourceAcquisition(), Vision::DFK51BG02H::Task::onResourceInitialization(), Control::AUV::RemoteOperation::Task::onUpdateParameters(), Transports::UDP::Task::onUpdateParameters(), Plan::Engine::Task::openDB(), Sensors::Microstrain3DMGX1::Task::parse(), Sensors::MLBL::Task::reportRanges(), Transports::Iridium::Task::send_announce(), Transports::Iridium::Task::send_device_updates(), Sensors::OS4000::Task::setParameter(), Vision::Lumenera::Task::setProperties(), UserInterfaces::RCViaArdupilot::Task::setupRate(), DUNE::Maneuvers::Maneuver::startManeuver(), Vision::Lumenera::Task::startVideo(), Supervisors::Vehicle::Task::stopCalibration(), Plan::Engine::Task::stopPlan(), Vision::Lumenera::Task::stopVideo(), Control::UAV::Ardupilot::Task::takeoff(), Supervisors::AUV::LostComms::Task::task(), Supervisors::Vehicle::Task::task(), Monitors::FuelLevel::Task::task(), and DUNE::Control::YoYoMotion::update().
void DUNE::Tasks::Task::dispatch | ( | IMC::Message * | msg, |
unsigned int | flags = 0 |
||
) |
Dispatch message to the message bus.
[in] | msg | message pointer. |
[in] | flags | bitfield with flags (see DispatchFlags). |
References DUNE::Tasks::DF_KEEP_SRC_EID, DUNE::Tasks::DF_KEEP_TIME, DUNE::Tasks::DF_LOOP_BACK, DUNE::IMC::Bus::dispatch(), getEntityId(), DUNE::IMC::Message::getSource(), DUNE::IMC::Message::getSourceEntity(), getSystemId(), DUNE::IMC::AddressResolver::isValid(), m_ctx, DUNE::Tasks::Context::mbus, DUNE::IMC::Message::setSource(), DUNE::IMC::Message::setSourceEntity(), and DUNE::IMC::Message::setTimeStamp().
Referenced by Sensors::MLBLTracker::Task::abort(), Sensors::MLBLTracker::Task::abortNarrowBand(), activate(), activationFailed(), Control::ASV::RemoteOperation::Task::actuate(), Control::ROV::RemoteOperation::Task::actuate(), Control::AUV::RemoteOperation::Task::actuate(), Control::ROV::RemoteOperation::Task::actuateThruster(), Control::AUV::Allocator::Task::allocate(), Transports::Announce::Task::announce(), Supervisors::Vehicle::Task::answer(), Plan::DB::Task::answer(), Plan::Engine::Task::answer(), Sensors::OS4000::Task::changeCalibrationState(), Plan::Engine::Task::changeLog(), Supervisors::Vehicle::Task::changeMode(), Plan::Engine::Task::changeMode(), Autonomy::TREX::Task::checkState(), Sensors::MLBLTracker::Task::checkTimeouts(), Control::AUV::Allocator::Task::computeProducedTorque(), DUNE::Control::BasicRemoteOperation::consume(), Transports::Fragments::Task::consume(), DUNE::Daemon::consume(), DUNE::Control::PathController::consume(), DUNE::Control::BasicAutopilot::consume(), Control::AntennaTracker::Task::consume(), Control::PTU::Task::consume(), Sensors::MTi::Task::consume(), Navigation::General::GPSNavigation::Task::consume(), Transports::Noptilus::Task::consume(), DUNE::Navigation::BasicNavigation::consume(), Plan::Generator::Task::consume(), Transports::Iridium::Task::consume(), Monitors::OperationalLimits::Task::consume(), Autonomy::TREX::Task::consume(), Sensors::Microstrain3DMGX3::Task::consume(), Navigation::General::Alignment::Task::consume(), Transports::UAN::Task::consume(), Sensors::MLBLTracker::Task::consume(), Supervisors::Vehicle::Task::consume(), Actuators::MCD4R::Task::consume(), Control::UAV::Ardupilot::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), Sensors::MLBL::Task::consume(), Transports::Cache::Task::copySnapshot(), deactivate(), deactivationFailed(), Sensors::IFOG::Task::decodeFrame(), Control::ROV::Depth::Task::depthControl(), Control::AUV::Attitude::Task::depthControl(), Supervisors::Vehicle::Task::disableLoops(), dispatch(), Control::AUV::Allocator::Task::dispatchAllFins(), dispatchReply(), Actuators::MCD4R::Task::dispatchState(), Control::AUV::Speed::Task::dispatchThrust(), Actuators::LED4R::Task::getMonitors(), Autonomy::TextActions::Task::handleAbortCommand(), Sensors::MLBLTracker::Task::handleCAMPCSNPNT(), Sensors::MLBLTracker::Task::handleCAMPR(), Sensors::MLBLTracker::Task::handleCAMUA(), Sensors::MLBLTracker::Task::handleCAMUC(), Sensors::MLBLTracker::Task::handleCARXD(), DUNE::Tasks::SimpleTransport::handleData(), Transports::FlightGear::Task::handleFlightGearData(), Control::UAV::Ardupilot::Task::handleHeartbeatPacket(), Control::UAV::Ardupilot::Task::handleHUDPacket(), Control::UAV::Ardupilot::Task::handleHWStatusPacket(), Transports::Iridium::Task::handleIridiumCommand(), Sensors::MLBL::Task::handleMiniPacket(), Control::UAV::Ardupilot::Task::handleNavControllerPacket(), Autonomy::TextActions::Task::handlePlanCommand(), Autonomy::TextActions::Task::handlePlanGeneratorCommand(), Control::UAV::Ardupilot::Task::handlePositionPacket(), UserInterfaces::RCViaArdupilot::Task::handleRCChannelsRawPacket(), Transports::IridiumSBD::Task::handleSBD(), Control::UAV::Ardupilot::Task::handleScaledPressurePacket(), Sensors::MLBLTracker::Task::handleSNTTA(), Control::UAV::Ardupilot::Task::handleSystemStatusPacket(), Control::UAV::Ardupilot::Task::handleSystemTimePacket(), Sensors::MLBL::Task::handleTransponderTravelTimes(), Transports::Iridium::Task::handleUpdates(), Control::UAV::Ardupilot::Task::handleWindPacket(), Sensors::MLBLTracker::Task::hasTransducer(), Control::AUV::Attitude::Task::headingControl(), DUNE::Navigation::BasicNavigation::isActive(), Transports::Cache::Task::load(), Transports::Cache::Task::loadSnapshot(), Sensors::MLBL::Task::logCommand(), Control::ROV::HorizontalPlane::Task::logDesiredHRate(), Control::Path::VectorField::Task::loiter(), Control::Path::ILOS::Task::loiter(), Control::UAV::Ardupilot::Task::loiterHere(), Autonomy::TREX::Task::onActivation(), Sensors::Imagenex881A::Task::onDeactivation(), Control::ROV::Depth::Task::onEstimatedState(), Control::AUV::LMI::Task::onEstimatedState(), Control::AUV::Attitude::Task::onEstimatedState(), Sensors::GillWindObserverII::Task::onMain(), Sensors::PPS::Task::onMain(), Sensors::MiniSVS::Task::onMain(), Sensors::DLV3::Task::onMain(), Sensors::XchangeSV::Task::onMain(), Sensors::PTU300::Task::onMain(), Sensors::WorkhorseNavigator::Task::onMain(), Transports::ArdupilotSITL::Task::onMain(), Transports::Replay::Task::onMain(), Autonomy::TREX::Task::onMain(), Sensors::XR620CTD::Task::onMain(), Sensors::OS4000::Task::onMain(), Sensors::Imagenex881A::Task::onMain(), Plan::Engine::Task::onMain(), Navigation::AUV::SGNavigation::Task::onReportEntityState(), Sensors::MLBL::Task::onReportEntityState(), Vision::Lumenera::Task::onRequestActivation(), Sensors::Imagenex881A::Task::onRequestActivation(), Vision::DFK51BG02H::Task::onRequestActivation(), Transports::IridiumSBD::Task::onResourceAcquisition(), Simulators::UAV::Task::onResourceAcquisition(), Transports::UDP::Task::onResourceAcquisition(), Maneuver::VehicleFormation::FormCollAvoid::Task::onResourceAcquisition(), Transports::Iridium::Task::onResourceInitialization(), Transports::UAN::Task::onResourceInitialization(), Sensors::MLBLTracker::Task::onResourceInitialization(), Sensors::Microstrain3DMGX1::Task::parse(), Sensors::MLBLTracker::Task::ping(), Sensors::AIS::Task::process(), Sensors::MLBL::Task::processInput(), Transports::LogBook::Task::provide(), Transports::Discovery::Task::readMessage(), Sensors::MLBLTracker::Task::readSentence(), Transports::UAN::Task::recvAbort(), Transports::UAN::Task::recvPlanControl(), Transports::UAN::Task::recvReport(), Transports::UAN::Task::recvRestartSystem(), Monitors::Entities::Task::reportState(), DUNE::Navigation::BasicNavigation::reportToBus(), requestActivation(), requestDeactivation(), Control::AUV::Speed::Task::reset(), Autonomy::TREX::Task::resetAuxCpu(), Navigation::AUV::Navigation::Task::runKalmanLBL(), DUNE::Navigation::BasicNavigation::runKalmanLBL(), Transports::Iridium::Task::send_announce(), Transports::Iridium::Task::send_device_updates(), Transports::UAN::Task::sendAbort(), Supervisors::Entities::Task::sendActivation(), Sensors::MLBLTracker::Task::sendCommand(), Transports::UAN::Task::sendPlanControl(), Transports::UAN::Task::sendRange(), Transports::UAN::Task::sendReport(), Transports::UAN::Task::sendRestartSystem(), Monitors::Emergency::Task::sendSMS(), Transports::IridiumSBD::Task::sendTxRequestStatus(), Sensors::MLBL::Task::setAndSendState(), setEntityState(), Plan::Engine::Task::setInitialState(), Maneuver::VehicleFormation::FormCollAvoid::Task::setLeaderState(), DUNE::Hardware::HayesModem::setRSSI(), Vision::Lumenera::Task::setStrobePower(), Monitors::Clock::Task::setTime(), Supervisors::Vehicle::Task::startCalibration(), Autonomy::TREX::Task::startExecution(), Plan::Engine::Task::startPlan(), Transports::Replay::Task::startReplay(), Control::Path::PurePursuit::Task::step(), DUNE::Control::DiscretePID::step(), Control::Path::VectorField::Task::step(), Control::Path::Height::Task::step(), Control::Path::Aerosonde::Task::step(), Control::Path::ILOS::Task::step(), Autonomy::TREX::Task::stopExecution(), Transports::Replay::Task::stopReplay(), Control::UAV::Ardupilot::Task::takeoff(), Control::ROV::HorizontalPlane::Task::tal(), Simulators::UAVAutopilot::Task::task(), Supervisors::UAV::LostComms::Task::task(), Sensors::SW100::Task::task(), Vision::FrameGrabber::Task::task(), Sensors::AIM104MultiIO::Task::task(), Supervisors::AUV::LostComms::Task::task(), Monitors::Medium::Task::task(), Sensors::Microstrain3DMGX3::Task::task(), Supervisors::Vehicle::Task::task(), Simulators::UAV::Task::task(), Monitors::FuelLevel::Task::task(), Maneuver::VehicleFormation::FormCollAvoid::Task::task(), Transports::Noptilus::Task::transmit(), Transports::Noptilus::Task::transmitPending(), Vision::PhotoTrigger::Task::trigger(), Control::UAV::RemoteOperation::Task::update(), updateParameters(), and Plan::Engine::Task::vehicleRequest().
|
inline |
Dispatch message to the message bus.
[in] | msg | message reference. |
[in] | flags | bitfield with flags (see DispatchFlags). |
References dispatch().
|
inline |
Dispatch message to the message bus in reply to another message.
[in] | original | original message. |
[in] | msg | message reference. |
[in] | flags | bitfield with flags (see DispatchFlags). |
References dispatch(), DUNE::IMC::Message::getSource(), DUNE::IMC::Message::getSourceEntity(), DUNE::IMC::Message::setDestination(), and DUNE::IMC::Message::setDestinationEntity().
Referenced by Actuators::LED4R::Task::consume().
void DUNE::Tasks::Task::err | ( | const char * | format, |
... | |||
) |
Send an human-readable error message to all configured output channels and files.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::IMC::LogBookEntry::LBET_ERROR.
Referenced by Supervisors::Vehicle::Task::answer(), Plan::DB::Task::answer(), Plan::Engine::Task::answer(), Vision::Lumenera::Task::checkActivation(), Transports::SerialOverTCP::Task::checkClientSockets(), Transports::SerialOverTCP::Task::checkMainSocket(), Maneuver::VehicleFormation::FormCollAvoid::Task::checkParameters(), DUNE::Control::BasicAutopilot::consume(), Transports::LogBook::Task::consume(), DUNE::Control::PathController::consume(), Transports::Noptilus::Task::consume(), Transports::Replay::Task::consume(), Transports::LoggingDigest::Task::consume(), Monitors::Entities::Task::consume(), Transports::GSM::Task::consume(), Transports::UAN::Task::consume(), Supervisors::Vehicle::Task::consume(), Plan::Engine::Task::consume(), Transports::Cache::Task::copySnapshot(), DUNE::Daemon::Daemon(), Transports::SerialOverTCP::Task::dispatchToClients(), Monitors::Entities::Task::enable(), Autonomy::TextActions::Task::handleAbortCommand(), Control::UAV::Ardupilot::Task::handleHeartbeatPacket(), Sensors::MLBL::Task::handleMiniPacket(), Transports::IridiumSBD::Task::handleSBD(), Sensors::MLBLTracker::Task::hasTransducer(), initializeResources(), loadConfig(), Plan::Engine::Task::lookForPlan(), Sensors::XR620CTD::Task::onMain(), Sensors::MLBLTracker::Task::onResourceAcquisition(), Sensors::PTU300::Task::onResourceInitialization(), Sensors::AIM104MultiIO::Task::onResourceInitialization(), Monitors::Entities::Task::onTimeoutCheck(), Control::AUV::LMI::Task::onUpdateParameters(), Monitors::FuelLevel::Task::onUpdateParameters(), UserInterfaces::RCViaArdupilot::Task::openConnection(), Sensors::MTi::Task::parse(), Sensors::Microstrain3DMGX1::Task::parse(), Sensors::MLBL::Task::processInput(), Sensors::MLBLTracker::Task::readSentence(), UserInterfaces::RCViaArdupilot::Task::receiveData(), Control::UAV::Ardupilot::Task::receiveData(), Sensors::PTU300::Task::sendCommand(), Monitors::OperationalLimits::Task::setError(), DUNE::Network::FragmentedMessage::setFragment(), Monitors::Clock::Task::setTime(), Sensors::MTi::Task::setup(), Monitors::Entities::Task::setupDefaults(), DUNE::Control::BasicAutopilot::signalBadVertical(), DUNE::Control::BasicAutopilot::signalBadYaw(), DUNE::Control::PathController::signalError(), DUNE::Tasks::Manager::start(), Transports::Replay::Task::startReplay(), Vision::Lumenera::Task::startVideo(), Sensors::AIM104MultiIO::Task::task(), and Supervisors::Vehicle::Task::task().
|
inline |
Retrieve the task's activation time.
Referenced by Sensors::Imagenex881A::Task::checkActivationProgress(), and Sensors::Imagenex881A::Task::onUpdateParameters().
|
inline |
Retrieve the task's deactivation time.
|
inline |
Retrieve the main entity identifier of the task.
Referenced by Supervisors::Vehicle::Task::changeMode(), DUNE::Daemon::consume(), Simulators::UAVAutopilot::Task::consume(), Control::PTU::Task::consume(), Transports::GSM::Task::consume(), Transports::IridiumSBD::Task::consume(), Plan::DB::Task::consume(), Monitors::OperationalLimits::Task::consume(), Sensors::Microstrain3DMGX3::Task::consume(), Transports::UAN::Task::consume(), Sensors::OS4000::Task::consume(), Navigation::General::Alignment::Task::consume(), Plan::Engine::Task::consume(), dispatch(), Sensors::MLBLTracker::Task::handleCAMUA(), Plan::Engine::Task::loadPlan(), DUNE::Control::BottomTracker::onDesiredZ(), and Transports::UAN::Task::replaceLastOp().
|
inlineprotected |
Retrieve the main entity label of the task.
Referenced by Sensors::Microstrain3DMGX3::Task::consume(), Actuators::LED4R::Task::onEntityReservation(), Actuators::MCD4R::Task::onEntityReservation(), Transports::UAN::Task::onResourceInitialization(), Sensors::MLBLTracker::Task::onResourceInitialization(), updateParameters(), and writeParamsXML().
|
inlineprotected |
Retrieve the current entity state.
References DUNE::IMC::EntityState::state.
Referenced by Simulators::UAVAutopilot::Task::consume(), Navigation::General::Alignment::Task::consume(), Sensors::OS4000::Task::consume(), Plan::Engine::Task::consume(), Control::UAV::Ardupilot::Task::loiterHere(), Monitors::Clock::Task::onMain(), UserInterfaces::RCViaArdupilot::Task::onMain(), Sensors::XR620CTD::Task::onMain(), Plan::Engine::Task::onMain(), Monitors::Medium::Task::task(), and Monitors::FuelLevel::Task::task().
|
inlinevirtual |
Retrieve the task's name.
Implements DUNE::Tasks::AbstractTask.
Referenced by loadConfig(), reserveEntities(), reserveEntity(), and updateParameters().
|
inline |
Get scheduling priority.
The priority of a task might change when configuration parameters are updated.
|
inline |
Retrieve the system's identifier.
References DUNE::IMC::AddressResolver::id(), m_ctx, and DUNE::Tasks::Context::resolver.
Referenced by DUNE::Daemon::consume(), Simulators::UAVAutopilot::Task::consume(), Control::AntennaTracker::Task::consume(), Supervisors::UAV::LostComms::Task::consume(), Transports::Noptilus::Task::consume(), Supervisors::AUV::LostComms::Task::consume(), Transports::GSM::Task::consume(), Transports::UAN::Task::consume(), Autonomy::TREX::Task::consume(), Transports::IridiumSBD::Task::consume(), Plan::Engine::Task::consume(), Transports::Announce::Task::consume(), Monitors::Emergency::Task::consume(), Plan::DB::Task::consume(), Vision::Lumenera::Task::consume(), Supervisors::Vehicle::Task::consume(), Control::AUV::Speed::Task::consume(), Vision::DFK51BG02H::Task::consume(), Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), dispatch(), Autonomy::TextActions::Task::handleAbortCommand(), Sensors::MLBLTracker::Task::handleCAMUA(), Sensors::MLBL::Task::handleMiniPacket(), Transports::IridiumSBD::Task::handleSBD(), Plan::DB::Task::onResourceAcquisition(), Transports::UDP::Task::onResourceAcquisition(), Transports::Announce::Task::onUpdateParameters(), Transports::UAN::Task::replaceLastOp(), Transports::Iridium::Task::send_announce(), Transports::Iridium::Task::send_device_updates(), Transports::UAN::Task::sendAbort(), Transports::UAN::Task::sendPlanControl(), Transports::UAN::Task::sendRange(), Transports::UAN::Task::sendReport(), Transports::UAN::Task::sendRestartSystem(), Maneuver::VehicleFormation::FormCollAvoid::Task::setLeaderState(), Transports::LoggingDigest::Task::startLog(), Simulators::UAV::Task::task(), Maneuver::VehicleFormation::FormCollAvoid::Task::task(), and Transports::Noptilus::Task::transmit().
|
inline |
Retrieve the system's name.
References m_ctx, DUNE::IMC::AddressResolver::name(), and DUNE::Tasks::Context::resolver.
Referenced by Monitors::Emergency::Task::consume(), Transports::Noptilus::Task::consume(), Autonomy::TREX::Task::onMain(), Plan::DB::Task::onResourceAcquisition(), Sensors::MLBL::Task::onResourceInitialization(), Transports::Announce::Task::onUpdateParameters(), Transports::Iridium::Task::send_announce(), Sensors::MLBLTracker::Task::Task(), Maneuver::VehicleFormation::FormCollAvoid::Task::task(), and DUNE::Daemon::writeParamsXML().
void DUNE::Tasks::Task::inf | ( | const char * | format, |
... | |||
) |
Send an human-readable informational message to all configured output channels and files.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::IMC::LogBookEntry::LBET_INFO.
Referenced by Monitors::Entities::Task::activate(), Plan::DB::Task::answer(), Plan::Engine::Task::answer(), Transports::SerialOverTCP::Task::checkMainSocket(), DUNE::Tasks::SimpleTransport::consume(), Transports::LogBook::Task::consume(), DUNE::Control::PathController::consume(), Transports::ArdupilotSITL::Task::consume(), Plan::Generator::Task::consume(), Transports::Iridium::Task::consume(), Monitors::OperationalLimits::Task::consume(), Autonomy::TREX::Task::consume(), Monitors::Entities::Task::consume(), Control::PTU::Task::consume(), Control::UAV::Ardupilot::Task::consume(), Plan::Engine::Task::consume(), DUNE::Daemon::Daemon(), Monitors::Entities::Task::disable(), Monitors::Entities::Task::enable(), Plan::Generator::Task::generate(), Sensors::MLBLTracker::Task::handleCAMUA(), Sensors::MLBLTracker::Task::handleCARXD(), DUNE::Tasks::SimpleTransport::handleData(), Transports::FlightGear::Task::handleFlightGearData(), Transports::Iridium::Task::handleIridiumCommand(), Sensors::MLBL::Task::handleMiniPacket(), Autonomy::TextActions::Task::handlePlanCommand(), Transports::Iridium::Task::handleUpdates(), Control::UAV::Ardupilot::Task::info(), Autonomy::TREX::Task::onActivation(), Sensors::Imagenex881A::Task::onActivation(), Autonomy::TREX::Task::onDeactivation(), Sensors::Imagenex881A::Task::onDeactivation(), Sensors::MLBL::Task::onEntityResolution(), Sensors::GillWindObserverII::Task::onMain(), Sensors::DLV3::Task::onMain(), UserInterfaces::RCViaArdupilot::Task::onMain(), Plan::DB::Task::onResourceAcquisition(), Sensors::IFOG::Task::onResourceAcquisition(), Actuators::LED4R::Task::onResourceAcquisition(), Simulators::UAV::Task::onResourceAcquisition(), Transports::UDP::Task::onResourceAcquisition(), Actuators::MCD4R::Task::onResourceAcquisition(), Transports::Discovery::Task::onResourceInitialization(), Sensors::PTU300::Task::onResourceInitialization(), Control::AntennaTracker::Task::onUpdateParameters(), Transports::Noptilus::Task::onUpdateParameters(), Control::PTU::Task::onUpdateParameters(), Transports::FlightGear::Task::openConnection(), Control::UAV::Ardupilot::Task::openConnection(), Transports::Discovery::Task::readMessage(), Transports::UDP::Task::refreshContacts(), Sensors::Microstrain3DMGX3::Task::runCalibration(), DUNE::Hardware::BasicModem::send(), Sensors::MLBLTracker::Task::sendCommand(), Monitors::Emergency::Task::sendSMS(), Sensors::Microstrain3DMGX3::Task::setHardIron(), DUNE::Tasks::Manager::start(), Autonomy::TREX::Task::startExecution(), Vision::Lumenera::Task::startVideo(), Autonomy::TREX::Task::stopExecution(), Sensors::SW100::Task::task(), Supervisors::Vehicle::Task::task(), and DUNE::Daemon::~Daemon().
void DUNE::Tasks::Task::initializeResources | ( | void | ) |
Instruct task to initialize the resources acquired in acquireResources().
References err(), onResourceInitialization(), stopping(), and DUNE::Time::Delay::wait().
|
inlineprotected |
Test if task is active.
References DUNE::IMC::EntityActivationState::EAS_ACTIVE, and DUNE::IMC::EntityActivationState::state.
Referenced by Autonomy::TREX::Task::checkState(), DUNE::Control::BasicRemoteOperation::consume(), Simulators::UAVAutopilot::Task::consume(), DUNE::Control::PathController::consume(), DUNE::Control::BasicAutopilot::consume(), Supervisors::AUV::LostComms::Task::consume(), Transports::Replay::Task::consume(), Control::AUV::Allocator::Task::consume(), Control::AUV::Speed::Task::consume(), Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), Sensors::MLBL::Task::consume(), DUNE::Maneuvers::Maneuver::consumeIfActive(), Supervisors::AUV::LostComms::Task::getPlanSpec(), Sensors::PPS::Task::onMain(), Vision::PhotoTrigger::Task::onMain(), Sensors::WorkhorseNavigator::Task::onMain(), Sensors::IFOG::Task::onMain(), Transports::Replay::Task::onMain(), Vision::DFK51BG02H::Task::onMain(), Transports::UAN::Task::onMain(), Vision::Lumenera::Task::onMain(), Sensors::Imagenex881A::Task::onMain(), Sensors::MLBL::Task::onMain(), Autonomy::TREX::Task::onReportEntityState(), Monitors::Emergency::Task::onResourceInitialization(), Sensors::MLBL::Task::processInput(), Maneuver::VehicleFormation::FormCollAvoid::Task::setLeaderState(), Transports::Replay::Task::startReplay(), Simulators::UAVAutopilot::Task::task(), Monitors::Emergency::Task::task(), Supervisors::AUV::LostComms::Task::task(), Simulators::UAV::Task::task(), and Maneuver::VehicleFormation::FormCollAvoid::Task::task().
void DUNE::Tasks::Task::loadConfig | ( | void | ) |
Load parameters from context's configuration.
References DUNE::Tasks::ParameterTable::begin(), DUNE::Tasks::Context::config, DUNE::Tasks::ParameterTable::end(), err(), DUNE::Tasks::ParameterTable::find(), DUNE::Parsers::Config::get(), getName(), DUNE::Parsers::Config::getSection(), m_ctx, DUNE::Tasks::ParameterTable::set(), and updateParameters().
|
inlineprotectedvirtual |
Called when the task starts/resumes normal execution.
Reimplemented in Vision::DFK51BG02H::Task, Sensors::Imagenex881A::Task, Vision::Lumenera::Task, Autonomy::TREX::Task, Sensors::IFOG::Task, Control::AUV::Speed::Task, Sensors::WorkhorseNavigator::Task, DUNE::Control::BasicAutopilot, Control::AUV::RemoteOperation::Task, Transports::UAN::Task, Control::AUV::Allocator::Task, Monitors::Emergency::Task, Control::ROV::RemoteOperation::Task, Control::UAV::RemoteOperation::Task, DUNE::Maneuvers::Maneuver, and Control::ASV::RemoteOperation::Task.
References spew().
Referenced by activate().
|
inlineprotectedvirtual |
Called when the task stops normal execution and enters an idleness state.
Reimplemented in Vision::DFK51BG02H::Task, Sensors::Imagenex881A::Task, Vision::Lumenera::Task, Autonomy::TREX::Task, Sensors::IFOG::Task, Control::AUV::Speed::Task, Control::AUV::RemoteOperation::Task, Sensors::WorkhorseNavigator::Task, Transports::UAN::Task, DUNE::Control::BasicAutopilot, Control::ROV::RemoteOperation::Task, Control::AUV::Allocator::Task, Monitors::Emergency::Task, Supervisors::AUV::LostComms::Task, Control::UAV::RemoteOperation::Task, DUNE::Maneuvers::Maneuver, and Control::ASV::RemoteOperation::Task.
References spew().
Referenced by deactivate().
|
inlineprotectedvirtual |
Called when the task is instructed to reserve all the entity identifiers it needs for normal execution.
See reserveEntity(). Derived classes that need to reserve entity identifiers other than that of the main entity should override this function.
Reimplemented in Simulators::UAV::Task, Control::AUV::Attitude::Task, Actuators::MCD4R::Task, Control::ROV::HorizontalPlane::Task, Actuators::LED4R::Task, Sensors::WorkhorseNavigator::Task, Sensors::AIM104MultiIO::Task, Control::ROV::Depth::Task, Control::Path::ILOS::Task, Transports::Replay::Task, Autonomy::TREX::Task, Control::Path::VectorField::Task, Sensors::DLV3::Task, DUNE::Control::PathController, and Control::Path::PurePursuit::Task.
Referenced by reserveEntities().
|
inlineprotectedvirtual |
Called when the task is instructed to resolve all the entity identifiers it needs for normal execution.
See resolveEntity(). Derived classes that need to resolve entity identifiers should override this function.
Reimplemented in Sensors::MLBL::Task, Monitors::FuelLevel::Task, Navigation::AUV::SGNavigation::Task, Navigation::General::Alignment::Task, Control::AUV::Allocator::Task, Monitors::Medium::Task, Navigation::AUV::Navigation::Task, Monitors::Entities::Task, DUNE::Navigation::BasicNavigation, and Navigation::General::GPSNavigation::Task.
Referenced by resolveEntities().
|
protectedpure virtual |
Implemented in Control::UAV::Ardupilot::Task, Sensors::MLBL::Task, Plan::Engine::Task, Sensors::MLBLTracker::Task, Plan::DB::Task, Sensors::Imagenex881A::Task, Vision::Lumenera::Task, Transports::UAN::Task, Actuators::MCD4R::Task, Navigation::General::Alignment::Task, Control::AUV::Speed::Task, Sensors::Microstrain3DMGX1::Task, Monitors::Entities::Task, Transports::UDP::Task, Vision::DFK51BG02H::Task, Control::AUV::Allocator::Task, Actuators::LED4R::Task, Transports::Announce::Task, Sensors::MTi::Task, Sensors::OS4000::Task, Sensors::XR620CTD::Task, Transports::Iridium::Task, Transports::IridiumSBD::Task, Autonomy::TREX::Task, UserInterfaces::RCViaArdupilot::Task, Transports::Replay::Task, Sensors::IFOG::Task, Transports::ArdupilotSITL::Task, Transports::FlightGear::Task, Sensors::WorkhorseNavigator::Task, Transports::Cache::Task, DUNE::Control::PathController, Transports::GSM::Task, Control::PTU::Task, Transports::Noptilus::Task, Transports::LoggingDigest::Task, Plan::Generator::Task, Transports::SerialOverTCP::Task, Transports::Discovery::Task, DUNE::Maneuvers::Maneuver, Monitors::Clock::Task, Sensors::AIS::Task, Navigation::General::GPSNavigation::Task, Sensors::PTU300::Task, Vision::PhotoTrigger::Task, Control::AntennaTracker::Task, Transports::LogBook::Task, Sensors::XchangeSV::Task, Autonomy::TextActions::Task, Sensors::DLV3::Task, Transports::Fragments::Task, Sensors::MiniSVS::Task, DUNE::Control::BasicAutopilot, Sensors::PPS::Task, Sensors::GillWindObserverII::Task, DUNE::Daemon, and DUNE::Tasks::SimpleTransport.
|
inlineprotectedvirtual |
Called when the task is instructed to report the state of its entities.
Derived classes that need to report the state of entities other than the main entity should override this function to dispatch the EntityState of those entities.
Reimplemented in Sensors::MLBL::Task, Navigation::AUV::SGNavigation::Task, Monitors::Entities::Task, Control::Path::ILOS::Task, and Autonomy::TREX::Task.
|
inlineprotectedvirtual |
Called when an external activation request is received.
Derived classes that need to perform extra steps to prepare normal execution should replace the default behaviour of immediate activation with calls to activate() when the request is completed or activationFailed() if the request cannot be honoured.
Reimplemented in Vision::DFK51BG02H::Task, Sensors::Imagenex881A::Task, and Vision::Lumenera::Task.
References activate(), and spew().
Referenced by requestActivation().
|
inlineprotectedvirtual |
Called when an external deactivation request is received.
Derived classes that need to perform extra steps to prepare normal execution should replace the default behaviour of immediate deactivation with calls to deactivate() when the request is completed or deactivationFailed() if the request cannot be honoured.
References deactivate(), and spew().
Referenced by requestDeactivation().
|
inlineprotectedvirtual |
Called when the task is instructed to acquire resources whose configuration is defined by run-time parameters.
Reimplemented in Sensors::Imagenex881A::Task, Control::UAV::Ardupilot::Task, Sensors::MLBL::Task, Maneuver::VehicleFormation::FormCollAvoid::Task, Actuators::MCD4R::Task, Vision::DFK51BG02H::Task, Monitors::FuelLevel::Task, Transports::UDP::Task, Control::AUV::Attitude::Task, Simulators::UAV::Task, Sensors::MLBLTracker::Task, Actuators::LED4R::Task, Sensors::Microstrain3DMGX3::Task, Vision::Lumenera::Task, Sensors::IFOG::Task, Sensors::OS4000::Task, Sensors::WorkhorseNavigator::Task, Plan::Engine::Task, Sensors::XR620CTD::Task, Transports::GSM::Task, Sensors::Microstrain3DMGX1::Task, UserInterfaces::RCViaArdupilot::Task, Transports::ArdupilotSITL::Task, Transports::IridiumSBD::Task, Supervisors::Vehicle::Task, Transports::FlightGear::Task, Plan::DB::Task, Sensors::MTi::Task, Sensors::AIM104MultiIO::Task, DUNE::Control::PathController, Vision::FrameGrabber::Task, Sensors::SW100::Task, Sensors::AIS::Task, Transports::Iridium::Task, Sensors::DLV3::Task, Transports::SerialOverTCP::Task, Sensors::MiniSVS::Task, Sensors::XchangeSV::Task, Sensors::EmulatedGPS::Task, Sensors::PTU300::Task, Sensors::GillWindObserverII::Task, Sensors::PPS::Task, and DUNE::Control::BasicAutopilot.
Referenced by acquireResources().
|
inlineprotectedvirtual |
Called when the task is instructed to initialize resources acquired previously or whose initialization depends on run-time parameters.
Reimplemented in Sensors::Imagenex881A::Task, Sensors::MLBL::Task, Vision::DFK51BG02H::Task, Actuators::MCD4R::Task, Sensors::MLBLTracker::Task, Navigation::AUV::SGNavigation::Task, Control::AUV::Attitude::Task, Actuators::LED4R::Task, Sensors::IFOG::Task, Sensors::Microstrain3DMGX3::Task, Control::AUV::Speed::Task, Navigation::General::Alignment::Task, Sensors::OS4000::Task, Sensors::WorkhorseNavigator::Task, Plan::Engine::Task, Sensors::XR620CTD::Task, Monitors::Medium::Task, Transports::IridiumSBD::Task, Control::ROV::HorizontalPlane::Task, Transports::GSM::Task, Transports::FlightGear::Task, Transports::Announce::Task, Navigation::AUV::Navigation::Task, Control::AUV::Allocator::Task, Sensors::Microstrain3DMGX1::Task, Navigation::General::ROV::Task, Supervisors::Vehicle::Task, Transports::UAN::Task, Control::AUV::LMI::Task, DUNE::Navigation::BasicNavigation, Monitors::Entities::Task, Sensors::AIM104MultiIO::Task, Control::ROV::Depth::Task, Transports::SerialOverTCP::Task, Monitors::Clock::Task, Supervisors::AUV::LostComms::Task, Vision::FrameGrabber::Task, DUNE::Control::PathController, Sensors::SW100::Task, Sensors::XchangeSV::Task, Monitors::Emergency::Task, Sensors::DLV3::Task, Transports::Iridium::Task, Transports::LoggingDigest::Task, DUNE::Control::BasicRemoteOperation, Sensors::MiniSVS::Task, Supervisors::Entities::Task, Sensors::PTU300::Task, Transports::Cache::Task, Supervisors::UAV::LostComms::Task, Transports::Discovery::Task, Monitors::CPU::Task, Transports::LogBook::Task, DUNE::Maneuvers::Maneuver, DUNE::Control::BasicAutopilot, DUNE::Daemon, and Autonomy::TextActions::Task.
Referenced by initializeResources().
|
inlineprotectedvirtual |
Called when the task is instructed to release resources.
Derived classes that override this function must not assume that any resource was previously acquired. This function must be implemented in such a way that it can be called at any time.
Reimplemented in Sensors::Imagenex881A::Task, Simulators::UAV::Task, Sensors::MLBL::Task, Actuators::MCD4R::Task, Control::UAV::Ardupilot::Task, Transports::UDP::Task, Vision::DFK51BG02H::Task, Sensors::MLBLTracker::Task, Monitors::FuelLevel::Task, Navigation::AUV::SGNavigation::Task, Transports::ArdupilotSITL::Task, Control::AUV::Attitude::Task, Actuators::LED4R::Task, Vision::Lumenera::Task, Sensors::IFOG::Task, Navigation::General::Alignment::Task, Sensors::Microstrain3DMGX3::Task, Sensors::OS4000::Task, Plan::DB::Task, Transports::IridiumSBD::Task, Transports::FlightGear::Task, Transports::GSM::Task, Plan::Engine::Task, Sensors::XR620CTD::Task, UserInterfaces::RCViaArdupilot::Task, Transports::UAN::Task, Sensors::Microstrain3DMGX1::Task, Navigation::General::ROV::Task, Sensors::AIM104MultiIO::Task, Sensors::WorkhorseNavigator::Task, Navigation::AUV::Navigation::Task, DUNE::Navigation::BasicNavigation, Sensors::PTU300::Task, Supervisors::Vehicle::Task, Sensors::MTi::Task, DUNE::Control::PathController, Vision::FrameGrabber::Task, Sensors::SW100::Task, Transports::Iridium::Task, Sensors::AIS::Task, Plan::Generator::Task, Sensors::DLV3::Task, Sensors::MiniSVS::Task, Transports::SerialOverTCP::Task, Sensors::XchangeSV::Task, Sensors::EmulatedGPS::Task, Monitors::CPU::Task, Sensors::GillWindObserverII::Task, Sensors::PPS::Task, DUNE::Control::BasicAutopilot, Simulators::UAVAutopilot::Task, and Transports::Fragments::Task.
Referenced by releaseResources().
|
inlineprotectedvirtual |
Called when the task is instructed to update its run-time parameters.
Derived classes that need to compute auxiliary values based on run-time parameters should override this function.
Reimplemented in Sensors::MLBL::Task, Maneuver::VehicleFormation::FormCollAvoid::Task, Sensors::Imagenex881A::Task, Actuators::MCD4R::Task, Control::AUV::Attitude::Task, Vision::DFK51BG02H::Task, Monitors::FuelLevel::Task, Sensors::MLBLTracker::Task, Autonomy::TREX::Task, Navigation::AUV::SGNavigation::Task, Sensors::OS4000::Task, Control::AUV::Speed::Task, Actuators::LED4R::Task, Transports::UDP::Task, Sensors::Microstrain3DMGX3::Task, Navigation::General::Alignment::Task, Monitors::OperationalLimits::Task, Sensors::IFOG::Task, Control::ROV::HorizontalPlane::Task, Transports::Announce::Task, Plan::Engine::Task, Sensors::XR620CTD::Task, Control::ROV::RemoteOperation::Task, Control::AUV::LMI::Task, Sensors::WorkhorseNavigator::Task, Transports::GSM::Task, Control::AUV::RemoteOperation::Task, Transports::IridiumSBD::Task, Transports::UAN::Task, Control::ROV::Depth::Task, DUNE::Navigation::BasicNavigation, Control::AUV::Allocator::Task, Navigation::AUV::Navigation::Task, Navigation::General::ROV::Task, Control::Path::ILOS::Task, Transports::Replay::Task, Transports::LoggingDigest::Task, Vision::PhotoTrigger::Task, DUNE::Control::PathController, Control::PTU::Task, Vision::FrameGrabber::Task, Transports::Noptilus::Task, Control::Path::Aerosonde::Task, Control::Path::VectorField::Task, Supervisors::Entities::Task, Control::Path::Height::Task, Control::UAV::RemoteOperation::Task, Control::AntennaTracker::Task, and Control::Path::PurePursuit::Task.
Referenced by updateParameters().
|
inlineprotected |
Declare a configuration parameter that can be parsed using the basic parameter parser.
T | type of the destination variable. |
[in] | name | parameter name. |
[in] | var | variable that will hold the parameter value. |
Referenced by DUNE::Control::BasicAutopilot::BasicAutopilot(), DUNE::Navigation::BasicNavigation::BasicNavigation(), DUNE::Control::BasicRemoteOperation::BasicRemoteOperation(), paramActive(), DUNE::Control::PathController::PathController(), DUNE::Tasks::Periodic::Periodic(), DUNE::Tasks::SimpleTransport::SimpleTransport(), Transports::Fragments::Task::Task(), Control::AntennaTracker::Task::Task(), Sensors::PPS::Task::Task(), Monitors::CPU::Task::Task(), Control::UAV::RemoteOperation::Task::Task(), Sensors::GillWindObserverII::Task::Task(), Control::PTU::Task::Task(), Transports::Cache::Task::Task(), Sensors::MiniSVS::Task::Task(), Sensors::PTU300::Task::Task(), Sensors::XchangeSV::Task::Task(), Control::Path::Height::Task::Task(), Transports::SerialOverTCP::Task::Task(), Sensors::EmulatedGPS::Task::Task(), Transports::Discovery::Task::Task(), Supervisors::UAV::LostComms::Task::Task(), Control::Path::VectorField::Task::Task(), Sensors::DLV3::Task::Task(), Supervisors::Entities::Task::Task(), Transports::LoggingDigest::Task::Task(), Vision::FrameGrabber::Task::Task(), Transports::Iridium::Task::Task(), Transports::Noptilus::Task::Task(), Control::Path::Aerosonde::Task::Task(), Navigation::General::GPSNavigation::Task::Task(), Monitors::Emergency::Task::Task(), Vision::PhotoTrigger::Task::Task(), Control::ROV::RemoteOperation::Task::Task(), Plan::Generator::Task::Task(), UserInterfaces::RCViaArdupilot::Task::Task(), Control::AUV::Allocator::Task::Task(), Control::ROV::Depth::Task::Task(), Control::Path::ILOS::Task::Task(), Autonomy::TREX::Task::Task(), Sensors::SW100::Task::Task(), Control::AUV::RemoteOperation::Task::Task(), Sensors::AIM104MultiIO::Task::Task(), Transports::IridiumSBD::Task::Task(), Sensors::AIS::Task::Task(), Control::AUV::LMI::Task::Task(), Navigation::AUV::Navigation::Task::Task(), Monitors::Clock::Task::Task(), Sensors::WorkhorseNavigator::Task::Task(), Transports::UAN::Task::Task(), Monitors::Medium::Task::Task(), Transports::FlightGear::Task::Task(), Supervisors::AUV::LostComms::Task::Task(), Control::ROV::HorizontalPlane::Task::Task(), Transports::Replay::Task::Task(), Transports::GSM::Task::Task(), Monitors::Entities::Task::Task(), Supervisors::Vehicle::Task::Task(), Sensors::MTi::Task::Task(), Navigation::General::ROV::Task::Task(), Transports::Announce::Task::Task(), Simulators::UAV::Task::Task(), Plan::DB::Task::Task(), Transports::ArdupilotSITL::Task::Task(), Plan::Engine::Task::Task(), Task(), Monitors::OperationalLimits::Task::Task(), Vision::Lumenera::Task::Task(), Control::AUV::Speed::Task::Task(), Sensors::Microstrain3DMGX1::Task::Task(), Sensors::OS4000::Task::Task(), Navigation::General::Alignment::Task::Task(), Transports::UDP::Task::Task(), Actuators::LED4R::Task::Task(), Sensors::XR620CTD::Task::Task(), Sensors::IFOG::Task::Task(), Control::AUV::Attitude::Task::Task(), Sensors::Microstrain3DMGX3::Task::Task(), Monitors::FuelLevel::Task::Task(), Sensors::MLBLTracker::Task::Task(), Maneuver::VehicleFormation::FormCollAvoid::Task::Task(), Navigation::AUV::SGNavigation::Task::Task(), Control::UAV::Ardupilot::Task::Task(), Vision::DFK51BG02H::Task::Task(), Sensors::Imagenex881A::Task::Task(), Sensors::MLBL::Task::Task(), and Actuators::MCD4R::Task::Task().
|
inlineprotected |
Declare a configuration parameter that can be parsed using a custom parameter reader.
Y | type of the custom parameter reader. |
T | type of the destination variable. |
[in] | name | parameter name. |
[in] | var | variable that will hold the parameter value. |
References DUNE::Tasks::ParameterTable::add().
|
protected |
Declare parameter 'Active' and associated parameters 'Active.
[in] | def_scope | default scope of 'Active' parameter. |
[in] | def_visibility | default visibility of 'Active' parameter. |
[in] | def_value | default value of 'Active' parameter. |
References DUNE::Tasks::Parameter::defaultValue(), param(), DUNE::Tasks::Parameter::scope(), DUNE::Tasks::Parameter::SCOPE_GLOBAL, DUNE::Tasks::Parameter::scopeToString(), DUNE::uncastLexical(), DUNE::Tasks::Parameter::visibility(), DUNE::Tasks::Parameter::VISIBILITY_DEVELOPER, and DUNE::Tasks::Parameter::visibilityToString().
Referenced by Monitors::Emergency::Task::Task(), Vision::PhotoTrigger::Task::Task(), Autonomy::TREX::Task::Task(), Sensors::WorkhorseNavigator::Task::Task(), Transports::UAN::Task::Task(), Vision::Lumenera::Task::Task(), Sensors::IFOG::Task::Task(), Vision::DFK51BG02H::Task::Task(), Sensors::Imagenex881A::Task::Task(), and Sensors::MLBL::Task::Task().
|
inlineprotected |
References DUNE::Tasks::ParameterTable::changed().
Referenced by Control::UAV::RemoteOperation::Task::onUpdateParameters(), Control::Path::VectorField::Task::onUpdateParameters(), Control::Path::Aerosonde::Task::onUpdateParameters(), DUNE::Control::PathController::onUpdateParameters(), Control::Path::ILOS::Task::onUpdateParameters(), Control::AUV::Allocator::Task::onUpdateParameters(), Control::AUV::RemoteOperation::Task::onUpdateParameters(), Transports::GSM::Task::onUpdateParameters(), Sensors::WorkhorseNavigator::Task::onUpdateParameters(), Control::ROV::RemoteOperation::Task::onUpdateParameters(), Plan::Engine::Task::onUpdateParameters(), Control::ROV::HorizontalPlane::Task::onUpdateParameters(), Sensors::Microstrain3DMGX3::Task::onUpdateParameters(), Control::AUV::Speed::Task::onUpdateParameters(), Sensors::MLBLTracker::Task::onUpdateParameters(), Monitors::FuelLevel::Task::onUpdateParameters(), Control::AUV::Attitude::Task::onUpdateParameters(), Sensors::Imagenex881A::Task::onUpdateParameters(), and updateParameters().
|
inlinevirtual |
Queue a message for later consumption.
msg | message object. |
Implements DUNE::Tasks::AbstractTask.
References DUNE::Tasks::Recipient::put().
Referenced by Control::UAV::Ardupilot::Task::handleHeartbeatPacket().
void DUNE::Tasks::Task::releaseResources | ( | void | ) |
Free all resources acquired in acquireResources().
References onResourceRelease().
|
protected |
Request task to start/resume normal execution.
References dispatch(), DUNE::IMC::EntityActivationState::EAS_ACT_FAIL, DUNE::IMC::EntityActivationState::EAS_ACT_IP, DUNE::IMC::EntityActivationState::EAS_DEACT_DONE, DUNE::IMC::EntityActivationState::EAS_DEACT_FAIL, DUNE::IMC::EntityActivationState::EAS_DEACT_IP, DUNE::IMC::EntityActivationState::EAS_INACTIVE, onRequestActivation(), spew(), and DUNE::IMC::EntityActivationState::state.
Referenced by DUNE::Control::BasicRemoteOperation::consume(), Simulators::UAVAutopilot::Task::consume(), Sensors::PPS::Task::consume(), DUNE::Control::PathController::consume(), DUNE::Control::BasicAutopilot::consume(), Monitors::Emergency::Task::consume(), Control::AUV::Allocator::Task::consume(), Control::AUV::Speed::Task::consume(), Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), deactivate(), Supervisors::AUV::LostComms::Task::getPlanSpec(), Simulators::UAV::Task::onResourceAcquisition(), Maneuver::VehicleFormation::FormCollAvoid::Task::setLeaderState(), DUNE::Maneuvers::Maneuver::startManeuver(), Transports::Replay::Task::startReplay(), and updateParameters().
|
protected |
Request task to stop normal execution and enter an idleness state.
References dispatch(), DUNE::IMC::EntityActivationState::EAS_ACT_DONE, DUNE::IMC::EntityActivationState::EAS_ACT_FAIL, DUNE::IMC::EntityActivationState::EAS_ACT_IP, DUNE::IMC::EntityActivationState::EAS_ACTIVE, DUNE::IMC::EntityActivationState::EAS_DEACT_FAIL, DUNE::IMC::EntityActivationState::EAS_DEACT_IP, onRequestDeactivation(), spew(), and DUNE::IMC::EntityActivationState::state.
Referenced by activate(), DUNE::Control::BasicRemoteOperation::BasicRemoteOperation(), DUNE::Control::BasicRemoteOperation::consume(), DUNE::Control::BasicAutopilot::consume(), Sensors::PPS::Task::consume(), DUNE::Control::PathController::consume(), Supervisors::AUV::LostComms::Task::consume(), Monitors::Emergency::Task::consume(), Autonomy::TREX::Task::consume(), Control::AUV::Speed::Task::consume(), Autonomy::TREX::Task::onReportEntityState(), DUNE::Control::BasicAutopilot::onResourceInitialization(), DUNE::Control::PathController::onResourceInitialization(), Control::AUV::Speed::Task::onResourceInitialization(), Sensors::Imagenex881A::Task::onResourceInitialization(), Sensors::Imagenex881A::Task::onResourceRelease(), Control::AUV::Allocator::Task::reset(), Transports::Replay::Task::reset(), DUNE::Control::BasicAutopilot::signalBadVertical(), DUNE::Control::BasicAutopilot::signalBadYaw(), and updateParameters().
void DUNE::Tasks::Task::reserveEntities | ( | void | ) |
Instruct task to reserve all entity identifiers that it needs for normal execution.
References DUNE::Tasks::Context::entities, getName(), m_ctx, onEntityReservation(), and DUNE::Tasks::EntityDataBase::reserve().
Referenced by DUNE::Daemon::Daemon().
|
protected |
Associate an entity label with an automatically generated number (entity id).
[in] | label | entity name/label. |
References DUNE::Tasks::Context::entities, getName(), m_ctx, and DUNE::Tasks::EntityDataBase::reserve().
Referenced by DUNE::Control::PathController::onEntityReservation(), Sensors::DLV3::Task::onEntityReservation(), Autonomy::TREX::Task::onEntityReservation(), Transports::Replay::Task::onEntityReservation(), Control::ROV::Depth::Task::onEntityReservation(), Sensors::AIM104MultiIO::Task::onEntityReservation(), Sensors::WorkhorseNavigator::Task::onEntityReservation(), Actuators::LED4R::Task::onEntityReservation(), Control::ROV::HorizontalPlane::Task::onEntityReservation(), Actuators::MCD4R::Task::onEntityReservation(), and Control::AUV::Attitude::Task::onEntityReservation().
void DUNE::Tasks::Task::resolveEntities | ( | void | ) |
Instruct task to resolve all entity identifiers that it needs for normal execution.
References onEntityResolution().
|
protected |
Retrieve the entity id of a given entity label.
[in] | label | entity label. |
NonexistentLabel | if the label doesn't have an associated id. |
References DUNE::Tasks::Context::entities, m_ctx, and DUNE::Tasks::EntityDataBase::resolve().
Referenced by Monitors::Entities::Task::activate(), Transports::ArdupilotSITL::Task::consume(), Plan::Engine::Task::consume(), Navigation::General::GPSNavigation::Task::onEntityResolution(), DUNE::Navigation::BasicNavigation::onEntityResolution(), Monitors::Medium::Task::onEntityResolution(), Control::AUV::Allocator::Task::onEntityResolution(), Navigation::General::Alignment::Task::onEntityResolution(), Navigation::AUV::SGNavigation::Task::onEntityResolution(), Monitors::FuelLevel::Task::onEntityResolution(), Sensors::MLBL::Task::onEntityResolution(), Transports::UDP::Task::onUpdateParameters(), and Monitors::Entities::Task::setupDefaults().
|
protected |
Retrieve the entity label of a given entity id.
[in] | id | entity id. |
NonexistentId | if the id doesn't have an associated label. |
References DUNE::Tasks::Context::entities, m_ctx, and DUNE::Tasks::EntityDataBase::resolve().
|
inline |
Retrieve the name associated with a given system identifier.
References m_ctx, DUNE::IMC::AddressResolver::resolve(), and DUNE::Tasks::Context::resolver.
Referenced by Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), Transports::Iridium::Task::handleUpdates(), Plan::DB::Task::onChange(), Transports::Discovery::Task::readMessage(), Transports::UDP::Task::refreshContacts(), and Plan::DB::Task::storeInDB().
|
inline |
Retrieve the identifier associated with a given system name.
[in] | name | system name. |
References m_ctx, DUNE::IMC::AddressResolver::resolve(), and DUNE::Tasks::Context::resolver.
Referenced by Transports::Noptilus::Task::consume(), Transports::UAN::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), DUNE::Daemon::Daemon(), Control::AntennaTracker::Task::onUpdateParameters(), Control::PTU::Task::onUpdateParameters(), and Sensors::MLBLTracker::Task::Task().
|
inlineprotected |
Set the main entity label of the task.
[in] | label | main entity label. |
Referenced by DUNE::Daemon::Daemon().
|
protected |
Set current entity state with an optional pre-defined description.
If a status code is not given, then the existing description will be kept.
[in] | state | entity state. |
[in] | code | status code. |
References DUNE::IMC::EntityState::description, dispatch(), DUNE::Status::getString(), and DUNE::IMC::EntityState::state.
Referenced by DUNE::Control::BasicAutopilot::BasicAutopilot(), DUNE::Navigation::BasicNavigation::checkUncertainty(), DUNE::Control::BasicRemoteOperation::consume(), DUNE::Control::BasicAutopilot::consume(), Simulators::UAVAutopilot::Task::consume(), Monitors::CPU::Task::consume(), Control::AntennaTracker::Task::consume(), Control::PTU::Task::consume(), Plan::Generator::Task::consume(), Monitors::Clock::Task::consume(), Navigation::General::GPSNavigation::Task::consume(), Transports::LoggingDigest::Task::consume(), Plan::Engine::Task::consume(), Navigation::General::Alignment::Task::consume(), Plan::DB::Task::consume(), Sensors::OS4000::Task::consume(), Supervisors::AUV::LostComms::Task::getPlanSpec(), Control::UAV::Ardupilot::Task::handleArdupilotData(), Monitors::Emergency::Task::onActivation(), Control::AUV::Allocator::Task::onActivation(), Transports::UAN::Task::onActivation(), DUNE::Control::BasicAutopilot::onActivation(), Control::AUV::Speed::Task::onActivation(), Autonomy::TREX::Task::onActivation(), Vision::Lumenera::Task::onActivation(), Sensors::Imagenex881A::Task::onActivation(), Vision::DFK51BG02H::Task::onActivation(), Supervisors::AUV::LostComms::Task::onDeactivation(), Monitors::Emergency::Task::onDeactivation(), Control::AUV::Allocator::Task::onDeactivation(), DUNE::Control::BasicAutopilot::onDeactivation(), Transports::UAN::Task::onDeactivation(), Control::AUV::Speed::Task::onDeactivation(), Sensors::IFOG::Task::onDeactivation(), Autonomy::TREX::Task::onDeactivation(), Vision::Lumenera::Task::onDeactivation(), Sensors::Imagenex881A::Task::onDeactivation(), Vision::DFK51BG02H::Task::onDeactivation(), Sensors::MiniSVS::Task::onMain(), Sensors::XchangeSV::Task::onMain(), Navigation::General::GPSNavigation::Task::onMain(), Sensors::AIS::Task::onMain(), Monitors::Clock::Task::onMain(), Sensors::WorkhorseNavigator::Task::onMain(), Sensors::IFOG::Task::onMain(), UserInterfaces::RCViaArdupilot::Task::onMain(), Sensors::XR620CTD::Task::onMain(), Sensors::OS4000::Task::onMain(), Actuators::LED4R::Task::onMain(), Sensors::Microstrain3DMGX1::Task::onMain(), Navigation::General::Alignment::Task::onMain(), Actuators::MCD4R::Task::onMain(), Sensors::Imagenex881A::Task::onMain(), Sensors::MLBLTracker::Task::onMain(), Control::UAV::Ardupilot::Task::onMain(), Autonomy::TREX::Task::onReportEntityState(), Control::Path::ILOS::Task::onReportEntityState(), Sensors::MiniSVS::Task::onResourceAcquisition(), Sensors::XchangeSV::Task::onResourceAcquisition(), Plan::DB::Task::onResourceAcquisition(), Sensors::Microstrain3DMGX3::Task::onResourceAcquisition(), Sensors::MLBLTracker::Task::onResourceAcquisition(), Transports::UDP::Task::onResourceAcquisition(), Sensors::Imagenex881A::Task::onResourceAcquisition(), Autonomy::TextActions::Task::onResourceInitialization(), DUNE::Daemon::onResourceInitialization(), DUNE::Maneuvers::Maneuver::onResourceInitialization(), Transports::LogBook::Task::onResourceInitialization(), Supervisors::UAV::LostComms::Task::onResourceInitialization(), Transports::Cache::Task::onResourceInitialization(), Supervisors::Entities::Task::onResourceInitialization(), DUNE::Control::BasicRemoteOperation::onResourceInitialization(), Transports::LoggingDigest::Task::onResourceInitialization(), Transports::Iridium::Task::onResourceInitialization(), Monitors::Emergency::Task::onResourceInitialization(), Supervisors::AUV::LostComms::Task::onResourceInitialization(), Monitors::Entities::Task::onResourceInitialization(), Transports::UAN::Task::onResourceInitialization(), Transports::Announce::Task::onResourceInitialization(), Transports::GSM::Task::onResourceInitialization(), Transports::IridiumSBD::Task::onResourceInitialization(), Sensors::WorkhorseNavigator::Task::onResourceInitialization(), Sensors::OS4000::Task::onResourceInitialization(), Sensors::Microstrain3DMGX3::Task::onResourceInitialization(), Sensors::IFOG::Task::onResourceInitialization(), Actuators::LED4R::Task::onResourceInitialization(), Actuators::MCD4R::Task::onResourceInitialization(), Vision::DFK51BG02H::Task::onResourceInitialization(), Sensors::Imagenex881A::Task::onResourceInitialization(), Transports::FlightGear::Task::openConnection(), Control::UAV::Ardupilot::Task::openConnection(), Plan::Engine::Task::openDB(), Transports::GSM::Task::processQueue(), Sensors::MLBLTracker::Task::readSentence(), Monitors::OperationalLimits::Task::reset(), DUNE::Navigation::BasicNavigation::reset(), Sensors::Microstrain3DMGX3::Task::runCalibration(), Supervisors::Vehicle::Task::setInitialState(), Sensors::Microstrain3DMGX1::Task::setup(), DUNE::Control::BasicAutopilot::signalBadVertical(), DUNE::Control::BasicAutopilot::signalBadYaw(), Sensors::WorkhorseNavigator::Task::startSampling(), Sensors::XR620CTD::Task::startSampling(), Sensors::XR620CTD::Task::stopSampling(), Transports::Fragments::Task::Task(), Monitors::CPU::Task::Task(), UserInterfaces::RCViaArdupilot::Task::Task(), Control::AUV::Allocator::Task::Task(), Monitors::Clock::Task::Task(), Transports::FlightGear::Task::Task(), Transports::ArdupilotSITL::Task::Task(), Task(), Control::AUV::Speed::Task::Task(), Navigation::General::Alignment::Task::Task(), Sensors::SW100::Task::task(), Monitors::Medium::Task::task(), Sensors::Microstrain3DMGX3::Task::task(), Monitors::FuelLevel::Task::task(), Sensors::OS4000::Task::terminateCalibration(), and Monitors::OperationalLimits::Task::updateState().
|
protected |
Set current entity state with a custom description.
[in] | state | entity state. |
[in] | description | custom state description. |
References DUNE::IMC::EntityState::description, dispatch(), and DUNE::IMC::EntityState::state.
|
inlineprotected |
Set the name of the parameter editor that should be used to interact with the parameters of the task.
[in] | name | editor name (free-form string). |
|
inline |
Set scheduling priority programatically.
The priority of a task might change when configuration parameters are updated.
[in] | value | desired scheduling priority. |
void DUNE::Tasks::Task::spew | ( | const char * | format, |
... | |||
) |
Send a very verbose or frequent human-readable debug message to all configured output channels and files.
The message will only be processed if the configured log level is DEBUG_LEVEL_SPEW.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::Tasks::DEBUG_LEVEL_SPEW, and DUNE::IMC::LogBookEntry::LBET_DEBUG.
Referenced by activate(), activationFailed(), Navigation::General::Alignment::Task::calibrate(), Sensors::OS4000::Task::calibrating(), Vision::Lumenera::Task::captureFrame(), DUNE::Navigation::BasicNavigation::checkUncertainty(), Transports::IridiumSBD::Task::cleanExpired(), Simulators::UAVAutopilot::Task::consume(), Autonomy::TextActions::Task::consume(), Control::AntennaTracker::Task::consume(), Control::PTU::Task::consume(), DUNE::Navigation::BasicNavigation::consume(), Monitors::Emergency::Task::consume(), Transports::ArdupilotSITL::Task::consume(), Navigation::AUV::SGNavigation::Task::consume(), Simulators::UAV::Task::consume(), deactivate(), deactivationFailed(), Maneuver::VehicleFormation::FormCollAvoid::Task::formationControl(), UserInterfaces::RCViaArdupilot::Task::handleArdupilotData(), Control::UAV::Ardupilot::Task::handleArdupilotData(), Transports::FlightGear::Task::handleFlightGearData(), Transports::Iridium::Task::handleIridiumCommand(), onActivation(), onDeactivation(), Transports::ArdupilotSITL::Task::onMain(), Vision::Lumenera::Task::onMain(), onRequestActivation(), onRequestDeactivation(), Maneuver::VehicleFormation::FormCollAvoid::Task::onResourceAcquisition(), Control::AUV::LMI::Task::onUpdateParameters(), requestActivation(), requestDeactivation(), Transports::Iridium::Task::send_device_updates(), DUNE::Hardware::HayesModem::sendAT(), Transports::UAN::Task::sendRange(), DUNE::Navigation::BasicNavigation::setup(), UserInterfaces::RCViaArdupilot::Task::setupRate(), Control::UAV::Ardupilot::Task::setupRate(), Control::Path::VectorField::Task::step(), Simulators::UAVAutopilot::Task::task(), and Maneuver::VehicleFormation::FormCollAvoid::Task::task().
|
inlineprotected |
Test if task is stopping.
References DUNE::Concurrency::Runnable::isStopping().
Referenced by Sensors::XR620CTD::Task::getCalibration(), initializeResources(), DUNE::Tasks::SimpleTransport::onMain(), DUNE::Daemon::onMain(), Sensors::GillWindObserverII::Task::onMain(), Sensors::PPS::Task::onMain(), DUNE::Control::BasicAutopilot::onMain(), Sensors::MiniSVS::Task::onMain(), Transports::Fragments::Task::onMain(), Sensors::DLV3::Task::onMain(), Autonomy::TextActions::Task::onMain(), Sensors::XchangeSV::Task::onMain(), Transports::LogBook::Task::onMain(), Control::AntennaTracker::Task::onMain(), Vision::PhotoTrigger::Task::onMain(), Sensors::PTU300::Task::onMain(), Navigation::General::GPSNavigation::Task::onMain(), Sensors::AIS::Task::onMain(), Monitors::Clock::Task::onMain(), Transports::Discovery::Task::onMain(), Transports::SerialOverTCP::Task::onMain(), Plan::Generator::Task::onMain(), Transports::LoggingDigest::Task::onMain(), Transports::Noptilus::Task::onMain(), Control::PTU::Task::onMain(), Transports::GSM::Task::onMain(), DUNE::Control::PathController::onMain(), Transports::Cache::Task::onMain(), Sensors::WorkhorseNavigator::Task::onMain(), Transports::FlightGear::Task::onMain(), Transports::ArdupilotSITL::Task::onMain(), Sensors::IFOG::Task::onMain(), Transports::Replay::Task::onMain(), UserInterfaces::RCViaArdupilot::Task::onMain(), Autonomy::TREX::Task::onMain(), Transports::IridiumSBD::Task::onMain(), Transports::Iridium::Task::onMain(), Sensors::XR620CTD::Task::onMain(), Sensors::OS4000::Task::onMain(), Sensors::MTi::Task::onMain(), Transports::Announce::Task::onMain(), Actuators::LED4R::Task::onMain(), Control::AUV::Allocator::Task::onMain(), Vision::DFK51BG02H::Task::onMain(), Transports::UDP::Task::onMain(), Monitors::Entities::Task::onMain(), Sensors::Microstrain3DMGX1::Task::onMain(), Control::AUV::Speed::Task::onMain(), Navigation::General::Alignment::Task::onMain(), Actuators::MCD4R::Task::onMain(), Transports::UAN::Task::onMain(), Vision::Lumenera::Task::onMain(), Sensors::Imagenex881A::Task::onMain(), Plan::DB::Task::onMain(), Sensors::MLBLTracker::Task::onMain(), Plan::Engine::Task::onMain(), Sensors::MLBL::Task::onMain(), Control::UAV::Ardupilot::Task::onMain(), Sensors::OS4000::Task::onResourceInitialization(), Sensors::Microstrain3DMGX3::Task::onResourceInitialization(), Sensors::OS4000::Task::setParameter(), Sensors::XR620CTD::Task::setParameters(), and Sensors::XR620CTD::Task::stopSampling().
void DUNE::Tasks::Task::trace | ( | const char * | format, |
... | |||
) |
Send a verbose or frequent human-readable debug message to all configured output channels and files.
The message will only be processed if the configured log level is DEBUG_LEVEL_TRACE or greater.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::Tasks::DEBUG_LEVEL_TRACE, and DUNE::IMC::LogBookEntry::LBET_DEBUG.
Referenced by Supervisors::Vehicle::Task::answer(), DUNE::Control::PathController::consume(), Transports::ArdupilotSITL::Task::consume(), Transports::FlightGear::Task::consume(), Simulators::UAV::Task::consume(), Maneuver::VehicleFormation::FormCollAvoid::Task::consume(), Supervisors::Vehicle::Task::consume(), Control::UAV::Ardupilot::Task::consume(), UserInterfaces::RCViaArdupilot::Task::handleArdupilotData(), Control::UAV::Ardupilot::Task::handleArdupilotData(), Control::UAV::Ardupilot::Task::handleHeartbeatPacket(), Control::UAV::Ardupilot::Task::handleMissionCurrentPacket(), Control::UAV::Ardupilot::Task::handleMissionItemPacket(), Monitors::Entities::Task::onEntityResolution(), Transports::Replay::Task::onMain(), Vision::Lumenera::Task::onRequestActivation(), Vision::Lumenera::Task::onResourceRelease(), Transports::LogBook::Task::provide(), Transports::LogBook::Task::report(), Control::UAV::Ardupilot::Task::sendCommandPacket(), UserInterfaces::RCViaArdupilot::Task::sendData(), Control::UAV::Ardupilot::Task::sendData(), Supervisors::AUV::LostComms::Task::task(), Monitors::FuelLevel::Task::task(), and Control::UAV::RemoteOperation::Task::update().
void DUNE::Tasks::Task::updateParameters | ( | bool | act_deact = true | ) |
Instruct task to update its run-time parameters.
[in] | act_deact | if true this function will request activation/deactivation if the 'Active' parameter changed. |
References DUNE::IMC::EntityInfo::act_time, DUNE::IMC::EntityInfo::component, DUNE::IMC::EntityInfo::deact_time, DUNE::Tasks::DEBUG_LEVEL_DEBUG, DUNE::Tasks::DEBUG_LEVEL_NONE, DUNE::Tasks::DEBUG_LEVEL_SPEW, DUNE::Tasks::DEBUG_LEVEL_TRACE, dispatch(), DUNE::Tasks::ParameterTable::find(), getEntityLabel(), getName(), DUNE::IMC::EntityInfo::label, onUpdateParameters(), paramChanged(), requestActivation(), requestDeactivation(), and DUNE::Tasks::ParameterTable::setChanged().
Referenced by loadConfig().
|
inlineprotected |
Wait for the receiving queue to contain at least one message and then call the consumer functions for all the messages currently in it.
[in] | timeout | wait for timeout seconds. |
References DUNE::Tasks::Recipient::waitForMessages().
Referenced by DUNE::Daemon::onMain(), Sensors::PPS::Task::onMain(), DUNE::Control::BasicAutopilot::onMain(), Transports::Fragments::Task::onMain(), Autonomy::TextActions::Task::onMain(), Transports::LogBook::Task::onMain(), Control::AntennaTracker::Task::onMain(), Vision::PhotoTrigger::Task::onMain(), Navigation::General::GPSNavigation::Task::onMain(), Monitors::Clock::Task::onMain(), Plan::Generator::Task::onMain(), Transports::LoggingDigest::Task::onMain(), Transports::Noptilus::Task::onMain(), Control::PTU::Task::onMain(), Transports::GSM::Task::onMain(), DUNE::Control::PathController::onMain(), Transports::Cache::Task::onMain(), Sensors::WorkhorseNavigator::Task::onMain(), Sensors::IFOG::Task::onMain(), Transports::Replay::Task::onMain(), Transports::IridiumSBD::Task::onMain(), Sensors::MTi::Task::onMain(), Actuators::LED4R::Task::onMain(), Control::AUV::Allocator::Task::onMain(), Transports::UDP::Task::onMain(), Monitors::Entities::Task::onMain(), Control::AUV::Speed::Task::onMain(), Navigation::General::Alignment::Task::onMain(), Actuators::MCD4R::Task::onMain(), Transports::UAN::Task::onMain(), Vision::Lumenera::Task::onMain(), Sensors::Imagenex881A::Task::onMain(), Plan::DB::Task::onMain(), Plan::Engine::Task::onMain(), and Sensors::MLBL::Task::onMain().
void DUNE::Tasks::Task::war | ( | const char * | format, |
... | |||
) |
Send an human-readable warning message to all configured output channels and files.
format | string format (similar to printf(3)). |
... | arguments. |
References DUNE::IMC::LogBookEntry::LBET_WARNING.
Referenced by Supervisors::Vehicle::Task::changeMode(), Plan::Engine::Task::changeMode(), Maneuver::VehicleFormation::FormCollAvoid::Task::checkParameters(), Monitors::OperationalLimits::Task::clearError(), DUNE::Control::BasicAutopilot::consume(), Monitors::Clock::Task::consume(), Sensors::MTi::Task::consume(), Transports::Noptilus::Task::consume(), Monitors::Entities::Task::consume(), Autonomy::TREX::Task::consume(), Plan::DB::Task::consume(), Transports::Iridium::Task::consume(), Transports::FlightGear::Task::consume(), Supervisors::Vehicle::Task::consume(), Sensors::MLBL::Task::handleMiniPacket(), Transports::IridiumSBD::Task::handleSessionResult(), Sensors::MLBL::Task::handleTransponderTravelTimes(), Sensors::Microstrain3DMGX3::Task::isCalibrated(), Transports::Fragments::Task::messageRipper(), Navigation::General::Alignment::Task::onEntityResolution(), UserInterfaces::RCViaArdupilot::Task::onMain(), Vision::DFK51BG02H::Task::onMain(), Sensors::IFOG::Task::onResourceAcquisition(), Actuators::LED4R::Task::onResourceAcquisition(), Transports::UDP::Task::onResourceAcquisition(), Actuators::MCD4R::Task::onResourceAcquisition(), Transports::FlightGear::Task::openConnection(), Control::UAV::Ardupilot::Task::openConnection(), Sensors::MLBL::Task::ping(), Transports::GSM::Task::processQueue(), Transports::Discovery::Task::readMessage(), Transports::FlightGear::Task::receiveData(), UserInterfaces::RCViaArdupilot::Task::receiveData(), Transports::ArdupilotSITL::Task::receiveData(), Control::UAV::Ardupilot::Task::receiveData(), Transports::UAN::Task::recvAbort(), Transports::UAN::Task::recvPlanControl(), Monitors::Emergency::Task::sendSMS(), Transports::Replay::Task::startReplay(), Control::Path::Aerosonde::Task::step(), Transports::Replay::Task::stopReplay(), and Supervisors::AUV::LostComms::Task::task().
void DUNE::Tasks::Task::writeParamsXML | ( | std::ostream & | os | ) | const |
Write task parameters in XML format.
[in] | os | output stream. |
References getEntityLabel(), and DUNE::Tasks::ParameterTable::writeXML().
|
protected |
Referenced by DUNE::Navigation::BasicNavigation::BasicNavigation(), DUNE::Navigation::BasicNavigation::checkDeclination(), DUNE::Daemon::consume(), Vision::Lumenera::Task::consume(), Vision::DFK51BG02H::Task::consume(), DUNE::Daemon::Daemon(), dispatch(), getSystemId(), getSystemName(), loadConfig(), DUNE::Navigation::BasicNavigation::onEntityResolution(), Monitors::Entities::Task::onEntityResolution(), Plan::DB::Task::onResourceAcquisition(), DUNE::Daemon::onResourceInitialization(), Sensors::MLBL::Task::onResourceInitialization(), DUNE::Navigation::BasicNavigation::onUpdateParameters(), Transports::Announce::Task::onUpdateParameters(), Transports::UDP::Task::onUpdateParameters(), Plan::Engine::Task::openDB(), Transports::Discovery::Task::readMessage(), reserveEntities(), reserveEntity(), resolveEntity(), resolveSystemId(), resolveSystemName(), Transports::LoggingDigest::Task::startLog(), Transports::Cache::Task::Task(), Transports::Discovery::Task::Task(), and DUNE::Daemon::~Daemon().