Feature/date time mstimer clock (#861)
* Added daylight savings time calculation module with unit testing. * Added datetime daylight savings time and clock API * Added basic datetime_local() clock using mstimer as basis and time-sync option. Integrated clock with ports/stm32f4xx example.
This commit is contained in:
+30
-3
@@ -318,18 +318,45 @@ bool datetime_local(
|
||||
BACNET_TIME *btime,
|
||||
int16_t *utc_offset_minutes,
|
||||
bool *dst_active);
|
||||
/* UTC Offset API */
|
||||
BACNET_STACK_EXPORT
|
||||
int16_t datetime_utc_offset_minutes(void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_utc_offset_minutes_set(int16_t minutes);
|
||||
/* Daylight Savings Time API */
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_dst_active(void);
|
||||
bool datetime_dst_enabled(void);
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_dst_range(BACNET_DATE_RANGE *dst_range);
|
||||
void datetime_dst_enabled_set(bool flag);
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_dst_range_set(BACNET_DATE_RANGE *dst_range);
|
||||
bool datetime_dst_ordinal_range(
|
||||
uint8_t *start_month,
|
||||
uint8_t *start_week,
|
||||
uint8_t *start_day,
|
||||
uint8_t *end_month,
|
||||
uint8_t *end_week,
|
||||
uint8_t *end_day);
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_dst_ordinal_range_set(
|
||||
uint8_t start_month,
|
||||
uint8_t start_week,
|
||||
BACNET_WEEKDAY start_day,
|
||||
uint8_t end_month,
|
||||
uint8_t end_week,
|
||||
BACNET_WEEKDAY end_day);
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_dst_date_range(
|
||||
uint8_t *start_month,
|
||||
uint8_t *start_day,
|
||||
uint8_t *end_month,
|
||||
uint8_t *end_day);
|
||||
BACNET_STACK_EXPORT
|
||||
bool datetime_dst_date_range_set(
|
||||
uint8_t start_month, uint8_t start_day, uint8_t end_month, uint8_t end_day);
|
||||
/* BACnet TimeSynchronization service handler API */
|
||||
BACNET_STACK_EXPORT
|
||||
void datetime_timesync(BACNET_DATE *bdate, BACNET_TIME *btime, bool utc);
|
||||
/* Initialization for integration with a clock */
|
||||
BACNET_STACK_EXPORT
|
||||
void datetime_init(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user