TNTPClient

From Ultibo.org
Revision as of 00:35, 29 May 2018 by Ultibo (Talk | contribs) (Created page with "Return to Unit Services __TOC__ === Description === ---- ''To be documented'' === Class definitions === ---- <div class="toccolours mw-collapsible mw-...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Return to Unit Services


Description


To be documented

Class definitions



TNTPClient = class(TWinsock2UDPClient)

public
constructor Create;  
destructor Destroy; override;  
private
FLock:TMutexHandle;  
 
FPollInterval:LongWord; How often to poll the server (in seconds)
FPollTimeout:LongWord; How long before receive or send timeout occurs (in milliseconds)
FPollRetries:LongWord; How many times to retry a poll
 
FRetryTimeout:LongWord; How long to wait between poll retries (in milliseconds)
 
FInitialClockGet:Boolean; Has the time been obtained at least once
FInitialClockCount:LongWord; How many times have we tried to obtain the initial clock
 
FTimerHandle:TTimerHandle; Handle for the NTP update timer
 
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
 
procedure SetPollInterval(APollInterval:LongWord);  
procedure SetPollTimeout(APollTimeout:LongWord);  
procedure SetPollRetries(APollRetries:LongWord);  
 
procedure SetRetryTimeout(ARetryTimeout:LongWord);  
 
procedure SetInitialClockGet(AInitialClockGet:Boolean);  
procedure SetInitialClockCount(AInitialClockCount:LongWord);  
 
procedure SetTimerHandle(ATimerHandle:TTimerHandle);  
public
property PollInterval:LongWord read FPollInterval write SetPollInterval;  
property PollTimeout:LongWord read FPollTimeout write SetPollTimeout;  
property PollRetries:LongWord read FPollRetries write SetPollRetries;  
 
property RetryTimeout:LongWord read FRetryTimeout write SetRetryTimeout;  
 
property InitialClockGet:Boolean read FInitialClockGet write SetInitialClockGet;  
property InitialClockCount:LongWord read FInitialClockCount write SetInitialClockCount;  
 
property TimerHandle:TTimerHandle read FTimerHandle write SetTimerHandle;  
 
function GetTime:Int64;  
 
procedure IncrementInitialClockCount;  


Function declarations



constructor TNTPClient.Create;
Description: To be documented
Note None documented


destructor TNTPClient.Destroy;
Description: To be documented
Note None documented


function TNTPClient.AcquireLock:Boolean;
Description: To be documented
Note None documented


function TNTPClient.ReleaseLock:Boolean;
Description: To be documented
Note None documented


procedure TNTPClient.SetPollInterval(APollInterval:LongWord);
Description: To be documented
Note None documented


procedure TNTPClient.SetPollTimeout(APollTimeout:LongWord);
Description: To be documented
Note None documented


procedure TNTPClient.SetPollRetries(APollRetries:LongWord);
Description: To be documented
Note None documented


procedure TNTPClient.SetRetryTimeout(ARetryTimeout:LongWord);
Description: To be documented
Note None documented


procedure TNTPClient.SetInitialClockGet(AInitialClockGet:Boolean);
Description: To be documented
Note None documented


procedure TNTPClient.SetInitialClockCount(AInitialClockCount:LongWord);
Description: To be documented
Note None documented


procedure TNTPClient.SetTimerHandle(ATimerHandle:TTimerHandle);
Description: To be documented
Note None documented


function TNTPClient.GetTime:Int64;
Description: To be documented
Note None documented


procedure TNTPClient.IncrementInitialClockCount;
Description: To be documented
Note None documented


Return to Unit Reference