Date and time configuration methods.
More...
import"DateTime.idl";
|
void | getZoneInfos (out vector< ZoneInfo > zoneInfos, in boolean useOlson) |
| List all supported time zones. More...
|
|
boolean | checkNtpServer (in string ntpServer) |
| Check if a specified NTP server is usable. More...
|
|
void | getCfg (out Cfg cfg) |
| Retrieve the device date and time configuration. More...
|
|
int | setCfg (in Cfg cfg) |
| Set the device date and time configuration. More...
|
|
void | getTime (in boolean useOlson, out ZoneInfo zone, out boolean dstEnabled, out int utcOffset, out time currentTime) |
| Retrieve the current device date and time. More...
|
|
Date and time configuration methods.
Time synchronization protocol.
Enumerator |
---|
STATIC |
Device time is configured locally.
|
NTP |
Device time is synchronized via NTP.
|
boolean datetime::DateTime_3_0_0::checkNtpServer |
( |
in string |
ntpServer | ) |
|
Check if a specified NTP server is usable.
- Parameters
-
ntpServer | NTP server to be checked |
- Returns
true
if the NTP server is usable
void datetime::DateTime_3_0_0::getCfg |
( |
out Cfg |
cfg | ) |
|
Retrieve the device date and time configuration.
- Parameters
-
cfg | Result: Current date and time configration |
void datetime::DateTime_3_0_0::getTime |
( |
in boolean |
useOlson, |
|
|
out ZoneInfo |
zone, |
|
|
out boolean |
dstEnabled, |
|
|
out int |
utcOffset, |
|
|
out time |
currentTime |
|
) |
| |
Retrieve the current device date and time.
- Parameters
-
useOlson | Use Olson zoneinfo name |
zone | Result: Active time zone |
dstEnabled | if false, the time zone DST flag is not used |
utcOffset | Result: Offset (in minutes) between local time and UTC |
currentTime | Result: Device date and time |
void datetime::DateTime_3_0_0::getZoneInfos |
( |
out vector< ZoneInfo > |
zoneInfos, |
|
|
in boolean |
useOlson |
|
) |
| |
List all supported time zones.
- Parameters
-
zoneInfos | Result: List of time zones |
useOlson | Use Olson zoneinfo names |
int datetime::DateTime_3_0_0::setCfg |
( |
in Cfg |
cfg | ) |
|
Set the device date and time configuration.
Depending on the value of the protocol field either deviceTime or ntpCfg will be used from the cfg parameter.
- Parameters
-
cfg | New date and time configuration. |
- Returns
- 0 if OK
-
1 if the configuration is invalid
The documentation for this interface was generated from the following file: