Convert the property list values into int32_t to support the larger property values when an int is 8-bit or 16-bit. (#1145)
This commit is contained in:
@@ -28,16 +28,16 @@
|
||||
static float Present_Value[MAX_ANALOG_INPUTS];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Analog_Input_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Analog_Input_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME, PROP_OBJECT_TYPE, PROP_PRESENT_VALUE, PROP_STATUS_FLAGS,
|
||||
PROP_EVENT_STATE, PROP_OUT_OF_SERVICE, PROP_UNITS, -1 };
|
||||
|
||||
static const int Analog_Input_Properties_Optional[] = { PROP_DESCRIPTION, -1 };
|
||||
static const int32_t Analog_Input_Properties_Optional[] = { PROP_DESCRIPTION, -1 };
|
||||
|
||||
static const int Analog_Input_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Analog_Input_Properties_Proprietary[] = { -1 };
|
||||
|
||||
void Analog_Input_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
const int32_t **pRequired, const int32_t **pOptional, const int32_t **pProprietary)
|
||||
{
|
||||
if (pRequired)
|
||||
*pRequired = Analog_Input_Properties_Required;
|
||||
|
||||
@@ -38,21 +38,21 @@
|
||||
static uint8_t Present_Value[MAX_ANALOG_VALUES];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Analog_Value_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Analog_Value_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME, PROP_OBJECT_TYPE, PROP_PRESENT_VALUE, PROP_STATUS_FLAGS,
|
||||
PROP_EVENT_STATE, PROP_OUT_OF_SERVICE, PROP_UNITS, -1 };
|
||||
|
||||
static const int Analog_Value_Properties_Optional[] = { PROP_DESCRIPTION,
|
||||
static const int32_t Analog_Value_Properties_Optional[] = { PROP_DESCRIPTION,
|
||||
#if 0
|
||||
PROP_PRIORITY_ARRAY,
|
||||
PROP_RELINQUISH_DEFAULT,
|
||||
#endif
|
||||
-1 };
|
||||
|
||||
static const int Analog_Value_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Analog_Value_Properties_Proprietary[] = { -1 };
|
||||
|
||||
void Analog_Value_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
const int32_t **pRequired, const int32_t **pOptional, const int32_t **pProprietary)
|
||||
{
|
||||
if (pRequired)
|
||||
*pRequired = Analog_Value_Properties_Required;
|
||||
|
||||
@@ -27,16 +27,16 @@
|
||||
static BACNET_BINARY_PV Present_Value[MAX_BINARY_INPUTS];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Binary_Input_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Binary_Input_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME, PROP_OBJECT_TYPE, PROP_PRESENT_VALUE, PROP_STATUS_FLAGS,
|
||||
PROP_EVENT_STATE, PROP_OUT_OF_SERVICE, PROP_POLARITY, -1 };
|
||||
|
||||
static const int Binary_Input_Properties_Optional[] = { PROP_DESCRIPTION, -1 };
|
||||
static const int32_t Binary_Input_Properties_Optional[] = { PROP_DESCRIPTION, -1 };
|
||||
|
||||
static const int Binary_Input_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Binary_Input_Properties_Proprietary[] = { -1 };
|
||||
|
||||
void Binary_Input_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
const int32_t **pRequired, const int32_t **pOptional, const int32_t **pProprietary)
|
||||
{
|
||||
if (pRequired) {
|
||||
*pRequired = Binary_Input_Properties_Required;
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
static BACNET_BINARY_PV Present_Value[MAX_BINARY_VALUES];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Binary_Value_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Binary_Value_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME, PROP_OBJECT_TYPE, PROP_PRESENT_VALUE, PROP_STATUS_FLAGS,
|
||||
PROP_EVENT_STATE, PROP_OUT_OF_SERVICE, -1 };
|
||||
|
||||
static const int Binary_Value_Properties_Optional[] = { PROP_DESCRIPTION, -1 };
|
||||
static const int32_t Binary_Value_Properties_Optional[] = { PROP_DESCRIPTION, -1 };
|
||||
|
||||
static const int Binary_Value_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Binary_Value_Properties_Proprietary[] = { -1 };
|
||||
|
||||
void Binary_Value_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
const int32_t **pRequired, const int32_t **pOptional, const int32_t **pProprietary)
|
||||
{
|
||||
if (pRequired)
|
||||
*pRequired = Binary_Value_Properties_Required;
|
||||
|
||||
@@ -87,7 +87,7 @@ static BACNET_REINITIALIZED_STATE Reinitialize_State = BACNET_REINIT_IDLE;
|
||||
static const char *Reinit_Password = "rehmite";
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Device_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Device_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME, PROP_OBJECT_TYPE, PROP_SYSTEM_STATUS, PROP_VENDOR_NAME,
|
||||
PROP_VENDOR_IDENTIFIER, PROP_MODEL_NAME, PROP_FIRMWARE_REVISION,
|
||||
PROP_APPLICATION_SOFTWARE_VERSION, PROP_PROTOCOL_VERSION,
|
||||
@@ -98,10 +98,10 @@ static const int Device_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_MAX_INFO_FRAMES, PROP_DEVICE_ADDRESS_BINDING, PROP_DATABASE_REVISION,
|
||||
-1 };
|
||||
|
||||
static const int Device_Properties_Optional[] = { PROP_DESCRIPTION,
|
||||
static const int32_t Device_Properties_Optional[] = { PROP_DESCRIPTION,
|
||||
PROP_LOCATION, -1 };
|
||||
|
||||
static const int Device_Properties_Proprietary[] = { 9600, -1 };
|
||||
static const int32_t Device_Properties_Proprietary[] = { 9600, -1 };
|
||||
|
||||
static struct my_object_functions *Device_Objects_Find_Functions(
|
||||
BACNET_OBJECT_TYPE Object_Type)
|
||||
@@ -371,7 +371,7 @@ bool Device_Objects_Property_List_Member(
|
||||
}
|
||||
|
||||
void Device_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
const int32_t **pRequired, const int32_t **pOptional, const int32_t **pProprietary)
|
||||
{
|
||||
if (pRequired)
|
||||
*pRequired = Device_Properties_Required;
|
||||
|
||||
@@ -55,7 +55,7 @@ struct object_data Object_List[BACNET_NETWORK_PORTS_MAX];
|
||||
static uint32_t Link_Speeds[] = {9600, 19200, 38400, 57600, 76800, 115200 };
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Network_Port_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Network_Port_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME, PROP_OBJECT_TYPE, PROP_STATUS_FLAGS, PROP_RELIABILITY,
|
||||
PROP_OUT_OF_SERVICE, PROP_NETWORK_TYPE, PROP_PROTOCOL_LEVEL,
|
||||
PROP_CHANGES_PENDING,
|
||||
@@ -67,7 +67,7 @@ static const int Network_Port_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
#endif
|
||||
-1 };
|
||||
|
||||
static const int Network_Port_Properties_Optional[] = { PROP_MAC_ADDRESS,
|
||||
static const int32_t Network_Port_Properties_Optional[] = { PROP_MAC_ADDRESS,
|
||||
PROP_MAX_MASTER, PROP_MAX_INFO_FRAMES, PROP_LINK_SPEEDS,
|
||||
#if (BACNET_PROTOCOL_REVISION >= 24)
|
||||
PROP_APDU_LENGTH,
|
||||
@@ -77,7 +77,7 @@ static const int Network_Port_Properties_Optional[] = { PROP_MAC_ADDRESS,
|
||||
#endif
|
||||
-1 };
|
||||
|
||||
static const int Network_Port_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Network_Port_Properties_Proprietary[] = { -1 };
|
||||
|
||||
/**
|
||||
* Returns the list of required, optional, and proprietary properties.
|
||||
@@ -92,9 +92,9 @@ static const int Network_Port_Properties_Proprietary[] = { -1 };
|
||||
* BACnet proprietary properties for this object.
|
||||
*/
|
||||
void Network_Port_Property_List(uint32_t object_instance,
|
||||
const int **pRequired,
|
||||
const int **pOptional,
|
||||
const int **pProprietary)
|
||||
const int32_t **pRequired,
|
||||
const int32_t **pOptional,
|
||||
const int32_t **pProprietary)
|
||||
{
|
||||
(void)object_instance;
|
||||
if (pRequired) {
|
||||
@@ -122,7 +122,7 @@ void Network_Port_Property_List(uint32_t object_instance,
|
||||
* BACnet proprietary properties for this object.
|
||||
*/
|
||||
void Network_Port_Property_Lists(
|
||||
const int **pRequired, const int **pOptional, const int **pProprietary)
|
||||
const int32_t **pRequired, const int32_t **pOptional, const int32_t **pProprietary)
|
||||
{
|
||||
Network_Port_Property_List(
|
||||
BACNET_NETWORK_PORT_INSTANCE, pRequired, pOptional, pProprietary);
|
||||
|
||||
Reference in New Issue
Block a user