2nd pass at changing the error/reject/abort status reporting to improve BTL test compliance. ReadProperty fully done for core and demo objects. Will tackle other services next.
This commit is contained in:
@@ -37,6 +37,24 @@
|
||||
#include "bacdef.h"
|
||||
|
||||
/** @file abort.c Abort Encoding/Decoding */
|
||||
/* Helper function to avoid needing additional entries in service data structures
|
||||
* when passing back abort status.
|
||||
* Convert from error code to abort code - assumes value is in range
|
||||
* ERROR_CODE_RESERVED1 to ERROR_CODE_ABORT_SEGMENTATION_NOT_SUPPORTED
|
||||
* anything outside this range gets converted to ABORT_REASON_OTHER.
|
||||
* Will need reworking if it is required to return proprietary abort codes.
|
||||
*/
|
||||
|
||||
BACNET_ABORT_REASON abort_convert_error_code(
|
||||
BACNET_ERROR_CODE error_code)
|
||||
{
|
||||
BACNET_ABORT_REASON abort_code = ABORT_REASON_OTHER;
|
||||
|
||||
if((error_code > ERROR_CODE_RESERVED1) && (error_code <= ERROR_CODE_ABORT_SEGMENTATION_NOT_SUPPORTED))
|
||||
abort_code = (BACNET_ABORT_REASON)(error_code - ERROR_CODE_RESERVED1);
|
||||
|
||||
return(abort_code);
|
||||
}
|
||||
|
||||
/* encode service */
|
||||
int abort_encode_apdu(
|
||||
|
||||
Reference in New Issue
Block a user