DUNE: Uniform Navigational Environment
2016.03.0
|
Public Member Functions | |
HayesModem (Tasks::Task *task, IO::Handle *handle) | |
virtual | ~HayesModem (void) |
void | initialize (void) |
std::string | getManufacturer (void) |
std::string | getModel (void) |
std::string | getRevision (void) |
std::string | getIMEI (void) |
float | getRSSI (void) |
Public Member Functions inherited from DUNE::Hardware::BasicModem | |
BasicModem (Tasks::Task *task, IO::Handle *handle) | |
virtual | ~BasicModem (void) |
void | initialize (void) |
void | setLineTermIn (const std::string &term) |
const std::string & | getLineTermIn (void) |
void | setLineTermOut (const std::string &str) |
const std::string & | getLineTermOut (void) |
void | setLineTrim (bool enable) |
void | setTxRateMax (double rate) |
bool | isBusy (void) |
bool | isCooling (void) |
void | setBusy (bool value) |
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 | |
virtual void | sendInitialization (void) |
virtual void | sendReset (void) |
virtual void | queryRSSI (void) |
virtual void | expectOK (void) |
void | sendAT (const std::string &str) |
void | sendRaw (const uint8_t *data, unsigned data_size) |
void | expect (const std::string &str) |
void | expectREADY (void) |
void | setRSSI (float value) |
void | setFlowControl (bool value) |
void | setEcho (bool value) |
std::string | readValue (const std::string &cmd) |
Protected Member Functions inherited from DUNE::Hardware::BasicModem | |
virtual bool | handleUnsolicited (const std::string &str) |
virtual bool | isFragment (const std::string &str) |
void | sendRaw (const uint8_t *data, unsigned data_size) |
void | send (const std::string &str) |
void | setTimeout (double timeout) |
double | getTimeout (void) |
void | expect (const std::string &str) |
void | readRaw (Time::Counter< double > &timer, uint8_t *data, unsigned data_size) |
ReadMode | getReadMode (void) |
void | setReadMode (ReadMode mode) |
void | flushInput (void) |
std::string | readLine (void) |
std::string | readLine (Time::Counter< double > &timer) |
Tasks::Task * | getTask (void) |
void | setSkipLine (const std::string &line) |
Protected Member Functions inherited from DUNE::Concurrency::Thread | |
void | startImpl (void) |
void | stopImpl (void) |
void | joinImpl (void) |
void | setPriorityImpl (Scheduler::Policy policy, unsigned priority) |
Additional Inherited Members | |
Public Types inherited from DUNE::Concurrency::Runnable | |
enum | State { StateStarting, StateRunning, StateStopping, StateDead, StateUnknown } |
Protected Types inherited from DUNE::Hardware::BasicModem | |
enum | ReadMode { READ_MODE_LINE, READ_MODE_RAW } |
Protected Attributes inherited from DUNE::Hardware::BasicModem | |
Concurrency::Mutex | m_mutex |
IO::Handle * | m_handle |
std::string | m_last_cmd |
HayesModem::HayesModem | ( | Tasks::Task * | task, |
IO::Handle * | handle | ||
) |
Constructor.
[in] | task | parent task. |
[in] | handle | I/O handle. |
References DUNE::Hardware::BasicModem::getTask(), DUNE::IMC::Message::setDestination(), and DUNE::IMC::Message::setDestinationEntity().
|
inlinevirtual |
Destructor.
|
protected |
References DUNE::Hardware::BasicModem::readLine().
Referenced by expectOK(), and expectREADY().
|
protectedvirtual |
References expect().
Referenced by readValue(), setEcho(), and setFlowControl().
|
protected |
References expect().
std::string HayesModem::getIMEI | ( | void | ) |
std::string HayesModem::getManufacturer | ( | void | ) |
std::string HayesModem::getModel | ( | void | ) |
std::string HayesModem::getRevision | ( | void | ) |
Query the ISU revision.
References DUNE::Utils::String::join(), DUNE::Hardware::BasicModem::readLine(), and sendAT().
float HayesModem::getRSSI | ( | void | ) |
Retrieve received signal strength indication (RSSI).
References DUNE::Hardware::BasicModem::m_mutex, queryRSSI(), and DUNE::IMC::RSSI::value.
void HayesModem::initialize | ( | void | ) |
Perform ISU initialization, this function must be called before any other.
References DUNE::IO::Handle::flushInput(), DUNE::Hardware::BasicModem::m_handle, DUNE::Hardware::BasicModem::READ_MODE_LINE, sendInitialization(), sendReset(), DUNE::Hardware::BasicModem::setReadMode(), DUNE::Concurrency::Runnable::start(), and DUNE::Time::Delay::wait().
|
inlineprotectedvirtual |
Referenced by getRSSI().
|
protected |
References expectOK(), DUNE::Hardware::BasicModem::readLine(), and sendAT().
Referenced by getIMEI(), getManufacturer(), and getModel().
|
protected |
References DUNE::Tasks::Task::dispatch(), DUNE::Hardware::BasicModem::getLineTermOut(), DUNE::Hardware::BasicModem::getTask(), DUNE::Hardware::BasicModem::m_last_cmd, DUNE::Hardware::BasicModem::send(), DUNE::IMC::Message::setDestination(), and DUNE::IMC::DevDataText::value.
Referenced by getRevision(), readValue(), setEcho(), and setFlowControl().
|
inlineprotectedvirtual |
Reimplemented from DUNE::Hardware::BasicModem.
Referenced by initialize().
|
protected |
References DUNE::Hardware::BasicModem::m_handle, and DUNE::IO::Handle::write().
|
inlineprotectedvirtual |
Reimplemented from DUNE::Hardware::BasicModem.
Referenced by initialize().
|
protected |
Enable or disable the ISU to echo characters to the DTE.
[in] | value | true to enable, false to disable. |
References expectOK(), and sendAT().
|
protected |
Enable or disable RTS/CTS flow control.
[in] | value | true to enable flow control, false otherwise. |
References expectOK(), and sendAT().
|
protected |