DtkSystemSettings
dtk library for systemsettings.
载入中...
搜索中...
未找到
dsystemtimetypes.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DSYSTEMTIMETYPES_H
6#define DSYSTEMTIMETYPES_H
7
8#include "dtksystemtime_global.h"
9
10#include <qobject.h>
11
12DSYSTEMTIME_BEGIN_NAMESPACE
13
14struct Address
15{
16 qint32 type;
17 QByteArray ip;
18 friend bool operator==(const Address &lhs, const Address &rhs)
19 {
20 return lhs.type == rhs.type && lhs.ip == rhs.ip;
21 }
22};
23
24struct Message
25{
43 quint64 ntp_ts_short_to_usec_dispersion; /*< The maximum error of the local clock with respect
44 to the main reference clock.*/
45 QByteArray ntp_msg_refid; /*< The NTP REFID specifies a string of 4 ASCII characters that
46 defines the reference identifier used by the driver. The REFID
47 string overrides the default identifier ordinarily assigned by the
48 driver itself.*/
49 quint64 origin_time;
52 quint64 dest_time;
53 bool spike;
54 quint64 packet_count;
56 friend bool operator==(const Message &lhs, const Message &rhs)
57 {
58 return lhs.ntp_field_leap == rhs.ntp_field_leap &&
60 lhs.ntp_field_mode == rhs.ntp_field_mode &&
65 lhs.ntp_msg_refid == rhs.ntp_msg_refid &&
66 lhs.origin_time == rhs.origin_time &&
69 lhs.dest_time == rhs.dest_time &&
70 lhs.spike == rhs.spike &&
71 lhs.packet_count == rhs.packet_count &&
73 }
74
75};
76
77DSYSTEMTIME_END_NAMESPACE
78
79#endif
存储NTP服务器地址信息
Definition dsystemtimetypes.h:15
QByteArray ip
Definition dsystemtimetypes.h:17
qint32 type
Definition dsystemtimetypes.h:16
存储NTP服务器返回的信息
Definition dsystemtimetypes.h:25
qint32 ntp_msg_precision
Definition dsystemtimetypes.h:41
quint32 ntp_field_mode
Definition dsystemtimetypes.h:29
quint32 ntp_msg_stratum
Definition dsystemtimetypes.h:38
quint64 ntp_msg_trans_time
Definition dsystemtimetypes.h:51
quint32 ntp_field_leap
Definition dsystemtimetypes.h:26
quint32 ntp_field_version
Definition dsystemtimetypes.h:28
quint64 ntp_msg_recv_time
Definition dsystemtimetypes.h:50
quint64 ntp_ts_short_to_usec_delay
Definition dsystemtimetypes.h:42
quint64 samples_jitter
Definition dsystemtimetypes.h:55
quint64 ntp_ts_short_to_usec_dispersion
Definition dsystemtimetypes.h:43
quint64 packet_count
Definition dsystemtimetypes.h:54
QByteArray ntp_msg_refid
Definition dsystemtimetypes.h:45
quint64 dest_time
Definition dsystemtimetypes.h:52
bool spike
Definition dsystemtimetypes.h:53
quint64 origin_time
Definition dsystemtimetypes.h:49