Wirepas SDK
rtc.h
Go to the documentation of this file.
1/* Copyright 2023 Wirepas Ltd. All Rights Reserved.
2 *
3 * See file LICENSE.txt for full license details.
4 *
5 */
6
7#ifndef _RTC_H_
8#define _RTC_H_
9
10#include <stdint.h>
11#include <stdbool.h>
12
13
14#define RTC_VERSION (uint16_t)(1)
15
16
35
42
43typedef uint64_t rtc_timestamp_t;
44
49typedef void
50 (*on_rtc_initialized)(void);
51
57
66
74
81rtc_res_e RTC_getTimezoneOffsetInSeconds(long * timezoneOffsetInSeconds);
82
91
101
102#endif //_RTC_H_
void(* on_rtc_initialized)(void)
Callback called the first time RTC time is aquired from network.
Definition rtc.h:50
rtc_res_e RTC_addInitializeCb(on_rtc_initialized callback)
Add a new callback to be informed when RTC time is available from network.
rtc_res_e RTC_removeInitializedCb(on_rtc_initialized callback)
Remove an event callback from the list. Removed item fields are all set to 0.
rtc_res_e RTC_init(void)
Initialize the stack state library.
rtc_res_e RTC_getLocalTime(rtc_timestamp_t *now)
Get current expected RTC time with timezone from node.
rtc_res_e RTC_getTimezoneOffsetInSeconds(long *timezoneOffsetInSeconds)
Get configured timezone offset of the node.
uint64_t rtc_timestamp_t
Definition rtc.h:43
provisioning_data_ids_e
List of Wirepas Ids for TLV encoded provisioning data.
Definition rtc.h:38
@ RTC_ID_TIMESTAMP
Definition rtc.h:39
@ RTC_ID_TIMEZONE_OFFSET
Definition rtc.h:40
rtc_res_e
List of return code.
Definition rtc.h:21
@ RTC_UNAVAILABLE_YET
Definition rtc.h:25
@ RTC_UNKNOWN_CALLBACK
Definition rtc.h:29
@ RTC_RES_OK
Definition rtc.h:23
@ RTC_NO_MORE_CALLBACKS
Definition rtc.h:27
@ RTC_UNINITIALIZED
Definition rtc.h:33
@ RTC_INVALID_VALUE
Definition rtc.h:31
rtc_res_e RTC_getUTCTime(rtc_timestamp_t *now)
Get current expected RTC time from node.