mirror of
https://github.com/esphome/esphome.git
synced 2026-09-29 07:50:21 +00:00
27 lines
638 B
C++
27 lines
638 B
C++
#include "ble_client_state.h"
|
|
|
|
namespace esphome::ble_device_base {
|
|
|
|
const char *client_state_to_string(ClientState state) {
|
|
switch (state) {
|
|
case ClientState::INIT:
|
|
return "INIT";
|
|
case ClientState::DISCONNECTING:
|
|
return "DISCONNECTING";
|
|
case ClientState::IDLE:
|
|
return "IDLE";
|
|
case ClientState::DISCOVERED:
|
|
return "DISCOVERED";
|
|
case ClientState::CONNECTING:
|
|
return "CONNECTING";
|
|
case ClientState::CONNECTED:
|
|
return "CONNECTED";
|
|
case ClientState::ESTABLISHED:
|
|
return "ESTABLISHED";
|
|
default:
|
|
return "UNKNOWN";
|
|
}
|
|
}
|
|
|
|
} // namespace esphome::ble_device_base
|