|
20 | 20 | */
|
21 | 21 | class BLEUtils {
|
22 | 22 | public:
|
23 |
| - static const char* advTypeToString(uint8_t advType); |
24 |
| - static esp_gatt_id_t buildGattId(esp_bt_uuid_t uuid, uint8_t inst_id=0); |
25 |
| - |
| 23 | + static const char* addressTypeToString(esp_ble_addr_type_t type); |
| 24 | + static const char* advTypeToString(uint8_t advType); |
| 25 | + static esp_gatt_id_t buildGattId(esp_bt_uuid_t uuid, uint8_t inst_id=0); |
26 | 26 | static esp_gatt_srvc_id_t buildGattSrvcId(esp_gatt_id_t gattId, bool is_primary=true);
|
27 |
| - static std::string characteristicPropertiesToString(esp_gatt_char_prop_t prop); |
28 |
| - static char* buildHexData(uint8_t *target, uint8_t *source, uint8_t length); |
29 |
| - static BLEClient* findByConnId(uint16_t conn_id); |
30 |
| - static BLEClient* findByAddress(BLEAddress address); |
31 |
| - static std::string gattClientEventTypeToString(esp_gattc_cb_event_t eventType); |
32 |
| - static std::string gattServerEventTypeToString(esp_gatts_cb_event_t eventType); |
33 |
| - static std::string gattcServiceElementToString(esp_gattc_service_elem_t *pGATTCServiceElement); |
34 |
| - static std::string gattServiceIdToString(esp_gatt_srvc_id_t srvcId); |
35 |
| - static std::string gattStatusToString(esp_gatt_status_t status); |
36 |
| - static std::string gattServiceToString(uint32_t serviceId); |
37 |
| - static std::string gattCloseReasonToString(esp_gatt_conn_reason_t reason); |
38 |
| - static void registerByAddress(BLEAddress address, BLEClient* pDevice); |
39 |
| - static void registerByConnId(uint16_t conn_id, BLEClient* pDevice); |
40 |
| - static std::string gattCharacteristicUUIDToString(uint32_t characteristicUUID); |
41 |
| - static std::string getMember(uint32_t memberId); |
42 |
| - static std::string buildPrintData(uint8_t* source, size_t length); |
| 27 | + static char* buildHexData(uint8_t* target, uint8_t* source, uint8_t length); |
| 28 | + static std::string buildPrintData(uint8_t* source, size_t length); |
| 29 | + static std::string characteristicPropertiesToString(esp_gatt_char_prop_t prop); |
| 30 | + static const char* devTypeToString(esp_bt_dev_type_t type); |
| 31 | + static void dumpGapEvent( |
| 32 | + esp_gap_ble_cb_event_t event, |
| 33 | + esp_ble_gap_cb_param_t* param); |
43 | 34 | static void dumpGattClientEvent(
|
44 |
| - esp_gattc_cb_event_t event, |
45 |
| - esp_gatt_if_t gattc_if, |
| 35 | + esp_gattc_cb_event_t event, |
| 36 | + esp_gatt_if_t gattc_if, |
46 | 37 | esp_ble_gattc_cb_param_t* evtParam);
|
47 | 38 | static void dumpGattServerEvent(
|
48 |
| - esp_gatts_cb_event_t event, |
49 |
| - esp_gatt_if_t gatts_if, |
| 39 | + esp_gatts_cb_event_t event, |
| 40 | + esp_gatt_if_t gatts_if, |
50 | 41 | esp_ble_gatts_cb_param_t* evtParam);
|
51 |
| - static const char* devTypeToString(esp_bt_dev_type_t type); |
52 |
| - static void dumpGapEvent( |
53 |
| - esp_gap_ble_cb_event_t event, |
54 |
| - esp_ble_gap_cb_param_t* param); |
| 42 | + static const char* eventTypeToString(esp_ble_evt_type_t eventType); |
| 43 | + static BLEClient* findByAddress(BLEAddress address); |
| 44 | + static BLEClient* findByConnId(uint16_t conn_id); |
55 | 45 | static const char* gapEventToString(uint32_t eventType);
|
| 46 | + static std::string gattCharacteristicUUIDToString(uint32_t characteristicUUID); |
| 47 | + static std::string gattClientEventTypeToString(esp_gattc_cb_event_t eventType); |
| 48 | + static std::string gattCloseReasonToString(esp_gatt_conn_reason_t reason); |
| 49 | + static std::string gattcServiceElementToString(esp_gattc_service_elem_t *pGATTCServiceElement); |
| 50 | + static std::string gattDescriptorUUIDToString(uint32_t descriptorUUID); |
| 51 | + static std::string gattServerEventTypeToString(esp_gatts_cb_event_t eventType); |
| 52 | + static std::string gattServiceIdToString(esp_gatt_srvc_id_t srvcId); |
| 53 | + static std::string gattServiceToString(uint32_t serviceId); |
| 54 | + static std::string gattStatusToString(esp_gatt_status_t status); |
| 55 | + static std::string getMember(uint32_t memberId); |
| 56 | + static void registerByAddress(BLEAddress address, BLEClient* pDevice); |
| 57 | + static void registerByConnId(uint16_t conn_id, BLEClient* pDevice); |
56 | 58 | static const char* searchEventTypeToString(esp_gap_search_evt_t searchEvt);
|
57 |
| - static const char* addressTypeToString(esp_ble_addr_type_t type); |
58 |
| - static const char *eventTypeToString(esp_ble_evt_type_t eventType); |
59 | 59 | };
|
60 | 60 |
|
61 | 61 | #endif // CONFIG_BT_ENABLED
|
|
0 commit comments