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