DUNE: Uniform Navigational Environment  2019.02.1
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 onDeactivation (void)
 
void requestReactivation (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 updateDynDNS ()
 
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
 
std::string m_command_dyndns_update
 
bool m_powered
 
StateMachineStates m_sm_state
 
Address m_address
 
Time::Counter< double > m_conn_watchdog
 
Time::Counter< double > m_dyndns_watchdog
 
bool m_reactivating
 
int m_conn_timeout
 

Constructor & Destructor Documentation

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

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
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.
void Transports::MobileInternet::Task::onDeactivation ( void  )
inline
void Transports::MobileInternet::Task::onMain ( void  )
inline
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::requestReactivation ( 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.

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

Turn power channel on.

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

Member Data Documentation

Address Transports::MobileInternet::Task::m_address

Interface IPv4 address.

Arguments Transports::MobileInternet::Task::m_args

Task arguments.

std::string Transports::MobileInternet::Task::m_command_connect

Start command.

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

Stop command.

std::string Transports::MobileInternet::Task::m_command_dyndns_update

Update dynamic DNS command.

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

Start NAT command.

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

Stop NAT command.

int Transports::MobileInternet::Task::m_conn_timeout

Connection timeout time in seconds.

Time::Counter<double> Transports::MobileInternet::Task::m_conn_watchdog
Time::Counter<double> Transports::MobileInternet::Task::m_dyndns_watchdog
bool Transports::MobileInternet::Task::m_powered

True if modem is powered on.

bool Transports::MobileInternet::Task::m_reactivating

Are we reactivating the task?

StateMachineStates Transports::MobileInternet::Task::m_sm_state

Current state machine state.

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