sensorfw: adaptors/alsadaptor-ascii/alsadaptor-ascii.h Source File

sensorfw

alsadaptor-ascii.h
Go to the documentation of this file.
1
32#ifndef ALSADAPTOR_ASCII_H
33#define ALSADAPTOR_ASCII_H
34
35#include <QObject>
36#include <QString>
37#include "sysfsadaptor.h"
38#include "deviceadaptorringbuffer.h"
39#include "datatypes/timedunsigned.h"
40
41 class ALSAdaptorAscii : public SysfsAdaptor
42{
43 Q_OBJECT;
44public:
45 static DeviceAdaptor* factoryMethod(const QString& id)
46 {
47 return new ALSAdaptorAscii(id);
48 }
49
50protected:
51 ALSAdaptorAscii(const QString& id);
52 ~ALSAdaptorAscii();
53 bool startSensor();
54 void stopSensor();
55 virtual bool setStandbyOverride(const bool override) { Q_UNUSED(override); return false; }
56private:
57
58 void processSample(int pathId, int fd);
59 char buf[16];
60
61 DeviceAdaptorRingBuffer<TimedUnsigned>* alsBuffer_;
62
63 QByteArray powerStatePath;
64 QByteArray powerMode;
65};
66
67#endif
ALSAdaptorAscii
Definition alsadaptor-ascii.h:42
ALSAdaptorAscii::~ALSAdaptorAscii
~ALSAdaptorAscii()
ALSAdaptorAscii::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition alsadaptor-ascii.h:45
ALSAdaptorAscii::ALSAdaptorAscii
ALSAdaptorAscii(const QString &id)
ALSAdaptorAscii::startSensor
bool startSensor()
ALSAdaptorAscii::stopSensor
void stopSensor()
ALSAdaptorAscii::setStandbyOverride
virtual bool setStandbyOverride(const bool override)
Definition alsadaptor-ascii.h:55
timedunsigned.h
Datatype for unsigned values.