46 lines
644 B
C++
Executable File
46 lines
644 B
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
namespace NGL
|
|
{
|
|
class INGLLogger;
|
|
}
|
|
namespace TrainingAreaBaseOC
|
|
{
|
|
class Device;
|
|
|
|
|
|
class Channel : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Channel(QChar channel, bool bIsBinary, QObject *parent = nullptr);
|
|
|
|
void setDevice(Device *dev);
|
|
|
|
bool writeData(const QByteArray &data);
|
|
|
|
QChar channel() const { return m_channel; }
|
|
|
|
signals:
|
|
void dataAvailable(const QByteArray &);
|
|
void disconnectedFromEq();
|
|
|
|
|
|
protected slots:
|
|
void onDeviceDestroyed();
|
|
void onDataAvailable(const QByteArray &data);
|
|
|
|
protected:
|
|
|
|
NGL::INGLLogger &m_logger;
|
|
QChar m_channel;
|
|
bool m_bIsBinary;
|
|
Device *m_device;
|
|
};
|
|
}
|