📄 bodenstation2dlg.h
字号:
// Bodenstation2Dlg.h : Header-Datei
//
//{{AFX_INCLUDES()
#include "mschart.h"
//}}AFX_INCLUDES
#if !defined(AFX_BODENSTATION2DLG_H__2884905A_B1FE_4184_A224_0FA232ED5F33__INCLUDED_)
#define AFX_BODENSTATION2DLG_H__2884905A_B1FE_4184_A224_0FA232ED5F33__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <winsock2.h>
#include "Controler\global.h"
#include <fstream>
using namespace std;
/////////////////////////////////////////////////////////////////////////////
// CBodenstation2Dlg Dialogfeld
class CBodenstation2Dlg : public CDialog
{
// Konstruktion
public:
CBodenstation2Dlg(CWnd* pParent = NULL); // Standard-Konstruktor
// Dialogfelddaten
//{{AFX_DATA(CBodenstation2Dlg)
enum { IDD = IDD_BODENSTATION2_DIALOG };
CButton m_btnbasis;
CButton m_ConnectButton;
CMSChart m_Chart1;
CMSChart m_Chart2;
CMSChart m_Chart3;
CMSChart m_Chart4;
//}}AFX_DATA
// Vom Klassenassistenten generierte 躡erladungen virtueller Funktionen
//{{AFX_VIRTUAL(CBodenstation2Dlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV-Unterst黷zung
//}}AFX_VIRTUAL
// Implementierung
protected:
HICON m_hIcon;
// Generierte Message-Map-Funktionen
//{{AFX_MSG(CBodenstation2Dlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnConnect();
afx_msg void OnRadio1();
afx_msg void OnRadio2();
afx_msg void OnRadio3();
afx_msg void OnRadio4();
afx_msg void OnStart();
afx_msg void OnCom1();
afx_msg void OnCom2();
afx_msg void OnBtngps();
afx_msg void OnOLEStartDragMschart1(LPDISPATCH FAR* Data, long FAR* AllowedEffects);
DECLARE_EVENTSINK_MAP()
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
void PrintData();
void DrawChart1(unsigned int* Time, float* Line1, float* Line2, float* Line3, float* Line4);
void DrawChart2(unsigned int* Time, float* Line1, float* Line2, float* Line3, float* Line4);
void DrawChart3(float Pos_x, float Pos_y);
void DrawChart4(unsigned int* Time, float* Line1, float* Line2, float* Line3, float* Line4);
private:
static UINT Thread_Fkt1(LPVOID pParam);
void InitProgramm(); //Programm Initialisierungen
void InitChart1(); //Chart1 initialisieren
void InitChart2(); //Chart2 initialisieren
void InitChart3();
void InitChart4();
void InitUSB(); //Schnittstelle initialisieren
void ReceiveThread(); //Empfangsthread f黵 die Schnittstelle
//Telegramm decodieren
void DecodeReceiveBuffer(char* Buffer, int Lenght);
void SendThread();
void OpenServer();
void SendThread2();
void OpenServer2();
static UINT ThreadSend(LPVOID pParam); //Anlasser Arbeitsthread A
static UINT ThreadOpen(LPVOID pParam);
static UINT ThreadSend2(LPVOID pParam); //Anlasser Arbeitsthread B
static UINT ThreadOpen2(LPVOID pParam);
void SendElement(char Type, char Num, char* Data);
void SendDataForMap(float sensor_v, float sensor_h, float sensor_r, float sensor_l, float sensor_k,
float position_x, float position_y);
void Cancel();
SOCKET m_listenSocket;
SOCKET m_sendSocket;
SOCKET m_ClientSocket2;
SOCKET m_ServerSocket2;
int m_BufferIndex;
char m_Buffer[256];
int m_DataForMapIndex;
char m_DataForMap[256];
bool m_Blocked;
float m_fLine1[50]; //Array f黵 Datenpunkte
float m_fLine2[50];
float m_fLine3[50];
float m_fLine4[50];
float m_fLine5[50];
float m_fLine6[50];
float m_fLine7[50];
float m_fLine8[50];
float m_fLine9[50];
float m_fLine10[50];
float m_fLine11[50];
float m_fLine12[50];
float m_fLine13[50];
float m_fLine14[50];
float m_fLine15[50];
float m_fLine16[50];
float m_fLine17[50];
float m_fLine18[50];
float m_fLine19[50];
float m_fLine20[50];
float m_fLine21[50];
int m_iTime[10]; //Zeitstempel
unsigned int m_iSek[10]; //Sekundenz鋒ler
float x_Position[5];
float y_Position[5];
float m_Sensor_v[5];
float m_Sensor_h[5];
float m_Sensor_r[5];
float m_Sensor_l[5];
float m_Sensor_o[5];
float m_Sensor_u[5];
float m_Sensor_k[5];
float m_Sensor_b[5];
float m_GyroProZyklus[5];
float m_Richtung_ist[5];
float m_Akkuspannung[5];
unsigned char m_FoundBlobs;
/*X*/// fuer GPS Nachricht
unsigned char m_GPSDaten[128]; //Array fuer Cam Daten oder GPS Daten
float f_long_m[5]; // Longitude: Min.
float f_lat_m[5]; // Latitude: Min.
unsigned char ch_ns[5] ; //N/S Indicator N=north or S=south or U=unknown
unsigned char ch_ew[5] ; // E/W Indicator E=east or W=west or U=unknown
unsigned char ch_stat[5]; // A = valid fuer GPS Nachricht
// V = invalid
// z= unknown
float f_course[5]; // speed
////////////GPS Daten verarbeiten
float long_m[5];
float lat_m[5];
float first_long;
float first_lat;
bit first_flag ;
void GPSDatenverarbeiten(float f_long_m, float f_lat_m, char stat);
/*X*/
unsigned char m_IRData[9];
float TrackDaten[25][2]; //Array f黵 Positionsdaten
int ScaleFactor;
float m_RichtungSoll;
float m_FlugSoll;
float m_FlugIst;
HANDLE m_hComPort;
CString m_PortNumber; //Port zum auslesen (z.B."COM3")
ofstream m_Outfile;
CWinThread* m_pThread1; // erster Thread
bool m_ThreadActive;
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ f黦t unmittelbar vor der vorhergehenden Zeile zus鋞zliche Deklarationen ein.
#endif // !defined(AFX_BODENSTATION2DLG_H__2884905A_B1FE_4184_A224_0FA232ED5F33__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -