sensorfw
hybrisstepcounteradaptor.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2013 Jolla Ltd
4
**
5
** Copyright (C) 2016 kimmoli
6
**
7
**
8
** $QT_BEGIN_LICENSE:LGPL$
9
**
10
** GNU Lesser General Public License Usage
11
** Alternatively, this file may be used under the terms of the GNU Lesser
12
** General Public License version 2.1 as published by the Free Software
13
** Foundation and appearing in the file LICENSE.LGPL included in the
14
** packaging of this file. Please review the following information to
15
** ensure the GNU Lesser General Public License version 2.1 requirements
16
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17
**
18
** $QT_END_LICENSE$
19
**
20
****************************************************************************/
21
22
#ifndef HYBRISSTEPCOUNTERADAPTOR_H
23
#define HYBRISSTEPCOUNTERADAPTOR_H
24
#include "hybrisadaptor.h"
25
26
#include <QString>
27
#include <QStringList>
28
#include <linux/input.h>
29
#include "deviceadaptorringbuffer.h"
30
#include "
datatypes/orientationdata.h
"
31
#include <QTime>
32
43
class
HybrisStepCounterAdaptor
:
public
HybrisAdaptor
44
{
45
Q_OBJECT
46
47
public
:
48
static
DeviceAdaptor*
factoryMethod
(
const
QString&
id
) {
49
return
new
HybrisStepCounterAdaptor
(
id
);
50
}
51
HybrisStepCounterAdaptor
(
const
QString&
id
);
52
~HybrisStepCounterAdaptor
();
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<TimedUnsigned>* buffer;
64
QByteArray powerStatePath;
65
66
};
67
#endif
HybrisStepCounterAdaptor::processSample
void processSample(const sensors_event_t &data)
HybrisStepCounterAdaptor::~HybrisStepCounterAdaptor
~HybrisStepCounterAdaptor()
HybrisStepCounterAdaptor::sendInitialData
void sendInitialData()
HybrisStepCounterAdaptor::startSensor
bool startSensor()
HybrisStepCounterAdaptor::stopSensor
void stopSensor()
HybrisStepCounterAdaptor::HybrisStepCounterAdaptor
HybrisStepCounterAdaptor(const QString &id)
HybrisStepCounterAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition
hybrisstepcounteradaptor.h:48
orientationdata.h
Datatypes for different filters.
adaptors
hybrisstepcounteradaptor
hybrisstepcounteradaptor.h
Generated by
1.13.2