Provides APIs for NTP(Network Time Protocol) Client.
More...
Provides APIs for NTP(Network Time Protocol) Client.
#define MAX_NTP_POLL_INTERVAL_SECS (24 * 60 * 60) /* 24 hours */ |
#define MAX_NTP_SERVER_NUM 5 |
#define MIN_NTP_POLL_INTERVAL_SECS 10 /* 10 seconds */ |
This enumeration describes the state of the NTP daemon.
Enumerator |
---|
NTP_NOT_RUNNING |
|
NTP_STARTED |
|
NTP_RUNNING |
|
NTP_STOP_REQUESTED |
|
NTP_STOPPED |
|
Definition at line 88 of file ntpclient.h.
This enumeration describes the state of the NTP Client's Link.
Enumerator |
---|
NTP_LINK_NOT_SET |
|
NTP_LINK_DOWN |
|
NTP_LINK_UP |
|
Definition at line 99 of file ntpclient.h.
int ntpc_get_status |
( |
void |
| ) |
|
ntpc_get_status() gets NTP client daemon's status value.
- Parameters
-
- Returns
- ntpc daemon's status value is returned (please, refer to enum ntpc_daemon_e definition).
- Since
- Tizen RT v1.0
int ntpc_start |
( |
struct ntpc_server_conn_s * |
server_list, |
|
|
uint32_t |
num_of_servers, |
|
|
uint32_t |
interval_secs, |
|
|
void * |
link_error_cb |
|
) |
| |
ntpc_start() starts the NTP client daemon.
- Parameters
-
[in] | server_list | the array of struct ntpc_server_conn_s
- server_list[n]->hostname : ntp server's hostname
- server_list[n]->port : ntp server's port number
|
[in] | num_of_servers | number of servers |
[in] | interval_secs | polling interval seconds |
[in] | link_error_cb | callback function for link error case |
- Returns
- On success, the non-negative task ID of the NTPC daemon is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0
ntpc_stop() stops the NTP client daemon.
- Parameters
-
- Returns
- On success, 0 is returned. On failure, a negative value is returned.
- Since
- Tizen RT v1.0