SynchroTime
|
#include <rtc.h>
Public Slots | |
void | informationRequestSlot () |
RTC::informationRequestSlot. More... | |
void | adjustmentRequestSlot () |
RTC::adjustmentRequestSlot. More... | |
void | calibrationRequestSlot () |
RTC::calibrationRequestSlot. More... | |
void | resetRequestSlot () |
RTC::resetRequestSlot. More... | |
void | setRegisterRequestSlot (const float newValue) |
RTC::setRegisterRequestSlot. More... | |
void | statusRequestSlot () |
RTC::versionRequestSlot. More... | |
Signals | |
void | getRate (const float rate) |
Signal function for determining the access rate via the serial interface. More... | |
void | getData (const QString &data) |
void | portError (const QString &error) |
Public Member Functions | |
RTC (const QString &portName, QObject *parent=0) | |
RTC::RTC Constructor for test purposes. More... | |
RTC (const Settings_t &portSettings, QObject *parent=0) | |
RTC::RTC Default Constructor. More... | |
~RTC () | |
RTC::~RTC Default destructor. More... | |
bool | isConnected () const |
RTC::isConnected. More... | |
bool | isBusy () const |
RTC::isBusy. More... | |
Private Slots | |
void | handleError (QSerialPort::SerialPortError error) |
RTC::handleError. More... | |
Private Member Functions | |
bool | openSerialPort () const |
RTC::openSerialPort. More... | |
void | connectToRTC () |
RTC::connectToRTC. More... | |
const QByteArray | sendRequest (Request request, quint8 size=0, const quint8 *const data=nullptr) |
RTC::sendRequest. More... | |
void | informationRequest () |
RTC::informationRequest. More... | |
void | adjustmentRequest () |
RTC::adjustmentRequest. More... | |
void | calibrationRequest () |
RTC::calibrationRequest. More... | |
void | resetRequest () |
RTC::resetRequest. More... | |
void | setRegisterRequest (const float newValue) |
RTC::setRegisterRequest. More... | |
bool | statusRequest () |
RTC::statusRequest. More... | |
Private Attributes | |
QSerialPort * | m_pSerialPort |
bool | m_isConnected |
bool | m_isBusy |
QTimer * | m_pTimerCheckConnection |
float | m_correctionFactor |
|
explicit |
RTC::RTC Constructor for test purposes.
portName | of the type const QString. Name of the port in the system. |
parent | of the type *QObject - pThread. |
References connectToRTC(), handleError(), m_pSerialPort, m_pTimerCheckConnection, and statusRequestSlot().
|
explicit |
RTC::RTC Default Constructor.
portSettings | of the type const Settings_t&. Reference to an parameters of the serial port. |
parent | of the type *QObject - pThread. |
References Settings::baudRate, Settings::dataBits, Settings::flowControl, handleError(), m_isConnected, m_pSerialPort, m_pTimerCheckConnection, Settings::name, openSerialPort(), Settings::parity, Settings::requestRate, Settings::statusControlEnabled, statusRequestSlot(), and Settings::stopBits.
RTC::~RTC | ( | ) |
RTC::~RTC Default destructor.
References m_pSerialPort, and m_pTimerCheckConnection.
|
private |
References ADJUST, ESC_RED, ESC_RESET, ESC_WHITE, ESC_YELLOW, getData(), sendRequest(), and STARTBYTE.
Referenced by adjustmentRequestSlot().
|
slot |
References adjustmentRequest(), m_isBusy, and m_isConnected.
Referenced by MainWindow::connectRTC().
|
private |
References CALIBR, ESC_RED, ESC_RESET, ESC_WHITE, ESC_YELLOW, getData(), sendRequest(), and STARTBYTE.
Referenced by calibrationRequestSlot().
|
slot |
References calibrationRequest(), m_isBusy, and m_isConnected.
Referenced by MainWindow::connectRTC().
|
private |
References m_isConnected, m_pSerialPort, statusRequest(), and WAIT_REBOOT.
Referenced by RTC().
|
signal |
Referenced by adjustmentRequest(), calibrationRequest(), MainWindow::connectRTC(), informationRequest(), resetRequest(), setRegisterRequest(), and statusRequest().
|
signal |
Signal function for determining the access rate via the serial interface.
Referenced by MainWindow::connectRTC(), and statusRequest().
|
privateslot |
error | of the type enum QSerialPort::SerialPortError. |
References m_pSerialPort, and portError().
Referenced by RTC().
|
private |
References ESC_RED, ESC_RESET, ESC_WHITE, getData(), INFO, m_correctionFactor, sendRequest(), and STARTBYTE.
Referenced by informationRequestSlot().
|
slot |
References informationRequest(), m_isBusy, and m_isConnected.
Referenced by MainWindow::connectRTC().
bool RTC::isBusy | ( | ) | const |
bool RTC::isConnected | ( | ) | const |
References m_isConnected.
Referenced by MainWindow::connectRTC().
|
private |
References m_pSerialPort, and WAIT_REBOOT.
Referenced by RTC().
|
signal |
Referenced by MainWindow::connectRTC(), handleError(), sendRequest(), and statusRequest().
|
private |
References ESC_RED, ESC_RESET, ESC_WHITE, ESC_YELLOW, getData(), RESET, sendRequest(), and STARTBYTE.
Referenced by resetRequestSlot().
|
slot |
References m_isBusy, m_isConnected, and resetRequest().
Referenced by MainWindow::connectRTC().
|
private |
request | of the type enum Request. |
size | of the type quint8. |
data | Sent data of type byte array. |
References m_isBusy, m_pSerialPort, portError(), STARTBYTE, and WAIT_TIME.
Referenced by adjustmentRequest(), calibrationRequest(), informationRequest(), resetRequest(), setRegisterRequest(), and statusRequest().
|
private |
newValue | of the type const float. The new Value for Offset Register. |
References ESC_RED, ESC_RESET, ESC_WHITE, ESC_YELLOW, getData(), sendRequest(), SETREG, and STARTBYTE.
Referenced by setRegisterRequestSlot().
|
slot |
newValue | of the type const float. |
References m_isBusy, m_isConnected, and setRegisterRequest().
Referenced by MainWindow::connectRTC().
|
private |
References ESC_RED, ESC_RESET, getData(), getRate(), m_pSerialPort, portError(), sendRequest(), STARTBYTE, STATUS, STATUS_DISCONNECTION, STATUS_ERROR, STATUS_INPUT_DATA_TOLONG, STATUS_INVALID_PARAMETER, STATUS_NOT_SUPPORTED, STATUS_SUCCESS, and STATUS_UNKNOWN_ERROR.
Referenced by connectToRTC(), and statusRequestSlot().
|
slot |
RTC::versionRequestSlot.
References m_isBusy, m_isConnected, and statusRequest().
Referenced by RTC().
|
private |
Referenced by informationRequest().
|
private |
|
private |
|
private |
Referenced by connectToRTC(), handleError(), openSerialPort(), RTC(), sendRequest(), statusRequest(), and ~RTC().