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:
@@ -36,18 +36,18 @@ static uint8_t Out_Of_Service[MAX_BINARY_OUTPUTS];
|
||||
static uint8_t Polarity[MAX_BINARY_OUTPUTS];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Binary_Output_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
static const int32_t Binary_Output_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, PROP_PRIORITY_ARRAY,
|
||||
PROP_RELINQUISH_DEFAULT, -1 };
|
||||
|
||||
static const int Binary_Output_Properties_Optional[] = { PROP_ACTIVE_TEXT,
|
||||
static const int32_t Binary_Output_Properties_Optional[] = { PROP_ACTIVE_TEXT,
|
||||
PROP_INACTIVE_TEXT, -1 };
|
||||
|
||||
static const int Binary_Output_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Binary_Output_Properties_Proprietary[] = { -1 };
|
||||
|
||||
void Binary_Output_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_Output_Properties_Required;
|
||||
|
||||
@@ -69,7 +69,7 @@ static const char *Reinit_Password = "stm32-challenge";
|
||||
static const char *BACnet_Version = BACNET_VERSION_TEXT;
|
||||
|
||||
/* 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,
|
||||
@@ -79,10 +79,10 @@ static const int Device_Properties_Required[] = { PROP_OBJECT_IDENTIFIER,
|
||||
PROP_APDU_TIMEOUT, PROP_NUMBER_OF_APDU_RETRIES, 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, PROP_MAX_MASTER, PROP_MAX_INFO_FRAMES, -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)
|
||||
@@ -293,7 +293,7 @@ bool Device_Objects_Property_List_Member(
|
||||
* @ingroup ObjIntf
|
||||
*/
|
||||
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