Download presentation
Presentation is loading. Please wait.
Published byAshlee Spencer Modified over 9 years ago
1
SNTP Simple Network Time Protocol
2
Simple Network Time Protocol (SNTP) Get accurate date and time from SNTP server –i.e. 131.215.254.2 Make Standard Time functions (ANSI C) to return accurate date and time –i.e. time() or localtime().
3
Simple Network Time Protocol (SNTP) APIs –NAinstallSntpTime –NAinstallTimeZone –NArestartSntpServer –NAgetSntpTime
4
Simple Network Time Protocol (SNTP) NAinstallSntpTime –Establish SNTP server connection –Start SNTP (run as a separate thread) –Setup SNTP for standard time functions User’s Callback –Used to notify user the SNTP status. –i.e. Time is successfully (unsuccessfully) updated or obtained
5
Simple Network Time Protocol (SNTP) NAinstallTimeZone –Setup local time zone relative to GMT NArestartSntpServer –Restart SNTP with different NTP servers –It should be called in user’s callback function
6
Simple Network Time Protocol (SNTP) Define APP_USE_NETWORK_TIME in appconf.h to include SNTP in BSP –BSP will setup SNTP and time zone –SNTP server address & time zone are stored in NVRAM USA Eastern Standard Time is default time zone 5 hour is default time to re-synchronize SNTP server –Once time is obtained from SNTP server, use system clock (ticks)
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.