Index: sources/bluetooth/BluetoothInterface.h =================================================================== diff -u -re4a0e2fc4c7ae0cbce0d670772276bf7f5ff3845 -raa8f2c87c14c68d1fda6da2540d47144990a596c --- sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision e4a0e2fc4c7ae0cbce0d670772276bf7f5ff3845) +++ sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision aa8f2c87c14c68d1fda6da2540d47144990a596c) @@ -22,6 +22,7 @@ // Project #include "main.h" // Doxygen : do not remove #include "MBluetooth.h" +#include "MUIBloodPressureData.h" // Define #define _BluetoothInterface Bluetooth::BluetoothInterface::I() @@ -73,23 +74,6 @@ const quint16 _interval = 1000 ; // the interface timer base interval in mSec public: - // 19 total bytes - struct MeasurementData { - uint8_t flags; // 1 byte - uint16_t systolic; // 2 bytes - uint16_t diastolic; // 2 bytes - uint16_t mean_arterial_pressure_value; // 2 bytes - uint16_t year; // 2 bytes - uint8_t month; // 1 byte - uint8_t day; // 1 byte - uint8_t hour; // 1 byte - uint8_t minute; // 1 byte - uint8_t second; // 1 byte - uint16_t pulse_rate; // 2 bytes - uint8_t user_id; // 1 byte - uint16_t measurement_status; // 2 bytes - }; - bool isValid( ) const { return _isValid ; } void valid(bool vValid) { _isValid = vValid; } @@ -100,6 +84,8 @@ bool init(); bool init(QThread &vThread); + void doNotifyStatePOSTError(); + private slots: void quit(); @@ -152,7 +138,7 @@ bool isDeviceValid (); // bool isServiceValid (QLowEnergyService *vService); bool isDetailValid (const QLowEnergyCharacteristic &vDetail); - bool isDeviceSupported ( const QString &vName ); + bool isDeviceSupported (const QString &vName ); bool connectToDevice (); bool reconnectToDevice (); @@ -163,11 +149,12 @@ void readInformation (); void printCharacteristics (QLowEnergyService *vService); - void notifyStateChange(const BluetoothData &vData); + void notifyStateChange (const BluetoothData &vData); + void interpretBloodPressure (const QByteArray &vData); - void parseMeasurement (const QByteArray &byteArray); signals: - void didStateChange(const BluetoothData &vData); + void didStateChange (const BluetoothData &vData); + void didActionReceive (const UIBloodPressureData &vData); SAFE_CALL(doStart ) SAFE_CALL(doScan )