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:
@@ -127,7 +127,7 @@ static const char *BACnet_Version = BACNET_VERSION_TEXT;
|
||||
static uint8_t Device_UUID[16];
|
||||
|
||||
/* These three arrays are used by the ReadPropertyMultiple handler */
|
||||
static const int Device_Properties_Required[] = {
|
||||
static const int32_t Device_Properties_Required[] = {
|
||||
/* required properties for this object */
|
||||
PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME,
|
||||
@@ -152,7 +152,7 @@ static const int Device_Properties_Required[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Device_Properties_Optional[] = {
|
||||
static const int32_t Device_Properties_Optional[] = {
|
||||
/* optional properties for this object */
|
||||
PROP_DESCRIPTION,
|
||||
PROP_LOCATION,
|
||||
@@ -166,7 +166,7 @@ static const int Device_Properties_Optional[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Device_Properties_Proprietary[] = { -1 };
|
||||
static const int32_t Device_Properties_Proprietary[] = { -1 };
|
||||
|
||||
/** Glue function to let the Device object, when called by a handler,
|
||||
* lookup which Object type needs to be invoked.
|
||||
@@ -286,7 +286,9 @@ 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;
|
||||
|
||||
+12
-10
@@ -48,7 +48,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[] = {
|
||||
static const int32_t Network_Port_Properties_Required[] = {
|
||||
PROP_OBJECT_IDENTIFIER,
|
||||
PROP_OBJECT_NAME,
|
||||
PROP_OBJECT_TYPE,
|
||||
@@ -67,7 +67,7 @@ static const int Network_Port_Properties_Required[] = {
|
||||
-1
|
||||
};
|
||||
|
||||
static const int Network_Port_Properties_Optional[] = {
|
||||
static const int32_t Network_Port_Properties_Optional[] = {
|
||||
PROP_MAC_ADDRESS,
|
||||
PROP_MAX_MASTER,
|
||||
PROP_MAX_INFO_FRAMES,
|
||||
@@ -81,7 +81,7 @@ static const int Network_Port_Properties_Optional[] = {
|
||||
-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.
|
||||
@@ -97,9 +97,9 @@ static const int Network_Port_Properties_Proprietary[] = { -1 };
|
||||
*/
|
||||
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) {
|
||||
@@ -127,7 +127,9 @@ void Network_Port_Property_List(
|
||||
* 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);
|
||||
@@ -533,9 +535,9 @@ static bool
|
||||
Network_Port_Property_List_Member(uint32_t object_instance, int object_property)
|
||||
{
|
||||
bool found = false;
|
||||
const int *pRequired = NULL;
|
||||
const int *pOptional = NULL;
|
||||
const int *pProprietary = NULL;
|
||||
const int32_t *pRequired = NULL;
|
||||
const int32_t *pOptional = NULL;
|
||||
const int32_t *pProprietary = NULL;
|
||||
|
||||
Network_Port_Property_List(
|
||||
object_instance, &pRequired, &pOptional, &pProprietary);
|
||||
|
||||
Reference in New Issue
Block a user