- added application level encryption for over the air data
- added method getOutgoingData to AbstractAttribute that replaces the method getBytes and needs CryptoManager as argument
- added alternative signature for Characteristic.createAttribute: added new parameter for CryptoManager
- to get the raw data representation of an attribute the method getRawData was added to AbstractAttribute
- Added putMstime to GattByteBuffer
- Added getCharacteristics to obtain all Characteristics as a Collection
3.0.0 (2017-11-07)
This release comes with a significant api change to simplify
- replace
com.movisens.smartgattlib.Service
withcom.movisens.smartgattlib.Services
- replace
com.movisens.smartgattlib.Characteristic
withcom.movisens.smartgattlib.Characteristics
It is now possible to parse Characteristics with:
AbstractAttribute a = Characteristics.lookup(uuid).createAttribute(data);
if (a instanceof HeartRateMeasurement) {
HeartRateMeasurement heartRateMeasurement = ((HeartRateMeasurement) a);
heartRateMeasurement.getHr();
heartRateMeasurement.getEe();
} else if (a instanceof DefaultAttribute) {
System.err.println("characteristic for " + uuid + " is unknown");
} else {
System.out.println("unused characteristic " + a.getCharacteristic().getName());
}
It is also possible to write Characteristics and convert them to bytes:
AbstractAttribute aa = new Weight(12.3);
// TODO: Write aa.getBytes() to aa.getCharacteristic().getUuid();