sensorfw
hybrisaccelerometeradaptor.h
Go to the documentation of this file.
1
/****************************************************************************
2
**
3
** Copyright (C) 2013 Jolla Ltd
4
**
5
**
6
** $QT_BEGIN_LICENSE:LGPL$
7
**
8
** GNU Lesser General Public License Usage
9
** Alternatively, this file may be used under the terms of the GNU Lesser
10
** General Public License version 2.1 as published by the Free Software
11
** Foundation and appearing in the file LICENSE.LGPL included in the
12
** packaging of this file. Please review the following information to
13
** ensure the GNU Lesser General Public License version 2.1 requirements
14
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
15
**
16
** $QT_END_LICENSE$
17
**
18
****************************************************************************/
19
20
#ifndef HYBRISACCELEROMETERADPTOR_H
21
#define HYBRISACCELEROMETERADPTOR_H
22
23
#include "hybrisadaptor.h"
24
25
#include <QString>
26
#include <QStringList>
27
#include "deviceadaptorringbuffer.h"
28
#include "
datatypes/orientationdata.h
"
29
38
class
HybrisAccelerometerAdaptor
:
public
HybrisAdaptor
39
{
40
Q_OBJECT
41
42
public
:
43
static
DeviceAdaptor*
factoryMethod
(
const
QString&
id
) {
44
return
new
HybrisAccelerometerAdaptor
(
id
);
45
}
46
HybrisAccelerometerAdaptor
(
const
QString&
id
);
47
~HybrisAccelerometerAdaptor
();
48
49
bool
startSensor
();
50
void
stopSensor
();
51
52
protected
:
53
void
processSample
(
const
sensors_event_t& data);
54
55
private
:
56
DeviceAdaptorRingBuffer<AccelerationData>* buffer;
57
int
sensorType;
58
QByteArray powerStatePath;
59
60
};
61
#endif
HybrisAccelerometerAdaptor::~HybrisAccelerometerAdaptor
~HybrisAccelerometerAdaptor()
HybrisAccelerometerAdaptor::startSensor
bool startSensor()
HybrisAccelerometerAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition
hybrisaccelerometeradaptor.h:43
HybrisAccelerometerAdaptor::HybrisAccelerometerAdaptor
HybrisAccelerometerAdaptor(const QString &id)
HybrisAccelerometerAdaptor::processSample
void processSample(const sensors_event_t &data)
HybrisAccelerometerAdaptor::stopSensor
void stopSensor()
orientationdata.h
Datatypes for different filters.
adaptors
hybrisaccelerometer
hybrisaccelerometeradaptor.h
Generated by
1.13.2