SynchroTime
serialportsettings.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // Home Office
3 // Nürnberg, Germany
4 // E-Mail: sergej1@email.ua
5 //
6 // Copyright (C) 2020 free Project SynchroTime RTC DS3231. All rights reserved.
7 //------------------------------------------------------------------------------
8 // Project SynchroTime: Command-line client for adjust the exact time and
9 // calibrating the RTC DS3231 module via the serial interface (UART).
10 //------------------------------------------------------------------------------
16 #ifndef SERIALPORTSETTINGS_H
17 #define SERIALPORTSETTINGS_H
18 
19 //------------------------------------------------------------------------------
20 // Includes
21 //------------------------------------------------------------------------------
22 #include <QtSerialPort/QSerialPort>
23 
24 //------------------------------------------------------------------------------
25 // Preprocessor
26 //------------------------------------------------------------------------------
27 
28 //------------------------------------------------------------------------------
29 // Enums
30 //------------------------------------------------------------------------------
31 
32 //------------------------------------------------------------------------------
33 // Types
34 //------------------------------------------------------------------------------
43 typedef struct Settings {
44  QString name;
45  qint32 baudRate;
46  QString stringBaudRate;
47  QSerialPort::DataBits dataBits;
48  QString stringDataBits;
49  QSerialPort::Parity parity;
50  QString stringParity;
51  QSerialPort::StopBits stopBits;
52  QString stringStopBits;
53  QSerialPort::FlowControl flowControl;
60  bool isChanged = false;
61 } Settings_t;
62 
63 #endif // SERIALPORTSETTINGS_H
64 
bool statusControlEnabled
Additional parameter: This is a flag that allows periodic requests for device status.
Definition: serialportsettings.h:57
bool isChanged
This is a flag to save changes to the serial port parameters.
Definition: serialportsettings.h:60
QString stringFlowControl
description of the parameter flow control mode.
Definition: serialportsettings.h:54
QSerialPort::FlowControl flowControl
This property holds the desired flow control mode.
Definition: serialportsettings.h:53
QString stringBaudRate
The data baud rate for the UI.
Definition: serialportsettings.h:46
QString stringDataBits
description of the parameter data bits in a frame.
Definition: serialportsettings.h:48
QString stringStopBits
description of the parameter number of stop bits in a frame.
Definition: serialportsettings.h:52
QString name
The name of the serial port.
Definition: serialportsettings.h:44
int requestRate
Additional parameter: The interval, in milliseconds, between requests for device status.
Definition: serialportsettings.h:56
bool accessRateEnabled
Additional parameter: This is a flag that allows determining access rate via the serial interface...
Definition: serialportsettings.h:58
float correctionFactor
Additional parameter: Correction factor between frequency deviation and Aging register value...
Definition: serialportsettings.h:55
The Settings class.
Definition: serialportsettings.h:43
QSerialPort::StopBits stopBits
This property holds the number of stop bits in a frame.
Definition: serialportsettings.h:51
QString stringParity
description of the parameter parity checking mode.
Definition: serialportsettings.h:50
struct Settings Settings_t
bool localEchoEnabled
Additional parameter: This is a flag that allows console input.
Definition: serialportsettings.h:59
QSerialPort::Parity parity
This property holds the parity checking mode.
Definition: serialportsettings.h:49
qint32 baudRate
The data baud rate for the serial port.
Definition: serialportsettings.h:45
QSerialPort::DataBits dataBits
This property holds the data bits in a frame.
Definition: serialportsettings.h:47