diff --git a/nRF51GattServer.cpp b/nRF51GattServer.cpp index bb4e1dd..e9bb092 100644 --- a/nRF51GattServer.cpp +++ b/nRF51GattServer.cpp @@ -159,12 +159,12 @@ ble_error_t nRF51GattServer::addService(GattService &service) Everything executed properly */ /**************************************************************************/ -ble_error_t nRF51GattServer::readValue(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) +ble_error_t nRF51GattServer::read(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) { - return readValue(BLE_CONN_HANDLE_INVALID, attributeHandle, buffer, lengthP); + return read(BLE_CONN_HANDLE_INVALID, attributeHandle, buffer, lengthP); } -ble_error_t nRF51GattServer::readValue(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) +ble_error_t nRF51GattServer::read(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP) { ble_gatts_value_t value = { .len = *lengthP, @@ -199,12 +199,12 @@ ble_error_t nRF51GattServer::readValue(Gap::Handle_t connectionHandle, GattAttri Everything executed properly */ /**************************************************************************/ -ble_error_t nRF51GattServer::updateValue(GattAttribute::Handle_t attributeHandle, const uint8_t buffer[], uint16_t len, bool localOnly) +ble_error_t nRF51GattServer::write(GattAttribute::Handle_t attributeHandle, const uint8_t buffer[], uint16_t len, bool localOnly) { - return updateValue(BLE_CONN_HANDLE_INVALID, attributeHandle, buffer, len, localOnly); + return write(BLE_CONN_HANDLE_INVALID, attributeHandle, buffer, len, localOnly); } -ble_error_t nRF51GattServer::updateValue(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, const uint8_t buffer[], uint16_t len, bool localOnly) +ble_error_t nRF51GattServer::write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, const uint8_t buffer[], uint16_t len, bool localOnly) { uint16_t gapConnectionHandle = nRF51Gap::getInstance().getConnectionHandle(); ble_error_t returnValue = BLE_ERROR_NONE; diff --git a/nRF51GattServer.h b/nRF51GattServer.h index 84fd47a..0595967 100644 --- a/nRF51GattServer.h +++ b/nRF51GattServer.h @@ -31,10 +31,10 @@ public: /* Functions that must be implemented from GattServer */ virtual ble_error_t addService(GattService &); - virtual ble_error_t readValue(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP); - virtual ble_error_t readValue(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP); - virtual ble_error_t updateValue(GattAttribute::Handle_t, const uint8_t[], uint16_t, bool localOnly = false); - virtual ble_error_t updateValue(Gap::Handle_t connectionHandle, GattAttribute::Handle_t, const uint8_t[], uint16_t, bool localOnly = false); + virtual ble_error_t read(GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP); + virtual ble_error_t read(Gap::Handle_t connectionHandle, GattAttribute::Handle_t attributeHandle, uint8_t buffer[], uint16_t *lengthP); + virtual ble_error_t write(GattAttribute::Handle_t, const uint8_t[], uint16_t, bool localOnly = false); + virtual ble_error_t write(Gap::Handle_t connectionHandle, GattAttribute::Handle_t, const uint8_t[], uint16_t, bool localOnly = false); virtual ble_error_t initializeGATTDatabase(void); /* nRF51 Functions */