source: trunk/Packages/synapse/docs/help/sntpsend.TSNTPSend.html

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Základní kostra projektu.
  • Přidáno: Knihovna synapse.
File size: 12.0 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
2<html>
3<head>
4<meta name="GENERATOR" content="PasDoc 0.9.0">
5<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6<title>sntpsend: Class TSNTPSend</title>
7<link rel="StyleSheet" type="text/css" href="pasdoc.css">
8</head>
9<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
10<a name="TSNTPSend"></a><h1 class="cio">Class TSNTPSend</h1>
11<table class="sections">
12<tr>
13<td><a class="section" href="#@Description">Description</a></td><td><a class="section" href="#@Hierarchy">Hierarchy</a></td><td>Fields</td><td><a class="section" href="#@Methods">Methods</a></td><td><a class="section" href="#@Properties">Properties</a></td></tr></table>
14<a name="@Description"></a><h2 class="unit">Unit</h2>
15<p class="unitlink">
16<a href="sntpsend.html">sntpsend</a></p>
17<h2 class="declaration">Declaration</h2>
18<p class="declaration">
19<code>type TSNTPSend = class(<a class="normal" href="blcksock.TSynaClient.html">TSynaClient</a>)</code></p>
20<h2 class="description">Description</h2>
21<p>
22Implementation of NTP and SNTP client protocol</p>
23<p>
24, include time synchronisation. It can send NTP or SNTP time queries, or it can receive NTP broadcasts too.
25
26<p>Note: Are you missing properties for specify server address and port? Look to parent <a class="normal" href="blcksock.TSynaClient.html">TSynaClient</a> too!</p>
27<a name="@Hierarchy"></a><h2 class="hierarchy">Hierarchy</h2>
28<ul class="hierarchy"><li class="ancestor">TObject</li>
29<li class="ancestor"><a class="normal" href="blcksock.TSynaClient.html">TSynaClient</a></li>
30<li class="thisitem">TSNTPSend</li></ul><h2 class="overview">Overview</h2>
31<a name="@Methods"></a><h3 class="summary">Methods</h3>
32<table class="summary">
33<tr class="list">
34<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
35<td class="itemcode"><code>constructor <b><a href="sntpsend.TSNTPSend.html#Create">Create</a></b>;</code></td>
36</tr>
37<tr class="list2">
38<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
39<td class="itemcode"><code>destructor <b><a href="sntpsend.TSNTPSend.html#Destroy">Destroy</a></b>; override;</code></td>
40</tr>
41<tr class="list">
42<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
43<td class="itemcode"><code>function <b><a href="sntpsend.TSNTPSend.html#DecodeTs">DecodeTs</a></b>(Nsec, Nfrac: Longint): TDateTime;</code></td>
44</tr>
45<tr class="list2">
46<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
47<td class="itemcode"><code>procedure <b><a href="sntpsend.TSNTPSend.html#EncodeTs">EncodeTs</a></b>(dt: TDateTime; var Nsec, Nfrac: Longint);</code></td>
48</tr>
49<tr class="list">
50<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
51<td class="itemcode"><code>function <b><a href="sntpsend.TSNTPSend.html#GetSNTP">GetSNTP</a></b>: Boolean;</code></td>
52</tr>
53<tr class="list2">
54<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
55<td class="itemcode"><code>function <b><a href="sntpsend.TSNTPSend.html#GetNTP">GetNTP</a></b>: Boolean;</code></td>
56</tr>
57<tr class="list">
58<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
59<td class="itemcode"><code>function <b><a href="sntpsend.TSNTPSend.html#GetBroadcastNTP">GetBroadcastNTP</a></b>: Boolean;</code></td>
60</tr>
61</table>
62<a name="@Properties"></a><h3 class="summary">Properties</h3>
63<table class="summary">
64<tr class="list">
65<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
66<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#NTPReply">NTPReply</a></b>: <a href="sntpsend.TNtp.html">TNtp</a> read FNTPReply;</code></td>
67</tr>
68<tr class="list2">
69<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
70<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#NTPTime">NTPTime</a></b>: TDateTime read FNTPTime;</code></td>
71</tr>
72<tr class="list">
73<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
74<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#NTPOffset">NTPOffset</a></b>: Double read FNTPOffset;</code></td>
75</tr>
76<tr class="list2">
77<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
78<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#NTPDelay">NTPDelay</a></b>: Double read FNTPDelay;</code></td>
79</tr>
80<tr class="list">
81<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
82<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#MaxSyncDiff">MaxSyncDiff</a></b>: double read FMaxSyncDiff write FMaxSyncDiff;</code></td>
83</tr>
84<tr class="list2">
85<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
86<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#SyncTime">SyncTime</a></b>: Boolean read FSyncTime write FSyncTime;</code></td>
87</tr>
88<tr class="list">
89<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
90<td class="itemcode"><code>property <b><a href="sntpsend.TSNTPSend.html#Sock">Sock</a></b>: <a href="blcksock.TUDPBlockSocket.html">TUDPBlockSocket</a> read FSock;</code></td>
91</tr>
92</table>
93<h2 class="description">Description</h2>
94<h3 class="detail">Methods</h3>
95<table class="detail">
96<tr class="list">
97<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
98<td class="itemcode"><a name="Create"></a><code>constructor <b>Create</b>;</code></td>
99</tr>
100</table>
101&nbsp;<table class="detail">
102<tr class="list">
103<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
104<td class="itemcode"><a name="Destroy"></a><code>destructor <b>Destroy</b>; override;</code></td>
105</tr>
106</table>
107&nbsp;<table class="detail">
108<tr class="list">
109<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
110<td class="itemcode"><a name="DecodeTs"></a><code>function <b>DecodeTs</b>(Nsec, Nfrac: Longint): TDateTime;</code></td>
111</tr>
112</table>
113<p>
114Decode 128 bit timestamp used in NTP packet to TDateTime type.</p>
115<table class="detail">
116<tr class="list">
117<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
118<td class="itemcode"><a name="EncodeTs"></a><code>procedure <b>EncodeTs</b>(dt: TDateTime; var Nsec, Nfrac: Longint);</code></td>
119</tr>
120</table>
121<p>
122Decode TDateTime type to 128 bit timestamp used in NTP packet.</p>
123<table class="detail">
124<tr class="list">
125<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
126<td class="itemcode"><a name="GetSNTP"></a><code>function <b>GetSNTP</b>: Boolean;</code></td>
127</tr>
128</table>
129<p>
130Send request to <a class="normal" href="blcksock.TSynaClient.html">TSynaClient</a>.<a class="normal" href="blcksock.TSynaClient.html#TargetHost">TargetHost</a> and wait for reply. If all is OK, then result is <code>True</code> and <a class="normal" href="sntpsend.TSNTPSend.html#NTPReply">NTPReply</a> and <a class="normal" href="sntpsend.TSNTPSend.html#NTPTime">NTPTime</a> are valid.</p>
131<table class="detail">
132<tr class="list">
133<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
134<td class="itemcode"><a name="GetNTP"></a><code>function <b>GetNTP</b>: Boolean;</code></td>
135</tr>
136</table>
137<p>
138Send request to <a class="normal" href="blcksock.TSynaClient.html">TSynaClient</a>.<a class="normal" href="blcksock.TSynaClient.html#TargetHost">TargetHost</a> and wait for reply. If all is OK, then result is <code>True</code> and <a class="normal" href="sntpsend.TSNTPSend.html#NTPReply">NTPReply</a> and <a class="normal" href="sntpsend.TSNTPSend.html#NTPTime">NTPTime</a> are valid. Result time is after all needed corrections.</p>
139<table class="detail">
140<tr class="list">
141<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
142<td class="itemcode"><a name="GetBroadcastNTP"></a><code>function <b>GetBroadcastNTP</b>: Boolean;</code></td>
143</tr>
144</table>
145<p>
146Wait for broadcast NTP packet. If all OK, result is <code>True</code> and <a class="normal" href="sntpsend.TSNTPSend.html#NTPReply">NTPReply</a> and <a class="normal" href="sntpsend.TSNTPSend.html#NTPTime">NTPTime</a> are valid.</p>
147<h3 class="detail">Properties</h3>
148<table class="detail">
149<tr class="list">
150<td class="visibility"><a href="legend.html"><img src="public.gif" alt="Public" title="Public"></a></td>
151<td class="itemcode"><a name="NTPReply"></a><code>property <b>NTPReply</b>: <a href="sntpsend.TNtp.html">TNtp</a> read FNTPReply;</code></td>
152</tr>
153</table>
154<p>
155Holds last received NTP packet.</p>
156<table class="detail">
157<tr class="list">
158<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
159<td class="itemcode"><a name="NTPTime"></a><code>property <b>NTPTime</b>: TDateTime read FNTPTime;</code></td>
160</tr>
161</table>
162<p>
163Date and time of remote NTP or SNTP server. (UTC time!!!)</p>
164<table class="detail">
165<tr class="list">
166<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
167<td class="itemcode"><a name="NTPOffset"></a><code>property <b>NTPOffset</b>: Double read FNTPOffset;</code></td>
168</tr>
169</table>
170<p>
171Offset between your computer and remote NTP or SNTP server.</p>
172<table class="detail">
173<tr class="list">
174<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
175<td class="itemcode"><a name="NTPDelay"></a><code>property <b>NTPDelay</b>: Double read FNTPDelay;</code></td>
176</tr>
177</table>
178<p>
179Delay between your computer and remote NTP or SNTP server.</p>
180<table class="detail">
181<tr class="list">
182<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
183<td class="itemcode"><a name="MaxSyncDiff"></a><code>property <b>MaxSyncDiff</b>: double read FMaxSyncDiff write FMaxSyncDiff;</code></td>
184</tr>
185</table>
186<p>
187Define allowed maximum difference between your time and remote time for synchronising time. If difference is bigger, your system time is not changed!</p>
188<table class="detail">
189<tr class="list">
190<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
191<td class="itemcode"><a name="SyncTime"></a><code>property <b>SyncTime</b>: Boolean read FSyncTime write FSyncTime;</code></td>
192</tr>
193</table>
194<p>
195If <code>True</code>, after successfull getting time is local computer clock synchronised to given time. For synchronising time you must have proper rights! (Usually Administrator)</p>
196<table class="detail">
197<tr class="list">
198<td class="visibility"><a href="legend.html"><img src="published.gif" alt="Published" title="Published"></a></td>
199<td class="itemcode"><a name="Sock"></a><code>property <b>Sock</b>: <a href="blcksock.TUDPBlockSocket.html">TUDPBlockSocket</a> read FSock;</code></td>
200</tr>
201</table>
202<p>
203Socket object used for TCP/IP operation. Good for seting OnStatus hook, etc.</p>
204<hr noshade size="1"><span class="appinfo"><em>Generated by <a target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.9.0</a> on 2012-04-23 21:38:51</em>
205</span>
206</body></html>
Note: See TracBrowser for help on using the repository browser.