Cleaned up compiler warnings.
This commit is contained in:
@@ -155,30 +155,6 @@ static struct my_object_functions *Device_Objects_Find_Functions(
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int Read_Property_Common(
|
|
||||||
struct my_object_functions *pObject,
|
|
||||||
BACNET_READ_PROPERTY_DATA * rpdata)
|
|
||||||
{
|
|
||||||
int apdu_len = BACNET_STATUS_ERROR;
|
|
||||||
BACNET_CHARACTER_STRING char_string = { 0 };
|
|
||||||
uint8_t *apdu = NULL;
|
|
||||||
|
|
||||||
if ((rpdata->application_data == NULL) ||
|
|
||||||
(rpdata->application_data_len == 0)) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
apdu = rpdata->application_data;
|
|
||||||
switch (rpdata->object_property) {
|
|
||||||
default:
|
|
||||||
if (pObject->Object_Read_Property) {
|
|
||||||
apdu_len = pObject->Object_Read_Property(rpdata);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return apdu_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Encodes the property APDU and returns the length,
|
/* Encodes the property APDU and returns the length,
|
||||||
or sets the error, and returns BACNET_STATUS_ERROR */
|
or sets the error, and returns BACNET_STATUS_ERROR */
|
||||||
int Device_Read_Property(
|
int Device_Read_Property(
|
||||||
@@ -599,7 +575,7 @@ int Device_Read_Property_Local(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
apdu = rpdata->application_data;
|
apdu = rpdata->application_data;
|
||||||
switch (rpdata->object_property) {
|
switch ((int)rpdata->object_property) {
|
||||||
case PROP_OBJECT_IDENTIFIER:
|
case PROP_OBJECT_IDENTIFIER:
|
||||||
apdu_len =
|
apdu_len =
|
||||||
encode_application_object_id(&apdu[0], rpdata->object_type,
|
encode_application_object_id(&apdu[0], rpdata->object_type,
|
||||||
@@ -824,7 +800,7 @@ bool Device_Write_Property_Local(
|
|||||||
wp_data->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
|
wp_data->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch (wp_data->object_property) {
|
switch ((int)wp_data->object_property) {
|
||||||
case PROP_OBJECT_IDENTIFIER:
|
case PROP_OBJECT_IDENTIFIER:
|
||||||
if (value.tag == BACNET_APPLICATION_TAG_OBJECT_ID) {
|
if (value.tag == BACNET_APPLICATION_TAG_OBJECT_ID) {
|
||||||
if ((value.type.Object_Id.type == OBJECT_DEVICE) &&
|
if ((value.type.Object_Id.type == OBJECT_DEVICE) &&
|
||||||
|
|||||||
@@ -458,6 +458,21 @@ uint8_t characterstring_encoding(
|
|||||||
return encoding;
|
return encoding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* returns the encoding. */
|
||||||
|
bool characterstring_set_encoding(
|
||||||
|
BACNET_CHARACTER_STRING * char_string,
|
||||||
|
uint8_t encoding)
|
||||||
|
{
|
||||||
|
bool status = false;
|
||||||
|
|
||||||
|
if (char_string) {
|
||||||
|
char_string->encoding = encoding;
|
||||||
|
status = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
/* returns true if string is printable */
|
/* returns true if string is printable */
|
||||||
/* used to assist in the requirement that
|
/* used to assist in the requirement that
|
||||||
"The set of characters used in the Object_Name shall be
|
"The set of characters used in the Object_Name shall be
|
||||||
|
|||||||
Reference in New Issue
Block a user