forked from sandeepmistry/arduino-BLEPeripheral
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBLEConstantCharacteristic.cpp
More file actions
27 lines (22 loc) · 906 Bytes
/
BLEConstantCharacteristic.cpp
File metadata and controls
27 lines (22 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "BLEConstantCharacteristic.h"
BLEConstantCharacteristic::BLEConstantCharacteristic(const char* uuid, const unsigned char value[], unsigned char length) :
BLEFixedLengthCharacteristic(uuid, BLERead, (unsigned char)0)
{
this->_valueLength = this->_valueSize = length;
this->_value = (unsigned char*)value;
}
BLEConstantCharacteristic::BLEConstantCharacteristic(const char* uuid, const char* value) :
BLEFixedLengthCharacteristic(uuid, BLERead, (unsigned char)0)
{
this->_valueLength = this->_valueSize = strlen(value);
this->_value = (unsigned char*)value;
}
BLEConstantCharacteristic::~BLEConstantCharacteristic() {
this->_value = NULL; // null so super destructor doesn't try to free
}
bool BLEConstantCharacteristic::setValue(const unsigned char value[], unsigned char length) {
return false;
}
bool BLEConstantCharacteristic::setValue(const char* value) {
return false;
}