DUNE: Uniform Navigational Environment  2017.01.0
Transports::MobileInternet::Task Struct Reference

Public Member Functions

 Task (const std::string &name, Tasks::Context &ctx)
 
 ~Task (void)
 
void onUpdateParameters (void)
 
void consume (const IMC::PowerChannelState *msg)
 
void onResourceAcquisition (void)
 
void onRequestActivation (void)
 
void onRequestDeactivation (void)
 
void controlPower (IMC::PowerChannelControl::OperationEnum op)
 
void turnPowerOn (void)
 
void turnPowerOff (void)
 
bool isPowered (void)
 
bool connect (void)
 
bool disconnect (void)
 
bool isConnected (Address *address=NULL)
 
void startNAT (void)
 
void stopNAT (void)
 
void updateStateMachine (void)
 
void onMain (void)
 

Public Attributes

Arguments m_args
 
std::string m_command_connect
 
std::string m_command_disconnect
 
std::string m_command_nat_start
 
std::string m_command_nat_stop
 
bool m_powered
 
StateMachineStates m_sm_state
 
Address m_address
 
Time::Counter< double > m_conn_watchdog
 

Constructor & Destructor Documentation

Transports::MobileInternet::Task::~Task ( void  )
inline

References disconnect().

Member Function Documentation

void Transports::MobileInternet::Task::consume ( const IMC::PowerChannelState *  msg)
inline
void Transports::MobileInternet::Task::controlPower ( IMC::PowerChannelControl::OperationEnum  op)
inline
bool Transports::MobileInternet::Task::disconnect ( void  )
inline

References m_command_disconnect.

Referenced by updateStateMachine(), and ~Task().

bool Transports::MobileInternet::Task::isConnected ( Address *  address = NULL)
inline
bool Transports::MobileInternet::Task::isPowered ( void  )
inline

Test if power channel is on.

Returns
true if power channel is on, false otherwise.

References m_powered.

Referenced by updateStateMachine().

void Transports::MobileInternet::Task::onMain ( void  )
inline

References updateStateMachine().

void Transports::MobileInternet::Task::onRequestActivation ( void  )
inline
void Transports::MobileInternet::Task::onRequestDeactivation ( void  )
inline
void Transports::MobileInternet::Task::onResourceAcquisition ( void  )
inline
void Transports::MobileInternet::Task::onUpdateParameters ( void  )
inline
void Transports::MobileInternet::Task::startNAT ( void  )
inline
void Transports::MobileInternet::Task::stopNAT ( void  )
inline
void Transports::MobileInternet::Task::turnPowerOff ( void  )
inline

Turn power channel off.

References controlPower().

Referenced by updateStateMachine().

void Transports::MobileInternet::Task::turnPowerOn ( void  )
inline

Turn power channel on.

References controlPower().

Referenced by updateStateMachine().

Member Data Documentation

Address Transports::MobileInternet::Task::m_address

Interface IPv4 address.

Referenced by updateStateMachine().

Arguments Transports::MobileInternet::Task::m_args
std::string Transports::MobileInternet::Task::m_command_connect

Start command.

Referenced by connect(), and Task().

std::string Transports::MobileInternet::Task::m_command_disconnect

Stop command.

Referenced by disconnect(), and Task().

std::string Transports::MobileInternet::Task::m_command_nat_start

Start NAT command.

Referenced by startNAT(), and Task().

std::string Transports::MobileInternet::Task::m_command_nat_stop

Stop NAT command.

Referenced by stopNAT(), and Task().

Time::Counter<double> Transports::MobileInternet::Task::m_conn_watchdog

Referenced by Task(), and updateStateMachine().

bool Transports::MobileInternet::Task::m_powered

True if modem is powered on.

Referenced by consume(), isPowered(), and onUpdateParameters().

StateMachineStates Transports::MobileInternet::Task::m_sm_state

Current state machine state.

Referenced by onRequestActivation(), onRequestDeactivation(), and updateStateMachine().

Collaboration diagram for Transports::MobileInternet::Task:
Collaboration graph