diff options
author | Kari Hautamäki <kari.hautamaki@qt.io> | 2017-02-13 10:28:20 +0200 |
---|---|---|
committer | Titta Heikkala <titta.heikkala@qt.io> | 2017-02-15 07:56:58 +0000 |
commit | 4b5beeedda5e129018c167dd0a5cd1f17fc5c246 (patch) | |
tree | b96df903324ce8f080c9af97c98488d39aab4905 /tradeshow/iot-sensortag/sensortagdataprovider.h | |
parent | cacd82b316c8632edde4c37e92d0c0e9747bf5d6 (diff) |
iot-sensortag: Add sensor tag setup for Embedded World
- Added two sensor tags with unique capabilities by faking that each
provide only a subset of available sensor data
Change-Id: I9b7ad9f7b41ea7c5abaad0bc3fbe063219b19a9e
Reviewed-by: Titta Heikkala <titta.heikkala@qt.io>
Diffstat (limited to 'tradeshow/iot-sensortag/sensortagdataprovider.h')
-rw-r--r-- | tradeshow/iot-sensortag/sensortagdataprovider.h | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/tradeshow/iot-sensortag/sensortagdataprovider.h b/tradeshow/iot-sensortag/sensortagdataprovider.h index c3006e5..9f079e9 100644 --- a/tradeshow/iot-sensortag/sensortagdataprovider.h +++ b/tradeshow/iot-sensortag/sensortagdataprovider.h @@ -91,13 +91,13 @@ class SensorTagDataProvider : public QObject public: enum TagType {AmbientTemperature = 1 << 0, ObjectTemperature = 1 << 1, - Humidity, - AirPressure = 1 << 2, - Light = 1 << 3, - Magnetometer = 1 << 4, - Rotation = 1 << 5, - Accelometer = 1 << 6, - Altitude = 1 << 7}; + Humidity = 1 << 2, + AirPressure = 1 << 3, + Light = 1 << 4, + Magnetometer = 1 << 5, + Rotation = 1 << 6, + Accelometer = 1 << 7, + Altitude = 1 << 8}; enum ProviderState {Disconnected = 0, Scanning, Connected, Error}; explicit SensorTagDataProvider(QObject *parent = 0); @@ -106,33 +106,34 @@ public: virtual bool startDataFetching() {return false;} virtual void endDataFetching() {} QString getRelativeHumidityString(); - double getRelativeHumidity(); - double getInfraredAmbientTemperature(); - double getInfraredObjectTemperature(); + virtual double getRelativeHumidity(); + virtual double getInfraredAmbientTemperature(); + virtual double getInfraredObjectTemperature(); QString getLightIntensityLuxString(); - double getLightIntensityLux(); - double getBarometerCelsiusTemperature(); + virtual double getLightIntensityLux(); + virtual double getBarometerCelsiusTemperature(); QString getBarometerCelsiusTemperatureString(); - double getBarometerTemperatureAverage(); + virtual double getBarometerTemperatureAverage(); QString getBarometer_hPaString(); - double getBarometer_hPa(); - float getGyroscopeX_degPerSec(); - float getGyroscopeY_degPerSec(); - float getGyroscopeZ_degPerSec(); - float getAccelometer_xAxis(); - float getAccelometer_yAxis(); - float getAccelometer_zAxis(); - float getMagnetometerMicroT_xAxis(); - float getMagnetometerMicroT_yAxis(); - float getMagnetometerMicroT_zAxis(); - float getRotationX(); - float getRotationY(); - float getRotationZ(); + virtual double getBarometer_hPa(); + virtual float getGyroscopeX_degPerSec(); + virtual float getGyroscopeY_degPerSec(); + virtual float getGyroscopeZ_degPerSec(); + virtual float getAccelometer_xAxis(); + virtual float getAccelometer_yAxis(); + virtual float getAccelometer_zAxis(); + virtual float getMagnetometerMicroT_xAxis(); + virtual float getMagnetometerMicroT_yAxis(); + virtual float getMagnetometerMicroT_zAxis(); + virtual float getRotationX(); + virtual float getRotationY(); + virtual float getRotationZ(); int getRotationUpdateInterval(); - float getAltitude(); + virtual float getAltitude(); - Q_INVOKABLE int tagType() const; - QString id() const; + Q_INVOKABLE virtual int tagType() const; + void setTagType(int tagType); + virtual QString id() const; ProviderState state() const; void setState(ProviderState state); |