Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
sntp_helper.c File Reference
#include "sntp_helper.h"
#include "ca-ot-util/cascoda_dns.h"
#include "cascoda-bm/cascoda_interface.h"
#include "cascoda-util/cascoda_tasklet.h"
#include "openthread/dns.h"
#include "openthread/sntp.h"
#include "openthread/thread.h"
#include "platform.h"
Include dependency graph for sntp_helper.c:

Macros

#define NTP_SERVER   "pool.ntp.org"
 

Enumerations

enum  time_constants { REQUEST_TIMEOUT_MS = 30 * 1000 , REFRESH_MS = CASCODA_SNTP_INTERVAL * 60 * 1000 }
 

Functions

void do_dns_query ()
 
void dns_response_handler (ca_error aError, const otIp6Address *aAddress, dns_index aIndex, void *aContext)
 
void SNTP_Init ()
 Initialise the SNTP library. More...
 
ca_error SNTP_Update ()
 Start the process for updating the RTC using an SNTP request. More...
 
enum sntp_query_state SNTP_GetState ()
 Get the status of the library, which indicates whether the RTC has been updated using SNTP. More...
 

Macro Definition Documentation

◆ NTP_SERVER

#define NTP_SERVER   "pool.ntp.org"

Enumeration Type Documentation

◆ time_constants

Enumerator
REQUEST_TIMEOUT_MS 
REFRESH_MS 

Function Documentation

◆ dns_response_handler()

void dns_response_handler ( ca_error  aError,
const otIp6Address *  aAddress,
dns_index  aIndex,
void *  aContext 
)

◆ do_dns_query()

void do_dns_query ( )