sensorfw
hrmsensor_i.h
Go to the documentation of this file.
29#ifndef HRMSENSOR_I_H
30#define HRMSENSOR_I_H
31
32#include <QtDBus/QtDBus>
33
34#include "datatypes/heartrate.h"
35#include "abstractsensor_i.h"
36
44{
45 Q_OBJECT
46 Q_DISABLE_COPY(HrmSensorChannelInterface)
47 Q_PROPERTY(HeartRate heartRate READ heartRate)
48
49public:
53 static const char* staticInterfaceName;
54
63
70
77 HrmSensorChannelInterface(const QString& path, int sessionId);
78
86 static const HrmSensorChannelInterface* listenInterface(const QString& id);
87
95 static HrmSensorChannelInterface* controlInterface(const QString& id);
96
103 static HrmSensorChannelInterface* interface(const QString& id);
104
105protected:
106 virtual bool dataReceivedImpl();
107
108Q_SIGNALS:
114 void HeartRateChanged(const HeartRate& value);
115};
116
117namespace local {
119}
120
121#endif
Base class for sensor interface.
Base-class for client facades of different sensor types.
QObject facade for HeartRateData.
Definition: heartrate.h:37
Client interface for accessing heart rate monitor sensor.
Definition: hrmsensor_i.h:44
HeartRate heartRate()
Get latest heart rate measurements from sensor daemon.
static const char * staticInterfaceName
Name of the D-Bus interface for this class.
Definition: hrmsensor_i.h:53
void HeartRateChanged(const HeartRate &value)
Sent when measured bpm has changed.
static HrmSensorChannelInterface * interface(const QString &id)
Request an interface to the sensor.
virtual bool dataReceivedImpl()
Callback for subclasses in which they must read their expected data from socket.
static AbstractSensorChannelInterface * factoryMethod(const QString &id, int sessionId)
Create new instance of the class.
static const HrmSensorChannelInterface * listenInterface(const QString &id)
Request a listening interface to the sensor.
static HrmSensorChannelInterface * controlInterface(const QString &id)
Request a control interface to the sensor.
HrmSensorChannelInterface(const QString &path, int sessionId)
Constructor.
QObject based datatype for HeartRateData.
::HrmSensorChannelInterface HrmSensor
Definition: hrmsensor_i.h:118