Added Binary Input and Binary Value intrinsic reporting CHANGE_OF_STATE algorithm as per 13.3.2 as per ASHRAE 135-2020 (#689)
This commit is contained in:
committed by
GitHub
parent
299d4f36e0
commit
f4637325ad
@@ -23,6 +23,8 @@ set(ZTST_DIR "${TST_DIR}/ztest/src")
|
||||
add_compile_definitions(
|
||||
BIG_ENDIAN=0
|
||||
CONFIG_ZTEST=1
|
||||
INTRINSIC_REPORTING=1
|
||||
BINARY_INPUT_INTRINSIC_REPORTING=1
|
||||
)
|
||||
|
||||
include_directories(
|
||||
@@ -64,6 +66,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/basic/sys/keylist.c
|
||||
# Test and test library files
|
||||
./src/main.c
|
||||
./stubs.c
|
||||
${TST_DIR}/bacnet/basic/object/property_test.c
|
||||
${ZTST_DIR}/ztest_mock.c
|
||||
${ZTST_DIR}/ztest.c
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Stub functions for unit test of a BACnet object
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date December 2022
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/alarm_ack.h"
|
||||
#include "bacnet/datetime.h"
|
||||
#include "bacnet/event.h"
|
||||
#include "bacnet/getevent.h"
|
||||
#include "bacnet/get_alarm_sum.h"
|
||||
#include "bacnet/npdu.h"
|
||||
|
||||
bool datetime_local(
|
||||
BACNET_DATE *bdate,
|
||||
BACNET_TIME *btime,
|
||||
int16_t *utc_offset_minutes,
|
||||
bool *dst_active)
|
||||
{
|
||||
(void)bdate;
|
||||
(void)btime;
|
||||
(void)utc_offset_minutes;
|
||||
(void)dst_active;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Notification_Class_common_reporting_function(
|
||||
BACNET_EVENT_NOTIFICATION_DATA *event_data)
|
||||
{
|
||||
(void)event_data;
|
||||
}
|
||||
|
||||
void Notification_Class_Get_Priorities(
|
||||
uint32_t Object_Instance, uint32_t *pPriorityArray)
|
||||
{
|
||||
(void)Object_Instance;
|
||||
(void)pPriorityArray;
|
||||
}
|
||||
|
||||
void handler_get_event_information_set(
|
||||
BACNET_OBJECT_TYPE object_type, get_event_info_function pFunction)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)pFunction;
|
||||
}
|
||||
|
||||
void handler_alarm_ack_set(
|
||||
BACNET_OBJECT_TYPE object_type, alarm_ack_function pFunction)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)pFunction;
|
||||
}
|
||||
|
||||
void handler_get_alarm_summary_set(
|
||||
BACNET_OBJECT_TYPE object_type, get_alarm_summary_function pFunction)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)pFunction;
|
||||
}
|
||||
@@ -23,6 +23,8 @@ set(ZTST_DIR "${TST_DIR}/ztest/src")
|
||||
add_compile_definitions(
|
||||
BIG_ENDIAN=0
|
||||
CONFIG_ZTEST=1
|
||||
INTRINSIC_REPORTING=1
|
||||
BINARY_VALUE_INTRINSIC_REPORTING=1
|
||||
)
|
||||
|
||||
include_directories(
|
||||
@@ -63,6 +65,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/basic/sys/keylist.c
|
||||
# Test and test library files
|
||||
./src/main.c
|
||||
./stubs.c
|
||||
${TST_DIR}/bacnet/basic/object/property_test.c
|
||||
${ZTST_DIR}/ztest_mock.c
|
||||
${ZTST_DIR}/ztest.c
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Stub functions for unit test of a BACnet object
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date December 2022
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/alarm_ack.h"
|
||||
#include "bacnet/datetime.h"
|
||||
#include "bacnet/event.h"
|
||||
#include "bacnet/getevent.h"
|
||||
#include "bacnet/get_alarm_sum.h"
|
||||
#include "bacnet/npdu.h"
|
||||
|
||||
bool datetime_local(
|
||||
BACNET_DATE *bdate,
|
||||
BACNET_TIME *btime,
|
||||
int16_t *utc_offset_minutes,
|
||||
bool *dst_active)
|
||||
{
|
||||
(void)bdate;
|
||||
(void)btime;
|
||||
(void)utc_offset_minutes;
|
||||
(void)dst_active;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Notification_Class_common_reporting_function(
|
||||
BACNET_EVENT_NOTIFICATION_DATA *event_data)
|
||||
{
|
||||
(void)event_data;
|
||||
}
|
||||
|
||||
void Notification_Class_Get_Priorities(
|
||||
uint32_t Object_Instance, uint32_t *pPriorityArray)
|
||||
{
|
||||
(void)Object_Instance;
|
||||
(void)pPriorityArray;
|
||||
}
|
||||
|
||||
void handler_get_event_information_set(
|
||||
BACNET_OBJECT_TYPE object_type, get_event_info_function pFunction)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)pFunction;
|
||||
}
|
||||
|
||||
void handler_alarm_ack_set(
|
||||
BACNET_OBJECT_TYPE object_type, alarm_ack_function pFunction)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)pFunction;
|
||||
}
|
||||
|
||||
void handler_get_alarm_summary_set(
|
||||
BACNET_OBJECT_TYPE object_type, get_alarm_summary_function pFunction)
|
||||
{
|
||||
(void)object_type;
|
||||
(void)pFunction;
|
||||
}
|
||||
Reference in New Issue
Block a user