sensorfw
hybrishrmadaptor.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2013 Jolla Ltd
4
** Contact: lorn.potter@jollamobile.com
5
**
6
** Copyright (C) 2019 Florent Revest
7
** Contact: revestflo@gmail.com
8
**
9
**
10
** $QT_BEGIN_LICENSE:LGPL$
11
**
12
** GNU Lesser General Public License Usage
13
** Alternatively, this file may be used under the terms of the GNU Lesser
14
** General Public License version 2.1 as published by the Free Software
15
** Foundation and appearing in the file LICENSE.LGPL included in the
16
** packaging of this file. Please review the following information to
17
** ensure the GNU Lesser General Public License version 2.1 requirements
18
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19
**
20
** $QT_END_LICENSE$
21
**
22
****************************************************************************/
23
24
#ifndef HYBRISHRMADAPTOR_H
25
#define HYBRISHRMADAPTOR_H
26
#include "hybrisadaptor.h"
27
28
#include <QString>
29
#include <QStringList>
30
#include <linux/input.h>
31
#include "deviceadaptorringbuffer.h"
32
#include "
datatypes/heartratedata.h
"
33
#include <QTime>
34
43
class
HybrisHrmAdaptor
:
public
HybrisAdaptor
44
{
45
Q_OBJECT
46
47
public
:
48
static
DeviceAdaptor*
factoryMethod
(
const
QString&
id
) {
49
return
new
HybrisHrmAdaptor
(
id
);
50
}
51
HybrisHrmAdaptor
(
const
QString&
id
);
52
~HybrisHrmAdaptor
();
53
54
bool
startSensor
();
55
void
stopSensor
();
56
57
void
sendInitialData
();
58
59
protected
:
60
void
processSample
(
const
sensors_event_t& data);
61
62
private
:
63
DeviceAdaptorRingBuffer<HeartRateData>* buffer;
64
QByteArray powerStatePath;
65
66
};
67
#endif
HybrisHrmAdaptor
Adaptor for hybris hrm sensor.
Definition
hybrishrmadaptor.h:44
HybrisHrmAdaptor::~HybrisHrmAdaptor
~HybrisHrmAdaptor()
HybrisHrmAdaptor::sendInitialData
void sendInitialData()
HybrisHrmAdaptor::startSensor
bool startSensor()
HybrisHrmAdaptor::processSample
void processSample(const sensors_event_t &data)
HybrisHrmAdaptor::HybrisHrmAdaptor
HybrisHrmAdaptor(const QString &id)
HybrisHrmAdaptor::stopSensor
void stopSensor()
HybrisHrmAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition
hybrishrmadaptor.h:48
heartratedata.h
Datatypes for different filters.
adaptors
hybrishrmadaptor
hybrishrmadaptor.h
Generated by
1.11.0