Added a parameter to Device_Encode_Property_APDU so that it matched all the ther objects, which required all the demo and ports to modify their device and h_rp files.
This commit is contained in:
@@ -238,6 +238,7 @@ bool Device_Object_List_Identifier(
|
||||
/* return the length of the apdu encoded or -1 for error */
|
||||
int Device_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
@@ -254,6 +255,7 @@ int Device_Encode_Property_APDU(
|
||||
BACNET_TIME local_time;
|
||||
BACNET_DATE local_date;
|
||||
|
||||
object_instance = object_instance;
|
||||
/* FIXME: change the hardcoded names to suit your application */
|
||||
switch (property) {
|
||||
case PROP_OBJECT_IDENTIFIER:
|
||||
|
||||
@@ -66,7 +66,8 @@ int Encode_Property_APDU(
|
||||
case OBJECT_DEVICE:
|
||||
if (Device_Valid_Object_Instance_Number(object_instance)) {
|
||||
apdu_len =
|
||||
Device_Encode_Property_APDU(&apdu[0], property,
|
||||
Device_Encode_Property_APDU(&apdu[0],
|
||||
object_instance, property,
|
||||
array_index, error_class, error_code);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -164,6 +164,7 @@ bool Device_Object_List_Identifier(
|
||||
/* return the length of the apdu encoded or -1 for error */
|
||||
int Device_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
@@ -178,6 +179,7 @@ int Device_Encode_Property_APDU(
|
||||
uint32_t instance = 0;
|
||||
unsigned count = 0;
|
||||
|
||||
object_instance = object_instance;
|
||||
/* FIXME: change the hardcoded names to suit your application */
|
||||
switch (property) {
|
||||
case PROP_OBJECT_IDENTIFIER:
|
||||
|
||||
@@ -57,7 +57,9 @@ int Encode_Property_APDU(
|
||||
if (Device_Valid_Object_Instance_Number(rp_data->object_instance)) {
|
||||
apdu_len =
|
||||
Device_Encode_Property_APDU(&apdu[0],
|
||||
rp_data->object_property, rp_data->array_index,
|
||||
rp_data->object_instance,
|
||||
rp_data->object_property,
|
||||
rp_data->array_index,
|
||||
error_class, error_code);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -170,6 +170,7 @@ bool Device_Object_List_Identifier(
|
||||
/* return the length of the apdu encoded or -1 for error */
|
||||
int Device_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
@@ -184,6 +185,7 @@ int Device_Encode_Property_APDU(
|
||||
uint32_t instance = 0;
|
||||
unsigned count = 0;
|
||||
|
||||
object_instance = object_instance;
|
||||
/* FIXME: change the hardcoded names to suit your application */
|
||||
switch (property) {
|
||||
case PROP_OBJECT_IDENTIFIER:
|
||||
|
||||
@@ -61,7 +61,9 @@ int Encode_Property_APDU(
|
||||
if (Device_Valid_Object_Instance_Number(rp_data->object_instance)) {
|
||||
apdu_len =
|
||||
Device_Encode_Property_APDU(&apdu[0],
|
||||
rp_data->object_property, rp_data->array_index,
|
||||
rp_data->object_instance,
|
||||
rp_data->object_property,
|
||||
rp_data->array_index,
|
||||
error_class, error_code);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -308,6 +308,7 @@ bool Device_Object_List_Identifier(
|
||||
/* return the length of the apdu encoded or -1 for error */
|
||||
int Device_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
@@ -322,6 +323,7 @@ int Device_Encode_Property_APDU(
|
||||
uint32_t instance = 0;
|
||||
unsigned count = 0;
|
||||
|
||||
object_instance = object_instance;
|
||||
/* FIXME: change the hardcoded names to suit your application */
|
||||
switch (property) {
|
||||
case PROP_OBJECT_IDENTIFIER:
|
||||
|
||||
@@ -66,7 +66,8 @@ int Encode_Property_APDU(
|
||||
case OBJECT_DEVICE:
|
||||
if (Device_Valid_Object_Instance_Number(object_instance)) {
|
||||
apdu_len =
|
||||
Device_Encode_Property_APDU(&apdu[0], property,
|
||||
Device_Encode_Property_APDU(&apdu[0],
|
||||
object_instance, property,
|
||||
array_index, error_class, error_code);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -242,6 +242,7 @@ bool Device_Object_List_Identifier(
|
||||
/* return the length of the apdu encoded or -1 for error */
|
||||
int Device_Encode_Property_APDU(
|
||||
uint8_t * apdu,
|
||||
uint32_t object_instance,
|
||||
BACNET_PROPERTY_ID property,
|
||||
int32_t array_index,
|
||||
BACNET_ERROR_CLASS * error_class,
|
||||
@@ -261,6 +262,7 @@ int Device_Encode_Property_APDU(
|
||||
char string_buffer[24];
|
||||
int16_t TimeZone = 0;
|
||||
|
||||
object_instance = object_instance;
|
||||
/* FIXME: change the hardcoded names to suit your application */
|
||||
switch (property) {
|
||||
case PROP_OBJECT_IDENTIFIER:
|
||||
|
||||
@@ -93,6 +93,7 @@ void handler_read_property(
|
||||
if (Device_Valid_Object_Instance_Number(data.object_instance)) {
|
||||
len =
|
||||
Device_Encode_Property_APDU(&Temp_Buf[0],
|
||||
data.object_instance,
|
||||
data.object_property, data.array_index, &error_class,
|
||||
&error_code);
|
||||
if (len >= 0) {
|
||||
|
||||
Reference in New Issue
Block a user