DUNE: Uniform Navigational Environment
2.3.2
|
Public Member Functions | |
HayesModem (Tasks::Task *task, Hardware::SerialPort *uart) | |
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, Hardware::SerialPort *uart) | |
virtual | ~BasicModem (void) |
void | initialize (void) |
void | setTxRateMax (double rate) |
bool | isBusy (void) |
bool | isCooling (void) |
Public Member Functions inherited from DUNE::Concurrency::Thread | |
Thread (void) | |
virtual | ~Thread (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) |
void | sendAT (const std::string &str) |
void | sendRaw (const uint8_t *data, unsigned data_size) |
void | expect (const std::string &str) |
void | expectOK (void) |
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) |
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) |
void | setBusy (bool value) |
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 } |
Static Public Member Functions inherited from DUNE::Concurrency::Thread | |
static unsigned | native (void) |
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 |
Hardware::SerialPort * | m_uart |
std::string | m_last_cmd |
HayesModem::HayesModem | ( | Tasks::Task * | task, |
Hardware::SerialPort * | uart | ||
) |
Constructor.
[in] | task | parent task. |
[in] | uart | serial port connected to the ISU. |
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().
|
protected |
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::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::Hardware::SerialPort::flushInput(), DUNE::Hardware::BasicModem::m_uart, DUNE::Hardware::BasicModem::READ_MODE_LINE, sendInitialization(), sendReset(), setEcho(), DUNE::Hardware::BasicModem::setReadMode(), and DUNE::Concurrency::Runnable::start().
|
inlineprotectedvirtual |
Referenced by getRSSI().
|
protected |
References expectOK(), DUNE::Hardware::BasicModem::readLine(), and sendAT().
Referenced by getIMEI(), getManufacturer(), and getModel().
|
protected |
References DUNE::Hardware::BasicModem::getTask(), DUNE::Hardware::BasicModem::m_last_cmd, sendRaw(), and DUNE::Tasks::Task::spew().
Referenced by getRevision(), readValue(), setEcho(), and setFlowControl().
|
inlineprotectedvirtual |
Reimplemented from DUNE::Hardware::BasicModem.
Referenced by initialize().
|
protected |
References DUNE::Hardware::BasicModem::m_uart, and DUNE::Hardware::SerialPort::write().
Referenced by sendAT().
|
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().
Referenced by initialize().
|
protected |
Enable or disable RTS/CTS flow control.
[in] | value | true to enable flow control, false otherwise. |
References expectOK(), and sendAT().
|
protected |