Added check for zero length buffer size in primitive decoders that returns zero to enable simpler complex value optional element decoding. (#876)
This commit is contained in:
@@ -43,7 +43,7 @@ typedef struct BACnetDeviceObjectReference {
|
||||
* -- if omitted with an array the entire array is referenced
|
||||
* }
|
||||
*/
|
||||
typedef struct BACnet_Object_Property_Reference {
|
||||
typedef struct BACnetObjectPropertyReference {
|
||||
/* note: use type = OBJECT_NONE for unused reference */
|
||||
BACNET_OBJECT_ID object_identifier;
|
||||
BACNET_PROPERTY_ID property_identifier;
|
||||
@@ -51,6 +51,19 @@ typedef struct BACnet_Object_Property_Reference {
|
||||
BACNET_ARRAY_INDEX property_array_index;
|
||||
} BACNET_OBJECT_PROPERTY_REFERENCE;
|
||||
|
||||
/**
|
||||
* BACnetPropertyReference ::= SEQUENCE {
|
||||
* propertyIdentifier [0] BACnetPropertyIdentifier,
|
||||
* propertyArrayIndex [1] Unsigned OPTIONAL
|
||||
* -- used only with array datatype
|
||||
* -- if omitted with an array the entire array is referenced
|
||||
* }
|
||||
*/
|
||||
struct BACnetPropertyReference {
|
||||
BACNET_PROPERTY_ID property_identifier;
|
||||
BACNET_ARRAY_INDEX property_array_index;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
@@ -161,6 +174,30 @@ bool bacnet_object_property_reference_same(
|
||||
const BACNET_OBJECT_PROPERTY_REFERENCE *value1,
|
||||
const BACNET_OBJECT_PROPERTY_REFERENCE *value2);
|
||||
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_property_reference_encode(
|
||||
uint8_t *apdu, const struct BACnetPropertyReference *reference);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_property_reference_context_encode(
|
||||
uint8_t *apdu,
|
||||
uint8_t tag_number,
|
||||
const struct BACnetPropertyReference *reference);
|
||||
BACNET_STACK_EXPORT
|
||||
bool bacnet_property_reference_same(
|
||||
const struct BACnetPropertyReference *value1,
|
||||
const struct BACnetPropertyReference *value2);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_property_reference_decode(
|
||||
const uint8_t *apdu,
|
||||
uint32_t apdu_size,
|
||||
struct BACnetPropertyReference *value);
|
||||
BACNET_STACK_EXPORT
|
||||
int bacnet_property_reference_context_decode(
|
||||
const uint8_t *apdu,
|
||||
uint32_t apdu_size,
|
||||
uint8_t tag_number,
|
||||
struct BACnetPropertyReference *value);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
Reference in New Issue
Block a user