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