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:
@@ -325,7 +325,7 @@ void handler_read_property_multiple(
|
|||||||
} else {
|
} else {
|
||||||
special_object_property = rpmdata.object_property;
|
special_object_property = rpmdata.object_property;
|
||||||
Device_Objects_Property_List(rpmdata.object_type,
|
Device_Objects_Property_List(rpmdata.object_type,
|
||||||
&property_list);
|
rpmdata.object_instance, &property_list);
|
||||||
property_count =
|
property_count =
|
||||||
RPM_Object_Property_Count(&property_list,
|
RPM_Object_Property_Count(&property_list,
|
||||||
special_object_property);
|
special_object_property);
|
||||||
|
|||||||
@@ -521,10 +521,12 @@ rr_info_function Device_Objects_RR_Info(
|
|||||||
*/
|
*/
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList)
|
struct special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct object_functions *pObject = NULL;
|
struct object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.pList = NULL;
|
pPropertyList->Proprietary.pList = NULL;
|
||||||
@@ -1644,6 +1646,7 @@ int Device_Read_Property(
|
|||||||
if ((int)rpdata->object_property == PROP_PROPERTY_LIST) {
|
if ((int)rpdata->object_property == PROP_PROPERTY_LIST) {
|
||||||
Device_Objects_Property_List(
|
Device_Objects_Property_List(
|
||||||
rpdata->object_type,
|
rpdata->object_type,
|
||||||
|
rpdata->object_instance,
|
||||||
&property_list);
|
&property_list);
|
||||||
apdu_len = property_list_encode(
|
apdu_len = property_list_encode(
|
||||||
rpdata,
|
rpdata,
|
||||||
|
|||||||
@@ -250,6 +250,7 @@ extern "C" {
|
|||||||
const int **pProprietary);
|
const int **pProprietary);
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList);
|
struct special_property_list_t *pPropertyList);
|
||||||
/* functions to support COV */
|
/* functions to support COV */
|
||||||
bool Device_Encode_Value_List(
|
bool Device_Encode_Value_List(
|
||||||
|
|||||||
@@ -178,10 +178,12 @@ rr_info_function Device_Objects_RR_Info(
|
|||||||
*/
|
*/
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList)
|
struct special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct object_functions *pObject = NULL;
|
struct object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.pList = NULL;
|
pPropertyList->Proprietary.pList = NULL;
|
||||||
|
|||||||
@@ -282,10 +282,12 @@ bool Device_Write_Property(
|
|||||||
/* for a given object type, returns the special property list */
|
/* for a given object type, returns the special property list */
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList)
|
struct special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.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 */
|
/* for a given object type, returns the special property list */
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList)
|
struct special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.pList = NULL;
|
pPropertyList->Proprietary.pList = NULL;
|
||||||
|
|||||||
@@ -220,10 +220,12 @@ static unsigned property_list_count(
|
|||||||
*/
|
*/
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList)
|
struct special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.pList = NULL;
|
pPropertyList->Proprietary.pList = NULL;
|
||||||
|
|||||||
@@ -280,10 +280,12 @@ static unsigned property_list_count(
|
|||||||
/* for a given object type, returns the special property list */
|
/* for a given object type, returns the special property list */
|
||||||
void Device_Objects_Property_List(
|
void Device_Objects_Property_List(
|
||||||
BACNET_OBJECT_TYPE object_type,
|
BACNET_OBJECT_TYPE object_type,
|
||||||
|
uint32_t object_instance,
|
||||||
struct special_property_list_t *pPropertyList)
|
struct special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.pList = NULL;
|
pPropertyList->Proprietary.pList = NULL;
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ static struct my_object_functions {
|
|||||||
NULL, NULL, NULL}, {
|
NULL, NULL, NULL}, {
|
||||||
OBJECT_ANALOG_INPUT, Analog_Input_Init, Analog_Input_Count,
|
OBJECT_ANALOG_INPUT, Analog_Input_Init, Analog_Input_Count,
|
||||||
Analog_Input_Index_To_Instance, Analog_Input_Valid_Instance,
|
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,
|
Analog_Input_Write_Property, Analog_Input_Property_Lists,
|
||||||
NULL, NULL, NULL}, {
|
NULL, NULL, NULL}, {
|
||||||
MAX_BACNET_OBJECT_TYPE, NULL, NULL, NULL, NULL, 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 */
|
/* 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 special_property_list_t *pPropertyList)
|
||||||
{
|
{
|
||||||
struct my_object_functions *pObject = NULL;
|
struct my_object_functions *pObject = NULL;
|
||||||
|
|
||||||
|
(void)object_instance;
|
||||||
pPropertyList->Required.pList = NULL;
|
pPropertyList->Required.pList = NULL;
|
||||||
pPropertyList->Optional.pList = NULL;
|
pPropertyList->Optional.pList = NULL;
|
||||||
pPropertyList->Proprietary.pList = NULL;
|
pPropertyList->Proprietary.pList = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user