This version implements a 'newer' RFC 2030 (SNTP) Simple Network Time Protocol with UDP packets over port 123. Instead of the previous RFC-1305 (NTP) Network Time Protocol over port 37.
Note: The same server (64.147.116.229) is used and can be located among several other time servers here: http://tf.nist.gov/tf-cgi/servers.cgi
The SNTP time is returned as a 64 bit standard time stamp, but for this application the fractional time data is omitted. The date and time is decoded from the 'Transmit Timestamp' and the 'time of flight' data is available to be derived but it is not implemented in this example.
In the next update >>HERE<<I will implement a method that will allow the Spinneret to set/sync it's own RTC (Real Time Clock) over an internet connection.
You can compare the output results to this sight: http://wwp.greenwichmeantime.com/
PST output example:
Code:
INFO::GetTime:Socket successfully opened.
Mode:4
Version:4
Leap Indicator:00
Stratum:1
Poll Interval: 0
Precision:227
Root Delay:0
Root Dispersion:0
Reference Identifier:ACTS
Reference Timestamp:D0FB5C7D99271CE4
Originate Timestamp:0000000000000000
Receive Timestamp:D0FB5CB46FB48F24
Transmit Timestamp:D0FB5CB46FB595A3
(GMT + 0:00) 02/08/2011 06:09:56
INFO::GetTime:Closing socket.
Bookmarks