| | |
| | | #ifdef AFX_DESIGN_TIME
|
| | | enum { IDD = IDD_MTerm1CommDevView2 };
|
| | | #endif
|
| | |
|
| | | /*
|
| | | #ifdef _DEBUG
|
| | | virtual void AssertValid() const;
|
| | | CMTerm1Doc* CMTerm1CommDevView::GetDocument() const
|
| | |
| | | virtual void Dump(CDumpContext& dc) const;
|
| | | #endif
|
| | | #endif
|
| | |
|
| | | */
|
| | | protected:
|
| | | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
| | | DECLARE_MESSAGE_MAP()
|
| | |
| | | // CToolBar m_wndToolBar;
|
| | | // CImageList m_ColorTreeImages;
|
| | | // CTreeCtrl m_treectrl1;
|
| | |
|
| | | typedef struct tagWLStat
|
| | | {
|
| | | uint32_t Stat; //状态
|
| | | uint32_t curStat; //当前状态
|
| | | uint32_t runStep; //工作步骤
|
| | | union {
|
| | | uint32_t Status; //状态
|
| | | struct {
|
| | | uint32_t bMasterSent : 1;
|
| | | uint32_t bMasterRecved : 1;
|
| | | };
|
| | | };
|
| | | uint16_t curStat; //当前状态
|
| | | uint16_t runStep; //工作步骤
|
| | | uint16_t RunStat; //运行状态
|
| | | uint16_t ErrStat; //错误状态
|
| | | uint32_t RF_Freq; //运行频率
|
| | | uint16_t nTimeOnAir;
|
| | | uint16_t DeviceAddr;
|
| | |
|
| | | uint8_t NetWorkAddr;
|
| | |
|
| | | uint8_t Tx_Power; // dBm 5 - 22 dBm
|
| | | uint8_t LoraBandWidth; // [0: 125 kHz, 1: 250 kHz, 2: 500 kHz, 3: Reserved ] |
| | | uint8_t LoRaFactor; // [SF5 .. SF 12]
|
| | | uint8_t LoRaCodingRate; // [1 : 4/5, 2: 4/6, 3: 4/7, 4: 4/8 ]
|
| | |
|
| | | uint8_t LoRaPreambleLen; // 2 - 12
|
| | |
|
| | | uint8_t bEnableAddr;
|
| | | uint8_t bEnableEncrypt;
|
| | | uint8_t bEnableRelay;
|
| | | uint8_t bAutoReSend; //自动重发
|
| | | uint8_t nCurClient;
|
| | | uint8_t nSeq;
|
| | |
|
| | | uint32_t sentCount; //发送计数
|
| | | uint32_t recvCount; //接收计数
|
| | | uint32_t lastSendtime; //上次发送时间
|
| | |
| | | uint32_t lastErrTime; //上次错误时间
|
| | | uint32_t latancy; //延迟
|
| | | uint32_t cycleTime; //循环时间
|
| | | uint32_t LostPackets; //丢包计数
|
| | | uint32_t CtnLstPkts; //连续丢包计数
|
| | | uint32_t MaxCtnLstPkts; //最大连续丢包计数
|
| | | uint32_t TXErr; //发送错误计数
|
| | | uint32_t RXErr; //接收错误计数
|
| | | uint32_t CRCErr; //CRC错误计数
|
| | | uint32_t CADDoneCount; //CAD 完成次数
|
| | | uint32_t StepErr1; //步骤错误1
|
| | | uint32_t StepErr2; //步骤错误2
|
| | | uint32_t Err1Count; //微闪报警次数
|
| | | uint32_t Err2Count; //大闪报警次数
|
| | | uint32_t Err3Count; //严重丢失信号次数
|
| | | uint16_t LostPackets; //丢包计数
|
| | | uint16_t CtnLstPkts; //连续丢包计数
|
| | | uint16_t MaxCtnLstPkts; //最大连续丢包计数
|
| | | uint16_t TXErr; //发送错误计数
|
| | | uint16_t RXErr; //接收错误计数
|
| | | uint16_t CRCErr; //CRC错误计数
|
| | | uint16_t PktErr; //包错误 ;
|
| | | uint16_t ChnErr; //频道错误;
|
| | | uint16_t nErrChn; //错误的频道号;
|
| | | uint16_t CADDoneCount; //CAD 完成次数
|
| | | uint16_t CADOkCount; //CAD 是次数
|
| | | uint16_t CADNgCount; //CAD 否次数
|
| | | uint16_t CADTimeOut; //CAD 超时次数 |
| | | uint16_t StepErr1; //步骤错误1
|
| | | uint16_t StepErr2; //步骤错误2
|
| | | uint16_t Err1Count; //微闪报警次数
|
| | | uint16_t Err2Count; //大闪报警次数
|
| | | uint16_t Err3Count; //严重丢失信号次数
|
| | | int8_t RSSI; //信号强度
|
| | | int8_t SNR; //信噪比
|
| | | int8_t tRSSI; //对方信号强度
|
| | |
| | | uint32_t targetRecvdCount; //对方接受数量
|
| | |
|
| | | }stWLRunStat, *pstWLRunStat;
|
| | |
|
| | |
|
| | | typedef struct tagWLStatV12
|
| | | {
|
| | | union {
|
| | | uint32_t Status; //状态
|
| | | struct {
|
| | | uint32_t bMasterSent : 1;
|
| | | uint32_t bMasterRecved : 1;
|
| | | };
|
| | | }; |
| | | uint16_t curStat; //当前状态
|
| | | uint16_t runStep; //工作步骤
|
| | | uint16_t RunStat; //运行状态
|
| | | uint16_t ErrStat; //错误状态
|
| | | uint32_t RF_Freq; //运行频率
|
| | | uint32_t nTimeOnAir;
|
| | | uint32_t sentCount; //发送计数
|
| | | uint32_t recvCount; //接收计数
|
| | | uint32_t lastSendtime; //上次发送时间
|
| | | uint32_t lastSenttime; //上次发送出时间
|
| | | uint32_t lastRecvtime; //上次启动接收时间
|
| | | uint32_t lastRecvdtime; //上次接收时间
|
| | | uint32_t lastActTime; //上次动作时间
|
| | | uint32_t lastAckTime; //上次应答时间
|
| | | uint32_t lastErrTime; //上次错误时间
|
| | | uint32_t latancy; //延迟
|
| | | uint32_t cycleTime; //循环时间
|
| | | uint16_t LostPackets; //丢包计数
|
| | | uint16_t CtnLstPkts; //连续丢包计数
|
| | | uint16_t MaxCtnLstPkts; //最大连续丢包计数
|
| | | uint16_t TXErr; //发送错误计数
|
| | | uint16_t RXErr; //接收错误计数
|
| | | uint16_t CRCErr; //CRC错误计数
|
| | | uint16_t ChnErr; //频道错误
|
| | | uint16_t PktErr; //包错误
|
| | | uint16_t CADDoneCount; //CAD 完成次数
|
| | | uint16_t StepErr1; //步骤错误1
|
| | | uint16_t StepErr2; //步骤错误2
|
| | | uint16_t Err1Count; //微闪报警次数
|
| | | uint16_t Err2Count; //大闪报警次数
|
| | | uint16_t Err3Count; //严重丢失信号次数
|
| | | int8_t RSSI; //信号强度
|
| | | int8_t SNR; //信噪比
|
| | | int8_t tRSSI; //对方信号强度
|
| | | int8_t tSNR; //对方信噪比
|
| | | uint32_t targetSentCount; //对方发送数量
|
| | | uint32_t targetRecvdCount; //对方接受数量
|
| | |
|
| | | }stWLRunStatV12, *pstWLRunStatV12;
|
| | |
|
| | | typedef struct tagWLStatV1
|
| | | {
|
| | | union {
|
| | | uint32_t Status; //状态
|
| | | struct {
|
| | | uint32_t bMasterSent : 1;
|
| | | uint32_t bMasterRecved : 1;
|
| | | };
|
| | | };
|
| | | uint16_t curStat; //当前状态
|
| | | uint16_t runStep; //工作步骤
|
| | | uint16_t RunStat; //运行状态
|
| | | uint16_t ErrStat; //错误状态
|
| | | // uint32_t RF_Freq; //运行频率
|
| | | // uint32_t nTimeOnAir;
|
| | | uint32_t sentCount; //发送计数
|
| | | uint32_t recvCount; //接收计数
|
| | | uint32_t lastSendtime; //上次发送时间
|
| | | uint32_t lastSenttime; //上次发送出时间
|
| | | uint32_t lastRecvtime; //上次启动接收时间
|
| | | uint32_t lastRecvdtime; //上次接收时间
|
| | | uint32_t lastActTime; //上次动作时间
|
| | | uint32_t lastAckTime; //上次应答时间
|
| | | uint32_t lastErrTime; //上次错误时间
|
| | | uint32_t latancy; //延迟
|
| | | uint32_t cycleTime; //循环时间
|
| | | uint16_t LostPackets; //丢包计数
|
| | | uint16_t CtnLstPkts; //连续丢包计数
|
| | | uint16_t MaxCtnLstPkts; //最大连续丢包计数
|
| | | uint16_t TXErr; //发送错误计数
|
| | | uint16_t RXErr; //接收错误计数
|
| | | uint16_t CRCErr; //CRC错误计数
|
| | | // uint16_t ChnErr; //频道错误
|
| | | // uint16_t PktErr; //包错误
|
| | | uint16_t CADDoneCount; //CAD 完成次数
|
| | | uint16_t StepErr1; //步骤错误1
|
| | | uint16_t StepErr2; //步骤错误2
|
| | | uint16_t Err1Count; //微闪报警次数
|
| | | uint16_t Err2Count; //大闪报警次数
|
| | | uint16_t Err3Count; //严重丢失信号次数
|
| | | int8_t RSSI; //信号强度
|
| | | int8_t SNR; //信噪比
|
| | | int8_t tRSSI; //对方信号强度
|
| | | int8_t tSNR; //对方信噪比
|
| | | uint32_t targetSentCount; //对方发送数量
|
| | | uint32_t targetRecvdCount; //对方接受数量
|
| | |
|
| | | }stWLRunStatV1, * pstWLRunStatV1;
|
| | |
|
| | | CString KWRunStatToString(pstWLRunStat pWLRunStat1);
|
| | | CString KWRunStatToString(pstWLRunStatV1 pWLRunStat1);
|
| | | CString KWRunStatToString(pstWLRunStatV12 pWLRunStat1);
|
| | |
|
| | | afx_msg void OnClose();
|
| | | afx_msg void OnSize(UINT nType, int cx, int cy);
|
| | |
| | | afx_msg void OnBnClickedButton3();
|
| | | int UpdateLEDDisplay();
|
| | | int UpdateStatusBar(int nIndex);
|
| | | afx_msg void OnBnClickedButton5();
|
| | | afx_msg void OnBnClickedButton9();
|
| | | virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
|
| | | };
|