diff --git a/bacnet-stack/ports/at91sam7s/ai.c b/bacnet-stack/ports/at91sam7s/ai.c index 60b4f962..8b305c51 100644 --- a/bacnet-stack/ports/at91sam7s/ai.c +++ b/bacnet-stack/ports/at91sam7s/ai.c @@ -200,14 +200,14 @@ int Analog_Input_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ if ((apdu_len >= 0) && (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/at91sam7s/av.c b/bacnet-stack/ports/at91sam7s/av.c index d08c0503..3c5ff0a3 100644 --- a/bacnet-stack/ports/at91sam7s/av.c +++ b/bacnet-stack/ports/at91sam7s/av.c @@ -271,7 +271,7 @@ int Analog_Value_Read_Property( else { rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } @@ -291,7 +291,7 @@ int Analog_Value_Read_Property( } else { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_INVALID_ARRAY_INDEX; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } } @@ -304,7 +304,7 @@ int Analog_Value_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ @@ -315,7 +315,7 @@ int Analog_Value_Read_Property( (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; @@ -361,8 +361,8 @@ bool Analog_Value_Write_Property( Present_Value[object_index] = level; /* Note: you could set the physical output here if we are the highest priority. - However, if Out of Service is TRUE, then don't set the - physical output. This comment may apply to the + However, if Out of Service is TRUE, then don't set the + physical output. This comment may apply to the main loop (i.e. check out of service before changing output) */ status = true; } else if (priority == 6) { @@ -387,8 +387,8 @@ bool Analog_Value_Write_Property( /* Note: you could set the physical output here to the next highest priority, or to the relinquish default if no priorities are set. - However, if Out of Service is TRUE, then don't set the - physical output. This comment may apply to the + However, if Out of Service is TRUE, then don't set the + physical output. This comment may apply to the main loop (i.e. check out of service before changing output) */ status = true; } else { diff --git a/bacnet-stack/ports/at91sam7s/bi.c b/bacnet-stack/ports/at91sam7s/bi.c index b5008b06..56452bd1 100644 --- a/bacnet-stack/ports/at91sam7s/bi.c +++ b/bacnet-stack/ports/at91sam7s/bi.c @@ -219,14 +219,14 @@ int Binary_Input_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ if ((apdu_len >= 0) && (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/at91sam7s/bv.c b/bacnet-stack/ports/at91sam7s/bv.c index 674151fb..4b15e54e 100644 --- a/bacnet-stack/ports/at91sam7s/bv.c +++ b/bacnet-stack/ports/at91sam7s/bv.c @@ -217,14 +217,14 @@ int Binary_Value_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ if ((apdu_len >= 0) && (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; @@ -272,7 +272,7 @@ bool Binary_Value_Write_Property( Present_Value[object_index] = level; /* Note: you could set the physical output here if we are the highest priority. - However, if Out of Service is TRUE, then don't set the + However, if Out of Service is TRUE, then don't set the physical output. */ status = true; } else if (priority == 6) { diff --git a/bacnet-stack/ports/at91sam7s/device.c b/bacnet-stack/ports/at91sam7s/device.c index 301fe0f3..b384af8d 100644 --- a/bacnet-stack/ports/at91sam7s/device.c +++ b/bacnet-stack/ports/at91sam7s/device.c @@ -152,7 +152,7 @@ void Device_Property_Lists( int Device_Read_Property( BACNET_READ_PROPERTY_DATA * rpdata) { - int apdu_len = -1; + int apdu_len = BACNET_STATUS_ERROR; unsigned index = 0; struct object_functions *pObject = NULL; bool found = false; @@ -705,14 +705,14 @@ int Device_Read_Property_Local( rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } else { /* error: internal error? */ rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_OTHER; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } @@ -725,7 +725,7 @@ int Device_Read_Property_Local( else { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_INVALID_ARRAY_INDEX; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } } break; @@ -792,7 +792,7 @@ int Device_Read_Property_Local( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ @@ -800,7 +800,7 @@ int Device_Read_Property_Local( (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/ai.c b/bacnet-stack/ports/bdk-atxx4-mstp/ai.c index f95c31f0..10ad25e7 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/ai.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/ai.c @@ -39,7 +39,7 @@ #define MAX_ANALOG_INPUTS 2 #endif -static uint8_t Present_Value[MAX_ANALOG_INPUTS]; +static float Present_Value[MAX_ANALOG_INPUTS]; /* These three arrays are used by the ReadPropertyMultiple handler */ static const int Analog_Input_Properties_Required[] = { @@ -185,14 +185,14 @@ int Analog_Input_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ if ((apdu_len >= 0) && (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/av.c b/bacnet-stack/ports/bdk-atxx4-mstp/av.c index b786eed1..c10468ed 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/av.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/av.c @@ -169,8 +169,8 @@ bool Analog_Value_Present_Value_Set( Present_Value[index] = value; /* Note: you could set the physical output here if we are the highest priority. - However, if Out of Service is TRUE, then don't set the - physical output. This comment may apply to the + However, if Out of Service is TRUE, then don't set the + physical output. This comment may apply to the main loop (i.e. check out of service before changing output) */ status = true; } @@ -268,7 +268,7 @@ int Analog_Value_Read_Property( else { rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } @@ -289,7 +289,7 @@ int Analog_Value_Read_Property( } else { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_INVALID_ARRAY_INDEX; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } } @@ -302,7 +302,7 @@ int Analog_Value_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ @@ -313,7 +313,7 @@ int Analog_Value_Read_Property( (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/bi.c b/bacnet-stack/ports/bdk-atxx4-mstp/bi.c index f1a7d585..d2e59c4a 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/bi.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/bi.c @@ -215,14 +215,14 @@ int Binary_Input_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ if ((apdu_len >= 0) && (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/bo.c b/bacnet-stack/ports/bdk-atxx4-mstp/bo.c index 8fefaf90..af6752fe 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/bo.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/bo.c @@ -336,7 +336,7 @@ int Binary_Output_Read_Property( else { rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } @@ -357,7 +357,7 @@ int Binary_Output_Read_Property( } else { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_INVALID_ARRAY_INDEX; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } } break; @@ -378,7 +378,7 @@ int Binary_Output_Read_Property( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */ @@ -386,7 +386,7 @@ int Binary_Output_Read_Property( (rpdata->array_index != BACNET_ARRAY_ALL)) { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } return apdu_len; diff --git a/bacnet-stack/ports/bdk-atxx4-mstp/device.c b/bacnet-stack/ports/bdk-atxx4-mstp/device.c index 539dba5a..354002e5 100644 --- a/bacnet-stack/ports/bdk-atxx4-mstp/device.c +++ b/bacnet-stack/ports/bdk-atxx4-mstp/device.c @@ -203,7 +203,7 @@ static int Read_Property_Common( int Device_Read_Property( BACNET_READ_PROPERTY_DATA * rpdata) { - int apdu_len = -1; + int apdu_len = BACNET_STATUS_ERROR; struct object_functions *pObject = NULL; /* initialize the default return values */ @@ -700,14 +700,14 @@ int Device_Read_Property_Local( rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_NO_SPACE_FOR_OBJECT; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } else { /* error: internal error? */ rpdata->error_class = ERROR_CLASS_SERVICES; rpdata->error_code = ERROR_CODE_OTHER; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } } @@ -720,7 +720,7 @@ int Device_Read_Property_Local( else { rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_INVALID_ARRAY_INDEX; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; } } break; @@ -768,7 +768,7 @@ int Device_Read_Property_Local( default: rpdata->error_class = ERROR_CLASS_PROPERTY; rpdata->error_code = ERROR_CODE_UNKNOWN_PROPERTY; - apdu_len = -1; + apdu_len = BACNET_STATUS_ERROR; break; } /* only array properties can have array options */