Added prototype for device object property list member to use for storing device data storing. (#735)
This commit is contained in:
@@ -463,34 +463,6 @@ void Device_Property_Lists(
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Determine if the object property is a member of this object instance
|
||||
* @param object_instance - object-instance number of the object
|
||||
* @param object_property - object-property to be checked
|
||||
* @return true if the property is a member of this object instance
|
||||
*/
|
||||
static bool Property_List_Member(
|
||||
uint32_t object_instance, int object_property)
|
||||
{
|
||||
bool found = false;
|
||||
const int *pRequired = NULL;
|
||||
const int *pOptional = NULL;
|
||||
const int *pProprietary = NULL;
|
||||
|
||||
(void)object_instance;
|
||||
Device_Property_Lists(
|
||||
&pRequired, &pOptional, &pProprietary);
|
||||
found = property_list_member(pRequired, object_property);
|
||||
if (!found) {
|
||||
found = property_list_member(pOptional, object_property);
|
||||
}
|
||||
if (!found) {
|
||||
found = property_list_member(pProprietary, object_property);
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Determine if the object property is a member of this object instance
|
||||
* @param object_type - object type of the object
|
||||
@@ -498,9 +470,10 @@ static bool Property_List_Member(
|
||||
* @param object_property - object-property to be checked
|
||||
* @return true if the property is a member of this object instance
|
||||
*/
|
||||
bool Device_Objects_Property_List_Member(BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance,
|
||||
int object_property)
|
||||
bool Device_Objects_Property_List_Member(
|
||||
BACNET_OBJECT_TYPE object_type,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID object_property)
|
||||
{
|
||||
bool found = false;
|
||||
struct special_property_list_t property_list = { 0 };
|
||||
@@ -1304,8 +1277,11 @@ bool Device_Write_Property_Local(BACNET_WRITE_PROPERTY_DATA *wp_data)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (Property_List_Member(
|
||||
wp_data->object_instance, wp_data->object_property)) {
|
||||
if (property_lists_member(
|
||||
Device_Properties_Required,
|
||||
Device_Properties_Optional,
|
||||
Device_Properties_Proprietary,
|
||||
wp_data->object_property)) {
|
||||
wp_data->error_class = ERROR_CLASS_PROPERTY;
|
||||
wp_data->error_code = ERROR_CODE_WRITE_ACCESS_DENIED;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user