Rtos API example
AttReadByTypeResponse Struct Reference
Response to a Read By Type request. More...
#include <AttServerMessage.h>
Inherits ble::pal::AttServerMessage.
Inherited by SimpleAttReadByTypeResponse.
Data Structures | |
| struct | attribute_data_t |
| handle-value pair More... | |
Public Member Functions | |
| AttReadByTypeResponse () | |
| Base constructor, setup the OpCode of the response. | |
| virtual | ~AttReadByTypeResponse () |
| virtual destructor to overide if the sub class needs it. | |
| virtual size_t | size () const =0 |
| Return the number of attribute_data_t presents in the response. | |
| virtual attribute_data_t | operator[] (size_t index) const =0 |
| Return the attribute data at index. | |
Data Fields | |
| const AttributeOpcode | opcode |
| Op code used to identify the type of the attribute response. | |
Detailed Description
Response to a Read By Type request.
It contains a list of handle-value pairs where:
- handle is the handle of the attribute matching the rype requested.
- value is the value of the attribute found. If the value is longer than (mtu - 4) then it can be truncated and read blob request should be used to read the remaining octet of the attribute.
This class has to be subclassed by an implementation specific class defining the member function size and the subscript operator.
- Note:
- see BLUETOOTH SPECIFICATION Version 5.0 | Vol 3, Part F Section 3.4.4.2
Definition at line 397 of file AttServerMessage.h.
Constructor & Destructor Documentation
Base constructor, setup the OpCode of the response.
Definition at line 409 of file AttServerMessage.h.
| virtual ~AttReadByTypeResponse | ( | ) | [virtual] |
virtual destructor to overide if the sub class needs it.
Definition at line 416 of file AttServerMessage.h.
Member Function Documentation
| virtual attribute_data_t operator[] | ( | size_t | index ) | const [pure virtual] |
Return the attribute data at index.
- Note:
- Out of range access is undefined.
Implemented in SimpleAttReadByTypeResponse.
| virtual size_t size | ( | ) | const [pure virtual] |
Return the number of attribute_data_t presents in the response.
Implemented in SimpleAttReadByTypeResponse.
Field Documentation
const AttributeOpcode opcode [inherited] |
Op code used to identify the type of the attribute response.
Definition at line 102 of file AttServerMessage.h.
Generated on Sun Jul 17 2022 08:25:43 by
1.7.2