Converted all the BACnet-array-index variables from int32 to uint32 as they were intended.

This commit is contained in:
skarg
2011-08-23 20:11:42 +00:00
parent e0b5b5b164
commit f19f2c29d9
27 changed files with 70 additions and 81 deletions
+3 -3
View File
@@ -98,7 +98,7 @@ typedef struct BACnet_Access_Error {
struct BACnet_Property_Reference;
typedef struct BACnet_Property_Reference {
BACNET_PROPERTY_ID propertyIdentifier;
int32_t propertyArrayIndex; /* optional */
uint32_t propertyArrayIndex; /* optional */
/* either value or error, but not both.
Use NULL value to indicate error */
BACNET_APPLICATION_DATA_VALUE *value;
@@ -110,7 +110,7 @@ typedef struct BACnet_Property_Reference {
struct BACnet_Property_Value;
typedef struct BACnet_Property_Value {
BACNET_PROPERTY_ID propertyIdentifier;
int32_t propertyArrayIndex;
uint32_t propertyArrayIndex;
BACNET_APPLICATION_DATA_VALUE value;
uint8_t priority;
/* simple linked list */
@@ -123,7 +123,7 @@ typedef struct BACnet_Object_Property_Value {
BACNET_OBJECT_TYPE object_type;
uint32_t object_instance;
BACNET_PROPERTY_ID object_property;
int32_t array_index;
uint32_t array_index;
BACNET_APPLICATION_DATA_VALUE *value;
} BACNET_OBJECT_PROPERTY_VALUE;
+1 -1
View File
@@ -56,7 +56,7 @@
/* large BACnet Object Type */
#define BACNET_MAX_OBJECT (0x3FF)
/* Array index 0=size of array, n=array element n, MAX=all array elements */
#define BACNET_ARRAY_ALL (~(unsigned int)0)
#define BACNET_ARRAY_ALL (~0UL)
/* Priority Array for commandable objects */
#define BACNET_NO_PRIORITY 0
#define BACNET_MIN_PRIORITY 1
+3 -3
View File
@@ -119,7 +119,7 @@ extern "C" {
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
BACNET_PROPERTY_ID object_property,
int32_t array_index);
uint32_t array_index);
uint8_t Send_Read_Property_Multiple_Request(
uint8_t * pdu,
size_t max_pdu,
@@ -134,7 +134,7 @@ extern "C" {
BACNET_PROPERTY_ID object_property,
BACNET_APPLICATION_DATA_VALUE * object_value,
uint8_t priority,
int32_t array_index);
uint32_t array_index);
uint8_t Send_Write_Property_Request_Data(
uint32_t device_id,
BACNET_OBJECT_TYPE object_type,
@@ -143,7 +143,7 @@ extern "C" {
uint8_t * application_data,
int application_data_len,
uint8_t priority,
int32_t array_index);
uint32_t array_index);
/* returns the invoke ID for confirmed request, or 0 if failed */
uint8_t Send_Reinitialize_Device_Request(
-12
View File
@@ -209,18 +209,6 @@ extern "C" {
void rpm_ack_print_data(
BACNET_READ_ACCESS_DATA * rpm_data);
/* Encodes the property APDU and returns the length,
or sets the error, and returns -1 */
/* resides in h_rp.c */
int Encode_Property_APDU(
uint8_t * apdu,
BACNET_OBJECT_TYPE object_type,
uint32_t object_instance,
BACNET_PROPERTY_ID property,
int32_t array_index,
BACNET_ERROR_CLASS * error_class,
BACNET_ERROR_CODE * error_code);
void handler_cov_subscribe(
uint8_t * service_request,
uint16_t service_len,
+6 -6
View File
@@ -43,7 +43,7 @@ typedef struct BACnet_Read_Property_Data {
BACNET_OBJECT_TYPE object_type;
uint32_t object_instance;
BACNET_PROPERTY_ID object_property;
int32_t array_index;
uint32_t array_index;
uint8_t *application_data;
int application_data_len;
BACNET_ERROR_CLASS error_class;
@@ -55,7 +55,7 @@ struct BACnet_Read_Access_Data;
/** Reads one property for this object type of a given instance.
* A function template; @see device.c for assignment to object types.
* @ingroup ObjHelpers
* @ingroup ObjHelpers
*
* @param rp_data [in] Pointer to the BACnet_Read_Property_Data structure,
* which is packed with the information from the RP request.
@@ -132,14 +132,14 @@ extern "C" {
}
#endif /* __cplusplus */
/** @defgroup DataShare Data Sharing BIBBs
* These BIBBs prescribe the BACnet capabilities required to interoperably
* perform the data sharing functions enumerated in 22.2.1.1 for the BACnet
* These BIBBs prescribe the BACnet capabilities required to interoperably
* perform the data sharing functions enumerated in 22.2.1.1 for the BACnet
* devices defined therein.
*//** @defgroup DSRP Data Sharing -Read Property Service (DS-RP)
* @ingroup DataShare
* 15.5 ReadProperty Service <br>
* The ReadProperty service is used by a client BACnet-user to request the
* value of one property of one BACnet Object. This service allows read access
* The ReadProperty service is used by a client BACnet-user to request the
* value of one property of one BACnet Object. This service allows read access
* to any property of any object, whether a BACnet-defined object or not.
*/
#endif
+13 -13
View File
@@ -41,7 +41,7 @@
#include "bacapp.h"
/*
* Bundle together commonly used data items for convenience when calling
* Bundle together commonly used data items for convenience when calling
* rpm helper functions.
*/
@@ -49,7 +49,7 @@ typedef struct BACnet_RPM_Data {
BACNET_OBJECT_TYPE object_type;
uint32_t object_instance;
BACNET_PROPERTY_ID object_property;
int32_t array_index;
uint32_t array_index;
BACNET_ERROR_CLASS error_class;
BACNET_ERROR_CODE error_code;
} BACNET_RPM_DATA;
@@ -66,7 +66,7 @@ typedef struct BACnet_Read_Access_Data {
/** Fetches the lists of properties (array of BACNET_PROPERTY_ID's) for this
* object type, grouped by Required, Optional, and Proprietary.
* A function template; @see device.c for assignment to object types.
* @ingroup ObjHelpers
* @ingroup ObjHelpers
*
* @param pRequired [out] Pointer reference for the list of Required properties.
* @param pOptional [out] Pointer reference for the list of Optional properties.
@@ -118,7 +118,7 @@ extern "C" {
int rpm_encode_apdu_object_property(
uint8_t * apdu,
BACNET_PROPERTY_ID object_property,
int32_t array_index);
uint32_t array_index);
int rpm_encode_apdu_object_end(
uint8_t * apdu);
@@ -158,7 +158,7 @@ extern "C" {
int rpm_ack_encode_apdu_object_property(
uint8_t * apdu,
BACNET_PROPERTY_ID object_property,
int32_t array_index);
uint32_t array_index);
int rpm_ack_encode_apdu_object_property_value(
uint8_t * apdu,
@@ -186,7 +186,7 @@ extern "C" {
uint8_t * apdu,
unsigned apdu_len,
BACNET_PROPERTY_ID * object_property,
int32_t * array_index);
uint32_t * array_index);
#ifdef TEST
#include "ctest.h"
int rpm_decode_apdu(
@@ -215,13 +215,13 @@ extern "C" {
/** @defgroup DSRPM Data Sharing -Read Property Multiple Service (DS-RPM)
* @ingroup DataShare
* 15.7 ReadPropertyMultiple Service <br>
* The ReadPropertyMultiple service is used by a client BACnet-user to request
* the values of one or more specified properties of one or more BACnet Objects.
* This service allows read access to any property of any object, whether a
* BACnet-defined object or not. The user may read a single property of a single
* object, a list of properties of a single object, or any number of properties
* of any number of objects.
* A 'Read Access Specification' with the property identifier ALL can be used to
* The ReadPropertyMultiple service is used by a client BACnet-user to request
* the values of one or more specified properties of one or more BACnet Objects.
* This service allows read access to any property of any object, whether a
* BACnet-defined object or not. The user may read a single property of a single
* object, a list of properties of a single object, or any number of properties
* of any number of objects.
* A 'Read Access Specification' with the property identifier ALL can be used to
* learn the implemented properties of an object along with their values.
*/
#endif
+9 -9
View File
@@ -47,7 +47,7 @@ typedef struct BACnet_Write_Property_Data {
BACNET_OBJECT_TYPE object_type;
uint32_t object_instance;
BACNET_PROPERTY_ID object_property;
int32_t array_index; /* use BACNET_ARRAY_ALL when not setting */
uint32_t array_index; /* use BACNET_ARRAY_ALL when not setting */
uint8_t application_data[MAX_APDU];
int application_data_len;
uint8_t priority; /* use BACNET_NO_PRIORITY if no priority */
@@ -58,7 +58,7 @@ typedef struct BACnet_Write_Property_Data {
/** Attempts to write a new value to one property for this object type
* of a given instance.
* A function template; @see device.c for assignment to object types.
* @ingroup ObjHelpers
* @ingroup ObjHelpers
*
* @param wp_data [in] Pointer to the BACnet_Write_Property_Data structure,
* which is packed with the information from the WP request.
@@ -105,12 +105,12 @@ extern "C" {
/** @defgroup DSWP Data Sharing - Write Property Service (DS-WP)
* @ingroup DataShare
* 15.9 WriteProperty Service <br>
* The WriteProperty service is used by a client BACnet-user to modify the
* value of a single specified property of a BACnet object. This service
* potentially allows write access to any property of any object, whether a
* BACnet-defined object or not. Some implementors may wish to restrict write
* access to certain properties of certain objects. In such cases, an attempt
* to modify a restricted property shall result in the return of an error of
* 'Error Class' PROPERTY and 'Error Code' WRITE_ACCESS_DENIED.
* The WriteProperty service is used by a client BACnet-user to modify the
* value of a single specified property of a BACnet object. This service
* potentially allows write access to any property of any object, whether a
* BACnet-defined object or not. Some implementors may wish to restrict write
* access to certain properties of certain objects. In such cases, an attempt
* to modify a restricted property shall result in the return of an error of
* 'Error Class' PROPERTY and 'Error Code' WRITE_ACCESS_DENIED.
*/
#endif