Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_timezone.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2023 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_timezone.h
28 *
29 * @purpose This code implements the Open Api for the timesZone API
30 *
31 * @component OPEN
32 *
33 * @create 01/03/2023
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_TIMEZONE_H_INCLUDED
39 #define OPENAPI_TIMEZONE_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
44 typedef enum
45 {
52 
54 typedef enum
55 {
71 
73 typedef enum
74 {
90 
91 typedef struct open_clocktime_t
92 {
93  time_t seconds;
94  time_t nanoseconds;
96 
97 /*************************************************************************/
114 open_error_t openapiTimeConvert(openapiClientHandle_t *client_handle, open_buffdesc *bufd, uint32_t *pHour, uint32_t *pMin);
115 
116 /*************************************************************************/
133 open_error_t openapiMinutesOffsetConvert(openapiClientHandle_t *client_handle, int32_t minutes, uint32_t *pHour, uint32_t *pMin);
134 
135 /*************************************************************************/
151 open_error_t openapiWeekNumberGet(openapiClientHandle_t *client_handle, open_buffdesc *name, uint32_t *number);
152 
153 /*************************************************************************/
168 
169 /*************************************************************************/
184 
185 /*************************************************************************/
201 
202 /*************************************************************************/
218 
219 /*************************************************************************/
235 
236 /*************************************************************************/
252 
253 /*************************************************************************/
268 
269 /*************************************************************************/
284 
285 /*************************************************************************/
300 
301 /*************************************************************************/
316 int32_t openapiUTCTimeNow(openapiClientHandle_t *client_handle );
317 
318 /*************************************************************************/
334 
335 /*************************************************************************/
348 
349 /*************************************************************************/
368 open_error_t openapiAdjustedTimeGet(openapiClientHandle_t *client_handle, uint32_t *year, uint32_t *month, uint32_t * day, uint32_t * hour, uint32_t * minutes, uint32_t * seconds);
369 
370 /*************************************************************************/
385 uint32_t openapiRawAdjustedTimeGet(openapiClientHandle_t *client_handle, uint32_t rawTime);
386 
387 
388 #endif /* OPENAPI__H_INCLUDED */
389 
open_error_t openapiStRecurringGet(openapiClientHandle_t *client_handle, OPEN_ST_RECURRING_PARAM_t parameter, open_buffdesc *bufd)
Get recurring summertime parameters.
end year : (0 |2000..2097)
start year : (0 |2000..2097)
start day : none(0) | (1..31)
open_error_t openapiStModeGet(openapiClientHandle_t *client_handle, OPEN_SUMMER_TIME_MODE_t *mode)
Get the summer-time mode.
start day : none(0),sun(1),mon(2),tue(3),wed(4),thu(5),fri(6),sat(7)
open_error_t openapiStNonRecurringGet(openapiClientHandle_t *client_handle, OPEN_ST_NON_RECURRING_PARAM_t parameter, open_buffdesc *bufd)
Get non-recurring summertime parameters.
open_error_t openapiStNonRecurringSet(openapiClientHandle_t *client_handle, OPEN_ST_NON_RECURRING_PARAM_t parameter, open_buffdesc *bufd)
Set non-recurring summertime parameters.
open_error_t openapiTimeZoneAcronymSet(openapiClientHandle_t *client_handle, open_buffdesc *acronym)
Set the time zone acronym parameter.
OPEN_BOOL_t openapiSummerTimeIsInEffect(openapiClientHandle_t *client_handle)
know whether the summer-time is in effect or not.
open_error_t
OPEN uses these enumerators to indicate the error codes.
int32_t openapiUTCTimeNow(openapiClientHandle_t *client_handle)
Get the current synchronized UTC time since the Unix Epoch.
end day : none(0) | (1..31)
end day : none(0),sun(1),mon(2),tue(3),wed(4),thu(5),fri(6),sat(7)
start week : none(0),first(1),second(2),third(3),fourth(4),last(5)
open_error_t openapiWeekNumberGet(openapiClientHandle_t *client_handle, open_buffdesc *name, uint32_t *number)
Convert month name to number value.
open_error_t openapiStModeSet(openapiClientHandle_t *client_handle, OPEN_SUMMER_TIME_MODE_t mode)
Set the summer-time mode.
OPEN_ST_NON_RECURRING_PARAM_t
OpEN uses this enumeration to define the summer time non recurring parameters.
OPEN_SUMMER_TIME_MODE_t
OpEN uses this enumeration to define summer time mode.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiTimeZoneAcronymGet(openapiClientHandle_t *client_handle, open_buffdesc *acronym)
Get the time zone acronym parameter.
open_error_t openapiSystemTimeZoneAcronymGet(openapiClientHandle_t *client_handle, open_buffdesc *zoneName)
Gets the timezone acronym string.
open_error_t openapiStRecurringSet(openapiClientHandle_t *client_handle, OPEN_ST_RECURRING_PARAM_t parameter, open_buffdesc *bufd)
Set recurring summertime parameters.
end week : none(0),first(1),second(2),third(3),fourth(4),last(5)
start month : none(0),jan(1),feb(2),mar(3),apr(4),may(5),jun(6), jul(7),aug(8),sep(9),oct(10),nov(11),dec(12)
OPEN_ST_RECURRING_PARAM_t
OpEN uses this enumeration to define the summer time recurring parameters.
start month : none(0),jan(1),feb(2),mar(3),apr(4),may(5),jun(6), jul(7),aug(8),sep(9),oct(10),nov(11),dec(12)
open_error_t openapiTimeConvert(openapiClientHandle_t *client_handle, open_buffdesc *bufd, uint32_t *pHour, uint32_t *pMin)
Convert hh:mm string to int values.
uint32_t openapiRawAdjustedTimeGet(openapiClientHandle_t *client_handle, uint32_t rawTime)
Converts the given Raw time to UTC and then adds the timezone and summer time offsets if configured...
open_error_t openapiMinutesOffsetConvert(openapiClientHandle_t *client_handle, int32_t minutes, uint32_t *pHour, uint32_t *pMin)
Convert minute offset into hour and minutes.
open_error_t openapiAdjustedTimeGet(openapiClientHandle_t *client_handle, uint32_t *year, uint32_t *month, uint32_t *day, uint32_t *hour, uint32_t *minutes, uint32_t *seconds)
Adjusts current time for timezone and summer time.
end month : none(0),jan(1),feb(2),mar(3),apr(4),may(5),jun(6), jul(7),aug(8),sep(9),oct(10),nov(11),dec(12)
end month : none(0),jan(1),feb(2),mar(3),apr(4),may(5),jun(6), jul(7),aug(8),sep(9),oct(10),nov(11),dec(12)
open_error_t openapiUTCTimeGet(openapiClientHandle_t *client_handle, open_clocktime *ct)
Get the current UTC time since the Unix Epoch.