4326128e72
* Refactored and secured BACnetActionCommand codec into bacaction.c module for command object and added to bacapp module encode/decode with define for enabling and pseudo application tag for internal use. * Simplified bacapp_data_len() and moved into bacdcode module as bacnet_enclosed_data_len() function. * Secured ReadProperty-REQUEST and -ACK decoding. * Removed deprecated Keylist_Key() functions from usage. * Removed pseudo application datatypes from bacapp_data_decode() which only uses primitive application tag encoded values. * Defined INT_MAX when it is not already defined by compiler or libc. * Deprecated bacapp_decode_application_data_len() and bacapp_decode_context_data_len() as they are no longer used in any code in the library. * Added BACnetScale to bacapp module. Improved complex property value decoding. Refactored bacapp_decode_known_property() function. * Refactored and improved the bacapp_snprintf() function for printing EPICS. * Fixed Lighting Output WriteProperty to handle known property decoding.
32 lines
873 B
CMake
32 lines
873 B
CMake
# Copyright (c) 2022 Legrand North America, LLC.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
cmake_minimum_required(VERSION 3.20.0)
|
|
|
|
if(NOT ZEPHYR_CURRENT_MODULE_DIR)
|
|
string(REGEX REPLACE "/zephyr/tests/[a-zA-Z_/-]*$" ""
|
|
ZEPHYR_CURRENT_MODULE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
endif()
|
|
|
|
set(SOURCES
|
|
${ZEPHYR_CURRENT_MODULE_DIR}/test/unit/bacnet/bits/src/main.c
|
|
)
|
|
|
|
project(bacnet_bits)
|
|
find_package(Zephyr COMPONENTS unittest REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
|
|
|
# NOTE for Zephyr >= v3.2.0:
|
|
# - Zephyr unittest builds for target 'testbinary' instead of 'app'.
|
|
# - Zephyr unittest does not generate ZEPHYR_<modulename>_MODULE_DIR.
|
|
# So we have to use relative paths to get to the source.
|
|
|
|
target_include_directories(testbinary PRIVATE
|
|
${ZEPHYR_CURRENT_MODULE_DIR}/src
|
|
)
|
|
|
|
add_compile_definitions(
|
|
CONFIG_ZTEST_NEW_API
|
|
BACNET_STACK_DEPRECATED_DISABLE
|
|
)
|
|
|