![]() |
DUNE: Uniform Navigational Environment
2.3.2
|
Public Member Functions | |
| 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 Types | |
| enum | ReadMode { READ_MODE_LINE, READ_MODE_RAW } |
Protected Member Functions | |
| virtual bool | handleUnsolicited (const std::string &str) |
| virtual void | sendInitialization (void) |
| virtual void | sendReset (void) |
| 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) |
Protected Attributes | |
| Concurrency::Mutex | m_mutex |
| Hardware::SerialPort * | m_uart |
| std::string | m_last_cmd |
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 |
| DUNE::Hardware::BasicModem::BasicModem | ( | Tasks::Task * | task, |
| Hardware::SerialPort * | uart | ||
| ) |
Constructor.
| [in] | task | parent task. |
| [in] | uart | serial port connected to the ISU. |
References DUNE::Hardware::SerialPort::flushInput(), and m_uart.
|
inlinevirtual |
|
protected |
References readLine().
|
protected |
References DUNE::Hardware::SerialPort::flushInput(), and m_uart.
|
protected |
References m_mutex.
|
inlineprotected |
|
protected |
References m_mutex.
Referenced by readLine().
|
inlineprotectedvirtual |
| void DUNE::Hardware::BasicModem::initialize | ( | void | ) |
| bool DUNE::Hardware::BasicModem::isBusy | ( | void | ) |
Test if the modem is busy.
Test if ISU is busy performing an SBD session.
References m_mutex.
| bool DUNE::Hardware::BasicModem::isCooling | ( | void | ) |
Test if the modem is cooling down.
Test if ISU is cooling down.
References m_mutex, and DUNE::Time::Counter< T >::overflow().
|
protected |
References getTimeout().
Referenced by DUNE::Hardware::HayesModem::expect(), expect(), DUNE::Hardware::HayesModem::getRevision(), readLine(), and DUNE::Hardware::HayesModem::readValue().
|
protected |
|
protected |
|
protected |
References getTask(), DUNE::Tasks::Task::inf(), and sendRaw().
|
inlineprotectedvirtual |
Reimplemented in DUNE::Hardware::HayesModem.
Referenced by initialize().
|
protected |
References m_uart, and DUNE::Hardware::SerialPort::write().
Referenced by send().
|
inlineprotectedvirtual |
Reimplemented in DUNE::Hardware::HayesModem.
Referenced by initialize().
|
protected |
References m_mutex, and DUNE::Time::Counter< T >::reset().
|
protected |
References m_mutex.
Referenced by initialize(), and DUNE::Hardware::HayesModem::initialize().
|
protected |
|
protected |
References m_mutex.
| void DUNE::Hardware::BasicModem::setTxRateMax | ( | double | rate | ) |
Set maximum transmission rate.
| [in] | rate | transmission rate in second. Negative values will disable transmission rate control. |
| [in] | rate | transmission rate in second. Negative values will disable transmission rate cap. |
References m_mutex, and DUNE::Time::Counter< T >::setTop().
|
protected |
Last command sent to modem.
Referenced by readLine(), and DUNE::Hardware::HayesModem::sendAT().
|
protected |
|
protected |
Serial port handle.
Referenced by BasicModem(), flushInput(), initialize(), DUNE::Hardware::HayesModem::initialize(), sendRaw(), and DUNE::Hardware::HayesModem::sendRaw().
