OpenCores
URL https://opencores.org/ocsvn/bw_tiff_compression/bw_tiff_compression/trunk

Subversion Repositories bw_tiff_compression

[/] [bw_tiff_compression/] [trunk/] [client_application/] [src/] [Kernel/] [CDevice.h] - Blame information for rev 16

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 16 amulder
/*
2
 * @file     Device.h
3
 * @date     May 14, 2012
4
 * @author   Aart Mulder
5
 */
6
 
7
#ifndef CDevice_h
8
#define CDevice_h
9
 
10
#include <QThread>
11
#include <QString>
12
 
13
#include "CDeviceState.h"
14
 
15
    /** @author Aart Mulder
16
     *  @version 1
17
     */
18
class CDevice : public QThread {
19
    /* {since=2011-12-09}*/
20
 
21
        Q_OBJECT
22
 
23
 public:
24
    CDevice(int nLoopTime, QString sName);
25
    virtual ~CDevice();
26
        void Start();
27
        void Pause();
28
        void Resume();
29
        void Stop();
30
    int GetLoopTime();
31
    QString GetName();
32
 
33
 protected:
34
        virtual void DeviceLoopWaitForStart();
35
    virtual void BeforeDeviceLoop()  = 0;
36
    virtual void DeviceLoop()  = 0;
37
    virtual void AfterDeviceLoop()  = 0;
38
        void DelayMs(int delay);
39
 
40
 private:
41
    /**
42
     *  Needs local variable to store the last timestamp that the deviceloop has been executed.
43
     */
44
    void run();
45
    /* {deprecated=false}*/
46
 
47
        CDeviceState m_oDeviceState;
48
 
49
 protected:
50
        const QString m_sName;
51
        const int m_nLoopTime;
52
};
53
 
54
#endif // CDevice_h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.