Fixed load control object and unit test. Added recipe to Makefile for Zephyr OS twister unit testing. (#710)
This commit is contained in:
@@ -317,7 +317,8 @@ bool Analog_Output_Present_Value_Set(
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
if ((priority >= 1) && (priority <= BACNET_MAX_PRIORITY) &&
|
||||
value >= pObject->Min_Pres_Value && value <= pObject->Max_Pres_Value) {
|
||||
(value >= pObject->Min_Pres_Value) &&
|
||||
(value <= pObject->Max_Pres_Value)) {
|
||||
pObject->Relinquished[priority - 1] = false;
|
||||
pObject->Priority_Array[priority - 1] = value;
|
||||
Analog_Output_Present_Value_COV_Detect(
|
||||
|
||||
+510
-221
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,14 @@
|
||||
#include "bacnet/rp.h"
|
||||
#include "bacnet/wp.h"
|
||||
|
||||
typedef enum bacnet_load_control_state {
|
||||
SHED_INACTIVE,
|
||||
SHED_REQUEST_PENDING,
|
||||
SHED_NON_COMPLIANT,
|
||||
SHED_COMPLIANT,
|
||||
MAX_LOAD_CONTROL_STATE
|
||||
} BACNET_LOAD_CONTROL_STATE;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
@@ -50,9 +58,21 @@ extern "C" {
|
||||
BACNET_STACK_EXPORT
|
||||
void Load_Control_Init(
|
||||
void);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void Load_Control_State_Machine(
|
||||
int object_index);
|
||||
unsigned Load_Control_Priority_For_Writing(
|
||||
uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Priority_For_Writing_Set(
|
||||
uint32_t object_instance, unsigned priority);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Manipulated_Variable_Reference(
|
||||
uint32_t object_instance,
|
||||
BACNET_OBJECT_PROPERTY_REFERENCE * object_property_reference);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Manipulated_Variable_Reference_Set(
|
||||
uint32_t object_instance,
|
||||
BACNET_OBJECT_PROPERTY_REFERENCE * object_property_reference);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int Load_Control_Read_Property(
|
||||
@@ -62,6 +82,18 @@ extern "C" {
|
||||
bool Load_Control_Write_Property(
|
||||
BACNET_WRITE_PROPERTY_DATA * wp_data);
|
||||
|
||||
/* functions used for unit testing */
|
||||
BACNET_STACK_EXPORT
|
||||
void Load_Control_State_Machine(
|
||||
int object_index,
|
||||
BACNET_DATE_TIME *bdatetime);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_LOAD_CONTROL_STATE Load_Control_State(
|
||||
int object_index);
|
||||
BACNET_STACK_EXPORT
|
||||
BACNET_OBJECT_ID Load_Control_Object_ID(
|
||||
int object_index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in New Issue
Block a user