The Application tag encodes the datatype and length.
+---+---+---+---+---+---+---+---+
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
+---+---+---+---+---+---+---+---+
| tag type | c | l/v/t |
+---+---+---+---+---+---+---+---+
| offset | meaning |
| 0 bits 7 - 4 | tag type |
| 0 bit 3 | class = 0 means application tag |
| 0 bits 2 - 0 | length, value, or type |
Class
0 indicates an application tag. The tag number indicates the type.
1 indicates a context specific tag.
Sample Application tag:C4 02 00 1B 90
C4 => 1100 0100
tttt clll
| field | data | value |
| tttt | tag kind | 0xC = BACnetObjectIdentifier |
| c | class | 0 = Application Tag |
| lll | length | 4 |
| 02001B90 | Object type(top 10 bits) = 8 (device) |
| 02001B90 | Instance Number(bottom 22 bits) = 7056 |
Tag Types| number | meaning |
|---|
| 0 | Null |
| 1 | Boolean |
| 2 | unsigned integer |
| 3 | signed integer |
| 4 | real |
| 5 | double |
| 6 | Octet String |
| 7 | Character String |
| 8 | Bit String |
| 9 | Enumerated |
| 10 | Date |
| 11 | Time |
| 12 | BACnetObjectIdentifier |
| 13 | reserved for ASHRAE |
| 14 |
| 15 |
See Also:
embedded systems - bacnet - Context Tag
embedded systems - bacnet - PD tags
embedded systems - bacnet - tag decoder