Packed lists of id/length/value attributes, as exchanged with the phone.
More...
Packed lists of id/length/value attributes, as exchanged with the phone.
◆ pbl_generic_attr
Attribute, followed directly by the next one in a list.
| Data Fields |
|
uint8_t |
data[] |
Attribute value. |
|
uint8_t |
id |
Attribute identifier. |
|
uint16_t |
length |
Length of data in bytes. |
◆ pbl_generic_attr_list
| struct pbl_generic_attr_list |
| Data Fields |
|
struct pbl_generic_attr |
attributes[] |
Attributes, back to back. |
|
uint8_t |
num_attributes |
Number of attributes in attributes. |
◆ pbl_generic_attr_add()
Write an attribute.
The caller must ensure there is room for the header and size bytes, and update pbl_generic_attr_list::num_attributes.
- Parameters
-
| [out] | attr | Where to write the attribute. |
| id | Attribute identifier. |
| data | Attribute value. |
| size | Length of data in bytes. |
- Returns
- Position right after the written attribute, where the next one goes.
◆ pbl_generic_attr_find()
Find an attribute in a list.
Attributes that would extend past size end the search.
- Parameters
-
| attr_list | Attribute list. |
| id | Attribute identifier. |
| size | Size of the buffer holding attr_list, in bytes. |
- Returns
- First attribute with
id, or NULL if none is found.