Refactored BACnetShedLevel encoding, decoding, and printing into separate file. Added unit testing. (#1187)
* Refactored BACnetShedLevel encoding, decoding, and printing into separate file. Added unit testing. * Added API to load control object for shed-level, start-time, duty-window, full-duty-baseline, and enable. * Fixed bacapp sprintf for shed level and host-n-port found in scan build.
This commit is contained in:
@@ -21,6 +21,9 @@ The git repositories are hosted at the following sites:
|
||||
|
||||
### Added
|
||||
|
||||
* Added API and optional properties to basic load control object example
|
||||
Refactored BACnetShedLevel encoding, decoding, and printing into separate
|
||||
file. Added BACnetShedLevel validation testing. (#1187)
|
||||
* Added API for Analog_Input_Notification_Class, Analog_Input_Event_Enable,
|
||||
and Analog_Input_Notify_Type. (#1184)
|
||||
* Added API and optional properties to basic lighting output object example
|
||||
|
||||
@@ -672,6 +672,8 @@ add_library(${PROJECT_NAME}
|
||||
src/bacnet/rp.h
|
||||
src/bacnet/rpm.c
|
||||
src/bacnet/rpm.h
|
||||
src/bacnet/shed_level.c
|
||||
src/bacnet/shed_level.h
|
||||
src/bacnet/timer_value.c
|
||||
src/bacnet/timer_value.h
|
||||
src/bacnet/timestamp.c
|
||||
|
||||
@@ -168,6 +168,7 @@ set(BACNET_PROJECT_SOURCE
|
||||
${LIBRARY_BACNET_CORE}/reject.c
|
||||
${LIBRARY_BACNET_CORE}/rp.c
|
||||
${LIBRARY_BACNET_CORE}/rpm.c
|
||||
${LIBRARY_BACNET_CORE}/shed_level.c
|
||||
${LIBRARY_BACNET_CORE}/timer_value.c
|
||||
${LIBRARY_BACNET_CORE}/timestamp.c
|
||||
${LIBRARY_BACNET_CORE}/weeklyschedule.c
|
||||
|
||||
@@ -130,6 +130,7 @@ CORESRC = $(BACNET_CORE)/abort.c \
|
||||
$(BACNET_CORE)/reject.c \
|
||||
$(BACNET_CORE)/rp.c \
|
||||
$(BACNET_CORE)/rpm.c \
|
||||
$(BACNET_CORE)/shed_level.c \
|
||||
$(BACNET_CORE)/timer_value.c \
|
||||
$(BACNET_CORE)/timestamp.c \
|
||||
$(BACNET_CORE)/weeklyschedule.c \
|
||||
|
||||
@@ -1188,6 +1188,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\rpm.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\shed_level.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\timer_value.c</name>
|
||||
</file>
|
||||
|
||||
@@ -194,6 +194,7 @@ set(BACNET_PROJECT_SOURCE
|
||||
${LIBRARY_BACNET_CORE}/reject.c
|
||||
${LIBRARY_BACNET_CORE}/rp.c
|
||||
${LIBRARY_BACNET_CORE}/rpm.c
|
||||
${LIBRARY_BACNET_CORE}/shed_level.c
|
||||
${LIBRARY_BACNET_CORE}/timer_value.c
|
||||
${LIBRARY_BACNET_CORE}/timestamp.c
|
||||
${LIBRARY_BACNET_CORE}/weeklyschedule.c
|
||||
|
||||
@@ -82,6 +82,7 @@ BACNET_SRC = \
|
||||
$(BACNET_CORE)/rp.c \
|
||||
$(BACNET_CORE)/rpm.c \
|
||||
$(BACNET_CORE)/special_event.c \
|
||||
$(BACNET_CORE)/shed_level.c \
|
||||
$(BACNET_CORE)/timer_value.c \
|
||||
$(BACNET_CORE)/timestamp.c \
|
||||
$(BACNET_CORE)/weeklyschedule.c \
|
||||
|
||||
@@ -1118,6 +1118,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\rpm.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\shed_level.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\timer_value.c</name>
|
||||
</file>
|
||||
|
||||
@@ -227,6 +227,7 @@ set(BACNET_PROJECT_SOURCE
|
||||
${LIBRARY_BACNET_CORE}/reject.c
|
||||
${LIBRARY_BACNET_CORE}/rp.c
|
||||
${LIBRARY_BACNET_CORE}/rpm.c
|
||||
${LIBRARY_BACNET_CORE}/shed_level.c
|
||||
${LIBRARY_BACNET_CORE}/timer_value.c
|
||||
${LIBRARY_BACNET_CORE}/timestamp.c
|
||||
${LIBRARY_BACNET_CORE}/timesync.c
|
||||
|
||||
@@ -104,6 +104,7 @@ BACNET_SRC = \
|
||||
$(BACNET_CORE)/rp.c \
|
||||
$(BACNET_CORE)/rpm.c \
|
||||
$(BACNET_CORE)/special_event.c \
|
||||
$(BACNET_CORE)/shed_level.c \
|
||||
$(BACNET_CORE)/timer_value.c \
|
||||
$(BACNET_CORE)/timestamp.c \
|
||||
$(BACNET_CORE)/timesync.c \
|
||||
|
||||
@@ -1127,6 +1127,9 @@
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\rpm.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\shed_level.c</name>
|
||||
</file>
|
||||
<file>
|
||||
<name>$PROJ_DIR$\..\..\src\bacnet\timer_value.c</name>
|
||||
</file>
|
||||
|
||||
+1
@@ -215,6 +215,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\rp.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\rpm.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\basic\sys\sbuf.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\shed_level.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timer_value.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timestamp.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timesync.c" />
|
||||
|
||||
+3
@@ -129,6 +129,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\rpm.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\shed_level.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timer_value.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -210,6 +210,7 @@
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\rp.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\rpm.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\secure_connect.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\shed_level.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timer_value.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timestamp.c" />
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timesync.c" />
|
||||
|
||||
@@ -201,6 +201,9 @@
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\rpm.c">
|
||||
<Filter>Source Files\src\bacnet</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\shed_level.c">
|
||||
<Filter>Source Files\src\bacnet</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\..\..\src\bacnet\timer_value.c">
|
||||
<Filter>Source Files\src\bacnet</Filter>
|
||||
</ClCompile>
|
||||
|
||||
+10
-233
@@ -151,149 +151,6 @@ bacnet_scale_same(const BACNET_SCALE *value1, const BACNET_SCALE *value2)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BACAPP_SHED_LEVEL)
|
||||
/**
|
||||
* @brief Encode a BACnetScale value.
|
||||
*
|
||||
* BACnetScale ::= CHOICE {
|
||||
* float-scale [0] REAL,
|
||||
* integer-scale [1] INTEGER
|
||||
* }
|
||||
*
|
||||
* @param apdu - buffer to encode to
|
||||
* @param value - value to encode
|
||||
* @return number of bytes encoded
|
||||
*/
|
||||
static int
|
||||
bacnet_shed_level_encode(uint8_t *apdu, const BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
int apdu_len = 0;
|
||||
|
||||
if (!value) {
|
||||
return 0;
|
||||
}
|
||||
switch (value->type) {
|
||||
case BACNET_SHED_TYPE_PERCENT:
|
||||
apdu_len = encode_context_unsigned(apdu, 0, value->value.percent);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_AMOUNT:
|
||||
apdu_len = encode_context_real(apdu, 2, value->value.amount);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_LEVEL:
|
||||
apdu_len = encode_context_unsigned(apdu, 1, value->value.level);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return apdu_len;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BACAPP_SHED_LEVEL)
|
||||
/**
|
||||
* @brief Decode a BACnetShedLevel value.
|
||||
*
|
||||
* BACnetShedLevel ::= CHOICE {
|
||||
* percent [0] Unsigned,
|
||||
* level [1] Unsigned,
|
||||
* amount [2] REAL
|
||||
* }
|
||||
*
|
||||
* @param apdu - buffer to decode to
|
||||
* @param apdu_size - size of the buffer
|
||||
* @param value - value to encode
|
||||
* @return number of bytes decoded, or BACNET_STATUS_ERROR on error
|
||||
*/
|
||||
static int bacnet_shed_level_decode(
|
||||
const uint8_t *apdu, size_t apdu_size, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
int apdu_len = 0;
|
||||
BACNET_TAG tag = { 0 };
|
||||
BACNET_UNSIGNED_INTEGER unsigned_value = 0;
|
||||
float real_value = 0.0f;
|
||||
|
||||
if (!apdu) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
apdu_len = bacnet_tag_decode(apdu, apdu_size, &tag);
|
||||
if (apdu_len <= 0) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
switch (tag.number) {
|
||||
case 0:
|
||||
/* percent - Unsigned */
|
||||
apdu_len = bacnet_unsigned_context_decode(
|
||||
apdu, apdu_size, tag.number, &unsigned_value);
|
||||
if (apdu_len > 0) {
|
||||
value->value.percent = unsigned_value;
|
||||
value->type = BACNET_SHED_TYPE_PERCENT;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
/* level - Unsigned */
|
||||
apdu_len = bacnet_unsigned_context_decode(
|
||||
apdu, apdu_size, tag.number, &unsigned_value);
|
||||
if (apdu_len > 0) {
|
||||
value->value.level = unsigned_value;
|
||||
value->type = BACNET_SHED_TYPE_LEVEL;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
apdu_len = bacnet_real_context_decode(
|
||||
apdu, apdu_size, tag.number, &real_value);
|
||||
if (apdu_len > 0) {
|
||||
value->type = BACNET_SHED_TYPE_AMOUNT;
|
||||
value->value.amount = real_value;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
|
||||
return apdu_len;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BACAPP_SHED_LEVEL)
|
||||
static bool bacnet_shed_level_same(
|
||||
const BACNET_SHED_LEVEL *value1, const BACNET_SHED_LEVEL *value2)
|
||||
{
|
||||
bool status = false;
|
||||
|
||||
if (value1 && value2) {
|
||||
status = true;
|
||||
if (value1->type != value2->type) {
|
||||
status = false;
|
||||
} else {
|
||||
switch (value1->type) {
|
||||
case BACNET_SHED_TYPE_PERCENT:
|
||||
if (value1->value.percent != value2->value.percent) {
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case BACNET_SHED_TYPE_AMOUNT:
|
||||
if (islessgreater(
|
||||
value1->value.amount, value2->value.amount)) {
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case BACNET_SHED_TYPE_LEVEL:
|
||||
if (value1->value.level != value2->value.level) {
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Encode application data given by a pointer into the APDU.
|
||||
* @param apdu - Pointer to the buffer to encode to, or NULL for length
|
||||
@@ -2062,40 +1919,6 @@ int bacapp_snprintf_shift(int len, char **buf, size_t *buf_size)
|
||||
return len;
|
||||
}
|
||||
|
||||
#if defined(BACAPP_SHED_LEVEL)
|
||||
/**
|
||||
* @brief Print a value to a string for EPICS
|
||||
* @param str - destination string, or NULL for length only
|
||||
* @param str_len - length of the destination string, or 0 for length only
|
||||
* @param value - value to be printed
|
||||
* @return number of characters written to the string
|
||||
*/
|
||||
static int bacapp_snprintf_shed_level(
|
||||
char *str, size_t str_len, const BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
switch (value->type) {
|
||||
case BACNET_SHED_TYPE_PERCENT:
|
||||
length = bacapp_snprintf(
|
||||
str, str_len, "%u%%", (unsigned)value->value.percent);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_LEVEL:
|
||||
length = bacapp_snprintf(
|
||||
str, str_len, "%u", (unsigned)value->value.level);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_AMOUNT:
|
||||
length = bacapp_snprintf(
|
||||
str, str_len, "%f", (double)value->value.amount);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Print a value to a string for EPICS
|
||||
* @param str - destination string, or NULL for length only
|
||||
@@ -3440,7 +3263,7 @@ static int bacapp_snprintf_host_n_port(
|
||||
str, str_len, "%u.%u.%u.%u:%u", (unsigned)octet_str[0],
|
||||
(unsigned)octet_str[1], (unsigned)octet_str[2],
|
||||
(unsigned)octet_str[3], (unsigned)value->port);
|
||||
ret_val += slen;
|
||||
ret_val += bacapp_snprintf_shift(slen, &str, &str_len);
|
||||
} else if (value->host_name) {
|
||||
const BACNET_CHARACTER_STRING *name;
|
||||
name = &value->host.name;
|
||||
@@ -3458,7 +3281,7 @@ static int bacapp_snprintf_host_n_port(
|
||||
char_str++;
|
||||
}
|
||||
slen = bacapp_snprintf(str, str_len, "\"");
|
||||
ret_val += slen;
|
||||
ret_val += bacapp_snprintf_shift(slen, &str, &str_len);
|
||||
}
|
||||
slen = bacapp_snprintf(str, str_len, "}");
|
||||
ret_val += bacapp_snprintf_shift(slen, &str, &str_len);
|
||||
@@ -3801,7 +3624,8 @@ int bacapp_snprintf_value(
|
||||
BACNET_PROPERTY_ID property = PROP_ALL;
|
||||
BACNET_OBJECT_TYPE object_type = MAX_BACNET_OBJECT_TYPE;
|
||||
int ret_val = 0;
|
||||
#if defined(BACAPP_BDT_ENTRY) || defined(BACAPP_FDT_ENTRY)
|
||||
#if defined(BACAPP_BDT_ENTRY) || defined(BACAPP_FDT_ENTRY) || \
|
||||
defined(BACAPP_SHED_LEVEL)
|
||||
int slen = 0;
|
||||
#endif
|
||||
|
||||
@@ -4039,8 +3863,13 @@ int bacapp_snprintf_value(
|
||||
#endif
|
||||
#if defined(BACAPP_SHED_LEVEL)
|
||||
case BACNET_APPLICATION_TAG_SHED_LEVEL:
|
||||
ret_val = bacapp_snprintf_shed_level(
|
||||
slen = bacapp_snprintf(str, str_len, "{");
|
||||
ret_val += bacapp_snprintf_shift(slen, &str, &str_len);
|
||||
slen = bacapp_snprintf_shed_level(
|
||||
str, str_len, &value->type.Shed_Level);
|
||||
ret_val += bacapp_snprintf_shift(slen, &str, &str_len);
|
||||
slen = bacapp_snprintf(str, str_len, "}");
|
||||
ret_val += bacapp_snprintf_shift(slen, &str, &str_len);
|
||||
break;
|
||||
#endif
|
||||
#if defined(BACAPP_ACCESS_RULE)
|
||||
@@ -4335,58 +4164,6 @@ static bool bacnet_scale_from_ascii(BACNET_SCALE *value, const char *argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BACAPP_SHED_LEVEL)
|
||||
/**
|
||||
* @brief Parse a string into a BACnet Shed Level value
|
||||
* @param value [out] The BACnet Shed Level value
|
||||
* @param argv [in] The string to parse
|
||||
* @return True on success, else False
|
||||
*/
|
||||
static bool
|
||||
bacnet_shed_level_from_ascii(BACNET_SHED_LEVEL *value, const char *argv)
|
||||
{
|
||||
bool status = false;
|
||||
int count;
|
||||
unsigned percent, level;
|
||||
float amount;
|
||||
const char *percentage;
|
||||
const char *decimal_point;
|
||||
|
||||
if (!status) {
|
||||
percentage = strchr(argv, '%');
|
||||
if (percentage) {
|
||||
count = sscanf(argv, "%u", &percent);
|
||||
if (count == 1) {
|
||||
value->type = BACNET_SHED_TYPE_PERCENT;
|
||||
value->value.percent = percent;
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!status) {
|
||||
decimal_point = strchr(argv, '.');
|
||||
if (decimal_point) {
|
||||
count = sscanf(argv, "%f", &amount);
|
||||
if (count == 1) {
|
||||
value->type = BACNET_SHED_TYPE_AMOUNT;
|
||||
value->value.amount = amount;
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!status) {
|
||||
count = sscanf(argv, "%u", &level);
|
||||
if (count == 1) {
|
||||
value->type = BACNET_SHED_TYPE_LEVEL;
|
||||
value->value.level = level;
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(BACAPP_DEVICE_OBJECT_PROPERTY_REFERENCE)
|
||||
/**
|
||||
* @brief Parse a string into a BACnetDeviceObjectPropertyReference value
|
||||
|
||||
+1
-10
@@ -31,6 +31,7 @@
|
||||
#include "bacnet/calendar_entry.h"
|
||||
#include "bacnet/special_event.h"
|
||||
#include "bacnet/channel_value.h"
|
||||
#include "bacnet/shed_level.h"
|
||||
#include "bacnet/timer_value.h"
|
||||
#include "bacnet/secure_connect.h"
|
||||
|
||||
@@ -53,16 +54,6 @@ typedef struct BACnetScale {
|
||||
} type;
|
||||
} BACNET_SCALE;
|
||||
|
||||
/* The shed levels for the LEVEL choice of BACnetShedLevel. */
|
||||
typedef struct {
|
||||
BACNET_SHED_LEVEL_TYPE type;
|
||||
union {
|
||||
BACNET_UNSIGNED_INTEGER level;
|
||||
BACNET_UNSIGNED_INTEGER percent;
|
||||
float amount;
|
||||
} value;
|
||||
} BACNET_SHED_LEVEL;
|
||||
|
||||
struct BACnet_Application_Data_Value;
|
||||
typedef struct BACnet_Application_Data_Value {
|
||||
bool context_specific; /* true if context specific data */
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/bactext.h"
|
||||
#include "bacnet/datetime.h"
|
||||
#include "bacnet/shed_level.h"
|
||||
#include "bacnet/basic/object/lc.h"
|
||||
#include "bacnet/basic/object/ao.h"
|
||||
#include "bacnet/wp.h"
|
||||
@@ -33,9 +34,6 @@
|
||||
#define LOAD_CONTROL_TASK_INTERVAL_MS 1000UL
|
||||
|
||||
struct object_data {
|
||||
void *Context;
|
||||
const char *Object_Name;
|
||||
const char *Description;
|
||||
/* indicates the current load shedding state of the object */
|
||||
BACNET_SHED_STATE Present_Value;
|
||||
/* tracking for the Load Control finite state machine */
|
||||
@@ -91,6 +89,9 @@ struct object_data {
|
||||
load_control_manipulated_object_read_callback Manipulated_Object_Read;
|
||||
/* state machine task time tracking per object */
|
||||
uint32_t Task_Milliseconds;
|
||||
void *Context;
|
||||
const char *Object_Name;
|
||||
const char *Description;
|
||||
};
|
||||
/* Key List for storing the object data sorted by instance number */
|
||||
static OS_Keylist Object_List;
|
||||
@@ -1667,6 +1668,329 @@ bool Load_Control_Shed_Level_Array(
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the requested shed level
|
||||
* property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be retrieved
|
||||
* @return the requested shed level of this object instance.
|
||||
*/
|
||||
bool Load_Control_Requested_Shed_Level(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
status = bacnet_shed_level_copy(value, &pObject->Requested_Shed_Level);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the requested shed level
|
||||
* property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if requested shed level was set
|
||||
*/
|
||||
bool Load_Control_Requested_Shed_Level_Set(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
status = bacnet_shed_level_copy(&pObject->Requested_Shed_Level, value);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the expected shed level
|
||||
* property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be retrieved
|
||||
* @return the expected shed level of this object instance.
|
||||
*/
|
||||
bool Load_Control_Expected_Shed_Level(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
status = bacnet_shed_level_copy(value, &pObject->Expected_Shed_Level);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the expected shed level
|
||||
* property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if expected shed level was set
|
||||
*/
|
||||
bool Load_Control_Expected_Shed_Level_Set(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
status = bacnet_shed_level_copy(&pObject->Expected_Shed_Level, value);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the expected shed level
|
||||
* property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be retrieved
|
||||
* @return the expected shed level of this object instance.
|
||||
*/
|
||||
bool Load_Control_Actual_Shed_Level(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
status = bacnet_shed_level_copy(value, &pObject->Expected_Shed_Level);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the expected shed level
|
||||
* property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if expected shed level was set
|
||||
*/
|
||||
bool Load_Control_Actual_Shed_Level_Set(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
status = bacnet_shed_level_copy(&pObject->Expected_Shed_Level, value);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the start-time property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be retrieved
|
||||
* @return the start-time property value of this object instance.
|
||||
*/
|
||||
bool Load_Control_Start_Time(uint32_t object_instance, BACNET_DATE_TIME *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
datetime_copy_date(&value->date, &pObject->Start_Time.date);
|
||||
datetime_copy_time(&value->time, &pObject->Start_Time.time);
|
||||
status = true;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the start-time property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if property value was set
|
||||
*/
|
||||
bool Load_Control_Start_Time_Set(
|
||||
uint32_t object_instance, BACNET_DATE_TIME *value)
|
||||
{
|
||||
bool status = false;
|
||||
struct object_data *pObject;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
datetime_copy_date(&pObject->Start_Time.date, &value->date);
|
||||
datetime_copy_time(&pObject->Start_Time.time, &value->time);
|
||||
status = true;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the shed-duration property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return the shed-duration property value of this object instance.
|
||||
*/
|
||||
uint32_t Load_Control_Shed_Duration(uint32_t object_instance)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
uint32_t value = 0;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
value = pObject->Shed_Duration;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the shed-duration property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if property value was set
|
||||
*/
|
||||
bool Load_Control_Shed_Duration_Set(uint32_t object_instance, uint32_t value)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
bool status = false;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
pObject->Shed_Duration = value;
|
||||
status = true;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the duty-window property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return the duty-window property value of this object instance.
|
||||
*/
|
||||
uint32_t Load_Control_Duty_Window(uint32_t object_instance)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
uint32_t value = 0;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
value = pObject->Duty_Window;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the duty-window property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if property value was set
|
||||
*/
|
||||
bool Load_Control_Duty_Window_Set(uint32_t object_instance, uint32_t value)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
bool status = false;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
pObject->Duty_Window = value;
|
||||
status = true;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the full-duty-baseline
|
||||
* property value
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return the full-duty-baseline property value of this object instance.
|
||||
*/
|
||||
float Load_Control_Full_Duty_Baseline(uint32_t object_instance)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
float value = 0.0f;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
value = pObject->Full_Duty_Baseline;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the full-duty-baseline
|
||||
* property value
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if property value was set
|
||||
*/
|
||||
bool Load_Control_Full_Duty_Baseline_Set(uint32_t object_instance, float value)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
bool status = false;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
pObject->Full_Duty_Baseline = value;
|
||||
status = true;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, gets the enable property value
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @return the enable property value of this object instance.
|
||||
*/
|
||||
bool Load_Control_Enable(uint32_t object_instance)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
bool value = false;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
value = pObject->Load_Control_Enable;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief For a given object instance-number, sets the enable property
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param value - holds the value to be set
|
||||
* @return true if property value was set
|
||||
*/
|
||||
bool Load_Control_Enable_Set(uint32_t object_instance, bool value)
|
||||
{
|
||||
struct object_data *pObject;
|
||||
bool status = false;
|
||||
|
||||
pObject = Keylist_Data(Object_List, object_instance);
|
||||
if (pObject) {
|
||||
pObject->Load_Control_Enable = value;
|
||||
status = true;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the context used with a specific object instance
|
||||
* @param object_instance [in] BACnet object instance number
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "bacnet/bacdef.h"
|
||||
/* BACnet Stack API */
|
||||
#include "bacnet/bacerror.h"
|
||||
#include "bacnet/shed_level.h"
|
||||
#include "bacnet/rp.h"
|
||||
#include "bacnet/wp.h"
|
||||
|
||||
@@ -112,6 +113,53 @@ bool Load_Control_Shed_Level_Array(
|
||||
uint32_t array_entry,
|
||||
struct shed_level_data *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Requested_Shed_Level(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Requested_Shed_Level_Set(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Expected_Shed_Level(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Expected_Shed_Level_Set(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Actual_Shed_Level(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Actual_Shed_Level_Set(
|
||||
uint32_t object_instance, BACNET_SHED_LEVEL *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Start_Time(uint32_t object_instance, BACNET_DATE_TIME *value);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Start_Time_Set(
|
||||
uint32_t object_instance, BACNET_DATE_TIME *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint32_t Load_Control_Shed_Duration(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Shed_Duration_Set(uint32_t object_instance, uint32_t value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
uint32_t Load_Control_Duty_Window(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Duty_Window_Set(uint32_t object_instance, uint32_t value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
float Load_Control_Full_Duty_Baseline(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Full_Duty_Baseline_Set(uint32_t object_instance, float value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Enable(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
bool Load_Control_Enable_Set(uint32_t object_instance, bool value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
void *Load_Control_Context_Get(uint32_t object_instance);
|
||||
BACNET_STACK_EXPORT
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief BACnetShedLevel complex data type encode and decode
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date December 2025
|
||||
* @copyright SPDX-License-Identifier: GPL-2.0-or-later WITH GCC-exception-2.0
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include "bacnet/bacdcode.h"
|
||||
#include "bacnet/shed_level.h"
|
||||
|
||||
/**
|
||||
* @brief Encode a BACnetShedLevel value.
|
||||
*
|
||||
* BACnetShedLevel ::= CHOICE {
|
||||
* percent[0] Unsigned,
|
||||
* level[1] Unsigned,
|
||||
* amount[2] Real
|
||||
* }
|
||||
*
|
||||
* @param apdu - buffer to encode to
|
||||
* @param value - value to encode
|
||||
* @return number of bytes encoded
|
||||
*/
|
||||
int bacnet_shed_level_encode(uint8_t *apdu, const BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
int apdu_len = 0;
|
||||
|
||||
if (!value) {
|
||||
return 0;
|
||||
}
|
||||
switch (value->type) {
|
||||
case BACNET_SHED_TYPE_PERCENT:
|
||||
apdu_len = encode_context_unsigned(apdu, 0, value->value.percent);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_LEVEL:
|
||||
apdu_len = encode_context_unsigned(apdu, 1, value->value.level);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_AMOUNT:
|
||||
apdu_len = encode_context_real(apdu, 2, value->value.amount);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return apdu_len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a BACnetShedLevel value.
|
||||
*
|
||||
* BACnetShedLevel ::= CHOICE {
|
||||
* percent[0] Unsigned,
|
||||
* level[1] Unsigned,
|
||||
* amount[2] Real
|
||||
* }
|
||||
*
|
||||
* @param apdu - buffer to decode to
|
||||
* @param apdu_size - size of the buffer
|
||||
* @param value - value to encode, or NULL for size only
|
||||
* @return number of bytes decoded, or BACNET_STATUS_ERROR on error
|
||||
*/
|
||||
int bacnet_shed_level_decode(
|
||||
const uint8_t *apdu, size_t apdu_size, BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
int apdu_len = 0;
|
||||
BACNET_TAG tag = { 0 };
|
||||
BACNET_UNSIGNED_INTEGER unsigned_value = 0;
|
||||
float real_value = 0.0f;
|
||||
|
||||
if (!apdu) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
apdu_len = bacnet_tag_decode(apdu, apdu_size, &tag);
|
||||
if (apdu_len <= 0) {
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
switch (tag.number) {
|
||||
case 0:
|
||||
/* percent - Unsigned */
|
||||
apdu_len = bacnet_unsigned_context_decode(
|
||||
apdu, apdu_size, tag.number, &unsigned_value);
|
||||
if (apdu_len > 0) {
|
||||
if (value) {
|
||||
value->value.percent = unsigned_value;
|
||||
value->type = BACNET_SHED_TYPE_PERCENT;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
/* level - Unsigned */
|
||||
apdu_len = bacnet_unsigned_context_decode(
|
||||
apdu, apdu_size, tag.number, &unsigned_value);
|
||||
if (apdu_len > 0) {
|
||||
if (value) {
|
||||
value->value.level = unsigned_value;
|
||||
value->type = BACNET_SHED_TYPE_LEVEL;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
apdu_len = bacnet_real_context_decode(
|
||||
apdu, apdu_size, tag.number, &real_value);
|
||||
if (apdu_len > 0) {
|
||||
if (value) {
|
||||
value->type = BACNET_SHED_TYPE_AMOUNT;
|
||||
value->value.amount = real_value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return BACNET_STATUS_ERROR;
|
||||
}
|
||||
|
||||
return apdu_len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Compare the BACnetShedLevel complex data
|
||||
* @param value1 - BACNET_SHED_LEVEL structure
|
||||
* @param value2 - BACNET_SHED_LEVEL structure
|
||||
* @return true if the same
|
||||
*/
|
||||
bool bacnet_shed_level_same(
|
||||
const BACNET_SHED_LEVEL *value1, const BACNET_SHED_LEVEL *value2)
|
||||
{
|
||||
bool status = false;
|
||||
|
||||
if (value1 && value2) {
|
||||
status = true;
|
||||
if (value1->type != value2->type) {
|
||||
status = false;
|
||||
} else {
|
||||
switch (value1->type) {
|
||||
case BACNET_SHED_TYPE_PERCENT:
|
||||
if (value1->value.percent != value2->value.percent) {
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case BACNET_SHED_TYPE_LEVEL:
|
||||
if (value1->value.level != value2->value.level) {
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
case BACNET_SHED_TYPE_AMOUNT:
|
||||
if (islessgreater(
|
||||
value1->value.amount, value2->value.amount)) {
|
||||
status = false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Compare the BACnetShedLevel complex data
|
||||
* @param value1 - BACNET_SHED_LEVEL structure
|
||||
* @param value2 - BACNET_SHED_LEVEL structure
|
||||
* @return true if the same
|
||||
*/
|
||||
bool bacnet_shed_level_copy(
|
||||
BACNET_SHED_LEVEL *dest, const BACNET_SHED_LEVEL *src)
|
||||
{
|
||||
if (!dest || !src) {
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(dest, src, sizeof(BACNET_SHED_LEVEL));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Print a value to a string for EPICS
|
||||
* @param str - destination string, or NULL for length only
|
||||
* @param str_len - length of the destination string, or 0 for length only
|
||||
* @param value - value to be printed
|
||||
* @return number of characters written to the string
|
||||
*/
|
||||
int bacapp_snprintf_shed_level(
|
||||
char *str, size_t str_len, const BACNET_SHED_LEVEL *value)
|
||||
{
|
||||
int length = 0;
|
||||
|
||||
switch (value->type) {
|
||||
case BACNET_SHED_TYPE_PERCENT:
|
||||
length = bacnet_snprintf(
|
||||
str, str_len, length, "%u%%", (unsigned)value->value.percent);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_LEVEL:
|
||||
length = bacnet_snprintf(
|
||||
str, str_len, length, "%u", (unsigned)value->value.level);
|
||||
break;
|
||||
case BACNET_SHED_TYPE_AMOUNT:
|
||||
length = bacnet_snprintf(
|
||||
str, str_len, length, "%f", (double)value->value.amount);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse a string into a BACnet Shed Level value
|
||||
* @param value [out] The BACnet Shed Level value
|
||||
* @param argv [in] The string to parse
|
||||
* @return True on success, else False
|
||||
*/
|
||||
bool bacnet_shed_level_from_ascii(BACNET_SHED_LEVEL *value, const char *argv)
|
||||
{
|
||||
bool status = false;
|
||||
int count;
|
||||
unsigned percent, level;
|
||||
float amount;
|
||||
const char *percentage;
|
||||
const char *decimal_point;
|
||||
|
||||
if (!status) {
|
||||
percentage = strchr(argv, '%');
|
||||
if (percentage) {
|
||||
count = sscanf(argv, "%u", &percent);
|
||||
if (count == 1) {
|
||||
value->type = BACNET_SHED_TYPE_PERCENT;
|
||||
value->value.percent = percent;
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!status) {
|
||||
decimal_point = strchr(argv, '.');
|
||||
if (decimal_point) {
|
||||
count = sscanf(argv, "%f", &amount);
|
||||
if (count == 1) {
|
||||
value->type = BACNET_SHED_TYPE_AMOUNT;
|
||||
value->value.amount = amount;
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!status) {
|
||||
count = sscanf(argv, "%u", &level);
|
||||
if (count == 1) {
|
||||
value->type = BACNET_SHED_TYPE_LEVEL;
|
||||
value->value.level = level;
|
||||
status = true;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief API for BACnetShedLevel complex data type encode and decode
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date December 2025
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#ifndef BACNET_SHED_LEVEL_H
|
||||
#define BACNET_SHED_LEVEL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
/* BACnet Stack defines - first */
|
||||
#include "bacnet/bacdef.h"
|
||||
#include "bacnet/bacint.h"
|
||||
|
||||
/* The shed levels for the LEVEL choice of BACnetShedLevel. */
|
||||
typedef struct BACnetShedLevel {
|
||||
BACNET_SHED_LEVEL_TYPE type;
|
||||
union {
|
||||
BACNET_UNSIGNED_INTEGER level;
|
||||
BACNET_UNSIGNED_INTEGER percent;
|
||||
float amount;
|
||||
} value;
|
||||
} BACNET_SHED_LEVEL;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** Decode Special Event */
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_shed_level_decode(
|
||||
const uint8_t *apdu, size_t apdu_size, BACNET_SHED_LEVEL *value);
|
||||
|
||||
/** Encode Special Event */
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_shed_level_encode(uint8_t *apdu, const BACNET_SHED_LEVEL *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacnet_shed_level_same(
|
||||
const BACNET_SHED_LEVEL *value1, const BACNET_SHED_LEVEL *value2);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacnet_shed_level_copy(
|
||||
BACNET_SHED_LEVEL *dest, const BACNET_SHED_LEVEL *src);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacapp_snprintf_shed_level(
|
||||
char *str, size_t str_len, const BACNET_SHED_LEVEL *value);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacnet_shed_level_from_ascii(BACNET_SHED_LEVEL *value, const char *argv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif
|
||||
@@ -124,6 +124,7 @@ list(APPEND testdirs
|
||||
bacnet/rpm
|
||||
bacnet/secure_connect
|
||||
bacnet/specialevent
|
||||
bacnet/shed_level
|
||||
bacnet/timer_value
|
||||
bacnet/timestamp
|
||||
bacnet/timesync
|
||||
|
||||
@@ -56,6 +56,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -52,6 +52,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/basic/sys/days.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/timesync.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/timesync.c
|
||||
|
||||
@@ -56,6 +56,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/timesync.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -52,6 +52,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -52,6 +52,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/basic/sys/days.c
|
||||
|
||||
@@ -56,6 +56,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -57,6 +57,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -57,6 +57,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -60,6 +60,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -57,6 +57,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -58,6 +58,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -59,6 +59,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -58,6 +58,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -58,6 +58,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -57,6 +57,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -102,6 +102,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/reject.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -63,6 +63,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/rp.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -61,6 +61,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -58,6 +58,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -59,6 +59,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/list_element.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -71,6 +71,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -56,6 +56,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -56,6 +56,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -58,6 +58,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -107,6 +107,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/property.c
|
||||
${SRC_DIR}/bacnet/reject.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/wp.c
|
||||
|
||||
@@ -52,6 +52,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -196,6 +196,7 @@ target_sources(${PROJECT_NAME} PRIVATE
|
||||
${SRC_DIR}/bacnet/special_event.c
|
||||
${SRC_DIR}/bacnet/channel_value.c
|
||||
${SRC_DIR}/bacnet/secure_connect.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -186,6 +186,7 @@ target_sources(${PROJECT_NAME} PRIVATE
|
||||
${SRC_DIR}/bacnet/special_event.c
|
||||
${SRC_DIR}/bacnet/channel_value.c
|
||||
${SRC_DIR}/bacnet/secure_connect.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -184,6 +184,7 @@ target_sources(${PROJECT_NAME} PRIVATE
|
||||
${SRC_DIR}/bacnet/special_event.c
|
||||
${SRC_DIR}/bacnet/channel_value.c
|
||||
${SRC_DIR}/bacnet/secure_connect.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -189,6 +189,7 @@ target_sources(${PROJECT_NAME} PRIVATE
|
||||
${SRC_DIR}/bacnet/special_event.c
|
||||
${SRC_DIR}/bacnet/channel_value.c
|
||||
${SRC_DIR}/bacnet/secure_connect.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -67,6 +67,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/bactimevalue.c
|
||||
${SRC_DIR}/bacnet/dailyschedule.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/memcopy.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/special_event.c
|
||||
${SRC_DIR}/bacnet/channel_value.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# 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
|
||||
BACAPP_ALL
|
||||
)
|
||||
|
||||
include_directories(
|
||||
${SRC_DIR}
|
||||
${TST_DIR}/ztest/include
|
||||
)
|
||||
|
||||
add_executable(${PROJECT_NAME}
|
||||
# File(s) under test
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
# Support files and stubs (pathname alphabetical)
|
||||
${SRC_DIR}/bacnet/bacdcode.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/basic/sys/days.c
|
||||
${SRC_DIR}/bacnet/datetime.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
# Test and test library files
|
||||
./src/main.c
|
||||
${ZTST_DIR}/ztest_mock.c
|
||||
${ZTST_DIR}/ztest.c
|
||||
)
|
||||
@@ -0,0 +1,111 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Unit test for BACnetShedLevel.
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date October 2024
|
||||
* @copyright SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <zephyr/ztest.h>
|
||||
#include "bacnet/bactext.h"
|
||||
#include "bacnet/bacstr.h"
|
||||
#include "bacnet/shed_level.h"
|
||||
|
||||
/**
|
||||
* @addtogroup bacnet_tests
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @brief Test the BACnetShedLevel complex data encode/decode */
|
||||
#if defined(CONFIG_ZTEST_NEW_API)
|
||||
ZTEST(BACnetShedLevel_Tests, test_BACnetShedLevel)
|
||||
#else
|
||||
static void test_BACnetShedLevel(void)
|
||||
#endif
|
||||
{
|
||||
uint8_t apdu[MAX_APDU];
|
||||
int apdu_len, test_len, null_len;
|
||||
bool status;
|
||||
BACNET_SHED_LEVEL *value;
|
||||
BACNET_SHED_LEVEL case_value[] = {
|
||||
{ .type = BACNET_SHED_TYPE_PERCENT, .value.percent = 75 },
|
||||
{ .type = BACNET_SHED_TYPE_LEVEL, .value.level = 12345 },
|
||||
{ .type = BACNET_SHED_TYPE_AMOUNT, .value.amount = 3.141592654f },
|
||||
};
|
||||
size_t i;
|
||||
BACNET_SHED_LEVEL test_value = { 0 };
|
||||
char buffer[64];
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(case_value); i++) {
|
||||
value = &case_value[i];
|
||||
null_len = bacnet_shed_level_encode(apdu, NULL);
|
||||
zassert_equal(
|
||||
null_len, 0, "value->type: %s null_len=%d",
|
||||
bactext_shed_level_type_name(value->type), null_len);
|
||||
null_len = bacnet_shed_level_encode(NULL, value);
|
||||
apdu_len = bacnet_shed_level_encode(apdu, value);
|
||||
zassert_equal(
|
||||
apdu_len, null_len, "value->type: %s len=%d null_len=%d",
|
||||
bactext_shed_level_type_name(value->type), apdu_len, null_len);
|
||||
null_len = bacnet_shed_level_decode(NULL, apdu_len, &test_value);
|
||||
zassert_equal(
|
||||
null_len, BACNET_STATUS_ERROR, "value->type: %s null_len=%d",
|
||||
bactext_shed_level_type_name(value->type), null_len);
|
||||
null_len = bacnet_shed_level_decode(apdu, apdu_len, NULL);
|
||||
zassert_equal(
|
||||
null_len, apdu_len, "value->type: %s null_len=%d apdu_len=%d",
|
||||
bactext_shed_level_type_name(value->type), null_len, apdu_len);
|
||||
test_len = bacnet_shed_level_decode(apdu, apdu_len, &test_value);
|
||||
zassert_not_equal(
|
||||
test_len, BACNET_STATUS_ERROR, "value->type: %s test_len=%d",
|
||||
bactext_shed_level_type_name(value->type), test_len);
|
||||
zassert_equal(
|
||||
test_len, apdu_len, "value->type: %s test_len=%d apdu_len=%d",
|
||||
bactext_shed_level_type_name(value->type), test_len, apdu_len);
|
||||
zassert_equal(
|
||||
value->type, test_value.type, "value->type: %s test_type=%s",
|
||||
bactext_shed_level_type_name(value->type),
|
||||
bactext_shed_level_type_name(test_value.type));
|
||||
status = bacnet_shed_level_same(value, &test_value);
|
||||
zassert_true(
|
||||
status, "decode: different: %s",
|
||||
bactext_shed_level_type_name(value->type));
|
||||
status = bacnet_shed_level_copy(&test_value, value);
|
||||
zassert_true(
|
||||
status, "copy: failed: %s",
|
||||
bactext_shed_level_type_name(value->type));
|
||||
status = bacnet_shed_level_same(value, &test_value);
|
||||
zassert_true(
|
||||
status, "copy: different: %s",
|
||||
bactext_shed_level_type_name(value->type));
|
||||
test_len = bacapp_snprintf_shed_level(buffer, sizeof(buffer), value);
|
||||
zassert_true(
|
||||
test_len > 0, "snprintf: failed: %s",
|
||||
bactext_shed_level_type_name(value->type));
|
||||
test_len = bacapp_snprintf_shed_level(buffer, 0, value);
|
||||
zassert_true(
|
||||
test_len > 0, "snprintf length only: failed: %s",
|
||||
bactext_shed_level_type_name(value->type));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#if defined(CONFIG_ZTEST_NEW_API)
|
||||
ZTEST_SUITE(BACnetShedLevel_Tests, NULL, NULL, NULL, NULL, NULL);
|
||||
#else
|
||||
void test_main(void)
|
||||
{
|
||||
ztest_test_suite(
|
||||
BACnetShedLevel_Tests, ztest_unit_test(test_BACnetShedLevel));
|
||||
|
||||
ztest_run_test_suite(BACnetShedLevel_Tests);
|
||||
}
|
||||
#endif
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/bactimevalue.c
|
||||
|
||||
@@ -47,6 +47,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
# Test and test library files
|
||||
./src/main.c
|
||||
${ZTST_DIR}/ztest_mock.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/weeklyschedule.c
|
||||
|
||||
@@ -55,6 +55,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/calendar_entry.c
|
||||
|
||||
@@ -53,6 +53,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
|
||||
@@ -54,6 +54,7 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/hostnport.c
|
||||
${SRC_DIR}/bacnet/lighting.c
|
||||
${SRC_DIR}/bacnet/proplist.c
|
||||
${SRC_DIR}/bacnet/shed_level.c
|
||||
${SRC_DIR}/bacnet/timer_value.c
|
||||
${SRC_DIR}/bacnet/timestamp.c
|
||||
${SRC_DIR}/bacnet/indtext.c
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user