Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_time.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_time.h
28 *
29 * @purpose Date & Time Configuration and Status
30 *
31 * @component OpEN
32 *
33 * @create 09/29/2016
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_TIME_H_INCLUDED
39 #define OPENAPI_TIME_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 typedef enum
44 {
45  OPEN_CLOCK_SRC_NONE = 0,
46  OPEN_CLOCK_SRC_SNTP = 1
47 } OPEN_TIME_CLOCK_SRC_t;
48 
49 #define OPEN_DATE_TIME_BUF_LEN 20 /* includes trailing '\0' */
50 #define OPEN_TIMEZONE_BUF_LEN 15 /* includes trailing '\0' */
51 
52 /*****************************************************************/
72  open_buffdesc *bufd,
73  OPEN_TIME_CLOCK_SRC_t *clockSrc);
74 
75 /*****************************************************************/
98  open_buffdesc *bufd);
99 
100 /*****************************************************************/
120  open_buffdesc *bufd);
121 
122 /*****************************************************************/
143  open_buffdesc *bufd);
144 
145 #endif /* OPENAPI_TIME_H_INCLUDED */
146 
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiTimeZoneSet(openapiClientHandle_t *client_handle, open_buffdesc *bufd)
Set the system clock time zone.
open_error_t openapiClockSet(openapiClientHandle_t *client_handle, open_buffdesc *bufd)
Set the system clock date and time.
open_error_t openapiTimeZoneGet(openapiClientHandle_t *client_handle, open_buffdesc *bufd)
Get the time zone from the system clock.
open_error_t openapiClockGet(openapiClientHandle_t *client_handle, open_buffdesc *bufd, OPEN_TIME_CLOCK_SRC_t *clockSrc)
Get the date and time from the system clock.