8b8ef8f338
* Fix some ztests that were skipped * Expose bacapp_same_value() * Fix bacapp, ptransfer tests * Fix bugs in Load_Control object & tests * refactor days functions from datetime module * fix legacy ctests * Add bacnet/basic/sys/days.[ch] to Zephyr build * Update ztest to match from Zephyr v2.6.0; update ringbuf, datetime to build * Fixup ztest test for object/acc * Fix bvlc_address_from_ascii; enable/fix bvlc test * Comment cleanup * test/bacnet/basic/object/lc partially enabled * Fix bacapp_decode_data_len return status on erroneous input * fix ztest include fatal error * fix ztest strsignal reference fatal error * fix zassert_mem_equal reference syntax error * fix zassert_mem_equal reference syntax error Co-authored-by: Gregory Shue <gregory.shue@legrand.us> Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
59 lines
1.4 KiB
C
59 lines
1.4 KiB
C
/**
|
|
* @file
|
|
* @author Steve Karg <skarg@users.sourceforge.net>
|
|
* @date 1997
|
|
* @brief This file contains the function prototypes for the days calculations
|
|
*/
|
|
#ifndef DAYS_H
|
|
#define DAYS_H
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "bacnet/bacnet_stack_exports.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* __cplusplus */
|
|
|
|
BACNET_STACK_EXPORT
|
|
bool days_is_leap_year(uint16_t year);
|
|
BACNET_STACK_EXPORT
|
|
uint8_t days_per_month(uint16_t year, uint8_t month);
|
|
BACNET_STACK_EXPORT
|
|
uint32_t days_per_year(uint16_t year);
|
|
BACNET_STACK_EXPORT
|
|
uint16_t days_of_year(uint16_t year, uint8_t month, uint8_t day);
|
|
BACNET_STACK_EXPORT
|
|
uint16_t days_of_year_remaining(uint16_t year, uint8_t month, uint8_t day);
|
|
BACNET_STACK_EXPORT
|
|
void days_of_year_to_month_day(
|
|
uint32_t days, uint16_t year, uint8_t *pMonth, uint8_t *pDay);
|
|
BACNET_STACK_EXPORT
|
|
uint32_t days_apart(uint16_t year1,
|
|
uint8_t month1,
|
|
uint8_t day1,
|
|
uint16_t year2,
|
|
uint8_t month2,
|
|
uint8_t day2);
|
|
BACNET_STACK_EXPORT
|
|
uint32_t days_since_epoch(uint16_t epoch_year,
|
|
uint16_t year,
|
|
uint8_t month,
|
|
uint8_t day);
|
|
BACNET_STACK_EXPORT
|
|
void days_since_epoch_to_date(
|
|
uint16_t epoch_year,
|
|
uint32_t days,
|
|
uint16_t * pYear,
|
|
uint8_t * pMonth,
|
|
uint8_t * pDay);
|
|
|
|
BACNET_STACK_EXPORT
|
|
bool days_date_is_valid(uint16_t year,
|
|
uint8_t month,
|
|
uint8_t day);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
#endif
|