Mehrabi
3 years ago
4 changed files with 264 additions and 8 deletions
@ -1,17 +1,63 @@ |
|||||
#ifndef HONAPACKET_H |
#ifndef HONAPACKET_H |
||||
#define HONAPACKET_H |
#define HONAPACKET_H |
||||
|
|
||||
#include <QObject> |
#include <QtGlobal> |
||||
|
#include "include/LowLevel/Utils/Utils.h" |
||||
|
|
||||
class HonaPacket : public QObject |
|
||||
|
class HonaPacket |
||||
{ |
{ |
||||
Q_OBJECT |
private: |
||||
public: |
|
||||
explicit HonaPacket(QObject *parent = nullptr); |
|
||||
|
|
||||
signals: |
qreal toaClock; |
||||
|
honaPacketType m_PacketType; |
||||
|
quint32 m_PacketNumber; |
||||
|
qulonglong m_Toa; |
||||
|
quint32 m_Doa; |
||||
|
quint32 m_Pa1; |
||||
|
quint32 m_Pa2; |
||||
|
quint32 m_Pa3; |
||||
|
quint32 m_Pa4; |
||||
|
quint32 m_Code; |
||||
|
quint32 m_CodeL; |
||||
|
quint32 m_CodeM; |
||||
|
|
||||
public slots: |
public: |
||||
|
HonaPacket(); |
||||
|
/******************************************************************/ |
||||
|
honaPacketType getPacketType(void); |
||||
|
void setPacketType(honaPacketType &temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getPacketNumber(void); |
||||
|
void setPacketNumber(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
qulonglong getToa(void); |
||||
|
void setToa(qulonglong temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getDoa(void); |
||||
|
void setDoa(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getPa1(void); |
||||
|
void setPa1(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getPa2(void); |
||||
|
void setPa2(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getPa3(void); |
||||
|
void setPa3(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getPa4(void); |
||||
|
void setPa4(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getCode(void); |
||||
|
void setCode(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getCodeL(void); |
||||
|
void setCodeL(quint32 temp); |
||||
|
/******************************************************************/ |
||||
|
quint32 getCodeM(void); |
||||
|
void setCodeM(quint32 temp); |
||||
|
/******************************************************************/ |
||||
}; |
}; |
||||
|
|
||||
#endif // HONAPACKET_H
|
#endif // HONAPACKET_H
|
||||
|
@ -0,0 +1,41 @@ |
|||||
|
|
||||
|
#ifndef SETTINGS_H |
||||
|
#define SETTINGS_H |
||||
|
|
||||
|
#include <QtGlobal> |
||||
|
#include "include/LowLevel/Utils/Utils.h" |
||||
|
|
||||
|
/***********************************************************************************************/ |
||||
|
typedef struct _HIRUSETTINGS |
||||
|
{ |
||||
|
recorderStart recordStard; |
||||
|
recorderMode recordMode; |
||||
|
quint32 recordChannel; |
||||
|
quint32 threshold = 0; |
||||
|
quint32 timeout = 1000; |
||||
|
quint32 count = 5; |
||||
|
|
||||
|
}hiruSettings; |
||||
|
/***********************************************************************************************/ |
||||
|
typedef struct _HSRUSETTINGS |
||||
|
{ |
||||
|
bool isReal = true; |
||||
|
quint32 honaInt123CTHR = 128; |
||||
|
quint32 honaRes123CTHR = 128; |
||||
|
quint32 honaIntSTHR = 20; |
||||
|
quint32 honaResSTHR = 20; |
||||
|
quint32 honaSPTHR = 20; //mode4
|
||||
|
quint32 intM4_THR = 20; //mode4
|
||||
|
quint32 resM4_THR = 20; //mode4
|
||||
|
|
||||
|
}hsruSettings; |
||||
|
/***********************************************************************************************/ |
||||
|
typedef struct _HONASETTINGS |
||||
|
{ |
||||
|
quint32 hsruSettings; |
||||
|
quint32 hiruSettings; |
||||
|
|
||||
|
}honaSettings; |
||||
|
/***********************************************************************************************/ |
||||
|
|
||||
|
#endif // SETTING_H
|
@ -0,0 +1,69 @@ |
|||||
|
#ifndef UTILS_H |
||||
|
#define UTILS_H |
||||
|
|
||||
|
|
||||
|
/*************************************************************************************************/ |
||||
|
typedef enum _APIRESULT |
||||
|
{ |
||||
|
success, |
||||
|
alreadyStarted, |
||||
|
busy, |
||||
|
error |
||||
|
|
||||
|
}apiResult; |
||||
|
/*************************************************************************************************/ |
||||
|
typedef enum _DRXDEVICEIFCHANNEL |
||||
|
{ |
||||
|
ifChannel11, |
||||
|
ifChannel12 |
||||
|
|
||||
|
}drxDeviceIfChannel; |
||||
|
/*************************************************************************************************/ |
||||
|
typedef enum _HONARECEIVERS |
||||
|
{ |
||||
|
int123C, |
||||
|
intS, |
||||
|
resS, |
||||
|
int4, //Mode 4
|
||||
|
res4, //Mode 4
|
||||
|
signalPulse //Mode 4
|
||||
|
|
||||
|
}honaReceivers; |
||||
|
/*************************************************************************************************/ |
||||
|
typedef enum _RECORDERMODE |
||||
|
{ |
||||
|
signalChannel, |
||||
|
dualChannel |
||||
|
|
||||
|
}recorderMode; |
||||
|
/*************************************************************************************************/ |
||||
|
typedef enum _RECORDSTART |
||||
|
{ |
||||
|
selfTestCounter, |
||||
|
freeRunRecording |
||||
|
|
||||
|
}recorderStart; |
||||
|
/*************************************************************************************************/ |
||||
|
typedef enum _HONAPACKETTYPE |
||||
|
{ |
||||
|
interrogationMode123C, |
||||
|
interrogationModeS56, |
||||
|
interrogationModeS112, |
||||
|
interrogationMode4, |
||||
|
|
||||
|
responseMode123C, |
||||
|
responseModeS56, |
||||
|
responseModeS112, |
||||
|
|
||||
|
responseMode4, |
||||
|
signalPulseMode4 |
||||
|
|
||||
|
}honaPacketType; |
||||
|
/*************************************************************************************************/ |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
#endif // UTILS_H
|
@ -1,6 +1,106 @@ |
|||||
#include "../../include/LowLevel/HonaPacket.h" |
#include "../../include/LowLevel/HonaPacket.h" |
||||
|
|
||||
HonaPacket::HonaPacket(QObject *parent) : QObject(parent) |
HonaPacket::HonaPacket() |
||||
{ |
{ |
||||
|
|
||||
} |
} |
||||
|
/*************************************************************************************************/ |
||||
|
honaPacketType HonaPacket::getPacketType(void) |
||||
|
{ |
||||
|
return m_PacketType; |
||||
|
} |
||||
|
void HonaPacket::setPacketType(honaPacketType &temp) |
||||
|
{ |
||||
|
m_PacketType = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getPacketNumber(void) |
||||
|
{ |
||||
|
return m_PacketNumber; |
||||
|
} |
||||
|
void HonaPacket::setPacketNumber(quint32 temp) |
||||
|
{ |
||||
|
m_PacketNumber = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
qulonglong HonaPacket::getToa(void) |
||||
|
{ |
||||
|
return m_Toa; |
||||
|
} |
||||
|
void HonaPacket::setToa(qulonglong temp) |
||||
|
{ |
||||
|
m_Toa = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getDoa(void) |
||||
|
{ |
||||
|
return m_Doa; |
||||
|
} |
||||
|
void HonaPacket::setDoa(quint32 temp) |
||||
|
{ |
||||
|
m_Doa = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getPa1(void) |
||||
|
{ |
||||
|
return m_Pa1; |
||||
|
} |
||||
|
void HonaPacket::setPa1(quint32 temp) |
||||
|
{ |
||||
|
m_Pa1 = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getPa2(void) |
||||
|
{ |
||||
|
return m_Pa2; |
||||
|
} |
||||
|
void HonaPacket::setPa2(quint32 temp) |
||||
|
{ |
||||
|
m_Pa2 = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getPa3(void) |
||||
|
{ |
||||
|
return m_Pa3; |
||||
|
} |
||||
|
void HonaPacket::setPa3(quint32 temp) |
||||
|
{ |
||||
|
m_Pa3= temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getPa4(void) |
||||
|
{ |
||||
|
return m_Pa4; |
||||
|
} |
||||
|
void HonaPacket::setPa4(quint32 temp) |
||||
|
{ |
||||
|
m_Pa4= temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getCode(void) |
||||
|
{ |
||||
|
return m_Code; |
||||
|
} |
||||
|
void HonaPacket::setCode(quint32 temp) |
||||
|
{ |
||||
|
m_Code = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getCodeL(void) |
||||
|
{ |
||||
|
return m_CodeL; |
||||
|
} |
||||
|
void HonaPacket::setCodeL(quint32 temp) |
||||
|
{ |
||||
|
m_CodeL = temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
quint32 HonaPacket::getCodeM(void) |
||||
|
{ |
||||
|
return m_CodeM; |
||||
|
} |
||||
|
void HonaPacket::setCodeM(quint32 temp) |
||||
|
{ |
||||
|
m_CodeM= temp; |
||||
|
} |
||||
|
/*************************************************************************************************/ |
||||
|
Loading…
Reference in new issue