72 lines
2.1 KiB
C++
72 lines
2.1 KiB
C++
/*******************************************************************************
|
|
* *
|
|
* Société de Transports de Montréal. *
|
|
* 2012 - 2013 *
|
|
* *
|
|
* Projet Zones Tests *
|
|
* *
|
|
* *
|
|
* *
|
|
*******************************************************************************/
|
|
/*
|
|
Description:
|
|
Description du fichier si nécessaire.
|
|
|
|
*/
|
|
|
|
/* ************************************************************************** */
|
|
/* Revision:
|
|
### YYYMMDD JFM
|
|
Verision d'origine.
|
|
|
|
### YYYYMMDD Description du besoin ou du bug
|
|
Description du changement.
|
|
*/
|
|
|
|
/* ************************************************************************** */
|
|
|
|
#ifndef SIMULATORLAZERPROBE_H
|
|
#define SIMULATORLAZERPROBE_H
|
|
#include "AbstractLazerProbe.h"
|
|
#include <QMutex>
|
|
#include <QObject>
|
|
#include <QReadWriteLock>
|
|
|
|
class CSimulatorLazerProbe : public QObject, public CAbstractLazerProbe
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
CSimulatorLazerProbe(unsigned int ProbeID, unsigned int ProbeType);
|
|
~CSimulatorLazerProbe();
|
|
|
|
unsigned int OpenPort(QString PortName);
|
|
unsigned int GetType();
|
|
QString GetPortName();
|
|
unsigned int GetID();
|
|
unsigned int StartAcquisition();
|
|
unsigned int StopAcquisition();
|
|
unsigned int GetLastData();
|
|
unsigned int SetData(unsigned int data);
|
|
unsigned int FlushProbeData();
|
|
bool IsProbeAlive();
|
|
|
|
unsigned int SetProbeAlive();
|
|
unsigned int SetProbeDead();
|
|
|
|
unsigned int mData;
|
|
|
|
private:
|
|
QString mPortName;
|
|
unsigned int mProbeID;
|
|
unsigned int mProbeType;
|
|
QMutex mMutex;
|
|
QReadWriteLock mRdWrLock;
|
|
bool mProbeAlive;
|
|
|
|
signals:
|
|
void NewProbeData(unsigned int,unsigned int);
|
|
|
|
};
|
|
|
|
#endif // SIMULATORLAZERPROBE_H
|