57 lines
1.1 KiB
C++
57 lines
1.1 KiB
C++
#ifndef AVRECEIVERDEVICE_H
|
|
#define AVRECEIVERDEVICE_H
|
|
|
|
#include <QTcpSocket>
|
|
#include <QHash>
|
|
|
|
#define RECEIVER_PORT 23
|
|
#define RECEIVER_IP_ADDRESS "192.168.0.104"
|
|
|
|
enum eReceiverSpkStatus
|
|
{
|
|
RECEIVER_OFF_SPK_STATUS,
|
|
RECEIVER_A_ON_SPK_STATUS,
|
|
RECEIVER_B_ON_SPK_STATUS,
|
|
RECEIVER_A_B_ON_SPK_STATUS,
|
|
RECEIVER_UNKNOWN_SPK_STATUS
|
|
};
|
|
|
|
class CAVReceiverDevice : QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
CAVReceiverDevice();
|
|
~CAVReceiverDevice();
|
|
|
|
int ConnectToReceiver();
|
|
int DisconnectReceiver();
|
|
|
|
private:
|
|
QTcpSocket *mReceiverSocket;
|
|
int AnalyseRxData(QByteArray data);
|
|
|
|
int mReceiverVolume;
|
|
bool mReceiverMute;
|
|
int mReceiverCurInput;
|
|
int mReceiverListeningModeSet;
|
|
int mReceiverPlayingLM;
|
|
int mReceiverSpkStatus;
|
|
int mReceiverHDMIOutSel;
|
|
|
|
QHash<int,QString> mInputsHash;
|
|
QHash<int,QString> mListeningModesHash;
|
|
QHash<int,QString> mPlayingLMHash;
|
|
QHash<int,QString> mSpeakerStatusHash;
|
|
QHash<int,QString> mHDMIOutSelectHash;
|
|
|
|
bool mIsConnected;
|
|
|
|
public slots:
|
|
void SocketConnected();
|
|
void SocketDisconnected();
|
|
void SocketRX();
|
|
};
|
|
|
|
#endif // AVRECEIVERDEVICE_H
|