serveur WEB sur carte SD pour TestBed , lit des tensions les met dans un fichier htm et l\'envoie . on peut agir sur les ES .
lwip/SNTPClient/SNTPClient.h@0:83cf97c10b63, 2011-09-05 (annotated)
- Committer:
- geiineuville
- Date:
- Mon Sep 05 14:36:10 2011 +0000
- Revision:
- 0:83cf97c10b63
webserver v 0 v 1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
geiineuville | 0:83cf97c10b63 | 1 | #ifndef SNTPCLIENT_H |
geiineuville | 0:83cf97c10b63 | 2 | #define SNTPCLIENT_H |
geiineuville | 0:83cf97c10b63 | 3 | |
geiineuville | 0:83cf97c10b63 | 4 | |
geiineuville | 0:83cf97c10b63 | 5 | typedef enum {DST_START, DST_STOP} tDST_START; |
geiineuville | 0:83cf97c10b63 | 6 | |
geiineuville | 0:83cf97c10b63 | 7 | typedef struct DST_POINT { |
geiineuville | 0:83cf97c10b63 | 8 | time_t t; // Point in time when DST switch happens (in localtime) |
geiineuville | 0:83cf97c10b63 | 9 | signed int dst; // Active DST value (for gSntpDST) |
geiineuville | 0:83cf97c10b63 | 10 | signed int dstshift; // DST shift value (regardless if it is active or not) |
geiineuville | 0:83cf97c10b63 | 11 | } tDstPoint; |
geiineuville | 0:83cf97c10b63 | 12 | |
geiineuville | 0:83cf97c10b63 | 13 | typedef tDstPoint (*pFncDstCalc)(int tz, int year, tDST_START start); |
geiineuville | 0:83cf97c10b63 | 14 | |
geiineuville | 0:83cf97c10b63 | 15 | typedef enum { |
geiineuville | 0:83cf97c10b63 | 16 | #define _(z, fnc, gmt, dst, hr1,wk1,wday1,mon1, hr2,wk2,wday2,mon2) z, |
geiineuville | 0:83cf97c10b63 | 17 | #include "DstZones.h" |
geiineuville | 0:83cf97c10b63 | 18 | DST_LAST // LAST ITEM IN ENUM |
geiineuville | 0:83cf97c10b63 | 19 | } tDST_ZONE; |
geiineuville | 0:83cf97c10b63 | 20 | |
geiineuville | 0:83cf97c10b63 | 21 | void SNTPSetDstZone(tDST_ZONE zone, bool adjust_clock=false); |
geiineuville | 0:83cf97c10b63 | 22 | const char *SNTPDstZoneName(tDST_ZONE zone); |
geiineuville | 0:83cf97c10b63 | 23 | |
geiineuville | 0:83cf97c10b63 | 24 | void SNTPSetRecvTimeout(unsigned int val_s); |
geiineuville | 0:83cf97c10b63 | 25 | void SNTPSetUpdateDelay(unsigned int val_s); |
geiineuville | 0:83cf97c10b63 | 26 | void SNTPSetTimezone(float hours_from_utc, bool adjust_clock=false); |
geiineuville | 0:83cf97c10b63 | 27 | void SNTPSetDST(float hours_from_utc, bool adjust_clock=false); |
geiineuville | 0:83cf97c10b63 | 28 | int SNTPSetAddresses(const char* server_addresses[], int count, void (*p_free)(void*)); |
geiineuville | 0:83cf97c10b63 | 29 | int SNTPReadIniFile(const char* filename); |
geiineuville | 0:83cf97c10b63 | 30 | void SNTPWriteIniFile(FILE * f); |
geiineuville | 0:83cf97c10b63 | 31 | |
geiineuville | 0:83cf97c10b63 | 32 | void SNTPClientInit(void); |
geiineuville | 0:83cf97c10b63 | 33 | |
geiineuville | 0:83cf97c10b63 | 34 | time_t SNTPTime(void); |
geiineuville | 0:83cf97c10b63 | 35 | void SNTPSetTime(time_t seconds); |
geiineuville | 0:83cf97c10b63 | 36 | |
geiineuville | 0:83cf97c10b63 | 37 | time_t SNTPTimeUTC(void); |
geiineuville | 0:83cf97c10b63 | 38 | void SNTPSetTimeUTC(time_t seconds); |
geiineuville | 0:83cf97c10b63 | 39 | |
geiineuville | 0:83cf97c10b63 | 40 | #endif // SNTPCLIENT_H |
geiineuville | 0:83cf97c10b63 | 41 | //END |