Changed Device_Objects_Property_List() function to pass the object instance so that objects of the same type can have different optional or proprietary properties.

This commit is contained in:
skarg
2016-08-12 21:54:02 +00:00
parent a8ad8f4d5c
commit bec5836bbd
9 changed files with 20 additions and 3 deletions
+1 -1
View File
@@ -325,7 +325,7 @@ void handler_read_property_multiple(
} else {
special_object_property = rpmdata.object_property;
Device_Objects_Property_List(rpmdata.object_type,
&property_list);
rpmdata.object_instance, &property_list);
property_count =
RPM_Object_Property_Count(&property_list,
special_object_property);
+3
View File
@@ -521,10 +521,12 @@ rr_info_function Device_Objects_RR_Info(
*/
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;
@@ -1644,6 +1646,7 @@ int Device_Read_Property(
if ((int)rpdata->object_property == PROP_PROPERTY_LIST) {
Device_Objects_Property_List(
rpdata->object_type,
rpdata->object_instance,
&property_list);
apdu_len = property_list_encode(
rpdata,
+1
View File
@@ -250,6 +250,7 @@ extern "C" {
const int **pProprietary);
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList);
/* functions to support COV */
bool Device_Encode_Value_List(
+2
View File
@@ -178,10 +178,12 @@ rr_info_function Device_Objects_RR_Info(
*/
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;
+2
View File
@@ -282,10 +282,12 @@ bool Device_Write_Property(
/* for a given object type, returns the special property list */
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct my_object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;
@@ -226,10 +226,12 @@ static unsigned my_property_list_count(
/* for a given object type, returns the special property list */
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct my_object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;
+2
View File
@@ -220,10 +220,12 @@ static unsigned property_list_count(
*/
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct my_object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;
+2
View File
@@ -280,10 +280,12 @@ static unsigned property_list_count(
/* for a given object type, returns the special property list */
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct my_object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;
+5 -2
View File
@@ -71,7 +71,7 @@ static struct my_object_functions {
NULL, NULL, NULL}, {
OBJECT_ANALOG_INPUT, Analog_Input_Init, Analog_Input_Count,
Analog_Input_Index_To_Instance, Analog_Input_Valid_Instance,
Analog_Input_Object_Name, Analog_Input_Read_Property,
Analog_Input_Object_Name, Analog_Input_Read_Property,
Analog_Input_Write_Property, Analog_Input_Property_Lists,
NULL, NULL, NULL}, {
MAX_BACNET_OBJECT_TYPE, NULL, NULL, NULL, NULL, NULL, NULL, NULL}
@@ -192,11 +192,14 @@ bool Device_Write_Property(BACNET_WRITE_PROPERTY_DATA * wp_data)
}
/* for a given object type, returns the special property list */
void Device_Objects_Property_List(BACNET_OBJECT_TYPE object_type,
void Device_Objects_Property_List(
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
struct special_property_list_t *pPropertyList)
{
struct my_object_functions *pObject = NULL;
(void)object_instance;
pPropertyList->Required.pList = NULL;
pPropertyList->Optional.pList = NULL;
pPropertyList->Proprietary.pList = NULL;