sensorfw
hybrisalsadaptor.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 HYBRISALSADAPTOR_H
21
#define HYBRISALSADAPTOR_H
22
#include "hybrisadaptor.h"
23
24
#include <QString>
25
#include <QStringList>
26
#include <linux/input.h>
27
#include "deviceadaptorringbuffer.h"
28
#include "
datatypes/orientationdata.h
"
29
#include <QTime>
30
41
class
HybrisAlsAdaptor
:
public
HybrisAdaptor
42
{
43
Q_OBJECT
44
45
public
:
46
static
DeviceAdaptor*
factoryMethod
(
const
QString&
id
) {
47
return
new
HybrisAlsAdaptor
(
id
);
48
}
49
HybrisAlsAdaptor
(
const
QString&
id
);
50
~HybrisAlsAdaptor
();
51
52
bool
startSensor
();
53
void
stopSensor
();
54
55
void
sendInitialData
();
56
57
protected
:
58
void
processSample
(
const
sensors_event_t& data);
59
void
init
();
60
61
private
:
62
DeviceAdaptorRingBuffer<TimedUnsigned>* buffer;
63
unsigned
lastLightValue;
64
QByteArray powerStatePath;
65
66
};
67
#endif
HybrisAlsAdaptor::init
void init()
HybrisAlsAdaptor
Adaptor for hybris ambient light sensor.
Definition:
hybrisalsadaptor.h:42
orientationdata.h
Datatypes for different filters.
HybrisAlsAdaptor::stopSensor
void stopSensor()
HybrisAlsAdaptor::startSensor
bool startSensor()
HybrisAlsAdaptor::processSample
void processSample(const sensors_event_t &data)
HybrisAlsAdaptor::HybrisAlsAdaptor
HybrisAlsAdaptor(const QString &id)
HybrisAlsAdaptor::sendInitialData
void sendInitialData()
HybrisAlsAdaptor::~HybrisAlsAdaptor
~HybrisAlsAdaptor()
HybrisAlsAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition:
hybrisalsadaptor.h:46
adaptors
hybrisalsadaptor
hybrisalsadaptor.h
Generated by
1.8.20