Files
bacnet_stack/test/bacnet/basic/object/msv/CMakeLists.txt
T
Ondřej Hruška 7cdab61d72 Schedule encoding/decoding (#319)
* schedule: add decode_daily_schedule() and encode_daily_schedule()

* schedule: encode/decode implemented + add to bacapp

* add safe encode/decode functions for timevalue, schedule function renaming

* fix unit tests build failing

* add IDEA and test temporary files to .gitignore

* try to make "deprecated" work in MSVC

* add WeeklySchedule compare function

* add bacnet_weeklyschedule_context_decode()

* Add basic test for WeeklySchedule

* Fix WeeklySchedule parsing and snprintf, decoder verified with real hardware

* try to fix windows build

* improve boolean parsing in 'bacapp_parse_application_data'

* add parse function for weekly schedule

* allow types > 16 in bacwp, show the decoded value before sending

* add bacapp binaries to gitignore

* remove bacwp logging

* Add error checking to bacapp_parse_application_data

* try to fix windows build

* fix avr build

* Fix error handling in RP Ack

* add singleDay flag

* show day name in single day weeklyschedule snprintf

* show weeklyschedule inner tag in snprintf

* improve weeklyschedule parsing and printing, supports type names now

* add weekly schedule to bacapp_decode_data

* move bacnet/bacnet_plat_compat.h to bacnet/basic/sys/platform.h

* disable tag limit also in bacwpm

* add ifdef's around strtoX helper functions in bacapp

* move strtox to BACAPP_PRINT_ENABLED ifdef in bacapp

* fix stm32 makefiles

* fix at91sam7s build

* use BACNET_UNSIGNED_INTEGER in BACnet_Short_Application_Data_Value

* fix capitalization in BACnet_Daily_Schedule

* add name to BACNET_TIME_VALUE struct

* change bacwp bacwpm to use bacapp_known_property_tag()

* fix some macros in bacdcode missing parentheses

* Remove dummy fields from BACNET_SHORT_APPLICATION_DATA_VALUE, replace remaining uses of upcasting (adds extra overhead but is maybe safer), rename short DV to Primitive

* fix new ci warnings

* more fixes for ancient C

* fix tests no longer building

* primitive value renamed to shorter name
2022-09-05 09:27:15 -05:00

62 lines
1.4 KiB
CMake

# SPDX-License-Identifier: MIT
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
get_filename_component(basename ${CMAKE_CURRENT_SOURCE_DIR} NAME)
project(test_${basename}
VERSION 1.0.0
LANGUAGES C)
string(REGEX REPLACE
"/test/bacnet/[a-zA-Z_/-]*$"
"/src"
SRC_DIR
${CMAKE_CURRENT_SOURCE_DIR})
string(REGEX REPLACE
"/test/bacnet/[a-zA-Z_/-]*$"
"/test"
TST_DIR
${CMAKE_CURRENT_SOURCE_DIR})
set(ZTST_DIR "${TST_DIR}/ztest/src")
add_compile_definitions(
BIG_ENDIAN=0
CONFIG_ZTEST=1
)
include_directories(
${SRC_DIR}
${TST_DIR}/ztest/include
)
add_executable(${PROJECT_NAME}
# File(s) under test
${SRC_DIR}/bacnet/basic/object/msv.c
# Support files and stubs (pathname alphabetical)
${SRC_DIR}/bacnet/bacapp.c
${SRC_DIR}/bacnet/bacdcode.c
${SRC_DIR}/bacnet/bacdevobjpropref.c
${SRC_DIR}/bacnet/bacint.c
${SRC_DIR}/bacnet/bacreal.c
${SRC_DIR}/bacnet/bacstr.c
${SRC_DIR}/bacnet/bactext.c
${SRC_DIR}/bacnet/basic/sys/bigend.c
${SRC_DIR}/bacnet/cov.c
${SRC_DIR}/bacnet/datetime.c
${SRC_DIR}/bacnet/basic/sys/days.c
${SRC_DIR}/bacnet/indtext.c
${SRC_DIR}/bacnet/hostnport.c
${SRC_DIR}/bacnet/lighting.c
${SRC_DIR}/bacnet/timestamp.c
${SRC_DIR}/bacnet/memcopy.c
${SRC_DIR}/bacnet/wp.c
${SRC_DIR}/bacnet/weeklyschedule.c
${SRC_DIR}/bacnet/bactimevalue.c
${SRC_DIR}/bacnet/dailyschedule.c
# Test and test library files
./src/main.c
${ZTST_DIR}/ztest_mock.c
${ZTST_DIR}/ztest.c
)