VSF Documented
vsf_linux_ntp.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Copyright(C)2009-2022 by VSF Team *
3 * *
4 * Licensed under the Apache License, Version 2.0 (the "License"); *
5 * you may not use this file except in compliance with the License. *
6 * You may obtain a copy of the License at *
7 * *
8 * http://www.apache.org/licenses/LICENSE-2.0 *
9 * *
10 * Unless required by applicable law or agreed to in writing, software *
11 * distributed under the License is distributed on an "AS IS" BASIS, *
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13 * See the License for the specific language governing permissions and *
14 * limitations under the License. *
15 * *
16 ****************************************************************************/
17
18#ifndef __VSF_LINUX_NTP_H__
19#define __VSF_LINUX_NTP_H__
20
21/*============================ INCLUDES ======================================*/
22
24
25#if VSF_LINUX_CFG_RELATIVE_PATH == ENABLED
26# include "../../include/sys/socket.h"
27# include "../../include/netinet/in.h"
28#else
29# include <sys/socket.h>
30# include <netinet/in.h>
31#endif
32
33// for rtc
34#include "hal/vsf_hal.h"
35
36#if defined(__VSF_LINUX_NTP_CLASS_IMPLEMENT)
37# undef __VSF_LINUX_NTP_CLASS_IMPLEMENT
38# define __VSF_CLASS_IMPLEMENT__
39#endif
40
41#include "utilities/ooc_class.h"
42
43#ifdef __cplusplus
44extern "C" {
45#endif
46
47/*============================ MACROS ========================================*/
48/*============================ MACROFIED FUNCTIONS ===========================*/
49/*============================ TYPES =========================================*/
50
52 public_member(
54 vsf_rtc_t vsf_rtc;
55#endif
56 struct sockaddr_in host_addr;
57 uint16_t timeout_ms;
58 )
59
60 private_member(
61 int sock;
62 )
63};
64
65/*============================ GLOBAL VARIABLES ==============================*/
66/*============================ PROTOTYPES ====================================*/
67
71
72#ifdef __cplusplus
73}
74#endif
75
76#endif
77/* EOF */
#define ENABLED
Definition __type.h:28
vsf_err_t
Definition __type.h:42
Definition vsf_linux_ntp.h:51
#define vsf_class(__name)
Definition ooc_class.h:48
unsigned short uint16_t
Definition stdint.h:7
Definition in.h:118
rtc configuration
Definition vsf_template_rtc.h:137
Definition vsf_template_rtc.h:160
Definition vsf_template_rtc.h:114
fsm_rt_t
Definition vsf_fsm.h:315
fsm_rt_t vsf_linux_ntp_rtc_enable(vsf_rtc_t *rtc_ptr)
Definition vsf_linux_ntp.c:119
vsf_err_t vsf_linux_ntp_rtc_get(vsf_rtc_t *rtc_ptr, vsf_rtc_tm_t *rtc_tm)
Definition vsf_linux_ntp.c:124
vsf_err_t vsf_linux_ntp_rtc_init(vsf_rtc_t *rtc_ptr, vsf_rtc_cfg_t *cfg_ptr)
Definition vsf_linux_ntp.c:114
#define VSF_RTC_CFG_MULTI_CLASS
Definition vsf_template_rtc.h:34