33 constant
int ERR_NTP_CHECK_INVALID_ARGUMENT = 2;
34 constant
int ERR_NTP_CHECK_ADDRESS_RESOLVE_ERROR = 3;
35 constant
int ERR_NTP_CHECK_AUTH_KEY_ID_UNKNOWN = 4;
36 constant
int ERR_NTP_CHECK_NETWORK_OR_HOST_UNREACHABLE = 5;
37 constant
int ERR_NTP_CHECK_CONNECTION_REFUSED = 6;
38 constant
int ERR_NTP_CHECK_NO_RESPONSE = 7;
39 constant
int ERR_NTP_CHECK_RESPONSE_FORMAT_INVALID = 8;
40 constant
int ERR_NTP_CHECK_SERVER_VERSION_UNSUPPORTED = 9;
41 constant
int ERR_NTP_CHECK_MAC_MISSING_OR_INVALID = 10;
42 constant
int ERR_NTP_CHECK_MODE_INVALID = 11;
43 constant
int ERR_NTP_CHECK_SERVER_NOT_SYNCHRONIZED = 12;
44 constant
int ERR_NTP_CHECK_ROOT_DISTANCE_TOO_LARGE = 13;
45 constant
int ERR_NTP_CHECK_ORIGIN_TIME_DOES_NOT_MATCH = 14;
46 constant
int ERR_NTP_CHECK_RECV_OR_XMIT_TIME_NOT_SET = 15;
146 void getZoneInfos(out vector<ZoneInfo> zoneInfos, in
boolean useOlson);
199 out
boolean dstEnabled, out
int utcOffset,
200 out time currentTime);
Date and time configuration methods.
constant int ERR_NTP_CHECK_INTERNAL
NTP server check errors.
NtpAuthKeyType
NTP authentication key type.
@ AES128CMAC
AES128-CMAC authentication key.
@ SHA512
SHA-512 authentication key.
@ SHA256
SHA-256 authentication key.
@ AES256CMAC
AES256-CMAC authentication key.
constant int SUCCESS
Success code.
int setCfg(in Cfg cfg)
Set the device date and time configuration.
Protocol
Time synchronization protocol.
@ NTP
Device time is synchronized via NTP.
@ STATIC
Device time is configured locally.
int checkNtpServer(in string ntpServer, in int ntpAuthKeyId, in NtpAuthKey ntpAuthKeyOverride)
Check if a specified NTP server is usable.
void getZoneInfos(out vector< ZoneInfo > zoneInfos, in boolean useOlson)
List all supported time zones.
vector< string > getActiveNtpServers()
Get active NTP servers.
void getCfg(out Cfg cfg)
Retrieve the device date and time configuration.
void getTime(in boolean useOlson, out ZoneInfo zone, out boolean dstEnabled, out int utcOffset, out time currentTime)
Retrieve the current device date and time.
Device Date and Time Configuration.
Device date and time configuration.
time deviceTime
Device date and time (local time)
NtpCfg ntpCfg
NTP server configuration.
Protocol protocol
Time synchronization protocol.
ZoneCfg zoneCfg
Time zone configuration.
Event that is sent when the device time is changed.
time oldTime
Device time before change (UNIX timestamp, UTC)
time newTime
Device time after change (UNIX timestamp, UTC)
Event that is sent when the configuration changes.
string dataHex
NTP authentication key data as case insensitive hex string (write-only; leave empty to keep current v...
NtpAuthKeyType type
NTP authentication key type (only honoured on write if dataHex is provided as well)
Static NTP server configuration.
string server1
Primary NTP server.
string server2
Secondary NTP server.
int server1AuthKeyId
Primary NTP server authetication key id (interpreted as 32bit unsigned int; 0 means no authentication...
map< int, NtpAuthKey > authKeys
NTP authentication keys indext by the key id.
int server2AuthKeyId
Secondary NTP server authetication key id (interpreted as 32bit unsigned int; 0 means no authenticati...
boolean enableAutoDST
Enable automatic daylight saving time adjustment.
int id
Selected time zone id.
string name
Selected time zone name (ignored on setCfg() if id != 0)
Time zone information (see also ZoneCfg)
string name
Time zone name.
boolean hasDSTInfo
true if the time zone has daylight saving time rules
Common base for all events.