- Added handling to WritePropertyMultiple.

- Added encode_tagged_enumerated function.
This commit is contained in:
k001a
2011-06-08 21:51:15 +00:00
parent 6a14f8f93a
commit a16a8f041b
7 changed files with 288 additions and 0 deletions
+17
View File
@@ -1260,6 +1260,23 @@ 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 */