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] - Rev 16

Compare with Previous | Blame | View Log

/*
 * @file     Device.h
 * @date     May 14, 2012
 * @author   Aart Mulder
 */
 
#ifndef CDevice_h
#define CDevice_h
 
#include <QThread>
#include <QString>
 
#include "CDeviceState.h"
 
    /** @author Aart Mulder
     *  @version 1
     */
class CDevice : public QThread {
    /* {since=2011-12-09}*/
 
	Q_OBJECT
 
 public:
    CDevice(int nLoopTime, QString sName);
    virtual ~CDevice();
	void Start();
	void Pause();
	void Resume();
	void Stop();
    int GetLoopTime();
    QString GetName();
 
 protected:
	virtual void DeviceLoopWaitForStart();
    virtual void BeforeDeviceLoop()  = 0;
    virtual void DeviceLoop()  = 0;
    virtual void AfterDeviceLoop()  = 0;
	void DelayMs(int delay);
 
 private:
    /** 
     *  Needs local variable to store the last timestamp that the deviceloop has been executed.
     */
    void run();
    /* {deprecated=false}*/
 
	CDeviceState m_oDeviceState;
 
 protected:
	const QString m_sName;
	const int m_nLoopTime;
};
 
#endif // CDevice_h
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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