forked from h2zero/esp-nimble-cpp
NimBLEUUID: Add operator == and != + correct equals() to test if values are set.
Adds convenience operators == and != to NimBLEUUID class. Tests if both values are not set in equals operation and returns true if so.
This commit is contained in:
+5
-1
@@ -40,10 +40,14 @@ public:
|
||||
uint8_t bitSize(); // Get the number of bits in this uuid.
|
||||
bool equals(NimBLEUUID uuid);
|
||||
ble_uuid_any_t* getNative();
|
||||
NimBLEUUID to128();
|
||||
NimBLEUUID & to128();
|
||||
std::string toString();
|
||||
static NimBLEUUID fromString(std::string uuid); // Create a NimBLEUUID from a string
|
||||
|
||||
bool operator ==(const NimBLEUUID & rhs);
|
||||
bool operator !=(const NimBLEUUID & rhs);
|
||||
operator std::string() const;
|
||||
|
||||
private:
|
||||
ble_uuid_any_t m_uuid; // The underlying UUID structure that this class wraps.
|
||||
bool m_valueSet = false; // Is there a value set for this instance.
|
||||
|
||||
Reference in New Issue
Block a user