Removed encode_tagged_enumerated function, because it was identical like encode_application_enumerated (I didn't see this before).
This commit is contained in:
@@ -313,9 +313,6 @@ extern "C" {
|
||||
int encode_bacnet_enumerated(
|
||||
uint8_t * apdu,
|
||||
uint32_t value);
|
||||
int encode_tagged_enumerated(
|
||||
uint8_t * apdu,
|
||||
int value);
|
||||
int encode_application_enumerated(
|
||||
uint8_t * apdu,
|
||||
uint32_t value);
|
||||
|
||||
@@ -1260,23 +1260,6 @@ int encode_bacnet_enumerated(
|
||||
return encode_bacnet_unsigned(apdu, value);
|
||||
}
|
||||
|
||||
/* from clause 20.2.11 Encoding of an Enumerated Value */
|
||||
/* and 20.2.1 General Rules for Encoding BACnet Tags */
|
||||
/* returns the number of apdu bytes consumed */
|
||||
int encode_tagged_enumerated(
|
||||
uint8_t * apdu,
|
||||
int value)
|
||||
{
|
||||
int len = 0; /* return value */
|
||||
|
||||
/* assumes that the tag only consumes 1 octet */
|
||||
len = encode_bacnet_enumerated(&apdu[1], value);
|
||||
len += encode_tag(&apdu[0], BACNET_APPLICATION_TAG_ENUMERATED,
|
||||
false, len);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/* from clause 20.2.11 Encoding of an Enumerated Value */
|
||||
/* and 20.2.1 General Rules for Encoding BACnet Tags */
|
||||
/* returns the number of apdu bytes consumed */
|
||||
|
||||
@@ -161,8 +161,8 @@ int wpm_error_ack_encode_apdu(uint8_t * apdu, uint8_t invoke_id,
|
||||
apdu[len++] = SERVICE_CONFIRMED_WRITE_PROP_MULTIPLE;
|
||||
|
||||
len += encode_opening_tag(&apdu[len], 0);
|
||||
len += encode_tagged_enumerated(&apdu[len], wp_data->error_class);
|
||||
len += encode_tagged_enumerated(&apdu[len], wp_data->error_code);
|
||||
len += encode_application_enumerated(&apdu[len], wp_data->error_class);
|
||||
len += encode_application_enumerated(&apdu[len], wp_data->error_code);
|
||||
len += encode_closing_tag(&apdu[len], 0);
|
||||
|
||||
len += encode_opening_tag(&apdu[len], 1);
|
||||
|
||||
Reference in New Issue
Block a user