Mitesh Patel / Mbed 2 deprecated camera_online_server

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SNTPClient.h Source File

SNTPClient.h

00001 #ifndef SNTPCLIENT_H
00002 #define SNTPCLIENT_H
00003 
00004 
00005 typedef enum {DST_START, DST_STOP} tDST_START;
00006 
00007 typedef struct DST_POINT {
00008     time_t     t;               // Point in time when DST switch happens (in localtime)
00009     signed int dst;             // Active DST value (for gSntpDST)
00010     signed int dstshift;        // DST shift value (regardless if it is active or not)
00011 } tDstPoint;
00012 
00013 typedef tDstPoint (*pFncDstCalc)(int tz, int year, tDST_START start);
00014 
00015 typedef enum {
00016 #define _(z, fnc, gmt, dst, hr1,wk1,wday1,mon1, hr2,wk2,wday2,mon2) z,
00017 #include "DstZones.h"
00018     DST_LAST    // LAST ITEM IN ENUM
00019 } tDST_ZONE;
00020 
00021 void SNTPSetDstZone(tDST_ZONE zone, bool adjust_clock=false);
00022 const char *SNTPDstZoneName(tDST_ZONE zone);
00023 
00024 void SNTPSetRecvTimeout(unsigned int val_s);
00025 void SNTPSetUpdateDelay(unsigned int val_s);
00026 void SNTPSetTimezone(float hours_from_utc, bool adjust_clock=false);
00027 void SNTPSetDST(float hours_from_utc, bool adjust_clock=false);
00028 int  SNTPSetAddresses(const char* server_addresses[], int count, void (*p_free)(void*));
00029 int  SNTPReadIniFile(const char* filename);
00030 void SNTPWriteIniFile(FILE * f);
00031 
00032 void   SNTPClientInit(void);
00033 
00034 time_t SNTPTime(void);
00035 void   SNTPSetTime(time_t seconds);
00036 
00037 time_t SNTPTimeUTC(void);
00038 void   SNTPSetTimeUTC(time_t seconds);
00039 
00040 #endif  // SNTPCLIENT_H
00041 //END