sensorfw
adaptors/alsadaptor-ascii/alsadaptor-ascii.h
Go to the documentation of this file.
00001 
00032 #ifndef ALSADAPTOR_ASCII_H
00033 #define ALSADAPTOR_ASCII_H
00034 
00035 #include <QObject>
00036 #include <QString>
00037 #include "sysfsadaptor.h"
00038 #include "deviceadaptorringbuffer.h"
00039 #include "datatypes/timedunsigned.h"
00040 
00041 class ALSAdaptorAscii : public SysfsAdaptor
00042 {
00043     Q_OBJECT;
00044 public:
00045     static DeviceAdaptor* factoryMethod(const QString& id)
00046     {
00047         return new ALSAdaptorAscii(id);
00048     }
00049 
00050 protected:
00051     ALSAdaptorAscii(const QString& id);
00052     ~ALSAdaptorAscii();
00053 
00054     virtual bool setStandbyOverride(const bool override) { Q_UNUSED(override); return false; }
00055 private:
00056 
00057     void processSample(int pathId, int fd);
00058     char buf[16];
00059 
00060     DeviceAdaptorRingBuffer<TimedUnsigned>* alsBuffer_;
00061 };
00062 
00063 #endif