Un-refactored property-list module to lower resource requirements on small devices.
This commit is contained in:
@@ -153,6 +153,14 @@ int bacapp_encode_application_data(
|
||||
lighting_command_encode(&apdu[0],
|
||||
&value->type.Lighting_Command);
|
||||
break;
|
||||
#endif
|
||||
#if defined (BACAPP_DEVICE_OBJECT_PROP_REF)
|
||||
case BACNET_APPLICATION_TAG_DEVICE_OBJECT_PROPERTY_REFERENCE:
|
||||
/* BACnetDeviceObjectPropertyReference */
|
||||
apdu_len =
|
||||
bacapp_encode_device_obj_property_ref(&apdu[0],
|
||||
&value->type.Device_Object_Property_Reference);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
@@ -676,9 +684,9 @@ BACNET_APPLICATION_TAG bacapp_context_tag_type(
|
||||
case 1:
|
||||
/* 2015.08.22 EKH 135-2012 pg 708
|
||||
todo - Context 1 in Recipient list would be a BACnetAddress, not coded yet...
|
||||
BACnetRecipient::= CHOICE {
|
||||
device [0] BACnetObjectIdentifier,
|
||||
address [1] BACnetAddress
|
||||
BACnetRecipient::= CHOICE {
|
||||
device [0] BACnetObjectIdentifier,
|
||||
address [1] BACnetAddress
|
||||
}
|
||||
*/
|
||||
break;
|
||||
|
||||
+27
-21
@@ -40,6 +40,11 @@
|
||||
#include "rp.h"
|
||||
#include "proplist.h"
|
||||
|
||||
#ifndef BACNET_PROPERTY_LISTS
|
||||
#define BACNET_PROPERTY_LISTS 0
|
||||
#endif
|
||||
|
||||
#if BACNET_PROPERTY_LISTS
|
||||
/** @file proplist.c List of Required and Optional object properties */
|
||||
/* note: the PROP_PROPERTY_LIST is NOT included in these lists, on purpose */
|
||||
|
||||
@@ -830,27 +835,6 @@ static const int Integer_Value_Properties_Optional[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
/**
|
||||
* Function that returns the number of BACnet object properties in a list
|
||||
*
|
||||
* @param pList - array of type 'int' that is a list of BACnet object
|
||||
* properties, terminated by a '-1' value.
|
||||
*/
|
||||
unsigned property_list_count(
|
||||
const int *pList)
|
||||
{
|
||||
unsigned property_count = 0;
|
||||
|
||||
if (pList) {
|
||||
while (*pList != -1) {
|
||||
property_count++;
|
||||
pList++;
|
||||
}
|
||||
}
|
||||
|
||||
return property_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that returns the list of all Optional properties
|
||||
* of known standard objects.
|
||||
@@ -1141,6 +1125,28 @@ unsigned property_list_special_count(
|
||||
|
||||
return count;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Function that returns the number of BACnet object properties in a list
|
||||
*
|
||||
* @param pList - array of type 'int' that is a list of BACnet object
|
||||
* properties, terminated by a '-1' value.
|
||||
*/
|
||||
unsigned property_list_count(
|
||||
const int *pList)
|
||||
{
|
||||
unsigned property_count = 0;
|
||||
|
||||
if (pList) {
|
||||
while (*pList != -1) {
|
||||
property_count++;
|
||||
pList++;
|
||||
}
|
||||
}
|
||||
|
||||
return property_count;
|
||||
}
|
||||
|
||||
/**
|
||||
* ReadProperty handler for this property. For the given ReadProperty
|
||||
|
||||
Reference in New Issue
Block a user