commit
3001dfefb7
2375 changed files with 353613 additions and 0 deletions
-
221BoardReceiver/BoardReceiver.cpp
-
392BoardReceiver/BoardReceiver.dsp
-
134BoardReceiver/BoardReceiver.dsw
-
73BoardReceiver/BoardReceiver.h
-
4BoardReceiver/BoardReceiver.ini
-
76BoardReceiver/BoardReceiver.plg
-
584BoardReceiver/BoardReceiver.rc
-
1121BoardReceiver/BoardReceiver.vcproj
-
65BoardReceiver/BoardReceiver.vcproj.DUALCORE.Sergey.user
-
65BoardReceiver/BoardReceiver.vcproj.P2600HT.Sergey.user
-
301BoardReceiver/BoardReceiver.vcproj.old
-
10BoardReceiver/BoardReceiver.vcproj.vspscc
-
111BoardReceiver/BoardReceiverDlg.cpp
-
70BoardReceiver/BoardReceiverDlg.h
-
748BoardReceiver/BoardReceiverDoc.cpp
-
141BoardReceiver/BoardReceiverDoc.h
-
182BoardReceiver/BoardReceiverList.cpp
-
69BoardReceiver/BoardReceiverList.h
-
111BoardReceiver/BoardReceiverParamDlg.cpp
-
80BoardReceiver/BoardReceiverParamDlg.h
-
110BoardReceiver/BoardReceiverSeekDlg.cpp
-
69BoardReceiver/BoardReceiverSeekDlg.h
-
84BoardReceiver/BoardReceiverSwitcher.cpp
-
32BoardReceiver/BoardReceiverSwitcher.h
-
120BoardReceiver/BoardReceiverVariableList.cpp
-
67BoardReceiver/BoardReceiverVariableList.h
-
669BoardReceiver/BoardReceiverView.cpp
-
117BoardReceiver/BoardReceiverView.h
-
96BoardReceiver/ChildFrm.cpp
-
69BoardReceiver/ChildFrm.h
-
69BoardReceiver/DataStreamsServer.cpp
-
41BoardReceiver/DataStreamsServer.h
-
1BoardReceiver/INIT_M.INI
-
75BoardReceiver/Kernel.cpp
-
51BoardReceiver/Kernel.h
-
130BoardReceiver/MainFrm.cpp
-
70BoardReceiver/MainFrm.h
-
146BoardReceiver/MemoryDC.cpp
-
41BoardReceiver/MemoryDC.h
-
BINBoardReceiver/RES/BoardReceiver.ico
-
13BoardReceiver/RES/BoardReceiver.rc2
-
BINBoardReceiver/RES/BoardReceiverDoc.ico
-
BINBoardReceiver/RES/Toolbar.bmp
-
BINBoardReceiver/RES/mainfram.bmp
-
BINBoardReceiver/RES/vssver.scc
-
1BoardReceiver/SERIAL.INI
-
12BoardReceiver/SN.INI
-
21BoardReceiver/StdAfx.cpp
-
43BoardReceiver/StdAfx.h
-
2BoardReceiver/_WIDTH.INI
-
2BoardReceiver/_width.ini
-
96BoardReceiver/hidden.txt
-
1BoardReceiver/init_m.ini
-
1BoardReceiver/init_s.ini
-
0BoardReceiver/lt0.ini
-
0BoardReceiver/lt1.ini
-
9BoardReceiver/mssccprj.scc
-
21BoardReceiver/polygons.txt
-
BINBoardReceiver/res/BoardReceiver.ico
-
13BoardReceiver/res/BoardReceiver.rc2
-
BINBoardReceiver/res/BoardReceiverDoc.ico
-
BINBoardReceiver/res/Toolbar.bmp
-
BINBoardReceiver/res/mainfram.bmp
-
BINBoardReceiver/res/vssver.scc
-
73BoardReceiver/resource.h
-
1BoardReceiver/serial.ini
-
12BoardReceiver/sn.ini
-
BINBoardReceiver/vssver.scc
-
28EmulateLGS/EmulateHW.cpp
-
198EmulateLGS/EmulateHW.h
-
BINEmulateLGS/EmulateLGS.aps
-
75EmulateLGS/EmulateLGS.cpp
-
359EmulateLGS/EmulateLGS.dsp
-
47EmulateLGS/EmulateLGS.h
-
1427EmulateLGS/EmulateLGS.plg
-
195EmulateLGS/EmulateLGS.rc
-
1010EmulateLGS/EmulateLGS.vcproj
-
65EmulateLGS/EmulateLGS.vcproj.DUALCORE.Sergey.user
-
65EmulateLGS/EmulateLGS.vcproj.P2600HT.Sergey.user
-
201EmulateLGS/EmulateLGSDlg.cpp
-
60EmulateLGS/EmulateLGSDlg.h
-
21EmulateLGS/Resource.h
-
1EmulateLGS/SERIAL.INI
-
12EmulateLGS/SN.INI
-
8EmulateLGS/StdAfx.cpp
-
19EmulateLGS/StdAfx.h
-
13EmulateLGS/USER.INI
-
0EmulateLGS/hidden.txt
-
1EmulateLGS/init_m.ini
-
1EmulateLGS/init_s.ini
-
0EmulateLGS/lt0.ini
-
0EmulateLGS/lt1.ini
-
7EmulateLGS/polygons.txt
-
BINEmulateLGS/res/EmulateLGS.ico
-
13EmulateLGS/res/EmulateLGS.rc2
-
1EmulateLGS/serial.ini
-
12EmulateLGS/sn.ini
-
13EmulateLGS/user.ini
-
BINLgLib/Advantech/ADSAPI/ADSAPI32.DLL
-
BINLgLib/Advantech/ADSAPI/ADSAPI32.LIB
@ -0,0 +1,221 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiver.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiver.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiver.cpp : Defines the class behaviors for the application.
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
|
|||
#include "MainFrm.h"
|
|||
#include "ChildFrm.h"
|
|||
#include "BoardReceiverDoc.h"
|
|||
#include "BoardReceiverView.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverApp
|
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverApp, CWinApp) |
|||
//{{AFX_MSG_MAP(CBoardReceiverApp)
|
|||
ON_COMMAND(ID_APP_ABOUT, OnAppAbout) |
|||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
|||
// DO NOT EDIT what you see in these blocks of generated code!
|
|||
//}}AFX_MSG_MAP
|
|||
// Standard file based document commands
|
|||
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew) |
|||
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen) |
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverApp construction
|
|||
|
|||
CBoardReceiverApp::CBoardReceiverApp() |
|||
{ |
|||
m_bFastIdleMode = FALSE; |
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// The one and only CBoardReceiverApp object
|
|||
|
|||
CBoardReceiverApp theApp; |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverApp initialization
|
|||
|
|||
BOOL CBoardReceiverApp::InitInstance() |
|||
{ |
|||
AfxEnableControlContainer(); |
|||
|
|||
// Standard initialization
|
|||
// If you are not using these features and wish to reduce the size
|
|||
// of your final executable, you should remove from the following
|
|||
// the specific initialization routines you do not need.
|
|||
|
|||
#ifdef _AFXDLL
|
|||
Enable3dControls(); // Call this when using MFC in a shared DLL
|
|||
#else
|
|||
Enable3dControlsStatic(); // Call this when linking to MFC statically
|
|||
#endif
|
|||
|
|||
// Change the registry key under which our settings are stored.
|
|||
// TODO: You should modify this string to be something appropriate
|
|||
// such as the name of your company or organization.
|
|||
SetRegistryKey(_T("Local AppWizard-Generated Applications")); |
|||
|
|||
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
|
|||
|
|||
// Register the application's document templates. Document templates
|
|||
// serve as the connection between documents, frame windows and views.
|
|||
|
|||
CMultiDocTemplate* pDocTemplate; |
|||
pDocTemplate = new CMultiDocTemplate( |
|||
IDR_BOARDRTYPE, |
|||
RUNTIME_CLASS(CBoardReceiverDoc), |
|||
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
|
|||
RUNTIME_CLASS(CBoardReceiverView)); |
|||
AddDocTemplate(pDocTemplate); |
|||
/*
|
|||
pDocTemplate = new CMultiDocTemplate( |
|||
IDR_BOARDRTYPE, |
|||
RUNTIME_CLASS(CBoardReceiverDoc), |
|||
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
|
|||
RUNTIME_CLASS(CBoardReceiverList)); |
|||
AddDocTemplate(pDocTemplate); |
|||
*/ |
|||
// create main MDI Frame window
|
|||
CMainFrame* pMainFrame = new CMainFrame; |
|||
if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) |
|||
return FALSE; |
|||
m_pMainWnd = pMainFrame; |
|||
|
|||
// Parse command line for standard shell commands, DDE, file open
|
|||
CCommandLineInfo cmdInfo; |
|||
ParseCommandLine(cmdInfo); |
|||
|
|||
// Dispatch commands specified on the command line
|
|||
// if (!ProcessShellCommand(cmdInfo))
|
|||
// return FALSE;
|
|||
|
|||
// The main window has been initialized, so show and update it.
|
|||
pMainFrame->ShowWindow(m_nCmdShow); |
|||
pMainFrame->UpdateWindow(); |
|||
/*
|
|||
// link server with client
|
|||
m_DataStreamsServer.LinkRemoteInterfaceBR( &m_TcpIpClient ); |
|||
m_TcpIpClient.Create( NULL, 2000 ); |
|||
*/ |
|||
return TRUE; |
|||
} |
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CAboutDlg dialog used for App About
|
|||
|
|||
class CAboutDlg : public CDialog |
|||
{ |
|||
public: |
|||
CAboutDlg(); |
|||
|
|||
// Dialog Data
|
|||
//{{AFX_DATA(CAboutDlg)
|
|||
enum { IDD = IDD_ABOUTBOX }; |
|||
//}}AFX_DATA
|
|||
|
|||
// ClassWizard generated virtual function overrides
|
|||
//{{AFX_VIRTUAL(CAboutDlg)
|
|||
protected: |
|||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|||
//}}AFX_VIRTUAL
|
|||
|
|||
// Implementation
|
|||
protected: |
|||
//{{AFX_MSG(CAboutDlg)
|
|||
// No message handlers
|
|||
//}}AFX_MSG
|
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) |
|||
{ |
|||
//{{AFX_DATA_INIT(CAboutDlg)
|
|||
//}}AFX_DATA_INIT
|
|||
} |
|||
|
|||
void CAboutDlg::DoDataExchange(CDataExchange* pDX) |
|||
{ |
|||
CDialog::DoDataExchange(pDX); |
|||
//{{AFX_DATA_MAP(CAboutDlg)
|
|||
//}}AFX_DATA_MAP
|
|||
} |
|||
|
|||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) |
|||
//{{AFX_MSG_MAP(CAboutDlg)
|
|||
// No message handlers
|
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
// App command to run the dialog
|
|||
void CBoardReceiverApp::OnAppAbout() |
|||
{ |
|||
CAboutDlg aboutDlg; |
|||
aboutDlg.DoModal(); |
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverApp message handlers
|
|||
|
|||
|
|||
BOOL CBoardReceiverApp::OnIdle( LONG lCount ) |
|||
{ |
|||
POSITION posDT = GetFirstDocTemplatePosition(); |
|||
while( posDT ) |
|||
{ |
|||
CDocTemplate* pDT = GetNextDocTemplate( posDT ); |
|||
POSITION posD = pDT->GetFirstDocPosition(); |
|||
while( posD ) |
|||
{ |
|||
CDocument *pD = pDT->GetNextDoc( posD ); |
|||
if( pD->IsKindOf( RUNTIME_CLASS( CBoardReceiverDoc ) ) ) |
|||
{ |
|||
CBoardReceiverDoc *pBRD = (CBoardReceiverDoc*) pD; |
|||
pBRD->OnIdle(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
BOOL bResult = CWinApp::OnIdle( lCount ); |
|||
|
|||
return m_bFastIdleMode ? TRUE : bResult; |
|||
} |
|||
|
|||
void CBoardReceiverApp::SetIdleMode( BOOL bFast ) |
|||
{ |
|||
m_bFastIdleMode = bFast; |
|||
} |
|||
/*
|
|||
BOOL CBoardReceiverApp::RegisterDocument( CBoardReceiverDoc *pDoc ) |
|||
{ |
|||
return m_DataStreamsServer.RegisterChannel( pDoc ); |
|||
} |
|||
|
|||
BOOL CBoardReceiverApp::UnregisterDocument( CBoardReceiverDoc *pDoc ) |
|||
{ |
|||
return m_DataStreamsServer.UnregisterChannel( pDoc ); |
|||
} |
|||
*/ |
|||
@ -0,0 +1,392 @@ |
|||
# Microsoft Developer Studio Project File - Name="BoardReceiver" - Package Owner=<4> |
|||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 |
|||
# ** DO NOT EDIT ** |
|||
|
|||
# TARGTYPE "Win32 (x86) Application" 0x0101 |
|||
|
|||
CFG=BoardReceiver - Win32 Debug |
|||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, |
|||
!MESSAGE use the Export Makefile command and run |
|||
!MESSAGE |
|||
!MESSAGE NMAKE /f "BoardReceiver.mak". |
|||
!MESSAGE |
|||
!MESSAGE You can specify a configuration when running NMAKE |
|||
!MESSAGE by defining the macro CFG on the command line. For example: |
|||
!MESSAGE |
|||
!MESSAGE NMAKE /f "BoardReceiver.mak" CFG="BoardReceiver - Win32 Debug" |
|||
!MESSAGE |
|||
!MESSAGE Possible choices for configuration are: |
|||
!MESSAGE |
|||
!MESSAGE "BoardReceiver - Win32 Release" (based on "Win32 (x86) Application") |
|||
!MESSAGE "BoardReceiver - Win32 Debug" (based on "Win32 (x86) Application") |
|||
!MESSAGE |
|||
|
|||
# Begin Project |
|||
# PROP AllowPerConfigDependencies 0 |
|||
# PROP Scc_ProjName ""$/System/System", TRFAAAAA" |
|||
# PROP Scc_LocalPath "..\system" |
|||
CPP=cl.exe |
|||
MTL=midl.exe |
|||
RSC=rc.exe |
|||
|
|||
!IF "$(CFG)" == "BoardReceiver - Win32 Release" |
|||
|
|||
# PROP BASE Use_MFC 6 |
|||
# PROP BASE Use_Debug_Libraries 0 |
|||
# PROP BASE Output_Dir "Release" |
|||
# PROP BASE Intermediate_Dir "Release" |
|||
# PROP BASE Target_Dir "" |
|||
# PROP Use_MFC 6 |
|||
# PROP Use_Debug_Libraries 0 |
|||
# PROP Output_Dir "..\Intermediate\6\Release\BoardReceiver" |
|||
# PROP Intermediate_Dir "..\Intermediate\6\Release\BoardReceiver" |
|||
# PROP Ignore_Export_Lib 0 |
|||
# PROP Target_Dir "" |
|||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c |
|||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c |
|||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 |
|||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 |
|||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" |
|||
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" |
|||
BSC32=bscmake.exe |
|||
# ADD BASE BSC32 /nologo |
|||
# ADD BSC32 /nologo |
|||
LINK32=link.exe |
|||
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 |
|||
# ADD LINK32 ijl15.lib Ws2_32.lib shlwapi.lib /nologo /subsystem:windows /machine:I386 /out:"..\test\BoardReceiver.exe" |
|||
|
|||
!ELSEIF "$(CFG)" == "BoardReceiver - Win32 Debug" |
|||
|
|||
# PROP BASE Use_MFC 6 |
|||
# PROP BASE Use_Debug_Libraries 1 |
|||
# PROP BASE Output_Dir "Debug" |
|||
# PROP BASE Intermediate_Dir "Debug" |
|||
# PROP BASE Target_Dir "" |
|||
# PROP Use_MFC 6 |
|||
# PROP Use_Debug_Libraries 1 |
|||
# PROP Output_Dir "..\Intermediate\6\Debug\BoardReceiver" |
|||
# PROP Intermediate_Dir "..\Intermediate\6\Debug\BoardReceiver" |
|||
# PROP Ignore_Export_Lib 0 |
|||
# PROP Target_Dir "" |
|||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c |
|||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /FD /GZ /c |
|||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 |
|||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 |
|||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" |
|||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" |
|||
BSC32=bscmake.exe |
|||
# ADD BASE BSC32 /nologo |
|||
# ADD BSC32 /nologo |
|||
LINK32=link.exe |
|||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept |
|||
# ADD LINK32 ijl15.lib Ws2_32.lib shlwapi.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept |
|||
|
|||
!ENDIF |
|||
|
|||
# Begin Target |
|||
|
|||
# Name "BoardReceiver - Win32 Release" |
|||
# Name "BoardReceiver - Win32 Debug" |
|||
# Begin Group "Source Files" |
|||
|
|||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\areset.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiver.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiver.rc |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverDlg.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverDoc.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverList.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverParamDlg.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverSeekDlg.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverSwitcher.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverVariableList.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverView.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Camera.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\chebron.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\ChildFrm.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMicPTZ.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMigPTZ.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpelco.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpg3ad.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cptzad.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\ctks576.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cvicon.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\DataStreamsServer.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\LGS\detecto_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Detector.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\System\DLIB\EventQueue.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Filters.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\LGS\filters_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\Kernel.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\MainFrm.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\MemoryDC.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\RELAY.CPP |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\relay_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Shadow.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\LGS\shadow_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\StdAfx.cpp |
|||
# ADD CPP /Yc"stdafx.h" |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Tracker.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\LGS\tracker_.cpp |
|||
# End Source File |
|||
# End Group |
|||
# Begin Group "Header Files" |
|||
|
|||
# PROP Default_Filter "h;hpp;hxx;hm;inl" |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiver.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverDlg.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverDoc.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverList.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverParamDlg.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverSeekDlg.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverSwitcher.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverVariableList.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\BoardReceiverView.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\chebron.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\ChildFrm.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMicPTZ.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMigPTZ.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpelco.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpg3ad.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\ctks576.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cvicon.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\DataStreamsServer.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Detector.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Filters.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\Kernel.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\MainFrm.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\MemoryDC.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\Resource.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Shadow.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\StdAfx.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Stream.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\LgLib\Templ.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Tracker.h |
|||
# End Source File |
|||
# End Group |
|||
# Begin Group "Resource Files" |
|||
|
|||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\BoardReceiver.ico |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\BoardReceiver.rc2 |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\BoardReceiverDoc.ico |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\mainfram.bmp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\Toolbar.bmp |
|||
# End Source File |
|||
# End Group |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\ReadMe.txt |
|||
# End Source File |
|||
# End Target |
|||
# End Project |
|||
@ -0,0 +1,134 @@ |
|||
Microsoft Developer Studio Workspace File, Format Version 6.00 |
|||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "BoardReceiver"=.\BoardReceiver.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLib |
|||
End Project Dependency |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLibComm |
|||
End Project Dependency |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLibNet |
|||
End Project Dependency |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLibRemote |
|||
End Project Dependency |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLibSocket |
|||
End Project Dependency |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLibVideo |
|||
End Project Dependency |
|||
Begin Project Dependency |
|||
Project_Dep_Name LgLibDevice |
|||
End Project Dependency |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLib"=..\LgLib\LgLib.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLibComm"=..\LgLib\Comm\LgLibComm.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLibDevice"=..\LgLib\Device\LgLibDevice.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLibNet"=..\LgLib\Net\LgLibNet.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLibRemote"=..\LgLib\Remote\LgLibRemote.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLibSocket"=..\LgLib\Socket\LgLibSocket.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Project: "LgLibVideo"=..\LgLib\Video\LgLibVideo.dsp - Package Owner=<4> |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<4> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
Global: |
|||
|
|||
Package=<5> |
|||
{{{ |
|||
}}} |
|||
|
|||
Package=<3> |
|||
{{{ |
|||
}}} |
|||
|
|||
############################################################################### |
|||
|
|||
@ -0,0 +1,73 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiver.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiver.h |
|||
//---------------------------------------------------------------------------- |
|||
// BoardReceiver.h : main header file for the BOARDRECEIVER application |
|||
// |
|||
|
|||
#if !defined(AFX_BOARDRECEIVER_H__D1A5F704_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_BOARDRECEIVER_H__D1A5F704_B810_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
#ifndef __AFXWIN_H__ |
|||
#error include 'stdafx.h' before including this file for PCH |
|||
#endif |
|||
|
|||
#include "resource.h" // main symbols |
|||
|
|||
#include "..\LgLib\Remote\LgRemoteClientTcpIpBoardReceiver.h" |
|||
#include "DataStreamsServer.h" |
|||
|
|||
class CBoardReceiverApp : public CWinApp |
|||
{ |
|||
public: |
|||
void SetIdleMode( BOOL bFast ); |
|||
CBoardReceiverApp(); |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverApp) |
|||
public: |
|||
virtual BOOL InitInstance(); |
|||
virtual BOOL OnIdle(LONG lCount); |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
//{{AFX_MSG(CBoardReceiverApp) |
|||
afx_msg void OnAppAbout(); |
|||
// NOTE - the ClassWizard will add and remove member functions here. |
|||
// DO NOT EDIT what you see in these blocks of generated code ! |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
/* |
|||
public: |
|||
BOOL RegisterDocument( CBoardReceiverDoc *pDoc ); |
|||
BOOL UnregisterDocument( CBoardReceiverDoc *pDoc ); |
|||
|
|||
private: |
|||
CLgRemoteClientTcpIpBoardReceiver m_TcpIpClient; |
|||
CDataStreamsServer m_DataStreamsServer; |
|||
*/ |
|||
private: |
|||
BOOL m_bFastIdleMode; |
|||
}; |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVER_H__D1A5F704_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,4 @@ |
|||
[LOGGER] |
|||
FLAGS=0 |
|||
LEVEL=0 |
|||
FILE=C:\Langs\BoardReceiver\BoardReceiver.log |
|||
@ -0,0 +1,76 @@ |
|||
<html> |
|||
<body> |
|||
<pre> |
|||
<h1>Build Log</h1> |
|||
<h3> |
|||
--------------------Configuration: BoardReceiver - Win32 Release-------------------- |
|||
</h3> |
|||
<h3>Command Lines</h3> |
|||
Creating temporary file "C:\DOCUME~1\Sergey\LOCALS~1\Temp\RSP6AF.tmp" with contents |
|||
[ |
|||
/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_AFXDLL" /Fp"..\Intermediate\6\Release\BoardReceiver/BoardReceiver.pch" /Yu"stdafx.h" /Fo"..\Intermediate\6\Release\BoardReceiver/" /Fd"..\Intermediate\6\Release\BoardReceiver/" /FD /c |
|||
"F:\Langs\Laserguard\BoardReceiver\BoardReceiverDoc.cpp" |
|||
] |
|||
Creating command line "cl.exe @C:\DOCUME~1\Sergey\LOCALS~1\Temp\RSP6AF.tmp" |
|||
Creating temporary file "C:\DOCUME~1\Sergey\LOCALS~1\Temp\RSP6B0.tmp" with contents |
|||
[ |
|||
ijl15.lib Ws2_32.lib shlwapi.lib /nologo /subsystem:windows /incremental:no /pdb:"..\Intermediate\6\Release\BoardReceiver/BoardReceiver.pdb" /machine:I386 /out:"..\test\BoardReceiver.exe" |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\areset.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiver.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverDlg.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverDoc.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverList.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverParamDlg.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverSeekDlg.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverSwitcher.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverVariableList.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiverView.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\Camera.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\chebron.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\ChildFrm.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\CMicPTZ.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\CMigPTZ.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\cpelco.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\cpg3ad.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\cptzad.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\ctks576.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\cvicon.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\DataStreamsServer.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\detecto_.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\Detector.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\EventQueue.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\Filters.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\filters_.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\Kernel.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\MainFrm.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\MemoryDC.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\RELAY.OBJ |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\relay_.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\Shadow.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\shadow_.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\StdAfx.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\Tracker.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\tracker_.obj |
|||
\Langs\Laserguard\Intermediate\6\Release\BoardReceiver\BoardReceiver.res |
|||
\Langs\Laserguard\Intermediate\6\LgLib.lib |
|||
\Langs\Laserguard\Intermediate\6\LgLibComm.lib |
|||
\Langs\Laserguard\Intermediate\6\LgLibDevice.lib |
|||
\Langs\Laserguard\Intermediate\6\LgLibNet.lib |
|||
\Langs\Laserguard\Intermediate\6\LgLibFileSystem.lib |
|||
\Langs\Laserguard\Intermediate\6\LgLibRemote.lib |
|||
] |
|||
Creating command line "link.exe @C:\DOCUME~1\Sergey\LOCALS~1\Temp\RSP6B0.tmp" |
|||
<h3>Output Window</h3> |
|||
Compiling... |
|||
BoardReceiverDoc.cpp |
|||
Linking... |
|||
LINK : warning LNK4098: defaultlib "LIBCMT" conflicts with use of other libs; use /NODEFAULTLIB:library |
|||
LINK : warning LNK4089: all references to "ijl15.dll" discarded by /OPT:REF |
|||
|
|||
|
|||
|
|||
<h3>Results</h3> |
|||
BoardReceiver.exe - 0 error(s), 2 warning(s) |
|||
</pre> |
|||
</body> |
|||
</html> |
|||
@ -0,0 +1,584 @@ |
|||
//Microsoft Developer Studio generated resource script. |
|||
// |
|||
#include "resource.h" |
|||
|
|||
#define APSTUDIO_READONLY_SYMBOLS |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Generated from the TEXTINCLUDE 2 resource. |
|||
// |
|||
#include "afxres.h" |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
#undef APSTUDIO_READONLY_SYMBOLS |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// English (U.S.) resources |
|||
|
|||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
|||
#ifdef _WIN32 |
|||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US |
|||
#pragma code_page(1252) |
|||
#endif //_WIN32 |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// TEXTINCLUDE |
|||
// |
|||
|
|||
1 TEXTINCLUDE MOVEABLE PURE |
|||
BEGIN |
|||
"resource.h\0" |
|||
END |
|||
|
|||
2 TEXTINCLUDE MOVEABLE PURE |
|||
BEGIN |
|||
"#include ""afxres.h""\r\n" |
|||
"\0" |
|||
END |
|||
|
|||
3 TEXTINCLUDE MOVEABLE PURE |
|||
BEGIN |
|||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n" |
|||
"#define _AFX_NO_OLE_RESOURCES\r\n" |
|||
"#define _AFX_NO_TRACKER_RESOURCES\r\n" |
|||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n" |
|||
"\r\n" |
|||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" |
|||
"#ifdef _WIN32\r\n" |
|||
"LANGUAGE 9, 1\r\n" |
|||
"#pragma code_page(1252)\r\n" |
|||
"#endif //_WIN32\r\n" |
|||
"#include ""res\\BoardReceiver.rc2"" // non-Microsoft Visual C++ edited resources\r\n" |
|||
"#include ""afxres.rc"" // Standard components\r\n" |
|||
"#endif\r\n" |
|||
"\0" |
|||
END |
|||
|
|||
#endif // APSTUDIO_INVOKED |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Icon |
|||
// |
|||
|
|||
// Icon with lowest ID value placed first to ensure application icon |
|||
// remains consistent on all systems. |
|||
IDR_MAINFRAME ICON DISCARDABLE "res\\BoardReceiver.ico" |
|||
IDR_BOARDRTYPE ICON DISCARDABLE "res\\BoardReceiverDoc.ico" |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Bitmap |
|||
// |
|||
|
|||
IDR_MAINFRAME BITMAP MOVEABLE PURE "res\\Toolbar.bmp" |
|||
IDR_BOARDRTYPE BITMAP MOVEABLE PURE "res\\mainfram.bmp" |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Toolbar |
|||
// |
|||
|
|||
IDR_MAINFRAME TOOLBAR MOVEABLE PURE 16, 15 |
|||
BEGIN |
|||
BUTTON ID_FILE_NEW |
|||
BUTTON ID_FILE_OPEN |
|||
BUTTON ID_FILE_SAVE |
|||
SEPARATOR |
|||
BUTTON ID_EDIT_CUT |
|||
BUTTON ID_EDIT_COPY |
|||
BUTTON ID_EDIT_PASTE |
|||
SEPARATOR |
|||
BUTTON ID_FILE_PRINT |
|||
SEPARATOR |
|||
BUTTON ID_APP_ABOUT |
|||
SEPARATOR |
|||
BUTTON ID_OPTIONS_STEP |
|||
SEPARATOR |
|||
BUTTON ID_VIEW_METERS |
|||
BUTTON ID_VIEW_DEGREES |
|||
BUTTON ID_VIEW_REVERSE |
|||
SEPARATOR |
|||
BUTTON ID_WINDOW_TILE_HORZ |
|||
BUTTON ID_WINDOW_TILE_VERT |
|||
END |
|||
|
|||
IDR_BOARDRTYPE TOOLBAR MOVEABLE PURE 16, 15 |
|||
BEGIN |
|||
BUTTON ID_FILE_NEW |
|||
BUTTON ID_FILE_OPEN |
|||
BUTTON ID_FILE_SAVE |
|||
SEPARATOR |
|||
BUTTON ID_EDIT_CUT |
|||
BUTTON ID_EDIT_COPY |
|||
BUTTON ID_EDIT_PASTE |
|||
SEPARATOR |
|||
BUTTON ID_FILE_PRINT |
|||
SEPARATOR |
|||
BUTTON ID_APP_ABOUT |
|||
SEPARATOR |
|||
BUTTON ID_OPTIONS_STEP |
|||
SEPARATOR |
|||
BUTTON ID_VIEW_METERS |
|||
BUTTON ID_VIEW_DEGREES |
|||
BUTTON ID_VIEW_REVERSE |
|||
BUTTON ID_WINDOW_TILE_VERT |
|||
END |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Menu |
|||
// |
|||
|
|||
IDR_MAINFRAME MENU DISCARDABLE |
|||
BEGIN |
|||
POPUP "&File" |
|||
BEGIN |
|||
MENUITEM "&New\tCtrl+N", ID_FILE_NEW |
|||
MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN |
|||
MENUITEM SEPARATOR |
|||
MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED |
|||
MENUITEM SEPARATOR |
|||
MENUITEM "E&xit", ID_APP_EXIT |
|||
END |
|||
POPUP "&View" |
|||
BEGIN |
|||
MENUITEM "&Toolbar", ID_VIEW_TOOLBAR |
|||
MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR |
|||
END |
|||
POPUP "&Help" |
|||
BEGIN |
|||
MENUITEM "&About BoardReceiver...", ID_APP_ABOUT |
|||
END |
|||
END |
|||
|
|||
IDR_BOARDRTYPE MENU DISCARDABLE |
|||
BEGIN |
|||
POPUP "&File" |
|||
BEGIN |
|||
MENUITEM "&New\tCtrl+N", ID_FILE_NEW |
|||
MENUITEM "&Open...\tCtrl+O", ID_FILE_OPEN |
|||
MENUITEM "&Close", ID_FILE_CLOSE |
|||
MENUITEM "&Save\tCtrl+S", ID_FILE_SAVE |
|||
MENUITEM "Save &As...", ID_FILE_SAVE_AS |
|||
MENUITEM SEPARATOR |
|||
MENUITEM "Recent File", ID_FILE_MRU_FILE1, GRAYED |
|||
MENUITEM SEPARATOR |
|||
MENUITEM "E&xit", ID_APP_EXIT |
|||
END |
|||
POPUP "&Edit" |
|||
BEGIN |
|||
MENUITEM "&Undo\tCtrl+Z", ID_EDIT_UNDO |
|||
MENUITEM SEPARATOR |
|||
MENUITEM "Cu&t\tCtrl+X", ID_EDIT_CUT |
|||
MENUITEM "&Copy\tCtrl+C", ID_EDIT_COPY |
|||
MENUITEM "&Paste\tCtrl+V", ID_EDIT_PASTE |
|||
END |
|||
POPUP "&View" |
|||
BEGIN |
|||
MENUITEM "&Toolbar", ID_VIEW_TOOLBAR |
|||
MENUITEM "&Status Bar", ID_VIEW_STATUS_BAR |
|||
MENUITEM SEPARATOR |
|||
MENUITEM "&Meters", ID_VIEW_METERS |
|||
MENUITEM "&Degrees", ID_VIEW_DEGREES |
|||
MENUITEM "&Reverse", ID_VIEW_REVERSE |
|||
END |
|||
POPUP "&Options" |
|||
BEGIN |
|||
MENUITEM "&Parameters", ID_OPTIONS_PARAMETERS |
|||
MENUITEM "&Reset", ID_OPTIONS_RESET |
|||
MENUITEM "&Go&&Run", ID_OPTIONS_SEEK |
|||
MENUITEM "&Step", ID_OPTIONS_STEP |
|||
MENUITEM "&Full reset", ID_OPTIONS_SOFTRESET |
|||
END |
|||
POPUP "&Window" |
|||
BEGIN |
|||
MENUITEM "&New Window", ID_WINDOW_NEW |
|||
MENUITEM "&Cascade", ID_WINDOW_CASCADE |
|||
MENUITEM "&Tile", ID_WINDOW_TILE_HORZ |
|||
MENUITEM "&Arrange Icons", ID_WINDOW_ARRANGE |
|||
END |
|||
POPUP "&Help" |
|||
BEGIN |
|||
MENUITEM "&About BoardReceiver...", ID_APP_ABOUT |
|||
END |
|||
END |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Accelerator |
|||
// |
|||
|
|||
IDR_MAINFRAME ACCELERATORS MOVEABLE PURE |
|||
BEGIN |
|||
"C", ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT |
|||
"N", ID_FILE_NEW, VIRTKEY, CONTROL, NOINVERT |
|||
"O", ID_FILE_OPEN, VIRTKEY, CONTROL, NOINVERT |
|||
"S", ID_FILE_SAVE, VIRTKEY, CONTROL, NOINVERT |
|||
"V", ID_EDIT_PASTE, VIRTKEY, CONTROL, NOINVERT |
|||
VK_BACK, ID_EDIT_UNDO, VIRTKEY, ALT, NOINVERT |
|||
VK_DELETE, ID_EDIT_CUT, VIRTKEY, SHIFT, NOINVERT |
|||
VK_F6, ID_NEXT_PANE, VIRTKEY, NOINVERT |
|||
VK_F6, ID_PREV_PANE, VIRTKEY, SHIFT, NOINVERT |
|||
VK_INSERT, ID_EDIT_COPY, VIRTKEY, CONTROL, NOINVERT |
|||
VK_INSERT, ID_EDIT_PASTE, VIRTKEY, SHIFT, NOINVERT |
|||
VK_SPACE, ID_OPTIONS_STEP, VIRTKEY, NOINVERT |
|||
"X", ID_EDIT_CUT, VIRTKEY, CONTROL, NOINVERT |
|||
"Z", ID_EDIT_UNDO, VIRTKEY, CONTROL, NOINVERT |
|||
END |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Dialog |
|||
// |
|||
|
|||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 |
|||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU |
|||
CAPTION "About BoardReceiver" |
|||
FONT 8, "MS Sans Serif" |
|||
BEGIN |
|||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 |
|||
LTEXT "BoardReceiver Version 1.0",IDC_STATIC,40,10,119,8, |
|||
SS_NOPREFIX |
|||
LTEXT "Copyright (C) 2001",IDC_STATIC,40,25,119,8 |
|||
DEFPUSHBUTTON "OK",IDOK,178,7,50,14,WS_GROUP |
|||
END |
|||
|
|||
IDD_NEW_DOC_DLG DIALOG DISCARDABLE 0, 0, 268, 98 |
|||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU |
|||
CAPTION "Select source" |
|||
FONT 8, "MS Sans Serif" |
|||
BEGIN |
|||
DEFPUSHBUTTON "OK",IDOK,211,59,50,14 |
|||
PUSHBUTTON "Cancel",IDCANCEL,211,76,50,14 |
|||
GROUPBOX "Data source",IDC_STATIC,7,3,254,50 |
|||
COMBOBOX IDC_COMBO_PORT,15,14,67,63,CBS_DROPDOWNLIST | CBS_SORT | |
|||
WS_VSCROLL | WS_TABSTOP |
|||
EDITTEXT IDC_EDIT_TARGET_FILE,15,32,222,13,ES_AUTOHSCROLL |
|||
PUSHBUTTON "...",IDC_BUTTON_TARGET_FILE,241,32,13,13 |
|||
CONTROL "Master",IDC_RADIO_MASTER,"Button",BS_AUTORADIOBUTTON | |
|||
WS_GROUP | WS_TABSTOP,95,16,37,10 |
|||
CONTROL "Slave",IDC_RADIO_SLAVE,"Button",BS_AUTORADIOBUTTON,143, |
|||
16,34,10 |
|||
END |
|||
|
|||
IDD_PARAM_DLG DIALOG DISCARDABLE 0, 0, 174, 151 |
|||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU |
|||
CAPTION "Parameters" |
|||
FONT 8, "MS Sans Serif" |
|||
BEGIN |
|||
DEFPUSHBUTTON "Reset",IDOK,117,7,50,14 |
|||
PUSHBUTTON "Cancel",IDCANCEL,117,24,50,14 |
|||
GROUPBOX "",IDC_STATIC,7,3,102,141 |
|||
LTEXT "Offset",IDC_STATIC,16,15,20,8 |
|||
LTEXT "Order",IDC_STATIC,16,33,18,8 |
|||
LTEXT "Flip",IDC_STATIC,16,87,12,8 |
|||
LTEXT "Width",IDC_STATIC,16,69,20,8 |
|||
LTEXT "Sun",IDC_STATIC,16,123,14,8 |
|||
LTEXT "SST",IDC_STATIC,16,105,15,8 |
|||
LTEXT "Delta",IDC_STATIC,16,51,18,8 |
|||
EDITTEXT IDC_EDIT_OFFSET,57,13,41,12,ES_AUTOHSCROLL |
|||
CONTROL "Spin1",IDC_SPIN_OFFSET,"msctls_updown32", |
|||
UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | |
|||
UDS_ARROWKEYS,99,13,11,14 |
|||
EDITTEXT IDC_EDIT_ORDER,57,31,41,12,ES_AUTOHSCROLL |
|||
CONTROL "Spin1",IDC_SPIN_ORDER,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,30,11, |
|||
14 |
|||
EDITTEXT IDC_EDIT_DELTA,57,49,41,12,ES_AUTOHSCROLL |
|||
CONTROL "Spin1",IDC_SPIN_DELTA,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,49,11, |
|||
14 |
|||
EDITTEXT IDC_EDIT_WIDTH,57,67,41,12,ES_AUTOHSCROLL |
|||
CONTROL "Spin1",IDC_SPIN_WIDTH,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,66,11, |
|||
14 |
|||
EDITTEXT IDC_EDIT_FLIP,57,85,41,12,ES_AUTOHSCROLL |
|||
CONTROL "Spin1",IDC_SPIN_FLIP,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,84,11, |
|||
14 |
|||
EDITTEXT IDC_EDIT_SUN,57,121,41,12,ES_AUTOHSCROLL |
|||
CONTROL "Spin1",IDC_SPIN_SUN,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,121,11, |
|||
14 |
|||
EDITTEXT IDC_EDIT_SST,57,103,41,12,ES_AUTOHSCROLL | ES_NUMBER |
|||
CONTROL "Spin1",IDC_SPIN_SST,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,97,102,11, |
|||
14 |
|||
END |
|||
|
|||
IDD_SEEK_DLG DIALOG DISCARDABLE 0, 0, 162, 117 |
|||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU |
|||
CAPTION "Seek" |
|||
FONT 8, "MS Sans Serif" |
|||
BEGIN |
|||
PUSHBUTTON "Go to",IDC_BUTTON_GOTO,105,60,50,14 |
|||
DEFPUSHBUTTON "Cancel",IDCANCEL,105,96,50,14 |
|||
EDITTEXT IDC_EDIT_STEP,56,14,91,15,ES_AUTOHSCROLL | ES_NUMBER |
|||
CONTROL "Spin1",IDC_SPIN_STEP,"msctls_updown32",UDS_SETBUDDYINT | |
|||
UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,142,14,11, |
|||
14 |
|||
CONTROL "By step",IDC_RADIO_STEP,"Button",BS_AUTORADIOBUTTON | |
|||
WS_GROUP,12,16,39,10 |
|||
CONTROL "By time",IDC_RADIO_TIME,"Button",BS_AUTORADIOBUTTON,12, |
|||
36,39,10 |
|||
CONTROL "DateTimePicker1",IDC_DATETIMEPICKER_TIME, |
|||
"SysDateTimePick32",DTS_RIGHTALIGN | DTS_UPDOWN | |
|||
WS_TABSTOP | 0x8,56,33,92,15 |
|||
GROUPBOX "",IDC_STATIC,7,3,148,53 |
|||
PUSHBUTTON "Run to",IDC_BUTTON_RUNTO,105,77,50,14 |
|||
END |
|||
|
|||
|
|||
#ifndef _MAC |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Version |
|||
// |
|||
|
|||
VS_VERSION_INFO VERSIONINFO |
|||
FILEVERSION 1,0,0,1 |
|||
PRODUCTVERSION 1,0,0,1 |
|||
FILEFLAGSMASK 0x3fL |
|||
#ifdef _DEBUG |
|||
FILEFLAGS 0x1L |
|||
#else |
|||
FILEFLAGS 0x0L |
|||
#endif |
|||
FILEOS 0x4L |
|||
FILETYPE 0x1L |
|||
FILESUBTYPE 0x0L |
|||
BEGIN |
|||
BLOCK "StringFileInfo" |
|||
BEGIN |
|||
BLOCK "040904B0" |
|||
BEGIN |
|||
VALUE "FileDescription", "BoardReceiver MFC Application\0" |
|||
VALUE "FileVersion", "1, 0, 0, 1\0" |
|||
VALUE "InternalName", "BoardReceiver\0" |
|||
VALUE "LegalCopyright", "Copyright (C) 2001\0" |
|||
VALUE "OriginalFilename", "BoardReceiver.EXE\0" |
|||
VALUE "ProductName", "BoardReceiver Application\0" |
|||
VALUE "ProductVersion", "1, 0, 0, 1\0" |
|||
END |
|||
END |
|||
BLOCK "VarFileInfo" |
|||
BEGIN |
|||
VALUE "Translation", 0x409, 1200 |
|||
END |
|||
END |
|||
|
|||
#endif // !_MAC |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// DESIGNINFO |
|||
// |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
GUIDELINES DESIGNINFO MOVEABLE PURE |
|||
BEGIN |
|||
IDD_ABOUTBOX, DIALOG |
|||
BEGIN |
|||
LEFTMARGIN, 7 |
|||
RIGHTMARGIN, 228 |
|||
TOPMARGIN, 7 |
|||
BOTTOMMARGIN, 48 |
|||
END |
|||
|
|||
IDD_NEW_DOC_DLG, DIALOG |
|||
BEGIN |
|||
LEFTMARGIN, 7 |
|||
RIGHTMARGIN, 261 |
|||
TOPMARGIN, 7 |
|||
BOTTOMMARGIN, 91 |
|||
END |
|||
|
|||
IDD_PARAM_DLG, DIALOG |
|||
BEGIN |
|||
LEFTMARGIN, 7 |
|||
RIGHTMARGIN, 167 |
|||
TOPMARGIN, 7 |
|||
BOTTOMMARGIN, 144 |
|||
END |
|||
|
|||
IDD_SEEK_DLG, DIALOG |
|||
BEGIN |
|||
LEFTMARGIN, 7 |
|||
RIGHTMARGIN, 155 |
|||
TOPMARGIN, 7 |
|||
BOTTOMMARGIN, 110 |
|||
END |
|||
END |
|||
#endif // APSTUDIO_INVOKED |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// String Table |
|||
// |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
IDR_MAINFRAME "LGS data analizer" |
|||
IDR_BOARDRTYPE "\nBoardReceiver\nBoardReceiver\nBoardReceiver (*.raw)\n.raw\nBoardReceiver.Document\nBoardReceiver Document" |
|||
ID_INDICATOR_ANGLES "0000" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
AFX_IDS_APP_TITLE "BoardReceiver" |
|||
AFX_IDS_IDLEMESSAGE "Ready" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_INDICATOR_EXT "EXT" |
|||
ID_INDICATOR_CAPS "CAP" |
|||
ID_INDICATOR_NUM "NUM" |
|||
ID_INDICATOR_SCRL "SCRL" |
|||
ID_INDICATOR_OVR "OVR" |
|||
ID_INDICATOR_REC "REC" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_FILE_NEW "Create a new document\nNew" |
|||
ID_FILE_OPEN "Open an existing document\nOpen" |
|||
ID_FILE_CLOSE "Close the active document\nClose" |
|||
ID_FILE_SAVE "Save the active document\nSave" |
|||
ID_FILE_SAVE_AS "Save the active document with a new name\nSave As" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_APP_ABOUT "Display program information, version number and copyright\nAbout" |
|||
ID_APP_EXIT "Quit the application; prompts to save documents\nExit" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_FILE_MRU_FILE1 "Open this document" |
|||
ID_FILE_MRU_FILE2 "Open this document" |
|||
ID_FILE_MRU_FILE3 "Open this document" |
|||
ID_FILE_MRU_FILE4 "Open this document" |
|||
ID_FILE_MRU_FILE5 "Open this document" |
|||
ID_FILE_MRU_FILE6 "Open this document" |
|||
ID_FILE_MRU_FILE7 "Open this document" |
|||
ID_FILE_MRU_FILE8 "Open this document" |
|||
ID_FILE_MRU_FILE9 "Open this document" |
|||
ID_FILE_MRU_FILE10 "Open this document" |
|||
ID_FILE_MRU_FILE11 "Open this document" |
|||
ID_FILE_MRU_FILE12 "Open this document" |
|||
ID_FILE_MRU_FILE13 "Open this document" |
|||
ID_FILE_MRU_FILE14 "Open this document" |
|||
ID_FILE_MRU_FILE15 "Open this document" |
|||
ID_FILE_MRU_FILE16 "Open this document" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_NEXT_PANE "Switch to the next window pane\nNext Pane" |
|||
ID_PREV_PANE "Switch back to the previous window pane\nPrevious Pane" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_WINDOW_NEW "Open another window for the active document\nNew Window" |
|||
ID_WINDOW_ARRANGE "Arrange icons at the bottom of the window\nArrange Icons" |
|||
ID_WINDOW_CASCADE "Arrange windows so they overlap\nCascade Windows" |
|||
ID_WINDOW_TILE_HORZ "Arrange windows as non-overlapping tiles\nTile Windows" |
|||
ID_WINDOW_TILE_VERT "Arrange windows as non-overlapping tiles\nTile Windows" |
|||
ID_WINDOW_SPLIT "Split the active window into panes\nSplit" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_EDIT_CLEAR "Erase the selection\nErase" |
|||
ID_EDIT_CLEAR_ALL "Erase everything\nErase All" |
|||
ID_EDIT_COPY "Copy the selection and put it on the Clipboard\nCopy" |
|||
ID_EDIT_CUT "Cut the selection and put it on the Clipboard\nCut" |
|||
ID_EDIT_FIND "Find the specified text\nFind" |
|||
ID_EDIT_PASTE "Insert Clipboard contents\nPaste" |
|||
ID_EDIT_REPEAT "Repeat the last action\nRepeat" |
|||
ID_EDIT_REPLACE "Replace specific text with different text\nReplace" |
|||
ID_EDIT_SELECT_ALL "Select the entire document\nSelect All" |
|||
ID_EDIT_UNDO "Undo the last action\nUndo" |
|||
ID_EDIT_REDO "Redo the previously undone action\nRedo" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_VIEW_TOOLBAR "Show or hide the toolbar\nToggle ToolBar" |
|||
ID_VIEW_STATUS_BAR "Show or hide the status bar\nToggle StatusBar" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
AFX_IDS_SCSIZE "Change the window size" |
|||
AFX_IDS_SCMOVE "Change the window position" |
|||
AFX_IDS_SCMINIMIZE "Reduce the window to an icon" |
|||
AFX_IDS_SCMAXIMIZE "Enlarge the window to full size" |
|||
AFX_IDS_SCNEXTWINDOW "Switch to the next document window" |
|||
AFX_IDS_SCPREVWINDOW "Switch to the previous document window" |
|||
AFX_IDS_SCCLOSE "Close the active window and prompts to save the documents" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
AFX_IDS_SCRESTORE "Restore the window to normal size" |
|||
AFX_IDS_SCTASKLIST "Activate Task List" |
|||
AFX_IDS_MDICHILD "Activate this window" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_OPTIONS_RESET "Reset" |
|||
ID_OPTIONS_STEP "Next loop" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_INDICATOR_X "XXXX" |
|||
ID_INDICATOR_Y "YYYY" |
|||
END |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
ID_OPTIONS_SEEK """Go to"" or ""run to"" exact position" |
|||
END |
|||
|
|||
#endif // English (U.S.) resources |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
|
|||
|
|||
#ifndef APSTUDIO_INVOKED |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Generated from the TEXTINCLUDE 3 resource. |
|||
// |
|||
#define _AFX_NO_SPLITTER_RESOURCES |
|||
#define _AFX_NO_OLE_RESOURCES |
|||
#define _AFX_NO_TRACKER_RESOURCES |
|||
#define _AFX_NO_PROPERTY_RESOURCES |
|||
|
|||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
|||
#ifdef _WIN32 |
|||
LANGUAGE 9, 1 |
|||
#pragma code_page(1252) |
|||
#endif //_WIN32 |
|||
#include "res\BoardReceiver.rc2" // non-Microsoft Visual C++ edited resources |
|||
#include "afxres.rc" // Standard components |
|||
#endif |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
#endif // not APSTUDIO_INVOKED |
|||
|
|||
1121
BoardReceiver/BoardReceiver.vcproj
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="Windows-1252"?> |
|||
<VisualStudioUserFile |
|||
ProjectType="Visual C++" |
|||
Version="8.00" |
|||
ShowAllFiles="false" |
|||
> |
|||
<Configurations> |
|||
<Configuration |
|||
Name="Debug|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="DUALCORE" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
<Configuration |
|||
Name="Release|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="DUALCORE" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
</Configurations> |
|||
</VisualStudioUserFile> |
|||
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="Windows-1252"?> |
|||
<VisualStudioUserFile |
|||
ProjectType="Visual C++" |
|||
Version="8.00" |
|||
ShowAllFiles="false" |
|||
> |
|||
<Configurations> |
|||
<Configuration |
|||
Name="Debug|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="..\test" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="P2600HT" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="0" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
<Configuration |
|||
Name="Release|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="P2600HT" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
</Configurations> |
|||
</VisualStudioUserFile> |
|||
@ -0,0 +1,301 @@ |
|||
<?xml version="1.0" encoding = "Windows-1252"?> |
|||
<VisualStudioProject |
|||
ProjectType="Visual C++" |
|||
Version="7.00" |
|||
Name="BoardReceiver" |
|||
SccProjectName="" |
|||
SccLocalPath="" |
|||
Keyword="MFCProj"> |
|||
<Platforms> |
|||
<Platform |
|||
Name="Win32"/> |
|||
</Platforms> |
|||
<Configurations> |
|||
<Configuration |
|||
Name="Release|Win32" |
|||
OutputDirectory=".\..\Intermediate\7\Release\BoardReceiver" |
|||
IntermediateDirectory=".\..\Intermediate\7\Release\BoardReceiver" |
|||
ConfigurationType="1" |
|||
UseOfMFC="2" |
|||
ATLMinimizesCRunTimeLibraryUsage="FALSE" |
|||
CharacterSet="2"> |
|||
<Tool |
|||
Name="VCCLCompilerTool" |
|||
InlineFunctionExpansion="1" |
|||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" |
|||
StringPooling="TRUE" |
|||
RuntimeLibrary="2" |
|||
EnableFunctionLevelLinking="TRUE" |
|||
UsePrecompiledHeader="3" |
|||
PrecompiledHeaderThrough="stdafx.h" |
|||
PrecompiledHeaderFile=".\..\Intermediate\7\Release\BoardReceiver/BoardReceiver.pch" |
|||
AssemblerListingLocation=".\..\Intermediate\7\Release\BoardReceiver/" |
|||
ObjectFile=".\..\Intermediate\7\Release\BoardReceiver/" |
|||
ProgramDataBaseFileName=".\..\Intermediate\7\Release\BoardReceiver/" |
|||
WarningLevel="3" |
|||
SuppressStartupBanner="TRUE"/> |
|||
<Tool |
|||
Name="VCCustomBuildTool"/> |
|||
<Tool |
|||
Name="VCLinkerTool" |
|||
AdditionalOptions="/MACHINE:I386" |
|||
AdditionalDependencies="ijl15.lib Ws2_32.lib shlwapi.lib" |
|||
OutputFile="..\test\BoardReceiver.exe" |
|||
LinkIncremental="1" |
|||
SuppressStartupBanner="TRUE" |
|||
ProgramDatabaseFile=".\..\Intermediate\7\Release\BoardReceiver/BoardReceiver.pdb" |
|||
SubSystem="2"/> |
|||
<Tool |
|||
Name="VCMIDLTool" |
|||
PreprocessorDefinitions="NDEBUG" |
|||
MkTypLibCompatible="TRUE" |
|||
SuppressStartupBanner="TRUE" |
|||
TargetEnvironment="1" |
|||
TypeLibraryName=".\..\Intermediate\7\Release\BoardReceiver/BoardReceiver.tlb"/> |
|||
<Tool |
|||
Name="VCPostBuildEventTool"/> |
|||
<Tool |
|||
Name="VCPreBuildEventTool"/> |
|||
<Tool |
|||
Name="VCPreLinkEventTool"/> |
|||
<Tool |
|||
Name="VCResourceCompilerTool" |
|||
PreprocessorDefinitions="_AFXDLL;NDEBUG" |
|||
Culture="1033"/> |
|||
<Tool |
|||
Name="VCWebServiceProxyGeneratorTool"/> |
|||
<Tool |
|||
Name="VCWebDeploymentTool"/> |
|||
</Configuration> |
|||
<Configuration |
|||
Name="Debug|Win32" |
|||
OutputDirectory=".\..\Intermediate\7\Debug\BoardReceiver" |
|||
IntermediateDirectory=".\..\Intermediate\7\Debug\BoardReceiver" |
|||
ConfigurationType="1" |
|||
UseOfMFC="2" |
|||
ATLMinimizesCRunTimeLibraryUsage="FALSE" |
|||
CharacterSet="2"> |
|||
<Tool |
|||
Name="VCCLCompilerTool" |
|||
Optimization="0" |
|||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" |
|||
BasicRuntimeChecks="3" |
|||
RuntimeLibrary="3" |
|||
UsePrecompiledHeader="3" |
|||
PrecompiledHeaderThrough="stdafx.h" |
|||
PrecompiledHeaderFile=".\..\Intermediate\7\Debug\BoardReceiver/BoardReceiver.pch" |
|||
AssemblerListingLocation=".\..\Intermediate\7\Debug\BoardReceiver/" |
|||
ObjectFile=".\..\Intermediate\7\Debug\BoardReceiver/" |
|||
ProgramDataBaseFileName=".\..\Intermediate\7\Debug\BoardReceiver/" |
|||
BrowseInformation="1" |
|||
WarningLevel="3" |
|||
SuppressStartupBanner="TRUE" |
|||
DebugInformationFormat="4"/> |
|||
<Tool |
|||
Name="VCCustomBuildTool"/> |
|||
<Tool |
|||
Name="VCLinkerTool" |
|||
AdditionalOptions="/MACHINE:I386" |
|||
AdditionalDependencies="ijl15.lib Ws2_32.lib shlwapi.lib" |
|||
OutputFile=".\..\Intermediate\7\Debug\BoardReceiver/BoardReceiver.exe" |
|||
LinkIncremental="2" |
|||
SuppressStartupBanner="TRUE" |
|||
GenerateDebugInformation="TRUE" |
|||
ProgramDatabaseFile=".\..\Intermediate\7\Debug\BoardReceiver/BoardReceiver.pdb" |
|||
SubSystem="2"/> |
|||
<Tool |
|||
Name="VCMIDLTool" |
|||
PreprocessorDefinitions="_DEBUG" |
|||
MkTypLibCompatible="TRUE" |
|||
SuppressStartupBanner="TRUE" |
|||
TargetEnvironment="1" |
|||
TypeLibraryName=".\..\Intermediate\7\Debug\BoardReceiver/BoardReceiver.tlb"/> |
|||
<Tool |
|||
Name="VCPostBuildEventTool"/> |
|||
<Tool |
|||
Name="VCPreBuildEventTool"/> |
|||
<Tool |
|||
Name="VCPreLinkEventTool"/> |
|||
<Tool |
|||
Name="VCResourceCompilerTool" |
|||
PreprocessorDefinitions="_AFXDLL;_DEBUG" |
|||
Culture="1033"/> |
|||
<Tool |
|||
Name="VCWebServiceProxyGeneratorTool"/> |
|||
<Tool |
|||
Name="VCWebDeploymentTool"/> |
|||
</Configuration> |
|||
</Configurations> |
|||
<Files> |
|||
<Filter |
|||
Name="Source Files" |
|||
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"> |
|||
<File |
|||
RelativePath=".\BoardReceiver.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiver.rc"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverDlg.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverDoc.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverList.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverParamDlg.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverSeekDlg.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverSwitcher.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverVariableList.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverView.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\ChildFrm.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\DataStreamsServer.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Detector.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Filters.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\Kernel.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\MainFrm.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\MemoryDC.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Shadow.cpp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\StdAfx.cpp"> |
|||
<FileConfiguration |
|||
Name="Release|Win32"> |
|||
<Tool |
|||
Name="VCCLCompilerTool" |
|||
UsePrecompiledHeader="1"/> |
|||
</FileConfiguration> |
|||
<FileConfiguration |
|||
Name="Debug|Win32"> |
|||
<Tool |
|||
Name="VCCLCompilerTool" |
|||
UsePrecompiledHeader="1"/> |
|||
</FileConfiguration> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Tracker.cpp"> |
|||
</File> |
|||
</Filter> |
|||
<Filter |
|||
Name="Header Files" |
|||
Filter="h;hpp;hxx;hm;inl"> |
|||
<File |
|||
RelativePath=".\BoardReceiver.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverDlg.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverDoc.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverList.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverParamDlg.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverSeekDlg.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverSwitcher.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverVariableList.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\BoardReceiverView.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\ChildFrm.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\DataStreamsServer.h"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Detector.h"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Filters.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\Kernel.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\MainFrm.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\MemoryDC.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\Resource.h"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Shadow.h"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\StdAfx.h"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Stream.h"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\LgLib\Templ.h"> |
|||
</File> |
|||
<File |
|||
RelativePath="..\lgs\Tracker.h"> |
|||
</File> |
|||
</Filter> |
|||
<Filter |
|||
Name="Resource Files" |
|||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"> |
|||
<File |
|||
RelativePath=".\res\BoardReceiver.ico"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\res\BoardReceiver.rc2"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\res\BoardReceiverDoc.ico"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\res\Toolbar.bmp"> |
|||
</File> |
|||
<File |
|||
RelativePath=".\res\mainfram.bmp"> |
|||
</File> |
|||
</Filter> |
|||
<File |
|||
RelativePath=".\ReadMe.txt"> |
|||
</File> |
|||
</Files> |
|||
<Globals> |
|||
</Globals> |
|||
</VisualStudioProject> |
|||
@ -0,0 +1,10 @@ |
|||
"" |
|||
{ |
|||
"FILE_VERSION" = "9237" |
|||
"ENLISTMENT_CHOICE" = "NEVER" |
|||
"PROJECT_FILE_RELATIVE_PATH" = "relative:BoardReceiver" |
|||
"NUMBER_OF_EXCLUDED_FILES" = "0" |
|||
"ORIGINAL_PROJECT_FILE_PATH" = "" |
|||
"NUMBER_OF_NESTED_PROJECTS" = "0" |
|||
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" |
|||
} |
|||
@ -0,0 +1,111 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverDlg.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverDlg.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverDlg.cpp : implementation file
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "BoardReceiverDlg.h"
|
|||
#include "Winspool.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverDlg dialog
|
|||
|
|||
|
|||
CBoardReceiverDlg::CBoardReceiverDlg(CWnd* pParent /*=NULL*/) |
|||
: CDialog(CBoardReceiverDlg::IDD, pParent) |
|||
{ |
|||
//{{AFX_DATA_INIT(CBoardReceiverDlg)
|
|||
m_RadioMaster = 0; |
|||
//}}AFX_DATA_INIT
|
|||
} |
|||
|
|||
|
|||
void CBoardReceiverDlg::DoDataExchange(CDataExchange* pDX) |
|||
{ |
|||
CDialog::DoDataExchange(pDX); |
|||
//{{AFX_DATA_MAP(CBoardReceiverDlg)
|
|||
DDX_Control(pDX, IDC_BUTTON_TARGET_FILE, m_ButtonTargetFile); |
|||
DDX_Control(pDX, IDC_COMBO_PORT, m_ComboPort); |
|||
DDX_Control(pDX, IDC_EDIT_TARGET_FILE, m_EditTargetFile); |
|||
DDX_Radio(pDX, IDC_RADIO_MASTER, m_RadioMaster); |
|||
//}}AFX_DATA_MAP
|
|||
} |
|||
|
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverDlg, CDialog) |
|||
//{{AFX_MSG_MAP(CBoardReceiverDlg)
|
|||
ON_BN_CLICKED(IDC_BUTTON_TARGET_FILE, OnButtonTargetFile) |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverDlg message handlers
|
|||
|
|||
BOOL CBoardReceiverDlg::OnInitDialog() |
|||
{ |
|||
CDialog::OnInitDialog(); |
|||
|
|||
DWORD cbNeeded = 0; |
|||
DWORD cReturned = 0; |
|||
::EnumPorts( NULL, 2, NULL, 0, &cbNeeded, &cReturned ); |
|||
|
|||
PORT_INFO_2 *pPorts = (PORT_INFO_2*) malloc( cbNeeded ); |
|||
|
|||
::EnumPorts( NULL, 2, (PBYTE)pPorts, cbNeeded, &cbNeeded, &cReturned ); |
|||
|
|||
for( DWORD i = 0; i < cReturned; i++ ) |
|||
if( !( pPorts[i].fPortType & ( PORT_TYPE_REDIRECTED | PORT_TYPE_NET_ATTACHED ) ) ) |
|||
m_ComboPort.AddString( pPorts[i].pPortName ); |
|||
|
|||
free( pPorts ); |
|||
|
|||
m_ComboPort.SetCurSel( 0 ); |
|||
|
|||
SYSTEMTIME st; |
|||
GetLocalTime( &st ); |
|||
|
|||
TCHAR pFileName[MAX_PATH]; |
|||
_sntprintf( pFileName, MAX_PATH, "%04d_%02d_%02d_%02d_%02d_%02d.raw", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond ); |
|||
m_EditTargetFile.SetWindowText( pFileName ); |
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
void CBoardReceiverDlg::OnOK() |
|||
{ |
|||
m_EditTargetFile.GetWindowText( m_strFileName ); |
|||
m_ComboPort.GetWindowText( m_strPort ); |
|||
|
|||
CDialog::OnOK(); |
|||
} |
|||
|
|||
void CBoardReceiverDlg::OnButtonTargetFile() |
|||
{ |
|||
CString defFile; |
|||
m_EditTargetFile.GetWindowText( defFile ); |
|||
|
|||
char szFilter[] = "BoardReceiver files (*.raw)|*.raw|All Files (*.*)|*.*||"; |
|||
CFileDialog fd( FALSE, "*.raw", defFile, OFN_HIDEREADONLY, szFilter, this ); |
|||
if( fd.DoModal() == IDOK ) |
|||
{ |
|||
m_EditTargetFile.SetWindowText( fd.GetPathName() ); |
|||
} |
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverDlg.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverDlg.h |
|||
//---------------------------------------------------------------------------- |
|||
#if !defined(AFX_BOARDRECEIVERDLG_H__AA60E9C5_BB30_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_BOARDRECEIVERDLG_H__AA60E9C5_BB30_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
// BoardReceiverDlg.h : header file |
|||
// |
|||
|
|||
class CBoardReceiverDlg : public CDialog |
|||
{ |
|||
// Construction |
|||
public: |
|||
CBoardReceiverDlg(CWnd* pParent = NULL); // standard constructor |
|||
|
|||
// Dialog Data |
|||
//{{AFX_DATA(CBoardReceiverDlg) |
|||
enum { IDD = IDD_NEW_DOC_DLG }; |
|||
CButton m_ButtonTargetFile; |
|||
CComboBox m_ComboPort; |
|||
CEdit m_EditTargetFile; |
|||
int m_RadioMaster; |
|||
//}}AFX_DATA |
|||
|
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverDlg) |
|||
protected: |
|||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
protected: |
|||
|
|||
// Generated message map functions |
|||
//{{AFX_MSG(CBoardReceiverDlg) |
|||
virtual BOOL OnInitDialog(); |
|||
virtual void OnOK(); |
|||
afx_msg void OnButtonTargetFile(); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
|
|||
public: |
|||
CString& GetFileName() { return m_strFileName; } |
|||
CString& GetPort() { return m_strPort; } |
|||
INT GetDevice() { return m_RadioMaster; } |
|||
|
|||
private: |
|||
CString m_strFileName; |
|||
CString m_strPort; |
|||
}; |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVERDLG_H__AA60E9C5_BB30_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,748 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverDoc.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverDoc.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverDoc.cpp : implementation of the CBoardReceiverDoc class
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "MainFrm.h"
|
|||
|
|||
#include "BoardReceiverDoc.h"
|
|||
#include "BoardReceiverDlg.h"
|
|||
#include "BoardReceiverView.h"
|
|||
#include "BoardReceiverList.h"
|
|||
#include "BoardReceiverParamDlg.h"
|
|||
#include "BoardReceiverVariableList.h"
|
|||
#include "BoardReceiverSeekDlg.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverDoc
|
|||
|
|||
IMPLEMENT_DYNCREATE(CBoardReceiverDoc, CDocument) |
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverDoc, CDocument) |
|||
//{{AFX_MSG_MAP(CBoardReceiverDoc)
|
|||
ON_COMMAND(ID_OPTIONS_RESET, OnOptionsReset) |
|||
ON_COMMAND(ID_OPTIONS_STEP, OnOptionsStep) |
|||
ON_UPDATE_COMMAND_UI(ID_OPTIONS_STEP, OnUpdateOptionsStep) |
|||
ON_COMMAND(ID_OPTIONS_PARAMETERS, OnOptionsParameters) |
|||
ON_COMMAND(ID_OPTIONS_SEEK, OnOptionsSeek) |
|||
ON_COMMAND(ID_OPTIONS_SOFTRESET, OnOptionsSoftreset) |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverDoc construction/destruction
|
|||
|
|||
CBoardReceiverDoc::CBoardReceiverDoc() |
|||
{ |
|||
m_bLgsMode = FALSE; |
|||
m_liReadPos.QuadPart = 0; |
|||
m_bFastProcessing = FALSE; |
|||
|
|||
m_pChannelName[0] = 0; |
|||
m_nChannelID = -1; |
|||
|
|||
m_nLastAngles = 0; |
|||
} |
|||
|
|||
CBoardReceiverDoc::~CBoardReceiverDoc() |
|||
{ |
|||
// ((CBoardReceiverApp*)AfxGetApp())->UnregisterDocument( this );
|
|||
} |
|||
|
|||
static INT gChannelID = 0; |
|||
|
|||
BOOL CBoardReceiverDoc::OnNewDocument() |
|||
{ |
|||
if (!CDocument::OnNewDocument()) |
|||
return FALSE; |
|||
|
|||
CBoardReceiverDlg dlg; |
|||
if( dlg.DoModal() != IDOK ) |
|||
return FALSE; |
|||
|
|||
if( !m_Kernel.Create() ) |
|||
{ |
|||
AfxMessageBox( "Can't create Kernel", MB_OK ); |
|||
return FALSE; |
|||
} |
|||
|
|||
m_strFileName = dlg.GetFileName(); |
|||
SetPathName( m_strFileName, FALSE ); |
|||
|
|||
CBoardReceiverSwitcher *bs = new CBoardReceiverSwitcher; |
|||
if( !bs->Switch( dlg.GetDevice(), dlg.GetPort() ) ) |
|||
{ |
|||
AfxMessageBox( "Can't open port for switch lgs mode", MB_OK ); |
|||
return FALSE; |
|||
} |
|||
|
|||
|
|||
for( INT nShadow = 0; nShadow < LGS_MAX_SHADOW_ANGLES; nShadow++ ) |
|||
{ |
|||
// range should be in the same system ( 0..2047 )
|
|||
CShadow::LPRAY_LINE pShadowLine = &m_Kernel.m_Shadow.m_pShadowLine[ (INT)nShadow ]; |
|||
|
|||
CShadow::LPRAY pShadow = pShadowLine->lpShadow; |
|||
for( INT i = 0; i < pShadowLine->nCount; i++, pShadow++ ) |
|||
{ |
|||
POINT p1 = { nShadow * LGS_MAX_DETECTOR_ANGLES / LGS_MAX_SHADOW_ANGLES, pShadow->nMin }; |
|||
POINT p2 = { (nShadow + 1 ) * LGS_MAX_DETECTOR_ANGLES / LGS_MAX_SHADOW_ANGLES, pShadow->nMax }; |
|||
AddHiddenZone( p1, p2 ); |
|||
} |
|||
} |
|||
|
|||
|
|||
if( !m_Connection.Create( dlg.GetPort(), 115200, 8, NOPARITY, ONESTOPBIT, 4096, 4096 ) ) |
|||
{ |
|||
AfxMessageBox( "Can't open port", MB_OK ); |
|||
return FALSE; |
|||
} |
|||
|
|||
// store properties and place into server
|
|||
strcpy( m_pChannelName, m_strFileName ); |
|||
m_nChannelID = gChannelID++; |
|||
// ((CBoardReceiverApp*)AfxGetApp())->RegisterDocument( this );
|
|||
|
|||
m_bLgsMode = TRUE; |
|||
|
|||
return CLgThread::Start( FALSE ); |
|||
} |
|||
|
|||
|
|||
BOOL CBoardReceiverDoc::OnOpenDocument(LPCTSTR lpszPathName) |
|||
{ |
|||
if (!CDocument::OnOpenDocument(lpszPathName)) |
|||
return FALSE; |
|||
|
|||
m_strFileName = lpszPathName; |
|||
m_bLgsMode = FALSE; |
|||
|
|||
if( !m_Kernel.Create() ) |
|||
{ |
|||
AfxMessageBox( "Can't create Kernel", MB_OK ); |
|||
return FALSE; |
|||
} |
|||
|
|||
m_liReadPos.QuadPart = 0; |
|||
|
|||
OnOptionsStep(); |
|||
|
|||
// store properties and place into server
|
|||
strcpy( m_pChannelName, m_strFileName ); |
|||
m_nChannelID = gChannelID++; |
|||
// ((CBoardReceiverApp*)AfxGetApp())->RegisterDocument( this );
|
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverDoc serialization
|
|||
|
|||
void CBoardReceiverDoc::Serialize(CArchive& ar) |
|||
{ |
|||
if (ar.IsStoring()) |
|||
{ |
|||
// TODO: add storing code here
|
|||
} |
|||
else |
|||
{ |
|||
// TODO: add loading code here
|
|||
} |
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverDoc diagnostics
|
|||
|
|||
#ifdef _DEBUG
|
|||
void CBoardReceiverDoc::AssertValid() const |
|||
{ |
|||
CDocument::AssertValid(); |
|||
} |
|||
|
|||
void CBoardReceiverDoc::Dump(CDumpContext& dc) const |
|||
{ |
|||
CDocument::Dump(dc); |
|||
} |
|||
#endif //_DEBUG
|
|||
|
|||
#define PACKET_SIZE (13*LGS_MAX_SEND_BOARDDATA_PART+1)
|
|||
#define READ_BUFFER_SIZE (PACKET_SIZE * 10)
|
|||
|
|||
DWORD CBoardReceiverDoc::ThreadProc() |
|||
{ |
|||
__try |
|||
{ |
|||
// current angle
|
|||
int nAngle = 0; |
|||
|
|||
// buffer for receiveing data
|
|||
BYTE pReadBuffer[ READ_BUFFER_SIZE * 3 ]; |
|||
INT nCount = 0; |
|||
BOARDDATAARRAY BoardDataArray; |
|||
|
|||
// until stop condition
|
|||
while( !CLgThread::IsStopping() ) |
|||
{ |
|||
// read from serial port
|
|||
__try |
|||
{ |
|||
nCount += m_Connection.Read( pReadBuffer + nCount, READ_BUFFER_SIZE - nCount, 100UL ); |
|||
} |
|||
__except( EXCEPTION_EXECUTE_HANDLER ) |
|||
{ |
|||
MessageBox( NULL, "","", 0 ); |
|||
} |
|||
PBYTE pBuffer = pReadBuffer; |
|||
|
|||
// parse buffer
|
|||
while( nCount >= PACKET_SIZE ) |
|||
{ |
|||
// prepare ckecksum
|
|||
BYTE sum = 0; |
|||
for( int i = 0; i < PACKET_SIZE-1; i++ ) |
|||
sum += pBuffer[i]; |
|||
|
|||
// if check sum correct
|
|||
if( sum == pBuffer[PACKET_SIZE-1] ) |
|||
{ |
|||
m_Decoder.SetBuffer( pBuffer ); |
|||
|
|||
BOOL bFront = TRUE; |
|||
for( i = 0; i < LGS_MAX_SEND_BOARDDATA_PART; i++ ) |
|||
{ |
|||
BOOL bNextPart = FALSE; |
|||
while( !bNextPart ) |
|||
{ |
|||
DWORD dwData; |
|||
|
|||
bNextPart = m_Decoder.Decode24( &dwData, 13 ); |
|||
|
|||
BOOL bZero = dwData & (1 << 12); |
|||
BOOL bSun = dwData & (1 << 11); |
|||
INT nRange = (INT)(dwData & 0x7FF); |
|||
|
|||
if( bZero ) |
|||
{ |
|||
if( nAngle != (LGS_MAX_DETECTOR_ANGLES - 1) ) TRACE("Board data ok\n"); |
|||
else TRACE("Board data incomplete (%d)\n", nAngle ); |
|||
|
|||
// __try
|
|||
{ |
|||
// __try
|
|||
{ |
|||
GetLocalTime( &BoardDataArray.Time ); |
|||
m_List.Lock(); |
|||
m_List.Add( BoardDataArray ); |
|||
m_List.Unlock(); |
|||
} |
|||
// __except(1)
|
|||
{ |
|||
// MessageBox( NULL, "sdsd","sdsdds", MB_OK );
|
|||
} |
|||
} |
|||
// __except(1)
|
|||
{ |
|||
// MessageBox( NULL, "sdsd","sdsdds", MB_OK );
|
|||
} |
|||
|
|||
m_nLastAngles = nAngle + 1; |
|||
|
|||
nAngle = 0; |
|||
} |
|||
else nAngle++; |
|||
|
|||
if( nAngle < LGS_MAX_DETECTOR_ANGLES ) |
|||
{ |
|||
BoardDataArray.BoardData[nAngle].bSun = bSun ? 1 : 0; |
|||
BoardDataArray.BoardData[nAngle].nRange = nRange; |
|||
BoardDataArray.BoardData[nAngle].bFront = bFront ? 1 : 0; |
|||
} |
|||
bFront = FALSE; |
|||
} |
|||
} |
|||
|
|||
pBuffer += PACKET_SIZE; |
|||
nCount -= PACKET_SIZE; |
|||
} |
|||
else |
|||
{ |
|||
pBuffer ++; |
|||
nCount --; |
|||
} |
|||
} |
|||
|
|||
// copy remainig part into begin of buffer
|
|||
if( pReadBuffer != pBuffer ) |
|||
memcpy( pReadBuffer, pBuffer, nCount ); |
|||
} |
|||
} |
|||
__except( 1 ) |
|||
{ |
|||
MessageBox( NULL, "", "", MB_OK ); |
|||
} |
|||
return 0UL; |
|||
} |
|||
|
|||
BOOL CBoardReceiverDoc::Get( PBOARDDATAARRAY pBoardDataArray ) |
|||
{ |
|||
if( !pBoardDataArray ) |
|||
return FALSE; |
|||
|
|||
CLgLocker Lock( &m_List ); |
|||
if( !m_List.GetCount() ) |
|||
return FALSE; |
|||
|
|||
*pBoardDataArray = m_List[0]; |
|||
|
|||
m_List.Remove(0); |
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnCloseDocument() |
|||
{ |
|||
CLgThread::Stop( TRUE ); |
|||
|
|||
m_Connection.Destroy(); |
|||
|
|||
CDocument::OnCloseDocument(); |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnIdle() |
|||
{ |
|||
if( Get( &m_BoardData ) ) |
|||
{ |
|||
if( m_bLgsMode ) |
|||
{ |
|||
// write data to file
|
|||
HANDLE hFile = ::CreateFile( m_strFileName, GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, 0, NULL ); |
|||
if( hFile != INVALID_HANDLE_VALUE ) |
|||
{ |
|||
LONG lMoveHigh = 0; |
|||
DWORD dwWritten = 0; |
|||
::SetFilePointer( hFile, 0, &lMoveHigh, FILE_END ); |
|||
::WriteFile( hFile, &m_BoardData, sizeof(m_BoardData), &dwWritten, NULL ); |
|||
::CloseHandle( hFile ); |
|||
} |
|||
} |
|||
|
|||
// actual processing
|
|||
for( int i = 0; i < LGS_MAX_DETECTOR_ANGLES; i++ ) |
|||
m_Kernel.Invalidate( i == 0, m_BoardData.BoardData[i].bSun, m_BoardData.BoardData[i].nRange ); |
|||
|
|||
// update views
|
|||
UpdateView(); |
|||
} |
|||
else |
|||
{ |
|||
if( !m_bLgsMode && m_bFastProcessing ) |
|||
{ |
|||
if( m_liFastProcessingStopPos.QuadPart > m_liReadPos.QuadPart ) |
|||
ReadData(); |
|||
else |
|||
{ |
|||
// stop fastr processing
|
|||
m_bFastProcessing = FALSE; |
|||
|
|||
// update idle mode
|
|||
((CBoardReceiverApp*)AfxGetApp())->SetIdleMode( m_bFastProcessing ); |
|||
|
|||
// update views
|
|||
UpdateView(); |
|||
} |
|||
} |
|||
} |
|||
|
|||
CMainFrame *pMainFrame = (CMainFrame*)AfxGetMainWnd(); |
|||
if( pMainFrame ) |
|||
{ |
|||
CString str; |
|||
str.Format( _T("%04d"), m_nLastAngles ); |
|||
pMainFrame->ShowLastAngles( str ); |
|||
} |
|||
} |
|||
|
|||
void CBoardReceiverDoc::UpdateView() |
|||
{ |
|||
LARGE_INTEGER liStep; |
|||
liStep.QuadPart = m_liReadPos.QuadPart / sizeof(m_BoardData); |
|||
|
|||
// update all document view representations
|
|||
POSITION posV = GetFirstViewPosition(); |
|||
while( posV ) |
|||
{ |
|||
CView *pView = GetNextView( posV ); |
|||
if( pView->IsKindOf( RUNTIME_CLASS(CBoardReceiverView) ) ) |
|||
{ |
|||
CBoardReceiverView *pBRV = (CBoardReceiverView*)pView; |
|||
if( (!m_bFastProcessing) || (liStep.QuadPart%100==0) ) |
|||
pBRV->Update( &m_Kernel, m_BoardData.BoardData, m_bLgsMode ); |
|||
} |
|||
else |
|||
if( pView->IsKindOf( RUNTIME_CLASS(CBoardReceiverList) ) ) |
|||
{ |
|||
CBoardReceiverList *pBRL = (CBoardReceiverList*)pView; |
|||
|
|||
if( m_Kernel.GetTracker()->GetLastErrorOverflow() ) |
|||
pBRL->Update( _T("OVERFLOW") ); |
|||
|
|||
if( m_Kernel.GetTracker()->GetLastErrorOverflowSST() ) |
|||
pBRL->Update( _T("SST OVERFLOW") ); |
|||
|
|||
if( m_Kernel.GetDetector()->GetLastErrorSun() ) |
|||
pBRL->Update( _T("SUN BIT ERROR") ); |
|||
|
|||
CTracker::TARGET target; |
|||
while( m_Kernel.GetTracker()->GetTarget( &target ) ) |
|||
{ |
|||
pBRL->Update( target.bType, target.nAngle, target.nRange, target.nWidth ); |
|||
} |
|||
} |
|||
else |
|||
if( pView->IsKindOf( RUNTIME_CLASS(CBoardReceiverVariableList) ) ) |
|||
{ |
|||
CBoardReceiverVariableList *pBRVL = (CBoardReceiverVariableList*)pView; |
|||
|
|||
TCHAR pText[1000]; |
|||
|
|||
#define INT_VARIABLE( v, d ) _sntprintf( pText, 1000, "%d", v ); pBRVL->SetVariable( d, pText );
|
|||
#define LARGE_INT_VARIABLE( v, d ) _sntprintf( pText, 1000, "%ld", v ); pBRVL->SetVariable( d, pText );
|
|||
|
|||
#define INT_DETECTOR_VARIABLE( v ) INT_VARIABLE( m_Kernel.GetDetector()->v, #v )
|
|||
|
|||
// _sntprintf( pText, 100, "%d", m_dwReadPos / sizeof(m_BoardDataArray.BoardData) );
|
|||
// pBRVL->SetVariable( "STEP", pText );
|
|||
|
|||
if( 1 ) |
|||
{ |
|||
LARGE_INT_VARIABLE( liStep.QuadPart, "STEP" ); |
|||
|
|||
_sntprintf( pText, 1000, "%02d/%02d/%04d %02d:%02d:%02d", |
|||
m_BoardData.Time.wDay, m_BoardData.Time.wMonth, m_BoardData.Time.wYear, |
|||
m_BoardData.Time.wHour, m_BoardData.Time.wMinute, m_BoardData.Time.wSecond ); |
|||
pBRVL->SetVariable( "TIME", pText ); |
|||
} |
|||
|
|||
if( (!m_bFastProcessing) || (liStep.QuadPart%100==0) ) |
|||
{ |
|||
// show flip info
|
|||
INT_DETECTOR_VARIABLE( m_nFlipWaitHistory ); |
|||
INT_DETECTOR_VARIABLE( m_nFlip ); |
|||
INT_DETECTOR_VARIABLE( m_nFlipWaitHistory ); |
|||
INT_DETECTOR_VARIABLE( m_nFloatFlip ); |
|||
INT_DETECTOR_VARIABLE( m_nFlipCounter ); |
|||
// INT_DETECTOR_VARIABLE( m_nSpikeWaitLoop );
|
|||
INT_DETECTOR_VARIABLE( m_nSpikeCount ); |
|||
INT_DETECTOR_VARIABLE( m_nSpikeTempCount ); |
|||
// INT_DETECTOR_VARIABLE( m_nSpikeLastLoop );
|
|||
INT_DETECTOR_VARIABLE( m_nSpikeHistoryPosition ); |
|||
INT_DETECTOR_VARIABLE( m_nSpikeHistoryCount ); |
|||
INT_DETECTOR_VARIABLE( m_nSpikeHistoryMax ); |
|||
|
|||
// fog spikes
|
|||
INT_DETECTOR_VARIABLE( m_nSpikeFogCount ); |
|||
INT_DETECTOR_VARIABLE( m_nSpikeFogTempCount ); |
|||
// INT_DETECTOR_VARIABLE( m_nSpikeFogCountLast );
|
|||
|
|||
/*
|
|||
INT nSize = 0; |
|||
for( INT i = 0; i < LGS_MAX_SPIKE_HISTORY; i++ ) |
|||
{ |
|||
INT pos = (m_Kernel.GetDetector()->m_nSpikeHistoryPosition + i) % LGS_MAX_SPIKE_HISTORY; |
|||
nSize += _sntprintf( pText + nSize, 1000-nSize, i ? ",%d" : "%d", m_Kernel.GetDetector()->m_pSpikeHistory[pos] ); |
|||
} |
|||
pBRVL->SetVariable( "m_pSpikeHistory", pText ); |
|||
*/ |
|||
#define INT_DETECTOR_ARRAY_VARIABLE( v, p, m ) \
|
|||
{ \ |
|||
INT nSize = 0; \ |
|||
for( INT i = 0; i < m; i++ ) \ |
|||
{ \ |
|||
INT pos = (m_Kernel.GetDetector()->p + i) % m; \ |
|||
nSize += _sntprintf( pText + nSize, 1000-nSize, i ? ",%d" : "%d", m_Kernel.GetDetector()->v[pos] ); \ |
|||
} \ |
|||
pBRVL->SetVariable( #v, pText ); \ |
|||
} |
|||
|
|||
INT_DETECTOR_ARRAY_VARIABLE( m_pSpikeHistory, m_nSpikeHistoryPosition, LGS_MAX_SPIKE_HISTORY ); |
|||
|
|||
/*
|
|||
INT_DETECTOR_VARIABLE( m_FilterDRD.m_nDRDCalculateLoop ); |
|||
// INT_DETECTOR_VARIABLE( m_FilterDRD.m_bDRDCalculate );
|
|||
// INT_DETECTOR_VARIABLE( m_FilterDRD.m_nDRDCount );
|
|||
INT_DETECTOR_VARIABLE( m_FilterDRD.m_bDRDMode ); |
|||
INT_DETECTOR_VARIABLE( m_FilterDRD.m_nDRDHistoryCount ); |
|||
// INT_DETECTOR_VARIABLE( m_FilterDRD.m_pDRDHistoryPosition );
|
|||
INT_DETECTOR_VARIABLE( m_FilterDRD.m_nDRDHistoryIndex ); |
|||
INT_DETECTOR_VARIABLE( m_FilterDRD.m_nDRDHistoryMedium ); |
|||
|
|||
for( int j = 0; j < LGS_DETECTOR_DRD_SECTOR_COUNT; j++ ) |
|||
{ |
|||
nSize = 0; |
|||
for( i = 0; i < LGS_DETECTOR_DRD_HISTORY_LENGTH; i++ ) |
|||
{ |
|||
INT pos = (m_Kernel.GetDetector()->m_FilterDRD.m_pDRDHistoryPosition[j] + i) % LGS_DETECTOR_DRD_HISTORY_LENGTH; |
|||
nSize += _sntprintf( pText + nSize, 1000-nSize, i ? ",%d" : "%d", m_Kernel.GetDetector()->m_FilterDRD.m_ppDRDHistory[j][pos] ); |
|||
} |
|||
CHAR pVariable[MAX_PATH]; |
|||
|
|||
sprintf( pVariable, "m_FilterDRD.m_pDRDHistory[%d]", j ); |
|||
pBRVL->SetVariable( pVariable, pText ); |
|||
|
|||
sprintf( pVariable, "m_FilterDRD.m_pSectorDRDCount[%d]", j ); |
|||
_sntprintf( pText, 1000, "%d", m_Kernel.GetDetector()->m_FilterDRD.m_pSectorDRDCount[j] ); |
|||
pBRVL->SetVariable( pVariable, pText ); |
|||
|
|||
sprintf( pVariable, "m_FilterDRD.m_pSectorDRDMode[%d]", j ); |
|||
_sntprintf( pText, 1000, "%d", m_Kernel.GetDetector()->m_FilterDRD.m_pSectorDRDMode[j] ); |
|||
pBRVL->SetVariable( pVariable, pText ); |
|||
|
|||
// pBRVL->SetVariable( "m_FilterDRD.m_pDRDHistory", pText );
|
|||
} |
|||
*/ |
|||
// show middle
|
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_nMedium ); |
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_nMediumCalculateLoop ); |
|||
/*
|
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_nHistoryCount ); |
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_nHistoryPosition ); |
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_nHistoryIndex ); |
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_nHistoryMedium ); |
|||
*/ |
|||
INT_DETECTOR_ARRAY_VARIABLE( m_FilterMediumRange.m_MediumHistory.m_pHistory, m_FilterMediumRange.m_MediumHistory.m_nHead, (1 << LGS_DETECTOR_MEDIUM_RANGE_HISTORY_LENGTH) ); |
|||
|
|||
INT_DETECTOR_VARIABLE( m_FilterMediumRange.m_bBlind ); |
|||
|
|||
/*
|
|||
nSize = 0; |
|||
for( i = 0; i < LGS_DETECTOR_MEDIUM_RANGE_HISTORY_LENGTH; i++ ) |
|||
{ |
|||
INT pos = (m_Kernel.GetDetector()->m_FilterMediumRange.m_nHistoryPosition + i) % LGS_DETECTOR_MEDIUM_RANGE_HISTORY_LENGTH; |
|||
nSize += _sntprintf( pText + nSize, 1000-nSize, i ? ",%d" : "%d", m_Kernel.GetDetector()->m_FilterMediumRange.m_pHistory[pos] ); |
|||
} |
|||
pBRVL->SetVariable( "m_FilterMediumRange.m_pHistory", pText ); |
|||
*/ |
|||
// INT_DETECTOR_ARRAY_VARIABLE( m_FilterMediumRange.m_pHistory, m_FilterMediumRange.m_nHistoryPosition, LGS_DETECTOR_MEDIUM_RANGE_HISTORY_LENGTH );
|
|||
|
|||
INT_DETECTOR_VARIABLE( m_FilterPD.m_nMediumLastPD ); |
|||
// INT_DETECTOR_VARIABLE( m_FilterPD.m_nMediumHistory );
|
|||
// INT_DETECTOR_ARRAY_VARIABLE( m_FilterPD.m_pMediumHistory, m_FilterPD.m_nMediumHistoryHead, LGS_DETECTOR_PD_HISTORY_LENGTH );
|
|||
INT_DETECTOR_VARIABLE( m_FilterPD.m_MediumHistory.m_nSum ); |
|||
INT_DETECTOR_ARRAY_VARIABLE( m_FilterPD.m_MediumHistory.m_pHistory, m_FilterPD.m_MediumHistory.m_nHead, (1 << LGS_DETECTOR_PD_HISTORY_LENGTH) ); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnOptionsReset() |
|||
{ |
|||
Reset(); |
|||
return; |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnOptionsStep() |
|||
{ |
|||
if( m_bLgsMode ) |
|||
return; |
|||
|
|||
if( !m_bFastProcessing ) |
|||
{ |
|||
ReadData(); |
|||
} |
|||
else |
|||
{ |
|||
m_bFastProcessing = FALSE; |
|||
// update idle mode
|
|||
((CBoardReceiverApp*)AfxGetApp())->SetIdleMode( m_bFastProcessing ); |
|||
// update view
|
|||
UpdateView(); |
|||
} |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnUpdateOptionsStep( CCmdUI* pCmdUI ) |
|||
{ |
|||
pCmdUI->Enable( !m_bLgsMode ); |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnOptionsParameters() |
|||
{ |
|||
CBoardReceiverParamDlg dlg; |
|||
|
|||
LGS::LGS_PARAMETERS params; |
|||
|
|||
m_Kernel.GetDetector()->GetParameters( ¶ms ); |
|||
|
|||
dlg.SetParameters( ¶ms ); |
|||
|
|||
if( dlg.DoModal() == IDOK ) |
|||
{ |
|||
dlg.GetParameters( ¶ms ); |
|||
m_Kernel.GetDetector()->SetParameters( ¶ms ); |
|||
|
|||
// OnOptionsReset();
|
|||
Reset(); |
|||
} |
|||
} |
|||
|
|||
void CBoardReceiverDoc::OnOptionsSeek() |
|||
{ |
|||
CBoardReceiverSeekDlg dlg; |
|||
dlg.m_nStep.QuadPart = m_liReadPos.QuadPart / sizeof(BOARDDATAARRAY); |
|||
if( dlg.DoModal() == IDOK ) |
|||
{ |
|||
switch( dlg.m_nRadio ) |
|||
{ |
|||
case 0: |
|||
{ |
|||
// open file
|
|||
HANDLE hFile = ::CreateFile( m_strFileName, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ); |
|||
if( hFile != INVALID_HANDLE_VALUE ) |
|||
{ |
|||
// get file size
|
|||
LARGE_INTEGER liSize; |
|||
liSize.LowPart = ::GetFileSize( hFile, (LPDWORD)&liSize.HighPart ); |
|||
|
|||
// update seek position
|
|||
dlg.m_nStep.QuadPart *= (__int64)sizeof(BOARDDATAARRAY); |
|||
|
|||
// depend on action
|
|||
if( dlg.m_bRuntoOrGoto ) |
|||
{ |
|||
// validate step
|
|||
if( liSize.QuadPart > dlg.m_nStep.QuadPart && |
|||
m_liReadPos.QuadPart < dlg.m_nStep.QuadPart ) |
|||
{ |
|||
m_bFastProcessing = TRUE; |
|||
m_liFastProcessingStopPos.QuadPart = dlg.m_nStep.QuadPart; |
|||
|
|||
// update idle mode
|
|||
((CBoardReceiverApp*)AfxGetApp())->SetIdleMode( m_bFastProcessing ); |
|||
} |
|||
} |
|||
else |
|||
{ |
|||
m_liReadPos.QuadPart = dlg.m_nStep.QuadPart - sizeof(BOARDDATAARRAY); |
|||
if( m_liReadPos.QuadPart < 0i64 ) |
|||
m_liReadPos.QuadPart = 0i64; |
|||
|
|||
ReadData(); |
|||
|
|||
OnIdle(); |
|||
|
|||
Reset(); |
|||
} |
|||
|
|||
::CloseHandle( hFile ); |
|||
} |
|||
} |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
BOOL CBoardReceiverDoc::ReadData() |
|||
{ |
|||
BOOL bResult = FALSE; |
|||
|
|||
HANDLE hFile = ::CreateFile( m_strFileName, GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL ); |
|||
if( hFile != INVALID_HANDLE_VALUE ) |
|||
{ |
|||
m_liReadPos.LowPart = ::SetFilePointer( hFile, m_liReadPos.LowPart, &m_liReadPos.HighPart, FILE_BEGIN ); |
|||
DWORD dwRead = 0; |
|||
if( ::ReadFile( hFile, &m_BoardData, sizeof(m_BoardData), &dwRead, NULL ) && |
|||
dwRead == sizeof(m_BoardData) ) |
|||
{ |
|||
bResult = TRUE; |
|||
|
|||
m_liReadPos.QuadPart = 0; |
|||
m_liReadPos.LowPart = ::SetFilePointer( hFile, m_liReadPos.LowPart, &m_liReadPos.HighPart, FILE_CURRENT ); |
|||
|
|||
CLgLocker Lock( &m_List ); |
|||
m_List.Add( m_BoardData ); |
|||
} |
|||
::CloseHandle( hFile ); |
|||
} |
|||
|
|||
return bResult; |
|||
} |
|||
|
|||
void CBoardReceiverDoc::Reset() |
|||
{ |
|||
m_Kernel.Reset( FALSE ); |
|||
|
|||
// update all document view representations
|
|||
POSITION posV = GetFirstViewPosition(); |
|||
while( posV ) |
|||
{ |
|||
CView *pView = GetNextView( posV ); |
|||
if( pView->IsKindOf( RUNTIME_CLASS(CBoardReceiverList) ) ) |
|||
{ |
|||
CBoardReceiverList *pBRL = (CBoardReceiverList*)pView; |
|||
|
|||
pBRL->ClearInfo(); |
|||
} |
|||
} |
|||
|
|||
UpdateView(); |
|||
} |
|||
|
|||
// perform full reset
|
|||
void CBoardReceiverDoc::OnOptionsSoftreset() |
|||
{ |
|||
m_Kernel.Reset( TRUE ); |
|||
|
|||
// update all document view representations
|
|||
POSITION posV = GetFirstViewPosition(); |
|||
while( posV ) |
|||
{ |
|||
CView *pView = GetNextView( posV ); |
|||
if( pView->IsKindOf( RUNTIME_CLASS(CBoardReceiverList) ) ) |
|||
{ |
|||
CBoardReceiverList *pBRL = (CBoardReceiverList*)pView; |
|||
|
|||
pBRL->ClearInfo(); |
|||
} |
|||
} |
|||
|
|||
UpdateView(); |
|||
} |
|||
|
|||
BOOL CBoardReceiverDoc::AddHiddenZone( POINT p1, POINT p2 ) |
|||
{ |
|||
CRect rect( p1, p2 ); |
|||
rect.NormalizeRect(); |
|||
return m_HiddenZoneArray.Add( rect ); |
|||
} |
|||
|
|||
BOOL CBoardReceiverDoc::RemoveHiddenZone( POINT p ) |
|||
{ |
|||
for( INT i = 0; i < m_HiddenZoneArray.GetCount(); i++ ) |
|||
{ |
|||
if( PtInRect( &m_HiddenZoneArray[i], p ) ) |
|||
{ |
|||
m_HiddenZoneArray.Remove( i ); |
|||
return TRUE; |
|||
} |
|||
} |
|||
|
|||
return FALSE; |
|||
} |
|||
@ -0,0 +1,141 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverDoc.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverDoc.h |
|||
//---------------------------------------------------------------------------- |
|||
#ifndef __BOARD__RECEIVER__DOC__H__INCLUDED__ |
|||
#define __BOARD__RECEIVER__DOC__H__INCLUDED__ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif |
|||
|
|||
#include "..\lglib\comm\rs485.h" |
|||
#include "..\lglib\thread.h" |
|||
#include "..\lglib\comm\lgsm.h" |
|||
#include "..\lglib\lgbitcod.h" |
|||
#include "..\lglib\templ.h" |
|||
|
|||
#include "BoardReceiverSwitcher.h" |
|||
|
|||
#include <afxtempl.h> |
|||
#include <afxmt.h> |
|||
#include "kernel.h" |
|||
|
|||
#pragma pack(1) |
|||
typedef struct BOARDDATA |
|||
{ |
|||
WORD bSun : 1; |
|||
WORD bFront : 1; |
|||
WORD bReserved : 3; |
|||
WORD nRange : 11; |
|||
}BOARDDATA, *PBOARDDATA; |
|||
#pragma pack() |
|||
#pragma pack(1) |
|||
typedef struct BOARDDATAARRAY |
|||
{ |
|||
SYSTEMTIME Time; |
|||
BOARDDATA BoardData[ LGS_MAX_DETECTOR_ANGLES ]; |
|||
}BOARDDATAARRAY, *PBOARDDATAARRAY; |
|||
#pragma pack() |
|||
|
|||
|
|||
class CBoardReceiverDoc : |
|||
public CDocument, |
|||
public CLgThread |
|||
{ |
|||
protected: |
|||
CBoardReceiverDoc(); |
|||
DECLARE_DYNCREATE(CBoardReceiverDoc) |
|||
|
|||
public: |
|||
//{{AFX_VIRTUAL(CBoardReceiverDoc) |
|||
public: |
|||
virtual BOOL OnNewDocument(); |
|||
virtual void Serialize(CArchive& ar); |
|||
virtual void OnCloseDocument(); |
|||
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName); |
|||
//}}AFX_VIRTUAL |
|||
|
|||
public: |
|||
virtual ~CBoardReceiverDoc(); |
|||
#ifdef _DEBUG |
|||
virtual void AssertValid() const; |
|||
virtual void Dump(CDumpContext& dc) const; |
|||
#endif |
|||
|
|||
protected: |
|||
//{{AFX_MSG(CBoardReceiverDoc) |
|||
afx_msg void OnOptionsReset(); |
|||
afx_msg void OnOptionsStep(); |
|||
afx_msg void OnUpdateOptionsStep(CCmdUI* pCmdUI); |
|||
afx_msg void OnOptionsParameters(); |
|||
afx_msg void OnOptionsSeek(); |
|||
afx_msg void OnOptionsSoftreset(); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
|
|||
public: |
|||
|
|||
public: |
|||
void OnIdle(); |
|||
|
|||
BOOL Get( PBOARDDATAARRAY pBoardDataArray ); |
|||
|
|||
private: |
|||
BOARDDATAARRAY m_BoardData; |
|||
CLgArrayP<BOARDDATAARRAY> m_List; |
|||
|
|||
private: |
|||
virtual DWORD ThreadProc(); |
|||
|
|||
private: |
|||
CConnectionRS485 m_Connection; |
|||
// CRS232 m_Connection; |
|||
BOOL m_bLgsMode; |
|||
|
|||
private: |
|||
CKernel m_Kernel; |
|||
CString m_strFileName; |
|||
LARGE_INTEGER m_liReadPos; |
|||
LARGE_INTEGER m_liFastProcessingStopPos; |
|||
CLgBitCode m_Decoder; |
|||
|
|||
INT m_nLastAngles; |
|||
|
|||
public: |
|||
LPTSTR GetChannelName() { return m_pChannelName; }; |
|||
INT GetChannelID() { return m_nChannelID; }; |
|||
|
|||
private: |
|||
TCHAR m_pChannelName[MAX_PATH]; |
|||
INT m_nChannelID; |
|||
|
|||
private: |
|||
void UpdateView(); |
|||
void Reset(); |
|||
BOOL ReadData(); |
|||
BOOL m_bFastProcessing; |
|||
|
|||
private: |
|||
typedef CLgArrayP<RECT> CHiddenZoneArray; |
|||
CHiddenZoneArray m_HiddenZoneArray; |
|||
|
|||
public: |
|||
BOOL AddHiddenZone( POINT p1, POINT p2 ); |
|||
BOOL RemoveHiddenZone( POINT p ); |
|||
CHiddenZoneArray &GetHiddenZoneArray() { return m_HiddenZoneArray; } |
|||
int GetAngleCount(void); |
|||
}; |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
|
|||
#endif |
|||
@ -0,0 +1,182 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverList.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverList.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverList.cpp : implementation file
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "..\lglib\comm\lgsm.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "BoardReceiverList.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverList
|
|||
|
|||
IMPLEMENT_DYNCREATE(CBoardReceiverList, CListView) |
|||
|
|||
CBoardReceiverList::CBoardReceiverList() |
|||
{ |
|||
} |
|||
|
|||
CBoardReceiverList::~CBoardReceiverList() |
|||
{ |
|||
} |
|||
|
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverList, CListView) |
|||
//{{AFX_MSG_MAP(CBoardReceiverList)
|
|||
ON_WM_SIZE() |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverList drawing
|
|||
|
|||
void CBoardReceiverList::OnDraw(CDC* pDC) |
|||
{ |
|||
CDocument* pDoc = GetDocument(); |
|||
// TODO: add draw code here
|
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverList diagnostics
|
|||
|
|||
#ifdef _DEBUG
|
|||
void CBoardReceiverList::AssertValid() const |
|||
{ |
|||
CListView::AssertValid(); |
|||
} |
|||
|
|||
void CBoardReceiverList::Dump(CDumpContext& dc) const |
|||
{ |
|||
CListView::Dump(dc); |
|||
} |
|||
#endif //_DEBUG
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverList message handlers
|
|||
|
|||
void CBoardReceiverList::OnInitialUpdate() |
|||
{ |
|||
CListView::OnInitialUpdate(); |
|||
|
|||
// set REPORT style
|
|||
LONG lStyle = ::GetWindowLong( GetListCtrl().GetSafeHwnd(), GWL_STYLE ); |
|||
::SetWindowLong( GetListCtrl().GetSafeHwnd(), GWL_STYLE, lStyle | LVS_REPORT ); |
|||
|
|||
CRect rect; |
|||
GetClientRect( &rect ); |
|||
|
|||
GetListCtrl().InsertColumn( 0, "Type", LVCFMT_CENTER, 100, 0 ); |
|||
GetListCtrl().InsertColumn( 1, "Angle", LVCFMT_CENTER, 100, 1 ); |
|||
GetListCtrl().InsertColumn( 2, "Range", LVCFMT_CENTER, 100, 2 ); |
|||
GetListCtrl().InsertColumn( 3, "Width", LVCFMT_CENTER, 100, 3 ); |
|||
|
|||
GetListCtrl().SetExtendedStyle( LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES ); |
|||
|
|||
OnSize( 0, rect.Width(), rect.Height() ); |
|||
} |
|||
|
|||
void CBoardReceiverList::OnSize(UINT nType, int cx, int cy) |
|||
{ |
|||
CListView::OnSize(nType, cx, cy); |
|||
|
|||
int nWidth = cx / 4; |
|||
|
|||
LVCOLUMN column; |
|||
column.mask = LVCF_WIDTH; |
|||
GetListCtrl().GetColumn( 0, &column ); |
|||
column.cx = nWidth; |
|||
GetListCtrl().SetColumn( 0, &column ); |
|||
column.cx = nWidth; |
|||
GetListCtrl().SetColumn( 1, &column ); |
|||
column.cx = nWidth; |
|||
GetListCtrl().SetColumn( 2, &column ); |
|||
column.cx = cx - nWidth * 3; |
|||
GetListCtrl().SetColumn( 3, &column ); |
|||
} |
|||
|
|||
void CBoardReceiverList::Update( BYTE nType, INT nAngle, INT nRange, INT nWidth) |
|||
{ |
|||
INT nCount = GetListCtrl().GetItemCount(); |
|||
|
|||
if( nCount > 100 ) |
|||
{ |
|||
if( GetListCtrl().DeleteItem(0) ) |
|||
nCount--; |
|||
} |
|||
|
|||
|
|||
TCHAR pText[MAX_PATH] = { "???" }; |
|||
|
|||
switch( nType ) |
|||
{ |
|||
case LGS::TT_FLIP: |
|||
_sntprintf( pText, MAX_PATH, "FLIP" ); |
|||
break; |
|||
case LGS::TT_TEST: |
|||
_sntprintf( pText, MAX_PATH, "TEST" ); |
|||
break; |
|||
case LGS::TT_CAMERA: |
|||
_sntprintf( pText, MAX_PATH, "CAMERA" ); |
|||
break; |
|||
case LGS::TT_NORMAL: |
|||
_sntprintf( pText, MAX_PATH, "NORMAL" ); |
|||
break; |
|||
case LGS::TT_WIDE: |
|||
_sntprintf( pText, MAX_PATH, "WIDE" ); |
|||
break; |
|||
case LGS::TT_BLIND: |
|||
_sntprintf( pText, MAX_PATH, "BLIND" ); |
|||
break; |
|||
} |
|||
|
|||
GetListCtrl().InsertItem( nCount, pText ); |
|||
|
|||
_sntprintf( pText, MAX_PATH, "%d", nAngle ); |
|||
GetListCtrl().SetItem( nCount, 1, LVIF_TEXT, pText, 0, 0, 0, 0 ); |
|||
|
|||
_sntprintf( pText, MAX_PATH, "%d", nRange ); |
|||
GetListCtrl().SetItem( nCount, 2, LVIF_TEXT, pText, 0, 0, 0, 0 ); |
|||
|
|||
_sntprintf( pText, MAX_PATH, "%d", nWidth ); |
|||
GetListCtrl().SetItem( nCount, 3, LVIF_TEXT, pText, 0, 0, 0, 0 ); |
|||
|
|||
GetListCtrl().EnsureVisible( nCount, FALSE ); |
|||
} |
|||
|
|||
void CBoardReceiverList::Update( LPCTSTR pText ) |
|||
{ |
|||
INT nCount = GetListCtrl().GetItemCount(); |
|||
|
|||
if( nCount > 100 ) |
|||
{ |
|||
if( GetListCtrl().DeleteItem(0) ) |
|||
nCount--; |
|||
} |
|||
|
|||
GetListCtrl().InsertItem( nCount, pText ); |
|||
|
|||
GetListCtrl().EnsureVisible( nCount, FALSE ); |
|||
} |
|||
|
|||
void CBoardReceiverList::ClearInfo() |
|||
{ |
|||
GetListCtrl().DeleteAllItems(); |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverList.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverList.h |
|||
//---------------------------------------------------------------------------- |
|||
#if !defined(AFX_BOARDRECEIVERLIST_H__AA60E9C1_BB30_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_BOARDRECEIVERLIST_H__AA60E9C1_BB30_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
#include <afxcview.h> |
|||
|
|||
class CBoardReceiverList : |
|||
public CListView |
|||
{ |
|||
protected: |
|||
CBoardReceiverList(); // protected constructor used by dynamic creation |
|||
DECLARE_DYNCREATE(CBoardReceiverList) |
|||
|
|||
// Attributes |
|||
public: |
|||
|
|||
// Operations |
|||
public: |
|||
void ClearInfo(); |
|||
void Update( BYTE nType, INT nAngle, INT nRange, INT nWidth ); |
|||
void Update( LPCTSTR ); |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverList) |
|||
public: |
|||
virtual void OnInitialUpdate(); |
|||
protected: |
|||
virtual void OnDraw(CDC* pDC); // overridden to draw this view |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
protected: |
|||
virtual ~CBoardReceiverList(); |
|||
#ifdef _DEBUG |
|||
virtual void AssertValid() const; |
|||
virtual void Dump(CDumpContext& dc) const; |
|||
#endif |
|||
|
|||
// Generated message map functions |
|||
protected: |
|||
//{{AFX_MSG(CBoardReceiverList) |
|||
afx_msg void OnSize(UINT nType, int cx, int cy); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVERLIST_H__AA60E9C1_BB30_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,111 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverParamDlg.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverParamDlg.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverParamDlg.cpp : implementation file
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "BoardReceiverParamDlg.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverParamDlg dialog
|
|||
|
|||
|
|||
CBoardReceiverParamDlg::CBoardReceiverParamDlg(CWnd* pParent /*=NULL*/) |
|||
: CDialog(CBoardReceiverParamDlg::IDD, pParent) |
|||
{ |
|||
//{{AFX_DATA_INIT(CBoardReceiverParamDlg)
|
|||
//}}AFX_DATA_INIT
|
|||
} |
|||
|
|||
|
|||
void CBoardReceiverParamDlg::DoDataExchange(CDataExchange* pDX) |
|||
{ |
|||
CDialog::DoDataExchange(pDX); |
|||
//{{AFX_DATA_MAP(CBoardReceiverParamDlg)
|
|||
DDX_Control(pDX, IDC_SPIN_SST, m_SpinSST); |
|||
DDX_Control(pDX, IDC_EDIT_SST, m_EditSST); |
|||
DDX_Control(pDX, IDC_SPIN_WIDTH, m_SpinWidth); |
|||
DDX_Control(pDX, IDC_SPIN_SUN, m_SpinSun); |
|||
DDX_Control(pDX, IDC_SPIN_ORDER, m_SpinOrder); |
|||
DDX_Control(pDX, IDC_SPIN_OFFSET, m_SpinOffset); |
|||
DDX_Control(pDX, IDC_SPIN_FLIP, m_SpinFlip); |
|||
DDX_Control(pDX, IDC_SPIN_DELTA, m_SpinDelta); |
|||
DDX_Control(pDX, IDC_EDIT_WIDTH, m_EditWidth); |
|||
DDX_Control(pDX, IDC_EDIT_SUN, m_EditSun); |
|||
DDX_Control(pDX, IDC_EDIT_ORDER, m_EditOrder); |
|||
DDX_Control(pDX, IDC_EDIT_OFFSET, m_EditOffset); |
|||
DDX_Control(pDX, IDC_EDIT_FLIP, m_EditFlip); |
|||
DDX_Control(pDX, IDC_EDIT_DELTA, m_EditDelta); |
|||
//}}AFX_DATA_MAP
|
|||
} |
|||
|
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverParamDlg, CDialog) |
|||
//{{AFX_MSG_MAP(CBoardReceiverParamDlg)
|
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
void CBoardReceiverParamDlg::GetParameters( LGS::LGS_PARAMETERS *pParameters ) |
|||
{ |
|||
*pParameters = m_Params; |
|||
} |
|||
|
|||
void CBoardReceiverParamDlg::SetParameters( LGS::LGS_PARAMETERS *pParameters ) |
|||
{ |
|||
m_Params = *pParameters; |
|||
} |
|||
|
|||
BOOL CBoardReceiverParamDlg::OnInitDialog() |
|||
{ |
|||
CDialog::OnInitDialog(); |
|||
|
|||
m_SpinWidth.SetRange( 0, 32000 ); |
|||
m_SpinSun.SetRange( 8, 1000 ); |
|||
m_SpinOrder.SetRange( 0, 100 ); |
|||
m_SpinOffset.SetRange( 0, 100 ); |
|||
m_SpinFlip.SetRange( 0, 128 ); |
|||
m_SpinDelta.SetRange( 0, 2047 ); |
|||
m_SpinSST.SetRange( 0, 100 ); |
|||
|
|||
m_SpinWidth.SetPos( m_Params.nWidth ); |
|||
m_SpinSun.SetPos( m_Params.nSun ); |
|||
m_SpinOrder.SetPos( m_Params.nOrder ); |
|||
m_SpinOffset.SetPos( m_Params.nOffset ); |
|||
m_SpinFlip.SetPos( m_Params.nFlip ); |
|||
m_SpinDelta.SetPos( m_Params.nDelta ); |
|||
m_SpinSST.SetPos( m_Params.bSST ); |
|||
|
|||
return TRUE; // return TRUE unless you set the focus to a control
|
|||
// EXCEPTION: OCX Property Pages should return FALSE
|
|||
} |
|||
|
|||
void CBoardReceiverParamDlg::OnOK() |
|||
{ |
|||
m_Params.nWidth = m_SpinWidth.GetPos(); |
|||
m_Params.nSun = m_SpinSun.GetPos(); |
|||
m_Params.nOrder = m_SpinOrder.GetPos(); |
|||
m_Params.nOffset = m_SpinOffset.GetPos(); |
|||
m_Params.nFlip = m_SpinFlip.GetPos(); |
|||
m_Params.nDelta = m_SpinDelta.GetPos(); |
|||
m_Params.bSST = m_SpinSST.GetPos(); |
|||
|
|||
CDialog::OnOK(); |
|||
} |
|||
@ -0,0 +1,80 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverParamDlg.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverParamDlg.h |
|||
//---------------------------------------------------------------------------- |
|||
#if !defined(AFX_BOARDRECEIVERPARAMDLG_H__616149C3_BD8A_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_BOARDRECEIVERPARAMDLG_H__616149C3_BD8A_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
// BoardReceiverParamDlg.h : header file |
|||
// |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// CBoardReceiverParamDlg dialog |
|||
|
|||
class CBoardReceiverParamDlg : public CDialog |
|||
{ |
|||
// Construction |
|||
public: |
|||
CBoardReceiverParamDlg(CWnd* pParent = NULL); // standard constructor |
|||
|
|||
// Dialog Data |
|||
//{{AFX_DATA(CBoardReceiverParamDlg) |
|||
enum { IDD = IDD_PARAM_DLG }; |
|||
CSpinButtonCtrl m_SpinSST; |
|||
CEdit m_EditSST; |
|||
CSpinButtonCtrl m_SpinWidth; |
|||
CSpinButtonCtrl m_SpinSun; |
|||
CSpinButtonCtrl m_SpinOrder; |
|||
CSpinButtonCtrl m_SpinOffset; |
|||
CSpinButtonCtrl m_SpinFlip; |
|||
CSpinButtonCtrl m_SpinDelta; |
|||
CEdit m_EditWidth; |
|||
CEdit m_EditSun; |
|||
CEdit m_EditOrder; |
|||
CEdit m_EditOffset; |
|||
CEdit m_EditFlip; |
|||
CEdit m_EditDelta; |
|||
//}}AFX_DATA |
|||
|
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverParamDlg) |
|||
protected: |
|||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
protected: |
|||
|
|||
// Generated message map functions |
|||
//{{AFX_MSG(CBoardReceiverParamDlg) |
|||
virtual BOOL OnInitDialog(); |
|||
virtual void OnOK(); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
|
|||
public: |
|||
void GetParameters( LGS::LGS_PARAMETERS* ); |
|||
void SetParameters( LGS::LGS_PARAMETERS* ); |
|||
|
|||
private: |
|||
LGS::LGS_PARAMETERS m_Params; |
|||
}; |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVERPARAMDLG_H__616149C3_BD8A_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,110 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverSeekDlg.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverSeekDlg.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverSeekDlg.cpp : implementation file
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "boardreceiver.h"
|
|||
#include "BoardReceiverSeekDlg.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverSeekDlg dialog
|
|||
|
|||
|
|||
CBoardReceiverSeekDlg::CBoardReceiverSeekDlg(CWnd* pParent /*=NULL*/) |
|||
: CDialog(CBoardReceiverSeekDlg::IDD, pParent) |
|||
{ |
|||
//{{AFX_DATA_INIT(CBoardReceiverSeekDlg)
|
|||
m_nRadio = 0; |
|||
//}}AFX_DATA_INIT
|
|||
} |
|||
|
|||
|
|||
void CBoardReceiverSeekDlg::DoDataExchange(CDataExchange* pDX) |
|||
{ |
|||
CDialog::DoDataExchange(pDX); |
|||
//{{AFX_DATA_MAP(CBoardReceiverSeekDlg)
|
|||
DDX_Control(pDX, IDC_SPIN_STEP, m_SpinStep); |
|||
DDX_Control(pDX, IDC_EDIT_STEP, m_EditStep); |
|||
DDX_Control(pDX, IDC_DATETIMEPICKER_TIME, m_DateTime); |
|||
DDX_Radio(pDX, IDC_RADIO_STEP, m_nRadio); |
|||
//}}AFX_DATA_MAP
|
|||
} |
|||
|
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverSeekDlg, CDialog) |
|||
//{{AFX_MSG_MAP(CBoardReceiverSeekDlg)
|
|||
ON_BN_CLICKED(IDC_RADIO_STEP, OnRadioButton) |
|||
ON_BN_CLICKED(IDC_RADIO_TIME, OnRadioButton) |
|||
ON_BN_CLICKED(IDC_BUTTON_GOTO, OnButtonGoto) |
|||
ON_BN_CLICKED(IDC_BUTTON_RUNTO, OnButtonRunto) |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverSeekDlg message handlers
|
|||
|
|||
BOOL CBoardReceiverSeekDlg::OnInitDialog() |
|||
{ |
|||
CDialog::OnInitDialog(); |
|||
|
|||
m_DateTime.SendMessage( DTM_SETFORMAT, 0, (LONG)_T("MMM' 'dd', 'yyy' 'HH':'mm':'ss") ); |
|||
|
|||
m_SpinStep.SetRange32( 1, INT_MAX ); |
|||
m_SpinStep.SendMessage( UDM_SETPOS32, 0, (LONG)m_nStep.QuadPart ); |
|||
|
|||
OnRadioButton(); |
|||
|
|||
return TRUE; // return TRUE unless you set the focus to a control
|
|||
// EXCEPTION: OCX Property Pages should return FALSE
|
|||
} |
|||
|
|||
void CBoardReceiverSeekDlg::OnRadioButton() |
|||
{ |
|||
UpdateData(); |
|||
|
|||
m_DateTime.EnableWindow( m_nRadio == 1 ); |
|||
m_EditStep.EnableWindow( m_nRadio == 0 ); |
|||
m_SpinStep.EnableWindow( m_nRadio == 0 ); |
|||
} |
|||
|
|||
void CBoardReceiverSeekDlg::OnButtonGoto() |
|||
{ |
|||
if( m_nRadio == 0 ) |
|||
{ |
|||
m_nStep.QuadPart = m_SpinStep.SendMessage( UDM_GETPOS32, 0, 0 ); |
|||
} |
|||
|
|||
m_bRuntoOrGoto = FALSE; |
|||
|
|||
CDialog::OnOK(); |
|||
} |
|||
|
|||
void CBoardReceiverSeekDlg::OnButtonRunto() |
|||
{ |
|||
if( m_nRadio == 0 ) |
|||
{ |
|||
m_nStep.QuadPart = m_SpinStep.SendMessage( UDM_GETPOS32, 0, 0 ); |
|||
} |
|||
|
|||
m_bRuntoOrGoto = TRUE; |
|||
|
|||
CDialog::OnOK(); |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverSeekDlg.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverSeekDlg.h |
|||
//---------------------------------------------------------------------------- |
|||
#if !defined(AFX_BOARDRECEIVERSEEKDLG_H__47A20E3D_BA8E_4099_9C1B_43CF168A3ABC__INCLUDED_) |
|||
#define AFX_BOARDRECEIVERSEEKDLG_H__47A20E3D_BA8E_4099_9C1B_43CF168A3ABC__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
// BoardReceiverSeekDlg.h : header file |
|||
// |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// CBoardReceiverSeekDlg dialog |
|||
|
|||
class CBoardReceiverSeekDlg : public CDialog |
|||
{ |
|||
// Construction |
|||
public: |
|||
CBoardReceiverSeekDlg(CWnd* pParent = NULL); // standard constructor |
|||
|
|||
// Dialog Data |
|||
//{{AFX_DATA(CBoardReceiverSeekDlg) |
|||
enum { IDD = IDD_SEEK_DLG }; |
|||
CSpinButtonCtrl m_SpinStep; |
|||
CEdit m_EditStep; |
|||
CDateTimeCtrl m_DateTime; |
|||
int m_nRadio; |
|||
//}}AFX_DATA |
|||
|
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverSeekDlg) |
|||
protected: |
|||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
protected: |
|||
|
|||
// Generated message map functions |
|||
//{{AFX_MSG(CBoardReceiverSeekDlg) |
|||
virtual BOOL OnInitDialog(); |
|||
afx_msg void OnRadioButton(); |
|||
afx_msg void OnButtonGoto(); |
|||
afx_msg void OnButtonRunto(); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
|
|||
public: |
|||
LARGE_INTEGER m_nStep; |
|||
BOOL m_bRuntoOrGoto; |
|||
}; |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVERSEEKDLG_H__47A20E3D_BA8E_4099_9C1B_43CF168A3ABC__INCLUDED_) |
|||
@ -0,0 +1,84 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverSwitcher.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverSwitcher.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverSwitcher.cpp: implementation of the CBoardReceiverSwitcher class.
|
|||
//
|
|||
//////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "BoardReceiverSwitcher.h"
|
|||
|
|||
//#include "..\testlgs\siteprocessor.h"
|
|||
#include "..\lglib\net\lgnetsocketmd.h"
|
|||
#include "..\lglib\net\lgnetdevicelgs.h"
|
|||
|
|||
CBoardReceiverSwitcher::CBoardReceiverSwitcher() |
|||
{ |
|||
|
|||
} |
|||
|
|||
CBoardReceiverSwitcher::~CBoardReceiverSwitcher() |
|||
{ |
|||
|
|||
} |
|||
|
|||
BOOL CBoardReceiverSwitcher::Switch( INT nDevice, LPCTSTR pPort, INT nCount, DWORD dwTimeout ) |
|||
{ |
|||
BOOL bResult = FALSE; |
|||
|
|||
// __try
|
|||
{ |
|||
bResult = Switch_( nDevice, pPort, nCount, dwTimeout ); |
|||
} |
|||
// __except( EXCEPTION_CONTINUE_EXECUTION )
|
|||
{ |
|||
// LGLOG( LOG_LEVEL_LOW, LOG_TYPE_ERROR, this, _T("CBoardReceiverSwitcher::Switch"), _T("Exception 0x%08X"), _exception_code() );
|
|||
} |
|||
|
|||
return bResult; |
|||
} |
|||
|
|||
BOOL CBoardReceiverSwitcher::Switch_( INT nDevice, LPCTSTR pPort, INT nCount, DWORD dwTimeout ) |
|||
{ |
|||
CLgNetDeviceLGS *device = new CLgNetDeviceLGS; |
|||
CLgNetSocketMD *socket = new CLgNetSocketMD; |
|||
|
|||
device->SetAddress( 0 ); |
|||
device->SetAutoBaudrate( FALSE ); |
|||
device->SetSpyMode( FALSE ); |
|||
|
|||
if( !socket->CLgLinkP<CLgNetObject,CLgNetObject,CLgNetObjectChild>::Link( device ) ) |
|||
return FALSE; |
|||
|
|||
if( !socket->Create( pPort, LGS_COMM_BAUDRATE, FALSE, FALSE ) ) |
|||
return FALSE; |
|||
|
|||
if( !socket->CLgLinkP<CLgNetSocket,CLgNetSocketDevice>::Link( device ) ) |
|||
return FALSE; |
|||
|
|||
CLgNetMessageLGS msg; |
|||
msg.BuildCmdSendBoardData( nDevice ); |
|||
msg.SetDistinationID( device->GetID() ); |
|||
msg.SetSenderID( socket->GetID() ); |
|||
|
|||
DWORD dwStartTime = ::GetTickCount(); |
|||
for( INT i = 0; i < nCount; i++ ) |
|||
{ |
|||
socket->SendMessageToChild( msg ); |
|||
Sleep( dwTimeout ); |
|||
} |
|||
|
|||
socket->Destroy(); |
|||
return TRUE; |
|||
} |
|||
@ -0,0 +1,32 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverSwitcher.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverSwitcher.h |
|||
//---------------------------------------------------------------------------- |
|||
#ifndef __BOARD__RECEIVER__SWITCHER__H__INCLUDED__ |
|||
#define __BOARD__RECEIVER__SWITCHER__H__INCLUDED__ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif |
|||
|
|||
class CBoardReceiverSwitcher |
|||
{ |
|||
public: |
|||
CBoardReceiverSwitcher(); |
|||
virtual ~CBoardReceiverSwitcher(); |
|||
|
|||
public: |
|||
BOOL Switch( INT nDevice, LPCTSTR pPort, INT nCount = 5, DWORD dwTimeout = 200L ); |
|||
BOOL Switch_( INT nDevice, LPCTSTR pPort, INT nCount, DWORD dwTimeout ); |
|||
}; |
|||
|
|||
#endif |
|||
@ -0,0 +1,120 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverVariableList.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverVariableList.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// BoardReceiverVariableList.cpp : implementation file
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "BoardReceiverVariableList.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverVariableList
|
|||
|
|||
IMPLEMENT_DYNCREATE(CBoardReceiverVariableList, CListView) |
|||
|
|||
CBoardReceiverVariableList::CBoardReceiverVariableList() |
|||
{ |
|||
} |
|||
|
|||
CBoardReceiverVariableList::~CBoardReceiverVariableList() |
|||
{ |
|||
} |
|||
|
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverVariableList, CListView) |
|||
//{{AFX_MSG_MAP(CBoardReceiverVariableList)
|
|||
ON_WM_SIZE() |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverVariableList drawing
|
|||
|
|||
void CBoardReceiverVariableList::OnDraw(CDC* pDC) |
|||
{ |
|||
CDocument* pDoc = GetDocument(); |
|||
// TODO: add draw code here
|
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverVariableList diagnostics
|
|||
|
|||
#ifdef _DEBUG
|
|||
void CBoardReceiverVariableList::AssertValid() const |
|||
{ |
|||
CListView::AssertValid(); |
|||
} |
|||
|
|||
void CBoardReceiverVariableList::Dump(CDumpContext& dc) const |
|||
{ |
|||
CListView::Dump(dc); |
|||
} |
|||
#endif //_DEBUG
|
|||
|
|||
void CBoardReceiverVariableList::OnInitialUpdate() |
|||
{ |
|||
CListView::OnInitialUpdate(); |
|||
|
|||
// set REPORT style
|
|||
LONG lStyle = ::GetWindowLong( GetListCtrl().GetSafeHwnd(), GWL_STYLE ); |
|||
::SetWindowLong( GetListCtrl().GetSafeHwnd(), GWL_STYLE, lStyle | LVS_REPORT ); |
|||
|
|||
CRect rect; |
|||
GetClientRect( &rect ); |
|||
|
|||
GetListCtrl().InsertColumn( 0, "Variable", LVCFMT_CENTER, 100, 0 ); |
|||
GetListCtrl().InsertColumn( 1, "Value", LVCFMT_CENTER, 100, 1 ); |
|||
|
|||
GetListCtrl().SetExtendedStyle( LVS_EX_FULLROWSELECT ); |
|||
|
|||
GetListCtrl().SetTextBkColor( RGB( 0xDF,0xDF,0xDF ) ); |
|||
|
|||
OnSize( 0, rect.Width(), rect.Height() ); |
|||
} |
|||
|
|||
void CBoardReceiverVariableList::OnSize(UINT nType, int cx, int cy) |
|||
{ |
|||
CListView::OnSize(nType, cx, cy); |
|||
|
|||
int nWidth = cx * 2 / 3; |
|||
|
|||
LVCOLUMN column; |
|||
column.mask = LVCF_WIDTH; |
|||
GetListCtrl().GetColumn( 0, &column ); |
|||
column.cx = cx - nWidth; |
|||
GetListCtrl().SetColumn( 0, &column ); |
|||
column.cx = nWidth; |
|||
GetListCtrl().SetColumn( 1, &column ); |
|||
} |
|||
|
|||
BOOL CBoardReceiverVariableList::SetVariable(LPCTSTR pName, LPCTSTR pValue) |
|||
{ |
|||
for( INT i = 0; i < GetListCtrl().GetItemCount(); i++ ) |
|||
{ |
|||
CString strName = GetListCtrl().GetItemText( i, 0 ); |
|||
if( strName == pName ) |
|||
return GetListCtrl().SetItemText( i, 1, pValue ); |
|||
} |
|||
|
|||
INT nItem = GetListCtrl().InsertItem( GetListCtrl().GetItemCount(), pName ); |
|||
GetListCtrl().SetItemText( nItem, 1, pValue ); |
|||
|
|||
return TRUE; |
|||
} |
|||
@ -0,0 +1,67 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverVariableList.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverVariableList.h |
|||
//---------------------------------------------------------------------------- |
|||
#if !defined(AFX_BOARDRECEIVERVARIABLELIST_H__896DE901_C89D_11D5_9B79_0000E89F6E90__INCLUDED_) |
|||
#define AFX_BOARDRECEIVERVARIABLELIST_H__896DE901_C89D_11D5_9B79_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
#include <afxcview.h> |
|||
|
|||
|
|||
class CBoardReceiverVariableList : public CListView |
|||
{ |
|||
protected: |
|||
CBoardReceiverVariableList(); // protected constructor used by dynamic creation |
|||
DECLARE_DYNCREATE(CBoardReceiverVariableList) |
|||
|
|||
// Attributes |
|||
public: |
|||
|
|||
// Operations |
|||
public: |
|||
BOOL SetVariable( LPCTSTR pName, LPCTSTR pValue ); |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverVariableList) |
|||
public: |
|||
virtual void OnInitialUpdate(); |
|||
protected: |
|||
virtual void OnDraw(CDC* pDC); // overridden to draw this view |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
protected: |
|||
virtual ~CBoardReceiverVariableList(); |
|||
#ifdef _DEBUG |
|||
virtual void AssertValid() const; |
|||
virtual void Dump(CDumpContext& dc) const; |
|||
#endif |
|||
|
|||
// Generated message map functions |
|||
protected: |
|||
//{{AFX_MSG(CBoardReceiverVariableList) |
|||
afx_msg void OnSize(UINT nType, int cx, int cy); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVERVARIABLELIST_H__896DE901_C89D_11D5_9B79_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,669 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: BoardReceiverView.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of BoardReceiverView.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
|
|||
#include "BoardReceiverDoc.h"
|
|||
#include "BoardReceiverView.h"
|
|||
#include "MainFrm.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverView
|
|||
|
|||
IMPLEMENT_DYNCREATE(CBoardReceiverView, CScrollView) |
|||
|
|||
BEGIN_MESSAGE_MAP(CBoardReceiverView, CScrollView) |
|||
//{{AFX_MSG_MAP(CBoardReceiverView)
|
|||
ON_WM_ERASEBKGND() |
|||
ON_WM_SIZE() |
|||
ON_WM_MOUSEMOVE() |
|||
ON_COMMAND(ID_VIEW_DEGREES, OnViewDegrees) |
|||
ON_COMMAND(ID_VIEW_METERS, OnViewMeters) |
|||
ON_UPDATE_COMMAND_UI(ID_VIEW_DEGREES, OnUpdateViewDegrees) |
|||
ON_UPDATE_COMMAND_UI(ID_VIEW_METERS, OnUpdateViewMeters) |
|||
ON_COMMAND(ID_VIEW_REVERSE, OnViewReverse) |
|||
ON_UPDATE_COMMAND_UI(ID_VIEW_REVERSE, OnUpdateViewReverse) |
|||
ON_WM_RBUTTONUP() |
|||
ON_WM_RBUTTONDOWN() |
|||
ON_WM_RBUTTONDBLCLK() |
|||
ON_WM_LBUTTONDBLCLK() |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverView construction/destruction
|
|||
|
|||
CBoardReceiverView::CBoardReceiverView() |
|||
{ |
|||
ZeroMemory( &m_pBoardData, sizeof(m_pBoardData) ); |
|||
ZeroMemory( &m_pBoardDataNC, sizeof(m_pBoardDataNC) ); |
|||
ZeroMemory( &m_pRealSAF, sizeof(m_pRealSAF) ); |
|||
ZeroMemory( &m_pSAF, sizeof(m_pSAF) ); |
|||
ZeroMemory( &m_pSpike, sizeof(m_pSpike) ); |
|||
// ZeroMemory( &m_pDRD, sizeof(m_pDRD) );
|
|||
ZeroMemory( &m_pPD, sizeof(m_pPD) ); |
|||
m_bReverseAngle = TRUE; |
|||
m_bShowDegrees = FALSE; |
|||
m_bShowMeters = FALSE; |
|||
m_bMouseOwned = FALSE; |
|||
|
|||
const INT fff = LGS_MAX_DETECTOR_ANGLES; |
|||
|
|||
} |
|||
|
|||
CBoardReceiverView::~CBoardReceiverView() |
|||
{ |
|||
} |
|||
|
|||
BOOL CBoardReceiverView::PreCreateWindow(CREATESTRUCT& cs) |
|||
{ |
|||
// TODO: Modify the Window class or styles here by modifying
|
|||
// the CREATESTRUCT cs
|
|||
|
|||
return CScrollView::PreCreateWindow(cs); |
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverView drawing
|
|||
|
|||
void CBoardReceiverView::OnDraw(CDC* pDC) |
|||
{ |
|||
CBoardReceiverDoc* pDoc = GetDocument(); |
|||
ASSERT_VALID(pDoc); |
|||
// TODO: add draw code for native data here
|
|||
|
|||
Draw( pDC, FALSE ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnInitialUpdate() |
|||
{ |
|||
CScrollView::OnInitialUpdate(); |
|||
|
|||
CSize sizeTotal; |
|||
// TODO: calculate the total size of this view
|
|||
sizeTotal.cx = 6000; |
|||
sizeTotal.cy = 2048; |
|||
SetScrollSizes(MM_TEXT, sizeTotal); |
|||
|
|||
SetTimer( 0, 100, 0 ); |
|||
|
|||
// m_bDrawData = FALSE;
|
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CBoardReceiverView diagnostics
|
|||
|
|||
#ifdef _DEBUG
|
|||
void CBoardReceiverView::AssertValid() const |
|||
{ |
|||
CScrollView::AssertValid(); |
|||
} |
|||
|
|||
void CBoardReceiverView::Dump(CDumpContext& dc) const |
|||
{ |
|||
CScrollView::Dump(dc); |
|||
} |
|||
|
|||
CBoardReceiverDoc* CBoardReceiverView::GetDocument() // non-debug version is inline
|
|||
{ |
|||
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CBoardReceiverDoc))); |
|||
return (CBoardReceiverDoc*)m_pDocument; |
|||
} |
|||
#endif //_DEBUG
|
|||
|
|||
void CBoardReceiverView::Update( CKernel *pKernel, BOARDDATA *pBoardData, BOOL bLive ) |
|||
{ |
|||
m_bLive = bLive; |
|||
|
|||
for( INT i = 0; i < LGS_MAX_DETECTOR_ANGLES; i++ ) |
|||
{ |
|||
INT nActiveSAF = pKernel->GetDetector()->SAFGetActive(); |
|||
|
|||
m_pRealSAF[i] = pKernel->GetDetector()->SAFGetSAF( nActiveSAF, i ); |
|||
|
|||
m_pBoardDataNC[i] = m_pBoardData[i] = pBoardData[i]; |
|||
|
|||
// calibrate range
|
|||
m_pBoardData[i].nRange = pKernel->GetCalibrator()->Calibrate( pBoardData[i].nRange ); |
|||
|
|||
CDetector::LPSAF pSAF = pKernel->GetDetector()->m_ppSAF[nActiveSAF]; |
|||
|
|||
m_pSAF[i] = pSAF[i]; |
|||
} |
|||
|
|||
for( i = 0; i < LGS_MAX_DETECTOR_ANGLES; i++ ) |
|||
{ |
|||
m_pSpike[i] = pKernel->GetDetector()->SAFGetSpike( i ); |
|||
} |
|||
|
|||
// for( i = 0; i < LGS_MAX_DETECTOR_ANGLES; i++ )
|
|||
// m_pDRD[i] = pDetector->m_FilterDRD.m_lpDRD[i];
|
|||
|
|||
for( i = 0; i < LGS_MAX_DETECTOR_ANGLES; i++ ) |
|||
m_pPD[i] = pKernel->GetDetector()->m_FilterPD.m_lpPD[i]; |
|||
|
|||
// m_pDRD[i] = pDetector->m_lpDRD[i];
|
|||
|
|||
|
|||
// m_bDRDMode = pDetector->m_bDRDMode;
|
|||
|
|||
InvalidateRect( NULL ); |
|||
} |
|||
|
|||
void CBoardReceiverView::Draw( CDC *pDC, BOOL bScroll ) |
|||
{ |
|||
int xScroll = GetScrollPos( SB_HORZ ); |
|||
int yScroll = GetScrollPos( SB_VERT ); |
|||
|
|||
CRect cRect; |
|||
GetClientRect( &cRect ); |
|||
|
|||
// clear image
|
|||
m_MemoryDC.FillSolidRect( 0, 0, cRect.Width(), cRect.Height(), m_bLive ? RGB(0xFF, 0xEF, 0xEF) : RGB(0xEF, 0xEF, 0xFF) ); |
|||
|
|||
// draw grid lines
|
|||
CPen pen1( PS_SOLID, 1, RGB(0xBF,0xBF,0xBF) ); |
|||
CPen pen2( PS_SOLID, 1, RGB(0xDF,0xDF,0xDF) ); |
|||
for( int i = 0; i < 2048; i += 20 ) |
|||
{ |
|||
CPen *pPen; |
|||
if( i % 100 == 0 ) pPen = m_MemoryDC.SelectObject( &pen1 ); |
|||
else pPen = m_MemoryDC.SelectObject( &pen2 ); |
|||
|
|||
m_MemoryDC.MoveTo( 0, 2047 - i - yScroll ); |
|||
m_MemoryDC.LineTo( 6000, 2047 - i - yScroll ); |
|||
|
|||
m_MemoryDC.SelectObject( pPen ); |
|||
} |
|||
for( i = 0; i < 6000; i += 20 ) |
|||
{ |
|||
CPen *pPen; |
|||
|
|||
if( i % 100 == 0 ) pPen = m_MemoryDC.SelectObject( &pen1 ); |
|||
else pPen = m_MemoryDC.SelectObject( &pen2 ); |
|||
|
|||
m_MemoryDC.MoveTo( i - xScroll, 0 ); |
|||
m_MemoryDC.LineTo( i - xScroll, 2047 ); |
|||
|
|||
m_MemoryDC.SelectObject( pPen ); |
|||
} |
|||
|
|||
// draw text labels
|
|||
CFont font; |
|||
font.CreateFont( -16, -8, 0, 0, 100, 0, 0, 0, DEFAULT_CHARSET , OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Courier" ); |
|||
CFont *pFont = m_MemoryDC.SelectObject( &font ); |
|||
m_MemoryDC.SetBkMode( TRANSPARENT ); |
|||
for( i = 0; i < 2048; i += 20 ) |
|||
{ |
|||
if( i % 100 == 0 ) |
|||
{ |
|||
char pText[1000]; |
|||
int nText = m_bShowMeters ? sprintf( pText, "%dm", i * 100 / 2047 ) : sprintf( pText, "%d", i ); |
|||
m_MemoryDC.TextOut( m_bReverseAngle ? 0 : ( cRect.Width() - nText * 9 ), 2047 - i - yScroll - 8, pText ); |
|||
} |
|||
} |
|||
for( i = 0; i < 6000; i += 20 ) |
|||
{ |
|||
if( i % 100 == 0 ) |
|||
{ |
|||
char pText[1000]; |
|||
int nText = m_bShowDegrees ? sprintf( pText, "%d°", i * 360 / 6000 ) : sprintf( pText, "%d", i ); |
|||
m_MemoryDC.TextOut( ( m_bReverseAngle ? i : ( 6000 - i) ) - xScroll - nText * 4, cRect.Height() - 16, pText ); |
|||
} |
|||
} |
|||
m_MemoryDC.SelectObject( pFont ); |
|||
|
|||
INT nWidth = ( cRect.Width() + xScroll <= 6000 ) ? cRect.Width() : cRect.Width() - 1; |
|||
// fill actual SAF (without orders and offsets)
|
|||
if( 1 ) |
|||
{ |
|||
LPPOINT pPolygon = new POINT[ nWidth * 2 ]; |
|||
if( pPolygon ) |
|||
{ |
|||
for( i = 0; i < nWidth; i++ ) |
|||
{ |
|||
CDetector::SAF *pSAF = &m_pSAF[ m_bReverseAngle ? ( i + xScroll ) : ( 5999 - (i + xScroll) ) ]; |
|||
POINT pMax = { i, 2047 - pSAF->nMax - yScroll }; |
|||
POINT pMin = { i, 2047 - pSAF->nMin - yScroll }; |
|||
|
|||
pPolygon[ i ] = pMax; |
|||
pPolygon[ nWidth * 2 - i - 1 ] = pMin; |
|||
} |
|||
|
|||
// CPen pen5( PS_SOLID, 1, RGB(0,0xDF,0) );
|
|||
// CBrush brush( RGB(0xCF, 0xFF, 0xCF) );
|
|||
CPen pen5( PS_SOLID, 1, RGB(0,0xEF,0) ); |
|||
CBrush brush( RGB(0, 0xEF, 0) ); |
|||
|
|||
CPen *pPen = m_MemoryDC.SelectObject( &pen5 ); |
|||
CBrush *pBrush = m_MemoryDC.SelectObject(&brush ); |
|||
|
|||
INT nROP2Mode = m_MemoryDC.SetROP2( R2_MASKPEN ); |
|||
m_MemoryDC.Polygon( pPolygon, nWidth * 2 ); |
|||
// m_MemoryDC.Polyline( pPolygon, nWidth * 2 );
|
|||
m_MemoryDC.SetROP2( nROP2Mode ); |
|||
|
|||
m_MemoryDC.SelectObject( pBrush ); |
|||
m_MemoryDC.SelectObject( pPen ); |
|||
|
|||
delete [] pPolygon; |
|||
} |
|||
} |
|||
|
|||
// draw all hidden zones
|
|||
{ |
|||
CBoardReceiverDoc* pDoc = GetDocument(); |
|||
ASSERT_VALID(pDoc); |
|||
for( INT i = 0; i < pDoc->GetHiddenZoneArray().GetCount(); i++ ) |
|||
{ |
|||
CPoint p1( *(((LPPOINT)&pDoc->GetHiddenZoneArray()[i]) + 0) ); |
|||
CPoint p2( *(((LPPOINT)&pDoc->GetHiddenZoneArray()[i]) + 1) ); |
|||
p1.x = p1.x - xScroll; |
|||
p2.x = p2.x - xScroll; |
|||
p1.y = 2047 - p1.y - yScroll; |
|||
p2.y = 2047 - p2.y - yScroll; |
|||
|
|||
CRect r( p1, p2 ); |
|||
|
|||
CBrush brush; |
|||
brush.CreateHatchBrush( HS_DIAGCROSS, 0 ); |
|||
CBrush *pBrush = m_MemoryDC.SelectObject( &brush ); |
|||
m_MemoryDC.Rectangle( &r ); |
|||
m_MemoryDC.SelectObject( pBrush ); |
|||
} |
|||
|
|||
// draw painting hidden zone
|
|||
if( m_bMouseOwned ) |
|||
{ |
|||
CPoint p1( m_MouseStart.x - xScroll, 2047 - m_MouseStart.y - yScroll ); |
|||
CPoint p2( m_MouseEnd.x - xScroll, 2047 - m_MouseEnd.y - yScroll ); |
|||
|
|||
CRect r( p1, p2 ); |
|||
|
|||
CBrush brush; |
|||
brush.CreateHatchBrush( HS_DIAGCROSS, 0 ); |
|||
CBrush *pBrush = m_MemoryDC.SelectObject( &brush ); |
|||
m_MemoryDC.Rectangle( &r ); |
|||
m_MemoryDC.SelectObject( pBrush ); |
|||
} |
|||
} |
|||
|
|||
// draw non-calibrated ranges
|
|||
CPen pen31( PS_DASH, 1, RGB(0xCF,0xCF,0xFF) ); |
|||
CPen pen41( PS_DASH, 1, RGB(0xFF,0xCF,0xCF) ); |
|||
for( i = 0; i < nWidth; i++ ) |
|||
{ |
|||
INT nIndex = m_bReverseAngle ? ( i + xScroll ) : ( 5999 - (i + xScroll) ); |
|||
PBOARDDATA pBoardData = &m_pBoardDataNC[ nIndex ]; |
|||
POINT p = { i, 2047 - pBoardData->nRange -yScroll }; |
|||
|
|||
// if( pBoardData->bFront )
|
|||
// m_MemoryDC.Ellipse( p.x-2, p.y-2, p.x+2, p.y+2 );
|
|||
|
|||
CPen *pPen = m_MemoryDC.SelectObject( &( pBoardData->bSun ? pen41 : pen31) ); |
|||
|
|||
if( i ) m_MemoryDC.LineTo( p ); |
|||
else m_MemoryDC.MoveTo( p ); |
|||
|
|||
m_MemoryDC.SelectObject( pPen ); |
|||
} |
|||
|
|||
// fill SAF with orders and offsets
|
|||
if( 1 ) |
|||
{ |
|||
INT nROP2Mode = m_MemoryDC.SetROP2( R2_MASKPEN ); |
|||
|
|||
LPPOINT pPolygon = new POINT[ nWidth * 2 ]; |
|||
if( pPolygon ) |
|||
{ |
|||
// draw bad points
|
|||
CPen pen5( PS_SOLID, 1, RGB(0xDF, 0xFF, 0xDF) ); |
|||
CPen pen6( PS_SOLID, 1, RGB(0xFF, 0xFF, 0xDF) ); |
|||
CPen pen7( PS_SOLID, 1, RGB(0xFF, 0xDF, 0xDF) ); |
|||
CPen pen8( PS_SOLID, 1, RGB(0xDF, 0xFF, 0xFF) ); |
|||
CPen pen51( PS_SOLID, 1, RGB(0,0xFF,0) ); |
|||
CPen pen61( PS_SOLID, 1, RGB(0xFF,0xFF,0) ); |
|||
CPen pen71( PS_SOLID, 1, RGB(0xFF,0,0) ); |
|||
CPen pen81( PS_SOLID, 1, RGB(0,0xFF,0xFF) ); |
|||
CBrush brush5( RGB(0xDF, 0xFF, 0xDF) ); |
|||
CBrush brush6( RGB(0xFF, 0xFF, 0xDF) ); |
|||
CBrush brush7( RGB(0xFF, 0xDF, 0xDF) ); |
|||
CBrush brush8( RGB(0xDF, 0xFF, 0xFF) ); |
|||
|
|||
CPen *ppPen[4] = { &pen5, &pen6, &pen7, &pen8 }; |
|||
CPen *ppPen1[4] = { &pen51, &pen61, &pen71, &pen81 }; |
|||
CBrush *ppBrush[4] = { &brush5, &brush6, &brush7, &brush8 }; |
|||
|
|||
INT nCount = 0; |
|||
INT nType = -1; |
|||
for( i = 0; i < nWidth; i++ ) |
|||
{ |
|||
INT nIndex = m_bReverseAngle ? ( i + xScroll ) : ( 5999 - (i + xScroll) ); |
|||
|
|||
CDetector::LPSAF pSAF = &m_pRealSAF[nIndex]; |
|||
|
|||
INT nNewType = 0; |
|||
/*
|
|||
CFilterDRD::LPDRD pDRD = &m_pDRD[nIndex]; |
|||
if( pDRD->bDRDMode ) |
|||
{ |
|||
if( pDRD->bDRDValue < LGS_DETECTOR_DRD_MAX_BAD_VALUE ) |
|||
nNewType = 1; |
|||
else |
|||
nNewType = 2; |
|||
} |
|||
else |
|||
nNewType = 0; |
|||
*/ |
|||
|
|||
CFilterPD::LPPD pPD = &m_pPD[nIndex]; |
|||
if( pPD->nValue < LGS_DETECTOR_PD_MAX_UPDATE_VALUE ) |
|||
{ |
|||
if( pPD->nValue > LGS_DETECTOR_PD_MIN_UPDATE_VALUE ) nNewType = 1; |
|||
else nNewType = 2; |
|||
} |
|||
else |
|||
nNewType = 0; |
|||
|
|||
|
|||
if( (nNewType != nType) && nCount ) |
|||
{ |
|||
// move points
|
|||
memmove( &pPolygon[nCount], &pPolygon[nWidth*2-nCount], nCount * sizeof(POINT) ); |
|||
|
|||
// draw poligon
|
|||
CPen *pPen = m_MemoryDC.SelectObject( ppPen[nType] ); |
|||
CBrush *pBrush = m_MemoryDC.SelectObject( ppBrush[nType] ); |
|||
m_MemoryDC.Polygon( pPolygon, nCount*2 ); |
|||
m_MemoryDC.SelectObject( pPen ); |
|||
m_MemoryDC.SelectObject( pBrush ); |
|||
|
|||
// draw border
|
|||
pPen = m_MemoryDC.SelectObject( ppPen1[nType] ); |
|||
m_MemoryDC.Polyline( pPolygon, nCount ); |
|||
m_MemoryDC.Polyline( &pPolygon[nCount], nCount ); |
|||
m_MemoryDC.SelectObject( pPen ); |
|||
|
|||
nCount = 0; |
|||
} |
|||
|
|||
// store type
|
|||
nType = nNewType; |
|||
|
|||
// make new points
|
|||
POINT pMax = { i, 2047 - pSAF->nMax - yScroll }; |
|||
POINT pMin = { i, 2047 - pSAF->nMin - yScroll }; |
|||
|
|||
// store points
|
|||
pPolygon[ nCount ] = pMax; |
|||
pPolygon[ nWidth * 2 - nCount - 1 ] = pMin; |
|||
|
|||
nCount++; |
|||
} |
|||
|
|||
if( nCount ) |
|||
{ |
|||
// move points
|
|||
memmove( &pPolygon[nCount], &pPolygon[nWidth*2-nCount], nCount * sizeof(POINT) ); |
|||
|
|||
// draw poligon
|
|||
CPen *pPen = m_MemoryDC.SelectObject( ppPen[nType] ); |
|||
CBrush *pBrush = m_MemoryDC.SelectObject( ppBrush[nType] ); |
|||
m_MemoryDC.Polygon( pPolygon, nCount*2 ); |
|||
m_MemoryDC.SelectObject( pPen ); |
|||
m_MemoryDC.SelectObject( pBrush ); |
|||
|
|||
// draw border
|
|||
pPen = m_MemoryDC.SelectObject( ppPen1[nType] ); |
|||
m_MemoryDC.Polyline( pPolygon, nCount ); |
|||
m_MemoryDC.Polyline( &pPolygon[nCount], nCount ); |
|||
m_MemoryDC.SelectObject( pPen ); |
|||
} |
|||
|
|||
delete []pPolygon; |
|||
} |
|||
/*
|
|||
pPolygon = new POINT[ nWidth * 2 ]; |
|||
if( pPolygon ) |
|||
{ |
|||
for( i = 0; i < nWidth; i++ ) |
|||
{ |
|||
CDetector::SAF *pSAF = &m_pRealSAF[ m_bReverseAngle ? ( i + xScroll ) : ( 5999 - (i + xScroll) ) ]; |
|||
POINT pMax = { i, 2047 - pSAF->nMax - yScroll }; |
|||
POINT pMin = { i, 2047 - pSAF->nMin - yScroll }; |
|||
|
|||
pPolygon[ i ] = pMax; |
|||
pPolygon[ nWidth * 2 - i - 1 ] = pMin; |
|||
} |
|||
|
|||
CPen pen5( PS_SOLID, 1, RGB(0,0xEF,0) ); |
|||
|
|||
CPen *pPen = m_MemoryDC.SelectObject( &pen5 ); |
|||
|
|||
m_MemoryDC.Polyline( pPolygon, nWidth * 2 ); |
|||
m_MemoryDC.MoveTo( *pPolygon ); |
|||
m_MemoryDC.LineTo( *(pPolygon + nWidth * 2 - 1) ); |
|||
|
|||
m_MemoryDC.SelectObject( pPen ); |
|||
|
|||
delete [] pPolygon; |
|||
} |
|||
*/ |
|||
m_MemoryDC.SetROP2( nROP2Mode ); |
|||
} |
|||
|
|||
// draw ranges
|
|||
CPen pen3( PS_SOLID, 1, RGB(0,0,0xFF) ); |
|||
CPen pen4( PS_SOLID, 1, RGB(0xFF,0,0) ); |
|||
for( i = 0; i < nWidth; i++ ) |
|||
{ |
|||
INT nIndex = m_bReverseAngle ? ( i + xScroll ) : ( 5999 - (i + xScroll) ); |
|||
PBOARDDATA pBoardData = &m_pBoardData[ nIndex ]; |
|||
POINT p = { i, 2047 - pBoardData->nRange -yScroll }; |
|||
|
|||
// if( pBoardData->bFront )
|
|||
// m_MemoryDC.Ellipse( p.x-2, p.y-2, p.x+2, p.y+2 );
|
|||
|
|||
CPen *pPen = m_MemoryDC.SelectObject( &( pBoardData->bSun ? pen4 : pen3) ); |
|||
|
|||
if( i ) m_MemoryDC.LineTo( p ); |
|||
else m_MemoryDC.MoveTo( p ); |
|||
|
|||
m_MemoryDC.SelectObject( pPen ); |
|||
} |
|||
|
|||
// draw target spikes
|
|||
CPen pen6( PS_SOLID, 1, RGB(0x7F,0x7F,0) ); |
|||
CPen pen7( PS_SOLID, 1, RGB(0xFF,0,0) ); |
|||
for( i = 0; i < nWidth; i++ ) |
|||
{ |
|||
CDetector::SPIKE *pSpike = &m_pSpike[ m_bReverseAngle ? ( i + xScroll ) : ( 5999 - (i + xScroll) ) ]; |
|||
CPen *pPen = NULL; |
|||
switch( pSpike->nType ) |
|||
{ |
|||
case CDetector::SPIKE_NONE: |
|||
break; |
|||
case CDetector::SPIKE_BEFORE_SST: |
|||
pPen = m_MemoryDC.SelectObject( &pen6 ); |
|||
break; |
|||
case CDetector::SPIKE_AFTER_SST: |
|||
pPen = m_MemoryDC.SelectObject( &pen7 ); |
|||
break; |
|||
} |
|||
if( pPen ) |
|||
{ |
|||
POINT p = { i, 2047 - pSpike->nRange - yScroll }; |
|||
|
|||
m_MemoryDC.Ellipse( p.x - 2, p.y - 2, p.x + 2, p.y + 2 ); |
|||
|
|||
m_MemoryDC.SelectObject( pPen ); |
|||
} |
|||
} |
|||
|
|||
pDC->BitBlt( xScroll, yScroll, cRect.Width(), cRect.Height(), &m_MemoryDC, 0, 0, SRCCOPY ); |
|||
|
|||
} |
|||
|
|||
BOOL CBoardReceiverView::OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll) |
|||
{ |
|||
InvalidateRect( NULL ); |
|||
return CScrollView::OnScroll(nScrollCode, nPos, bDoScroll); |
|||
} |
|||
|
|||
BOOL CBoardReceiverView::OnEraseBkgnd(CDC* pDC) |
|||
{ |
|||
return TRUE; //CScrollView::OnEraseBkgnd(pDC);
|
|||
} |
|||
|
|||
void CBoardReceiverView::OnSize(UINT nType, int cx, int cy) |
|||
{ |
|||
CScrollView::OnSize(nType, cx, cy); |
|||
|
|||
m_MemoryDC.Create( cx, cy, RGB(0xEF, 0xEF, 0xEF) ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnViewDegrees() |
|||
{ |
|||
m_bShowDegrees = !m_bShowDegrees; |
|||
InvalidateRect( NULL ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnViewMeters() |
|||
{ |
|||
m_bShowMeters = !m_bShowMeters; |
|||
InvalidateRect( NULL ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnViewReverse() |
|||
{ |
|||
m_bReverseAngle = !m_bReverseAngle; |
|||
InvalidateRect( NULL ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnUpdateViewDegrees(CCmdUI* pCmdUI) |
|||
{ |
|||
pCmdUI->SetCheck( m_bShowDegrees ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnUpdateViewMeters(CCmdUI* pCmdUI) |
|||
{ |
|||
pCmdUI->SetCheck( m_bShowMeters ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnUpdateViewReverse(CCmdUI* pCmdUI) |
|||
{ |
|||
pCmdUI->SetCheck( m_bReverseAngle ); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnMouseMove(UINT nFlags, CPoint point) |
|||
{ |
|||
CMainFrame *pMainFrame = (CMainFrame*)AfxGetMainWnd(); |
|||
if( pMainFrame ) |
|||
{ |
|||
int xScroll = GetScrollPos( SB_HORZ ); |
|||
int yScroll = GetScrollPos( SB_VERT ); |
|||
int x = m_bReverseAngle ? (point.x + xScroll) : (5999 - (point.x + xScroll)); |
|||
int y = 2047 - (point.y + yScroll); |
|||
TCHAR pTextX[10], pTextY[10]; |
|||
if( m_bShowDegrees ) _sntprintf( pTextX, 10, "%0.1f", x * 360.0 / 6000.0 ); |
|||
else _sntprintf( pTextX, 10, "%d", x ); |
|||
if( m_bShowMeters ) _sntprintf( pTextY, 10, "%0.1f", y * 100.0 / 2048.0 ); |
|||
else _sntprintf( pTextY, 10, "%d", y ); |
|||
pMainFrame->ShowMousePosition( pTextX, pTextY ); |
|||
} |
|||
|
|||
// if we are paining hidden zone
|
|||
if( m_bMouseOwned ) |
|||
{ |
|||
int xScroll = GetScrollPos( SB_HORZ ); |
|||
int yScroll = GetScrollPos( SB_VERT ); |
|||
m_MouseEnd.x = m_bReverseAngle ? (point.x + xScroll) : (5999 - (point.x + xScroll)); |
|||
m_MouseEnd.y = 2047 - (point.y + yScroll); |
|||
|
|||
InvalidateRect( NULL ); |
|||
} |
|||
|
|||
CScrollView::OnMouseMove(nFlags, point); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnRButtonDown(UINT nFlags, CPoint point) |
|||
{ |
|||
// remember that we begin to write hidden zone
|
|||
m_bMouseOwned = TRUE; |
|||
|
|||
// all mouse events will be catched by us
|
|||
SetCapture(); |
|||
|
|||
|
|||
// store start point
|
|||
int xScroll = GetScrollPos( SB_HORZ ); |
|||
int yScroll = GetScrollPos( SB_VERT ); |
|||
m_MouseStart.x = m_bReverseAngle ? (point.x + xScroll) : (5999 - (point.x + xScroll)); |
|||
m_MouseStart.y = 2047 - (point.y + yScroll); |
|||
m_MouseEnd = m_MouseStart; |
|||
|
|||
TRACE( "OWNED\n" ); |
|||
|
|||
CScrollView::OnRButtonDown(nFlags, point); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnRButtonUp(UINT nFlags, CPoint point) |
|||
{ |
|||
// remember that we finished to write hidden zone
|
|||
m_bMouseOwned = FALSE; |
|||
|
|||
ReleaseCapture(); |
|||
|
|||
TRACE( "RELASED\n" ); |
|||
|
|||
// add hidden zone into list
|
|||
if( m_MouseStart.x - m_MouseEnd.x && m_MouseStart.y - m_MouseEnd.y ) |
|||
{ |
|||
CBoardReceiverDoc* pDoc = GetDocument(); |
|||
ASSERT_VALID(pDoc); |
|||
pDoc->AddHiddenZone( m_MouseStart, m_MouseEnd ); |
|||
} |
|||
|
|||
InvalidateRect( NULL ); |
|||
|
|||
CScrollView::OnRButtonUp(nFlags, point); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnRButtonDblClk(UINT nFlags, CPoint point) |
|||
{ |
|||
CScrollView::OnRButtonDblClk(nFlags, point); |
|||
} |
|||
|
|||
void CBoardReceiverView::OnLButtonDblClk(UINT nFlags, CPoint point) |
|||
{ |
|||
// calculate position within field
|
|||
int xScroll = GetScrollPos( SB_HORZ ); |
|||
int yScroll = GetScrollPos( SB_VERT ); |
|||
point.x = m_bReverseAngle ? (point.x + xScroll) : (5999 - (point.x + xScroll)); |
|||
point.y = 2047 - (point.y + yScroll); |
|||
|
|||
// add hidden zone into list
|
|||
CBoardReceiverDoc* pDoc = GetDocument(); |
|||
ASSERT_VALID(pDoc); |
|||
if( pDoc->RemoveHiddenZone( point ) ) |
|||
InvalidateRect( NULL ); |
|||
|
|||
CScrollView::OnLButtonDblClk(nFlags, point); |
|||
} |
|||
@ -0,0 +1,117 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: BoardReceiverView.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of BoardReceiverView.h |
|||
//---------------------------------------------------------------------------- |
|||
// BoardReceiverView.h : interface of the CBoardReceiverView class |
|||
// |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#if !defined(AFX_BOARDRECEIVERVIEW_H__D1A5F70E_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_BOARDRECEIVERVIEW_H__D1A5F70E_B810_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
#include "MemoryDC.h" |
|||
|
|||
class CBoardReceiverView : public CScrollView |
|||
{ |
|||
protected: // create from serialization only |
|||
CBoardReceiverView(); |
|||
DECLARE_DYNCREATE(CBoardReceiverView) |
|||
|
|||
// Attributes |
|||
public: |
|||
CBoardReceiverDoc* GetDocument(); |
|||
|
|||
// Operations |
|||
public: |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CBoardReceiverView) |
|||
public: |
|||
virtual void OnDraw(CDC* pDC); // overridden to draw this view |
|||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs); |
|||
virtual BOOL OnScroll(UINT nScrollCode, UINT nPos, BOOL bDoScroll = TRUE); |
|||
protected: |
|||
virtual void OnInitialUpdate(); // called first time after construct |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
public: |
|||
virtual ~CBoardReceiverView(); |
|||
#ifdef _DEBUG |
|||
virtual void AssertValid() const; |
|||
virtual void Dump(CDumpContext& dc) const; |
|||
#endif |
|||
|
|||
protected: |
|||
|
|||
// Generated message map functions |
|||
protected: |
|||
//{{AFX_MSG(CBoardReceiverView) |
|||
afx_msg BOOL OnEraseBkgnd(CDC* pDC); |
|||
afx_msg void OnSize(UINT nType, int cx, int cy); |
|||
afx_msg void OnMouseMove(UINT nFlags, CPoint point); |
|||
afx_msg void OnViewDegrees(); |
|||
afx_msg void OnViewMeters(); |
|||
afx_msg void OnUpdateViewDegrees(CCmdUI* pCmdUI); |
|||
afx_msg void OnUpdateViewMeters(CCmdUI* pCmdUI); |
|||
afx_msg void OnViewReverse(); |
|||
afx_msg void OnUpdateViewReverse(CCmdUI* pCmdUI); |
|||
afx_msg void OnRButtonUp(UINT nFlags, CPoint point); |
|||
afx_msg void OnRButtonDown(UINT nFlags, CPoint point); |
|||
afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point); |
|||
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
|
|||
private: |
|||
void Draw( CDC *pDC, BOOL bScroll ); |
|||
// BOOL m_bDrawData; |
|||
CMemoryDC m_MemoryDC; |
|||
|
|||
public: |
|||
void Update( CKernel *pKernel, BOARDDATA *pBoardData, BOOL bLive ); |
|||
|
|||
private: |
|||
CDetector::SAF m_pSAF[LGS_MAX_DETECTOR_ANGLES]; |
|||
CDetector::SAF m_pRealSAF[LGS_MAX_DETECTOR_ANGLES]; |
|||
CDetector::SPIKE m_pSpike[LGS_MAX_DETECTOR_ANGLES]; |
|||
// CFilterDRD::DRD m_pDRD[LGS_MAX_DETECTOR_ANGLES]; |
|||
CFilterPD::PD m_pPD[LGS_MAX_DETECTOR_ANGLES]; |
|||
CFilterPD::SAF m_pPD_SAF[LGS_MAX_DETECTOR_ANGLES]; |
|||
BOARDDATA m_pBoardData[LGS_MAX_DETECTOR_ANGLES]; |
|||
BOARDDATA m_pBoardDataNC[LGS_MAX_DETECTOR_ANGLES]; |
|||
BOOL m_bLive; |
|||
BOOL m_bReverseAngle; |
|||
BOOL m_bShowDegrees; |
|||
BOOL m_bShowMeters; |
|||
// BOOL m_bDRDMode; |
|||
BOOL m_bMouseOwned; |
|||
CPoint m_MouseStart; |
|||
CPoint m_MouseEnd; |
|||
}; |
|||
|
|||
#ifndef _DEBUG // debug version in BoardReceiverView.cpp |
|||
inline CBoardReceiverDoc* CBoardReceiverView::GetDocument() |
|||
{ return (CBoardReceiverDoc*)m_pDocument; } |
|||
#endif |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_BOARDRECEIVERVIEW_H__D1A5F70E_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,96 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: ChildFrm.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of ChildFrm.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// ChildFrm.cpp : implementation of the CChildFrame class
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
|
|||
#include "ChildFrm.h"
|
|||
#include "BoardReceiverDoc.h"
|
|||
#include "BoardReceiverList.h"
|
|||
#include "BoardReceiverView.h"
|
|||
#include "BoardReceiverVariableList.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CChildFrame
|
|||
|
|||
IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd) |
|||
|
|||
BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd) |
|||
//{{AFX_MSG_MAP(CChildFrame)
|
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CChildFrame construction/destruction
|
|||
|
|||
CChildFrame::CChildFrame() |
|||
{ |
|||
// TODO: add member initialization code here
|
|||
|
|||
} |
|||
|
|||
CChildFrame::~CChildFrame() |
|||
{ |
|||
} |
|||
|
|||
BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs) |
|||
{ |
|||
// TODO: Modify the Window class or styles here by modifying
|
|||
// the CREATESTRUCT cs
|
|||
|
|||
if( !CMDIChildWnd::PreCreateWindow(cs) ) |
|||
return FALSE; |
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CChildFrame diagnostics
|
|||
|
|||
#ifdef _DEBUG
|
|||
void CChildFrame::AssertValid() const |
|||
{ |
|||
CMDIChildWnd::AssertValid(); |
|||
} |
|||
|
|||
void CChildFrame::Dump(CDumpContext& dc) const |
|||
{ |
|||
CMDIChildWnd::Dump(dc); |
|||
} |
|||
|
|||
#endif //_DEBUG
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CChildFrame message handlers
|
|||
|
|||
BOOL CChildFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext) |
|||
{ |
|||
BOOL bCreateSpltr = m_wndSplitter.CreateStatic( this, 1, 3); |
|||
|
|||
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(CBoardReceiverList), CSize(100,0), pContext ); |
|||
m_wndSplitter.CreateView(0,1,RUNTIME_CLASS(CBoardReceiverVariableList), CSize(0,0), pContext ); |
|||
m_wndSplitter.CreateView(0,2,RUNTIME_CLASS(CBoardReceiverView), CSize(0,0), pContext ); |
|||
|
|||
return (bCreateSpltr); |
|||
} |
|||
@ -0,0 +1,69 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: ChildFrm.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of ChildFrm.h |
|||
//---------------------------------------------------------------------------- |
|||
// ChildFrm.h : interface of the CChildFrame class |
|||
// |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#if !defined(AFX_CHILDFRM_H__D1A5F70A_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_CHILDFRM_H__D1A5F70A_B810_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
|
|||
class CChildFrame : public CMDIChildWnd |
|||
{ |
|||
DECLARE_DYNCREATE(CChildFrame) |
|||
public: |
|||
CChildFrame(); |
|||
|
|||
// Attributes |
|||
public: |
|||
|
|||
// Operations |
|||
public: |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CChildFrame) |
|||
public: |
|||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs); |
|||
protected: |
|||
virtual BOOL OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext); |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
public: |
|||
virtual ~CChildFrame(); |
|||
#ifdef _DEBUG |
|||
virtual void AssertValid() const; |
|||
virtual void Dump(CDumpContext& dc) const; |
|||
#endif |
|||
|
|||
// Generated message map functions |
|||
protected: |
|||
CSplitterWnd m_wndSplitter; |
|||
CSplitterWnd m_wndSplitter2; |
|||
//{{AFX_MSG(CChildFrame) |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_CHILDFRM_H__D1A5F70A_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,69 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: DataStreamsServer.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of DataStreamsServer.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
#include "stdafx.h"
|
|||
#include "boardreceiver.h"
|
|||
#include "DataStreamsServer.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[]=__FILE__; |
|||
#define new DEBUG_NEW
|
|||
#endif
|
|||
*/ |
|||
CDataStreamsServer::CDataStreamsServer() |
|||
{ |
|||
|
|||
} |
|||
|
|||
CDataStreamsServer::~CDataStreamsServer() |
|||
{ |
|||
|
|||
} |
|||
|
|||
BOOL CDataStreamsServer::RegisterChannel( CBoardReceiverDoc *pDoc ) |
|||
{ |
|||
CLgLocker Lock( &m_ChannelArray ); |
|||
return m_ChannelArray.Add( pDoc ); |
|||
} |
|||
|
|||
BOOL CDataStreamsServer::UnregisterChannel( CBoardReceiverDoc *pDoc ) |
|||
{ |
|||
CLgLocker Lock( &m_ChannelArray ); |
|||
return m_ChannelArray.Remove( m_ChannelArray.Find( pDoc ) ); |
|||
} |
|||
|
|||
BOOL CDataStreamsServer::DoRemoteBRChannelConnect( INT nChannel ) |
|||
{ |
|||
return FALSE; |
|||
} |
|||
|
|||
BOOL CDataStreamsServer::DoRemoteBRGetChannelProperties() |
|||
{ |
|||
CLgLocker Lock( &m_ChannelArray ); |
|||
|
|||
INT nChannelCount = m_ChannelArray.GetCount(); |
|||
LG_TCP_PACKET_BOARD_RECEIVER::PCHANNEL_PROPERTIES pChannelProperties = |
|||
(LG_TCP_PACKET_BOARD_RECEIVER::PCHANNEL_PROPERTIES)malloc( sizeof(LG_TCP_PACKET_BOARD_RECEIVER::CHANNEL_PROPERTIES) * nChannelCount ); |
|||
if( !pChannelProperties ) |
|||
return FALSE; |
|||
|
|||
for( INT i = 0; i < m_ChannelArray.GetCount(); i++ ) |
|||
{ |
|||
pChannelProperties[i].nChannelID = m_ChannelArray[i]->GetChannelID(); |
|||
strcpy( pChannelProperties[i].pCommPort, m_ChannelArray[i]->GetChannelName() ); |
|||
} |
|||
|
|||
|
|||
return OnRemoteBRGetChannelProperties( nChannelCount, pChannelProperties ); |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: DataStreamsServer.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of DataStreamsServer.h |
|||
//---------------------------------------------------------------------------- |
|||
#ifndef __DATA__STREAMS__SERVER__H__INCLUDED__ |
|||
#define __DATA__STREAMS__SERVER__H__INCLUDED__ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
#include "BoardReceiverDoc.h" |
|||
|
|||
class CDataStreamsServer : public CLgRemoteInterfaceBR |
|||
{ |
|||
public: |
|||
CDataStreamsServer(); |
|||
virtual ~CDataStreamsServer(); |
|||
|
|||
public: |
|||
BOOL DoRemoteBRChannelConnect( INT nChannel ); |
|||
BOOL DoRemoteBRGetChannelProperties(); |
|||
|
|||
public: |
|||
BOOL RegisterChannel( CBoardReceiverDoc *pDoc ); |
|||
BOOL UnregisterChannel( CBoardReceiverDoc *pDoc ); |
|||
|
|||
private: |
|||
CLgArrayP<CBoardReceiverDoc*> m_ChannelArray; |
|||
}; |
|||
|
|||
#endif |
|||
@ -0,0 +1 @@ |
|||
offset=8 delta=60 width=5400 order=1 sst=0 flip=16 sun=0 nowide=940364 |
|||
@ -0,0 +1,75 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: Kernel.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of Kernel.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
#include "Kernel.h"
|
|||
|
|||
#ifdef _DEBUG
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[]=__FILE__; |
|||
#define new DEBUG_NEW
|
|||
#endif
|
|||
|
|||
CKernel::CKernel() |
|||
{ |
|||
|
|||
} |
|||
|
|||
CKernel::~CKernel() |
|||
{ |
|||
Destroy(); |
|||
} |
|||
|
|||
BOOL CKernel::Create() |
|||
{ |
|||
Destroy(); |
|||
|
|||
if( !m_Tracker.Create( FALSE, &m_Camera, &m_Relay, &m_AutoReset ) ) |
|||
return FALSE; |
|||
|
|||
if( !m_Shadow.Create() ) |
|||
return FALSE; |
|||
|
|||
if( !m_Detector.Create( FALSE, &m_Tracker, &m_Shadow, 0, "init_m.ini" ) ) |
|||
return FALSE; |
|||
|
|||
if( !m_Calibrator.Create( "lt0.ini" ) ) |
|||
return FALSE; |
|||
|
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
void CKernel::Destroy() |
|||
{ |
|||
m_Detector.Destroy(); |
|||
m_Tracker.Destroy(); |
|||
m_Shadow.Destroy(); |
|||
} |
|||
|
|||
void CKernel::Invalidate( BOOL bZero, BOOL bSun, INT nRange ) |
|||
{ |
|||
// calibrate range
|
|||
nRange = m_Calibrator.Calibrate( nRange ); |
|||
|
|||
m_Tracker.Invalidate(); |
|||
|
|||
m_Detector.Invalidate( bZero, bSun, nRange, TRUE ); |
|||
} |
|||
|
|||
void CKernel::Reset( BOOL bReset ) |
|||
{ |
|||
m_Tracker.Reset(); |
|||
m_Detector.Reset( bReset ); |
|||
} |
|||
@ -0,0 +1,51 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: Kernel.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of Kernel.h |
|||
//---------------------------------------------------------------------------- |
|||
#ifndef __KERNEL__H__INCLUDED__ |
|||
#define __KERNEL__H__INCLUDED__ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif |
|||
|
|||
#include "..\lgs\detector.h" |
|||
|
|||
class CKernel |
|||
{ |
|||
public: |
|||
CKernel(); |
|||
virtual ~CKernel(); |
|||
|
|||
public: |
|||
void Destroy(); |
|||
BOOL Create(); |
|||
|
|||
public: |
|||
void Invalidate( BOOL bZero, BOOL bSun, INT nRange ); |
|||
void Reset( BOOL bReset ); |
|||
|
|||
CDetector *GetDetector() { return &m_Detector; } |
|||
CTracker *GetTracker() { return &m_Tracker; } |
|||
CFilterCalibration *GetCalibrator() { return &m_Calibrator; } |
|||
|
|||
public: |
|||
CTracker m_Tracker; |
|||
CDetector m_Detector; |
|||
CFilterCalibration m_Calibrator; |
|||
CShadow m_Shadow; |
|||
CCamera m_Camera; |
|||
CRelay m_Relay; |
|||
CAutoReset m_AutoReset; |
|||
}; |
|||
|
|||
#endif |
|||
@ -0,0 +1,130 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: MainFrm.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of MainFrm.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// MainFrm.cpp : implementation of the CMainFrame class
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "BoardReceiver.h"
|
|||
|
|||
#include "MainFrm.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
*/ |
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CMainFrame
|
|||
|
|||
IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd) |
|||
|
|||
BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd) |
|||
//{{AFX_MSG_MAP(CMainFrame)
|
|||
ON_WM_CREATE() |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
static UINT indicators[] = |
|||
{ |
|||
ID_SEPARATOR, // status line indicator
|
|||
ID_INDICATOR_ANGLES, |
|||
ID_INDICATOR_X, |
|||
ID_INDICATOR_Y, |
|||
/* ID_INDICATOR_CAPS,
|
|||
ID_INDICATOR_NUM, |
|||
ID_INDICATOR_SCRL, |
|||
*/ |
|||
}; |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CMainFrame construction/destruction
|
|||
|
|||
CMainFrame::CMainFrame() |
|||
{ |
|||
// TODO: add member initialization code here
|
|||
|
|||
} |
|||
|
|||
CMainFrame::~CMainFrame() |
|||
{ |
|||
} |
|||
|
|||
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) |
|||
{ |
|||
if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1) |
|||
return -1; |
|||
|
|||
if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP |
|||
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) || |
|||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME)) |
|||
{ |
|||
TRACE0("Failed to create toolbar\n"); |
|||
return -1; // fail to create
|
|||
} |
|||
|
|||
if (!m_wndStatusBar.Create(this) || |
|||
!m_wndStatusBar.SetIndicators(indicators, |
|||
sizeof(indicators)/sizeof(UINT))) |
|||
{ |
|||
TRACE0("Failed to create status bar\n"); |
|||
return -1; // fail to create
|
|||
} |
|||
|
|||
// TODO: Delete these three lines if you don't want the toolbar to
|
|||
// be dockable
|
|||
m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY); |
|||
EnableDocking(CBRS_ALIGN_ANY); |
|||
DockControlBar(&m_wndToolBar); |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) |
|||
{ |
|||
if( !CMDIFrameWnd::PreCreateWindow(cs) ) |
|||
return FALSE; |
|||
// TODO: Modify the Window class or styles here by modifying
|
|||
// the CREATESTRUCT cs
|
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CMainFrame diagnostics
|
|||
|
|||
#ifdef _DEBUG
|
|||
void CMainFrame::AssertValid() const |
|||
{ |
|||
CMDIFrameWnd::AssertValid(); |
|||
} |
|||
|
|||
void CMainFrame::Dump(CDumpContext& dc) const |
|||
{ |
|||
CMDIFrameWnd::Dump(dc); |
|||
} |
|||
|
|||
#endif //_DEBUG
|
|||
|
|||
|
|||
void CMainFrame::ShowMousePosition( LPCTSTR pTextX, LPCTSTR pTextY ) |
|||
{ |
|||
m_wndStatusBar.SetPaneText( 2, pTextX ); |
|||
m_wndStatusBar.SetPaneText( 3, pTextY ); |
|||
} |
|||
|
|||
void CMainFrame::ShowLastAngles( LPCTSTR pLastAngles ) |
|||
{ |
|||
m_wndStatusBar.SetPaneText( 1, pLastAngles ); |
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: MainFrm.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of MainFrm.h |
|||
//---------------------------------------------------------------------------- |
|||
// MainFrm.h : interface of the CMainFrame class |
|||
// |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
#if !defined(AFX_MAINFRM_H__D1A5F708_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
#define AFX_MAINFRM_H__D1A5F708_B810_11D5_9B78_0000E89F6E90__INCLUDED_ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
class CMainFrame : public CMDIFrameWnd |
|||
{ |
|||
DECLARE_DYNAMIC(CMainFrame) |
|||
public: |
|||
CMainFrame(); |
|||
|
|||
// Attributes |
|||
public: |
|||
|
|||
// Operations |
|||
public: |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CMainFrame) |
|||
virtual BOOL PreCreateWindow(CREATESTRUCT& cs); |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
public: |
|||
void ShowMousePosition( LPCTSTR pTextX, LPCTSTR pTextY ); |
|||
void ShowLastAngles( LPCTSTR pLastAngles ); |
|||
virtual ~CMainFrame(); |
|||
#ifdef _DEBUG |
|||
virtual void AssertValid() const; |
|||
virtual void Dump(CDumpContext& dc) const; |
|||
#endif |
|||
|
|||
protected: // control bar embedded members |
|||
CStatusBar m_wndStatusBar; |
|||
CToolBar m_wndToolBar; |
|||
|
|||
// Generated message map functions |
|||
protected: |
|||
//{{AFX_MSG(CMainFrame) |
|||
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_MAINFRM_H__D1A5F708_B810_11D5_9B78_0000E89F6E90__INCLUDED_) |
|||
@ -0,0 +1,146 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: MemoryDC.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of MemoryDC.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// MemDC.cpp: implementation of the CMemDC class.
|
|||
//
|
|||
//////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "MemoryDC.h"
|
|||
#include "..\LgLib\Version.h"
|
|||
/*
|
|||
#ifdef _DEBUG
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[]=__FILE__; |
|||
#define new DEBUG_NEW
|
|||
#endif
|
|||
*/ |
|||
//////////////////////////////////////////////////////////////////////
|
|||
// Construction/Destruction
|
|||
//////////////////////////////////////////////////////////////////////
|
|||
|
|||
CMemoryDC::CMemoryDC() |
|||
{ |
|||
m_pBitmap = NULL; |
|||
m_Size.cx = m_Size.cy = NULL; |
|||
} |
|||
|
|||
CMemoryDC::~CMemoryDC() |
|||
{ |
|||
if( GetSafeHdc() ) |
|||
DeleteDC(); |
|||
} |
|||
|
|||
BOOL CMemoryDC::Create( HBITMAP hBitmap, BOOL bCopy ) |
|||
{ |
|||
DIBSECTION DibSection; |
|||
if( !::GetObject( hBitmap, sizeof( DibSection ), &DibSection ) ) |
|||
return FALSE; |
|||
|
|||
int cx = DibSection.dsBm.bmWidth; |
|||
int cy = DibSection.dsBm.bmHeight; |
|||
|
|||
if( m_Size.cx != cx && m_Size.cy != cy ) |
|||
{ |
|||
if( GetSafeHdc() ) |
|||
DeleteDC(); |
|||
|
|||
m_Size.cx = cx; |
|||
m_Size.cy = cy; |
|||
|
|||
CDC *pDC = CWnd::GetDesktopWindow()->GetDC(); |
|||
if( pDC ) |
|||
{ |
|||
CreateCompatibleDC( pDC ); |
|||
|
|||
if( bCopy ) |
|||
m_Bitmap.CreateCompatibleBitmap( pDC, m_Size.cx, m_Size.cy ); |
|||
else |
|||
m_Bitmap.Attach( hBitmap ); |
|||
|
|||
m_pBitmap = SelectObject( &m_Bitmap ); |
|||
|
|||
CWnd::GetDesktopWindow()->ReleaseDC( pDC ); |
|||
} |
|||
|
|||
if( bCopy ) |
|||
{ |
|||
CDC *pDC = CWnd::GetDesktopWindow()->GetDC(); |
|||
if( pDC ) |
|||
{ |
|||
CDC dc; |
|||
dc.CreateCompatibleDC( pDC ); |
|||
|
|||
CBitmap bmp; |
|||
bmp.Attach( hBitmap ); |
|||
|
|||
CBitmap *pOldBmp = dc.SelectObject( &bmp ); |
|||
|
|||
BitBlt( 0, 0, m_Size.cx, m_Size.cy, &dc, 0, 0, SRCCOPY ); |
|||
|
|||
dc.SelectObject( pOldBmp ); |
|||
|
|||
bmp.Detach(); |
|||
|
|||
CWnd::GetDesktopWindow()->ReleaseDC( pDC ); |
|||
} |
|||
} |
|||
|
|||
} |
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
BOOL CMemoryDC::Create( int cx, int cy, COLORREF color ) |
|||
{ |
|||
if( m_Size.cx != cx || m_Size.cy != cy ) |
|||
{ |
|||
if( GetSafeHdc() ) |
|||
DeleteDC(); |
|||
|
|||
m_Size.cx = cx; |
|||
m_Size.cy = cy; |
|||
|
|||
CDC *pDC = CWnd::GetDesktopWindow()->GetDC(); |
|||
if( pDC ) |
|||
{ |
|||
CreateCompatibleDC( pDC ); |
|||
m_Bitmap.CreateCompatibleBitmap( pDC, m_Size.cx, m_Size.cy ); |
|||
m_pBitmap = SelectObject( &m_Bitmap ); |
|||
CWnd::GetDesktopWindow()->ReleaseDC( pDC ); |
|||
} |
|||
} |
|||
|
|||
if( GetSafeHdc() ) |
|||
{ |
|||
CBrush brush( color ); |
|||
CRect rect( 0, 0, m_Size.cx, m_Size.cy ); |
|||
FillRect( &rect, &brush ); |
|||
} |
|||
|
|||
return TRUE; |
|||
} |
|||
|
|||
BOOL CMemoryDC::DeleteDC() |
|||
{ |
|||
if( m_pBitmap ) |
|||
{ |
|||
SelectObject( m_pBitmap ); |
|||
m_pBitmap = NULL; |
|||
} |
|||
|
|||
if( m_Bitmap.GetSafeHandle() ) |
|||
m_Bitmap.DeleteObject(); |
|||
|
|||
return CDC::DeleteDC(); |
|||
} |
|||
@ -0,0 +1,41 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: MemoryDC.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of MemoryDC.h |
|||
//---------------------------------------------------------------------------- |
|||
#ifndef __MEMORY__DC__H__ |
|||
#define __MEMORY__DC__H__ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif |
|||
|
|||
class CMemoryDC : public CDC |
|||
{ |
|||
public: |
|||
CMemoryDC(); |
|||
virtual ~CMemoryDC(); |
|||
|
|||
public: |
|||
BOOL Create( HBITMAP hBitmap, BOOL bCopy = TRUE ); |
|||
BOOL Create( int cx, int cy, COLORREF color = RGB(0,0,0) ); |
|||
|
|||
public: |
|||
virtual BOOL DeleteDC( ); |
|||
const CSize& GetSize() const { return m_Size; } |
|||
|
|||
private: |
|||
CSize m_Size; |
|||
CBitmap m_Bitmap; |
|||
CBitmap*m_pBitmap; |
|||
}; |
|||
|
|||
#endif |
|||
Binary file not shown.
@ -0,0 +1,13 @@ |
|||
// |
|||
// BOARDRECEIVER.RC2 - resources Microsoft Visual C++ does not edit directly |
|||
// |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
#error this file is not editable by Microsoft Visual C++ |
|||
#endif //APSTUDIO_INVOKED |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// Add manually edited resources here... |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@ |
|||
115200 |
|||
@ -0,0 +1,12 @@ |
|||
SN = NOSERIALNUMBER |
|||
ADDRESS = 0 |
|||
CAMERA_TYPE = 7 |
|||
CAMERA_SHIFT = 0 |
|||
CAMERA_AUTO = 0 |
|||
CAMERA_DELAY = 0 |
|||
RELAY_AUTO = 0 |
|||
RELAY_DELAY = 0 |
|||
RELAY_NC = 0 |
|||
VOLTAGE_CONTROL = 0 |
|||
MASTER_DISABLED = 0 |
|||
SLAVE_DISABLED = 0 |
|||
@ -0,0 +1,21 @@ |
|||
//----------------------------------------------------------------------------
|
|||
// Laser Guard Ltd.
|
|||
// Copyright © 2000-2002. All Rights Reserved.
|
|||
// Version 1.0 01/01/2000
|
|||
// Last modification: 08/10/2003
|
|||
// PROJECT:
|
|||
// SUBSYSTEM:
|
|||
// FILE: StdAfx.cpp
|
|||
// AUTHOR: Sergey Chizhevskiy
|
|||
// OVERVIEW
|
|||
// ~~~~~~~~
|
|||
// Source file of StdAfx.cpp
|
|||
//----------------------------------------------------------------------------
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
|||
// BoardReceiver.pch will be the pre-compiled header
|
|||
// stdafx.obj will contain the pre-compiled type information
|
|||
|
|||
#include "stdafx.h"
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,43 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 03/12/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: StdAfx.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of StdAfx.h |
|||
//---------------------------------------------------------------------------- |
|||
#ifndef __STDAFX__H__INCLUDED__ |
|||
#define __STDAFX__H__INCLUDED__ |
|||
|
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif |
|||
|
|||
#define _WIN32_WINNT 0x0400 |
|||
|
|||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers |
|||
|
|||
#include <afxwin.h> // MFC core and standard components |
|||
#include <afxext.h> // MFC extensions |
|||
#include <afxdisp.h> // MFC Automation classes |
|||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls |
|||
#ifndef _AFX_NO_AFXCMN_SUPPORT |
|||
#include <afxcmn.h> // MFC support for Windows Common Controls |
|||
#endif // _AFX_NO_AFXCMN_SUPPORT |
|||
#include <deque> |
|||
#include <Winsock2.h> |
|||
#include <math.h> |
|||
#include <shlwapi.h> |
|||
//#include <wmsdk.h> |
|||
//#include <wmsysprf.h> |
|||
|
|||
#include "..\LgLib\LgLogger.h" |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
|
|||
#endif |
|||
@ -0,0 +1,2 @@ |
|||
700, 600, 500, 400, 300, 200, 150, 100, |
|||
100, 100, 100, 100, 100, 100, 100, 100 |
|||
@ -0,0 +1,2 @@ |
|||
700, 600, 500, 400, 300, 200, 150, 100, |
|||
100, 100, 100, 100, 100, 100, 100, 100 |
|||
@ -0,0 +1,96 @@ |
|||
0 0 108 159 |
|||
1 0 107 160 |
|||
2 0 106 161 |
|||
3 0 105 162 |
|||
4 0 104 163 |
|||
5 0 103 164 |
|||
6 0 102 146 |
|||
7 0 102 125 |
|||
8 0 101 110 |
|||
22 0 96 98 |
|||
23 0 95 109 |
|||
24 0 94 122 |
|||
25 0 93 140 |
|||
26 0 93 163 |
|||
27 0 92 167 |
|||
28 0 92 166 |
|||
29 0 91 165 |
|||
30 0 90 164 |
|||
31 0 90 163 |
|||
32 0 89 162 |
|||
33 0 89 161 |
|||
34 0 89 161 |
|||
35 0 88 160 |
|||
36 0 88 160 |
|||
37 0 87 159 |
|||
38 0 87 159 |
|||
39 0 87 158 |
|||
40 0 87 158 |
|||
41 0 86 157 |
|||
42 0 86 157 |
|||
43 0 86 157 |
|||
44 0 86 157 |
|||
45 0 86 157 |
|||
46 0 86 157 |
|||
47 0 86 157 |
|||
48 0 86 157 |
|||
49 0 86 157 |
|||
50 0 86 157 |
|||
51 0 86 157 |
|||
52 0 86 157 |
|||
53 0 86 157 |
|||
54 0 86 158 |
|||
55 0 86 158 |
|||
56 0 87 158 |
|||
57 0 87 159 |
|||
58 0 87 159 |
|||
59 0 87 160 |
|||
60 0 88 108 |
|||
78 0 83 162 |
|||
79 0 83 161 |
|||
80 0 83 161 |
|||
81 0 83 160 |
|||
82 0 83 160 |
|||
83 0 83 159 |
|||
84 0 83 159 |
|||
85 0 83 159 |
|||
86 0 83 159 |
|||
87 0 83 158 |
|||
88 0 84 158 |
|||
89 0 84 158 |
|||
90 0 84 158 |
|||
91 0 84 158 |
|||
92 0 84 158 |
|||
93 0 85 158 |
|||
94 0 85 159 |
|||
95 0 85 159 |
|||
96 0 86 159 |
|||
97 0 86 159 |
|||
98 0 87 160 |
|||
99 0 87 160 |
|||
100 0 87 161 |
|||
101 0 88 161 |
|||
336 0 156 156 |
|||
337 0 153 156 |
|||
338 0 149 156 |
|||
339 0 146 155 |
|||
340 0 143 155 |
|||
341 0 141 155 |
|||
342 0 138 155 |
|||
343 0 135 154 |
|||
344 0 133 154 |
|||
345 0 131 154 |
|||
346 0 129 154 |
|||
347 0 127 154 |
|||
348 0 125 154 |
|||
349 0 123 155 |
|||
350 0 121 155 |
|||
351 0 119 155 |
|||
352 0 118 155 |
|||
353 0 116 156 |
|||
354 0 115 156 |
|||
355 0 114 156 |
|||
356 0 112 157 |
|||
357 0 111 157 |
|||
358 0 110 158 |
|||
359 0 109 159 |
|||
@ -0,0 +1 @@ |
|||
offset=8 delta=60 width=5400 order=1 sst=0 flip=16 sun=0 nowide=940364 |
|||
@ -0,0 +1 @@ |
|||
offset=8 delta=60 width=5400 order=1 sst=0 flip=16 sun=0 nowide=940364 |
|||
@ -0,0 +1,9 @@ |
|||
SCC = This is a Source Code Control file |
|||
|
|||
[BoardReceiver.vcproj] |
|||
SCC_Aux_Path = "\\Lgs\SOURCESAFE\" |
|||
SCC_Project_Name = "$/System/BoardReceiver", VRFAAAAA |
|||
|
|||
[BoardReceiver.dsp] |
|||
SCC_Aux_Path = "\\Lgs\SOURCESAFE\" |
|||
SCC_Project_Name = "$/System/BoardReceiver", VRFAAAAA |
|||
@ -0,0 +1,21 @@ |
|||
type 255 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
81 65398 |
|||
150 65462 |
|||
89 65501 |
|||
43 65460 |
|||
polygon 0 |
|||
65503 65378 |
|||
65519 65450 |
|||
17 65455 |
|||
35 65378 |
|||
polygon 0 |
|||
99 65521 |
|||
163 65521 |
|||
143 63 |
|||
Binary file not shown.
@ -0,0 +1,13 @@ |
|||
// |
|||
// BOARDRECEIVER.RC2 - resources Microsoft Visual C++ does not edit directly |
|||
// |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
#error this file is not editable by Microsoft Visual C++ |
|||
#endif //APSTUDIO_INVOKED |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// Add manually edited resources here... |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,73 @@ |
|||
//---------------------------------------------------------------------------- |
|||
// Laser Guard Ltd. |
|||
// Copyright © 2000-2002. All Rights Reserved. |
|||
// Version 1.0 01/01/2000 |
|||
// Last modification: 08/10/2003 |
|||
// PROJECT: |
|||
// SUBSYSTEM: |
|||
// FILE: resource.h |
|||
// AUTHOR: Sergey Chizhevskiy |
|||
// OVERVIEW |
|||
// ~~~~~~~~ |
|||
// Header file of resource.h |
|||
//---------------------------------------------------------------------------- |
|||
//{{NO_DEPENDENCIES}} |
|||
// Microsoft Developer Studio generated include file. |
|||
// Used by BoardReceiver.rc |
|||
// |
|||
#define IDC_BUTTON_RUNTO 4 |
|||
#define IDD_ABOUTBOX 100 |
|||
#define ID_INDICATOR_X 100 |
|||
#define ID_INDICATOR_Y 101 |
|||
#define IDR_MAINFRAME 128 |
|||
#define IDR_BOARDRTYPE 129 |
|||
#define IDD_NEW_DOC_DLG 130 |
|||
#define ID_INDICATOR_ANGLES 130 |
|||
#define IDD_PARAM_DLG 131 |
|||
#define IDD_SEEK_DLG 132 |
|||
#define IDC_COMBO_PORT 1002 |
|||
#define IDC_EDIT_TARGET_FILE 1005 |
|||
#define IDC_BUTTON_TARGET_FILE 1006 |
|||
#define IDC_RADIO_MASTER 1007 |
|||
#define IDC_RADIO_SLAVE 1008 |
|||
#define IDC_EDIT_OFFSET 1009 |
|||
#define IDC_EDIT_ORDER 1010 |
|||
#define IDC_SPIN_OFFSET 1011 |
|||
#define IDC_SPIN_ORDER 1012 |
|||
#define IDC_EDIT_DELTA 1013 |
|||
#define IDC_SPIN_DELTA 1014 |
|||
#define IDC_EDIT_WIDTH 1015 |
|||
#define IDC_SPIN_WIDTH 1016 |
|||
#define IDC_EDIT_FLIP 1017 |
|||
#define IDC_SPIN_FLIP 1018 |
|||
#define IDC_EDIT_SUN 1019 |
|||
#define IDC_SPIN_SUN 1020 |
|||
#define IDC_CHECK_SST 1021 |
|||
#define IDC_EDIT_STEP 1022 |
|||
#define IDC_SPIN_STEP 1023 |
|||
#define IDC_RADIO_STEP 1024 |
|||
#define IDC_RADIO_TIME 1025 |
|||
#define IDC_DATETIMEPICKER_TIME 1027 |
|||
#define IDC_BUTTON_GOTO 1029 |
|||
#define IDC_EDIT_SST 1030 |
|||
#define IDC_SPIN_SST 1031 |
|||
#define ID_OPTIONS_RESET 32771 |
|||
#define ID_OPTIONS_STEP 32772 |
|||
#define ID_OPTIONS_PARAMETERS 32774 |
|||
#define ID_VIEW_METERS 32777 |
|||
#define ID_VIEW_DEGREES 32778 |
|||
#define ID_VIEW_REVERSE 32779 |
|||
#define ID_OPTIONS_SEEK 32787 |
|||
#define ID_OPTIONS_SOFTRESET 32788 |
|||
|
|||
// Next default values for new objects |
|||
// |
|||
#ifdef APSTUDIO_INVOKED |
|||
#ifndef APSTUDIO_READONLY_SYMBOLS |
|||
#define _APS_3D_CONTROLS 1 |
|||
#define _APS_NEXT_RESOURCE_VALUE 133 |
|||
#define _APS_NEXT_COMMAND_VALUE 32789 |
|||
#define _APS_NEXT_CONTROL_VALUE 1032 |
|||
#define _APS_NEXT_SYMED_VALUE 103 |
|||
#endif |
|||
#endif |
|||
@ -0,0 +1 @@ |
|||
115200 |
|||
@ -0,0 +1,12 @@ |
|||
SN = NOSERIALNUMBER |
|||
ADDRESS = 0 |
|||
CAMERA_TYPE = 7 |
|||
CAMERA_SHIFT = 0 |
|||
CAMERA_AUTO = 0 |
|||
CAMERA_DELAY = 0 |
|||
RELAY_AUTO = 0 |
|||
RELAY_DELAY = 0 |
|||
RELAY_NC = 0 |
|||
VOLTAGE_CONTROL = 0 |
|||
MASTER_DISABLED = 0 |
|||
SLAVE_DISABLED = 0 |
|||
Binary file not shown.
@ -0,0 +1,28 @@ |
|||
// EmulateHW.cpp: implementation of the CEmulateHAL class.
|
|||
//
|
|||
//////////////////////////////////////////////////////////////////////
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "EmulateHW.h"
|
|||
|
|||
#ifdef _DEBUG
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[]=__FILE__; |
|||
#define new DEBUG_NEW
|
|||
#endif
|
|||
|
|||
//////////////////////////////////////////////////////////////////////
|
|||
// Construction/Destruction
|
|||
//////////////////////////////////////////////////////////////////////
|
|||
|
|||
CEmulateHAL::CEmulateHAL() |
|||
{ |
|||
|
|||
} |
|||
|
|||
CEmulateHAL::~CEmulateHAL() |
|||
{ |
|||
|
|||
} |
|||
|
|||
INT g_bShowErrors = TRUE; |
|||
@ -0,0 +1,198 @@ |
|||
#ifndef __EMULATE__HW__H__INCLUDED__ |
|||
#define __EMULATE__HW__H__INCLUDED__ |
|||
|
|||
#pragma once |
|||
|
|||
#define LGS_DISABLE_FILE_SYSTEM |
|||
|
|||
#include "..\LgLib\Comm\RS232.h" |
|||
#include "..\LgLib\Comm\LGSm.h" |
|||
#include "..\LgLib\Thread.h" |
|||
#include "..\LgLib\LgLock.h" |
|||
#include <deque> |
|||
#include <math.h> |
|||
|
|||
class CEmulateHAL |
|||
{ |
|||
public: |
|||
CEmulateHAL(); |
|||
virtual ~CEmulateHAL(); |
|||
}; |
|||
|
|||
class CComm485 : |
|||
public CConnectionRS232, |
|||
public CLgThread |
|||
{ |
|||
public: |
|||
CComm485() {} |
|||
~CComm485() {} |
|||
|
|||
public: |
|||
typedef enum { _COM1, _COM2, _COM3, _COM4, _COM5, _COM6 } PORTS; |
|||
typedef enum { _NOPARITY = 0x00, _ODDPARITY = 0x08, _EVENPARITY = 0x18, _MARKPARITY = 0x28, _SPACEPARITY = 0x38 } PARITY; |
|||
|
|||
public: |
|||
BOOL Create( PORTS nPort, LONG nBaudRate, INT nBitCount, PARITY eParity ) |
|||
{ |
|||
LPCTSTR pCommPort = _T(""); |
|||
|
|||
switch( nPort ) |
|||
{ |
|||
case _COM1: pCommPort = _T("COM1:"); break; |
|||
case _COM2: pCommPort = _T("COM2:"); break; |
|||
case _COM3: pCommPort = _T("COM3:"); break; |
|||
case _COM4: pCommPort = _T("COM4:"); break; |
|||
case _COM5: pCommPort = _T("COM5:"); break; |
|||
case _COM6: pCommPort = _T("COM6:"); break; |
|||
} |
|||
|
|||
if( !CConnectionRS232::Create( pCommPort, nBaudRate, nBitCount, NOPARITY, ONESTOPBIT, 1024, 1024 ) ) |
|||
return FALSE; |
|||
|
|||
return CLgThread::Start(FALSE); |
|||
} |
|||
|
|||
void Destroy() |
|||
{ |
|||
CConnectionRS232::Destroy(); |
|||
} |
|||
|
|||
|
|||
typedef struct |
|||
{ |
|||
BYTE pBuffer[MAX_PATH]; |
|||
INT nSize; |
|||
}JOB; |
|||
|
|||
virtual DWORD Write( PBYTE pBuffer, DWORD dwSize, DWORD dwTimeout ) |
|||
{ |
|||
CLgLocker Lock( &m_lock ); |
|||
|
|||
JOB job; |
|||
memcpy( job.pBuffer, pBuffer, dwSize ); |
|||
job.nSize = dwSize; |
|||
m_queue.push_back( job ); |
|||
|
|||
return dwSize; |
|||
} |
|||
|
|||
private: |
|||
virtual DWORD ThreadProc() |
|||
{ |
|||
while( WaitForSingleObject( GetThreadStopEvent(), 1 ) != WAIT_OBJECT_0 ) |
|||
{ |
|||
m_lock.Lock(); |
|||
if( !m_queue.size() ) |
|||
{ |
|||
m_lock.Unlock(); |
|||
continue; |
|||
} |
|||
|
|||
JOB job = m_queue[0]; |
|||
m_queue.pop_front(); |
|||
m_lock.Unlock(); |
|||
|
|||
CConnectionRS232::Write( job.pBuffer, job.nSize, 1000 ); |
|||
} |
|||
|
|||
return 0UL; |
|||
} |
|||
|
|||
std::deque<JOB> m_queue; |
|||
CLgCriticalSection m_lock; |
|||
|
|||
public: |
|||
BOOL SetParameters( LONG nBaudRate, INT nBitCount, PARITY eParity ) |
|||
{ |
|||
DCB dcb; |
|||
if( !CConnectionRS232::GetCommState( &dcb ) ) |
|||
return FALSE; |
|||
|
|||
if( dcb.BaudRate == nBaudRate && |
|||
dcb.ByteSize == nBitCount ) |
|||
return TRUE; |
|||
|
|||
dcb.BaudRate = nBaudRate; |
|||
dcb.ByteSize = nBitCount; |
|||
return CConnectionRS232::SetCommState( &dcb ); |
|||
} |
|||
|
|||
LONG GetBaudRate() |
|||
{ |
|||
DCB dcb; |
|||
if( !CConnectionRS232::GetCommState( &dcb ) ) |
|||
return 19200UL; |
|||
|
|||
return dcb.BaudRate; |
|||
} |
|||
|
|||
public: |
|||
#ifdef COMM_WITHOUT_INTERRUPTS |
|||
BOOL Invalidate(){return TRUE;} |
|||
#endif |
|||
}; |
|||
|
|||
class CBoard |
|||
{ |
|||
public: |
|||
CBoard() { m_nAngle = 0; m_nTarget = 0; m_nTargetAngle = 0; } |
|||
virtual ~CBoard() {} |
|||
|
|||
public: |
|||
BOOL Create() { return TRUE; } |
|||
void Destroy() {} |
|||
void Reset() {} |
|||
|
|||
public: |
|||
WORD GetTimer() { return m_nAngle; } |
|||
|
|||
public: |
|||
void SetTestBit( BOOL bOn ) {} |
|||
void SetTestBit2( BOOL bOn ) {} |
|||
void SetRelayBit( BOOL bOn ) {} |
|||
|
|||
public: |
|||
|
|||
#ifdef LGS_MIRROR |
|||
#define DETECTOR_ANGLES (LGS_MAX_DETECTOR_ANGLES * LGS_MIRROR) |
|||
#else |
|||
#define DETECTOR_ANGLES LGS_MAX_DETECTOR_ANGLES |
|||
#endif |
|||
|
|||
WORD DataFunction( INT nAngle ) |
|||
{ |
|||
return (LGS_MAX_DETECTOR_RANGE-1) / 2 * (1 + cos( 5 * nAngle * 3.14 / DETECTOR_ANGLES )); |
|||
} |
|||
|
|||
BOOL GetData( PBOOL pZero, PBOOL pSun, PINT pRange, PBOOL pPower ) |
|||
{ |
|||
if( m_nAngle >= DETECTOR_ANGLES ) |
|||
m_nAngle = 0; |
|||
|
|||
*pZero = (m_nAngle == 0); |
|||
pSun[0] = FALSE; |
|||
pSun[1] = FALSE; |
|||
*pPower = FALSE; |
|||
|
|||
#ifdef LGS_MIRROR |
|||
INT nAngle0 = m_nAngle % LGS_MAX_DETECTOR_ANGLES; |
|||
INT nAngle1 = nAngle0; |
|||
#else |
|||
INT nAngle0 = m_nAngle; |
|||
INT nAngle1 = (m_nAngle + DETECTOR_ANGLES / 2) % DETECTOR_ANGLES; |
|||
#endif |
|||
|
|||
pRange[0] = DataFunction( nAngle0 ); |
|||
pRange[1] = DataFunction( nAngle1 ); |
|||
|
|||
m_nAngle++; |
|||
return TRUE; |
|||
} |
|||
|
|||
private: |
|||
INT m_nAngle; |
|||
INT m_nTarget; |
|||
INT m_nTargetAngle; |
|||
}; |
|||
|
|||
#endif |
|||
Binary file not shown.
@ -0,0 +1,75 @@ |
|||
// EmulateLGS.cpp : Defines the class behaviors for the application.
|
|||
//
|
|||
|
|||
#include "./stdafx.h"
|
|||
|
|||
#include "EmulateLGS.h"
|
|||
#include "EmulateLGSDlg.h"
|
|||
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CEmulateLGSApp
|
|||
|
|||
BEGIN_MESSAGE_MAP(CEmulateLGSApp, CWinApp) |
|||
//{{AFX_MSG_MAP(CEmulateLGSApp)
|
|||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
|||
// DO NOT EDIT what you see in these blocks of generated code!
|
|||
//}}AFX_MSG
|
|||
ON_COMMAND(ID_HELP, CWinApp::OnHelp) |
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CEmulateLGSApp construction
|
|||
|
|||
CEmulateLGSApp::CEmulateLGSApp() |
|||
{ |
|||
// TODO: add construction code here,
|
|||
// Place all significant initialization in InitInstance
|
|||
} |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// The one and only CEmulateLGSApp object
|
|||
|
|||
CEmulateLGSApp theApp; |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CEmulateLGSApp initialization
|
|||
|
|||
BOOL CEmulateLGSApp::InitInstance() |
|||
{ |
|||
AfxEnableControlContainer(); |
|||
|
|||
// Standard initialization
|
|||
// If you are not using these features and wish to reduce the size
|
|||
// of your final executable, you should remove from the following
|
|||
// the specific initialization routines you do not need.
|
|||
|
|||
#ifdef _AFXDLL
|
|||
Enable3dControls(); // Call this when using MFC in a shared DLL
|
|||
#else
|
|||
Enable3dControlsStatic(); // Call this when linking to MFC statically
|
|||
#endif
|
|||
|
|||
CEmulateLGSDlg dlg; |
|||
m_pMainWnd = &dlg; |
|||
int nResponse = dlg.DoModal(); |
|||
if (nResponse == IDOK) |
|||
{ |
|||
// TODO: Place code here to handle when the dialog is
|
|||
// dismissed with OK
|
|||
} |
|||
else if (nResponse == IDCANCEL) |
|||
{ |
|||
// TODO: Place code here to handle when the dialog is
|
|||
// dismissed with Cancel
|
|||
} |
|||
|
|||
// Since the dialog has been closed, return FALSE so that we exit the
|
|||
// application, rather than start the application's message pump.
|
|||
return FALSE; |
|||
} |
|||
@ -0,0 +1,359 @@ |
|||
# Microsoft Developer Studio Project File - Name="EmulateLGS" - Package Owner=<4> |
|||
# Microsoft Developer Studio Generated Build File, Format Version 6.00 |
|||
# ** DO NOT EDIT ** |
|||
|
|||
# TARGTYPE "Win32 (x86) Application" 0x0101 |
|||
|
|||
CFG=EmulateLGS - Win32 Debug |
|||
!MESSAGE This is not a valid makefile. To build this project using NMAKE, |
|||
!MESSAGE use the Export Makefile command and run |
|||
!MESSAGE |
|||
!MESSAGE NMAKE /f "EmulateLGS.mak". |
|||
!MESSAGE |
|||
!MESSAGE You can specify a configuration when running NMAKE |
|||
!MESSAGE by defining the macro CFG on the command line. For example: |
|||
!MESSAGE |
|||
!MESSAGE NMAKE /f "EmulateLGS.mak" CFG="EmulateLGS - Win32 Debug" |
|||
!MESSAGE |
|||
!MESSAGE Possible choices for configuration are: |
|||
!MESSAGE |
|||
!MESSAGE "EmulateLGS - Win32 Release" (based on "Win32 (x86) Application") |
|||
!MESSAGE "EmulateLGS - Win32 Debug" (based on "Win32 (x86) Application") |
|||
!MESSAGE |
|||
|
|||
# Begin Project |
|||
# PROP AllowPerConfigDependencies 0 |
|||
# PROP Scc_ProjName ""$/System/System", TRFAAAAA" |
|||
# PROP Scc_LocalPath "..\system" |
|||
CPP=cl.exe |
|||
MTL=midl.exe |
|||
RSC=rc.exe |
|||
|
|||
!IF "$(CFG)" == "EmulateLGS - Win32 Release" |
|||
|
|||
# PROP BASE Use_MFC 6 |
|||
# PROP BASE Use_Debug_Libraries 0 |
|||
# PROP BASE Output_Dir "Release" |
|||
# PROP BASE Intermediate_Dir "Release" |
|||
# PROP BASE Target_Dir "" |
|||
# PROP Use_MFC 6 |
|||
# PROP Use_Debug_Libraries 0 |
|||
# PROP Output_Dir "..\Intermediate\6\Release\EmulateLGS" |
|||
# PROP Intermediate_Dir "..\Intermediate\6\Release\EmulateLGS" |
|||
# PROP Ignore_Export_Lib 0 |
|||
# PROP Target_Dir "" |
|||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /c |
|||
# ADD CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /c |
|||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 |
|||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 |
|||
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" |
|||
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL" |
|||
BSC32=bscmake.exe |
|||
# ADD BASE BSC32 /nologo |
|||
# ADD BSC32 /nologo |
|||
LINK32=link.exe |
|||
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 |
|||
# ADD LINK32 shlwapi.lib /nologo /subsystem:windows /machine:I386 /out:"..\test/EmulateLGS.exe" |
|||
|
|||
!ELSEIF "$(CFG)" == "EmulateLGS - Win32 Debug" |
|||
|
|||
# PROP BASE Use_MFC 6 |
|||
# PROP BASE Use_Debug_Libraries 1 |
|||
# PROP BASE Output_Dir "Debug" |
|||
# PROP BASE Intermediate_Dir "Debug" |
|||
# PROP BASE Target_Dir "" |
|||
# PROP Use_MFC 6 |
|||
# PROP Use_Debug_Libraries 1 |
|||
# PROP Output_Dir "..\Intermediate\6\Debug\EmulateLGS" |
|||
# PROP Intermediate_Dir "..\Intermediate\6\Debug\EmulateLGS" |
|||
# PROP Ignore_Export_Lib 0 |
|||
# PROP Target_Dir "" |
|||
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /Yu"stdafx.h" /FD /GZ /c |
|||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX"stdafx.h" /FD /GZ /c |
|||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 |
|||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 |
|||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" |
|||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL" |
|||
BSC32=bscmake.exe |
|||
# ADD BASE BSC32 /nologo |
|||
# ADD BSC32 /nologo |
|||
LINK32=link.exe |
|||
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept |
|||
# ADD LINK32 shlwapi.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept |
|||
|
|||
!ENDIF |
|||
|
|||
# Begin Target |
|||
|
|||
# Name "EmulateLGS - Win32 Release" |
|||
# Name "EmulateLGS - Win32 Debug" |
|||
# Begin Group "Source Files" |
|||
|
|||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\areset.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Camera.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\chebron.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMicPTZ.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMigPTZ.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cnesher.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpelco.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpg3ad.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cptzad.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cptzad.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\ctks576.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cvicon.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\detecto_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Detector.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateHW.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateLGS.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateLGS.rc |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateLGSDlg.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Filters.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\filters_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\GETFILE.CPP |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\getfile_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\KERNEL.CPP |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\KERNEL.H |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\kernel_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\RELAY.CPP |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\relay_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Shadow.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\shadow_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\StdAfx.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Tracker.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\tracker_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\voltage.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\voltage_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\watchdo_.cpp |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\watchdog.cpp |
|||
# End Source File |
|||
# End Group |
|||
# Begin Group "Header Files" |
|||
|
|||
# PROP Default_Filter "h;hpp;hxx;hm;inl" |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\areset.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Camera.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\chebron.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMicPTZ.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\CMigPTZ.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cnesher.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpelco.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cpg3ad.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\ctks576.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\cvicon.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Detector.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateHW.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateLGS.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\EmulateLGSDlg.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Filters.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\GETFILE.H |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\RELAY.H |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\SCREEN.H |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Shadow.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\StdAfx.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Stdafx.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Stream.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\Tracker.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\voltage.h |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=..\lgs\watchdog.h |
|||
# End Source File |
|||
# End Group |
|||
# Begin Group "Resource Files" |
|||
|
|||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\EmulateLGS.ico |
|||
# End Source File |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\res\EmulateLGS.rc2 |
|||
# End Source File |
|||
# End Group |
|||
# Begin Source File |
|||
|
|||
SOURCE=.\ReadMe.txt |
|||
# End Source File |
|||
# End Target |
|||
# End Project |
|||
@ -0,0 +1,47 @@ |
|||
// EmulateLGS.h : main header file for the EMULATELGS application |
|||
// |
|||
|
|||
#ifndef __EMULATE__LGS__H__INCLUDED__ |
|||
#define __EMULATE__LGS__H__INCLUDED__ |
|||
|
|||
#pragma once |
|||
|
|||
//#ifndef __AFXWIN_H__ |
|||
// #error include 'stdafx.h' before including this file for PCH |
|||
//#endif |
|||
|
|||
#include "resource.h" // main symbols |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// CEmulateLGSApp: |
|||
// See EmulateLGS.cpp for the implementation of this class |
|||
// |
|||
|
|||
class CEmulateLGSApp : public CWinApp |
|||
{ |
|||
public: |
|||
CEmulateLGSApp(); |
|||
|
|||
// Overrides |
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CEmulateLGSApp) |
|||
public: |
|||
virtual BOOL InitInstance(); |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
|
|||
//{{AFX_MSG(CEmulateLGSApp) |
|||
// NOTE - the ClassWizard will add and remove member functions here. |
|||
// DO NOT EDIT what you see in these blocks of generated code ! |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_EMULATELGS_H__1E5392CB_E4D6_497A_A7EF_212802EF80FF__INCLUDED_) |
|||
1427
EmulateLGS/EmulateLGS.plg
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,195 @@ |
|||
// Microsoft Visual C++ generated resource script. |
|||
// |
|||
#include "resource.h" |
|||
|
|||
#define APSTUDIO_READONLY_SYMBOLS |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Generated from the TEXTINCLUDE 2 resource. |
|||
// |
|||
#include "afxres.h" |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
#undef APSTUDIO_READONLY_SYMBOLS |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// TEXTINCLUDE |
|||
// |
|||
|
|||
1 TEXTINCLUDE DISCARDABLE |
|||
BEGIN |
|||
"resource.h\0" |
|||
END |
|||
|
|||
2 TEXTINCLUDE DISCARDABLE |
|||
BEGIN |
|||
"#include ""afxres.h""\r\n" |
|||
"\0" |
|||
END |
|||
|
|||
3 TEXTINCLUDE DISCARDABLE |
|||
BEGIN |
|||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n" |
|||
"#define _AFX_NO_OLE_RESOURCES\r\n" |
|||
"#define _AFX_NO_TRACKER_RESOURCES\r\n" |
|||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n" |
|||
"\r\n" |
|||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n" |
|||
"#ifdef _WIN32\r\n" |
|||
"LANGUAGE 9, 1\r\n" |
|||
"#pragma code_page(1252)\r\n" |
|||
"#endif //_WIN32\r\n" |
|||
"#include ""res\\EmulateLGS.rc2"" // non-Microsoft Visual C++ edited resources\r\n" |
|||
"#include ""afxres.rc"" // Standard components\r\n" |
|||
"#endif\r\n" |
|||
"\0" |
|||
END |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
#endif // APSTUDIO_INVOKED |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Icon |
|||
// |
|||
|
|||
// Icon with lowest ID value placed first to ensure application icon |
|||
// remains consistent on all systems. |
|||
IDR_MAINFRAME ICON DISCARDABLE "res\\EmulateLGS.ico" |
|||
|
|||
|
|||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
|||
#ifdef _WIN32 |
|||
LANGUAGE 9, 1 |
|||
#pragma code_page(1252) |
|||
#endif //_WIN32 |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Dialog |
|||
// |
|||
|
|||
IDD_ABOUTBOX DIALOG DISCARDABLE 0, 0, 235, 55 |
|||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU |
|||
CAPTION "About EmulateLGS" |
|||
FONT 8, "MS Sans Serif" |
|||
BEGIN |
|||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20 |
|||
LTEXT "EmulateLGS Version 1.0",IDC_STATIC,40,10,119,8, |
|||
SS_NOPREFIX |
|||
LTEXT "Copyright (C) 2004",IDC_STATIC,40,25,119,8 |
|||
DEFPUSHBUTTON "OK",IDOK,178,7, 50,14,WS_GROUP |
|||
END |
|||
|
|||
IDD_EMULATELGS_DIALOG DIALOGEX 0, 0, 320, 200 |
|||
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU |
|||
EXSTYLE WS_EX_APPWINDOW |
|||
CAPTION "EmulateLGS" |
|||
FONT 8, "MS Sans Serif" |
|||
BEGIN |
|||
DEFPUSHBUTTON "OK",IDOK,260,7,50,14 |
|||
PUSHBUTTON "Cancel",IDCANCEL,260,23,50,14 |
|||
LTEXT "TODO: Place dialog controls here.",IDC_STATIC,50,90,200,8 |
|||
END |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Version |
|||
// |
|||
|
|||
VS_VERSION_INFO VERSIONINFO |
|||
FILEVERSION 1,0,0,1 |
|||
PRODUCTVERSION 1,0,0,1 |
|||
FILEFLAGSMASK 0x3fL |
|||
#ifdef _DEBUG |
|||
FILEFLAGS 0x1L |
|||
#else |
|||
FILEFLAGS 0x0L |
|||
#endif |
|||
FILEOS 0x4L |
|||
FILETYPE 0x1L |
|||
FILESUBTYPE 0x0L |
|||
BEGIN |
|||
BLOCK "StringFileInfo" |
|||
BEGIN |
|||
BLOCK "040904B0" |
|||
BEGIN |
|||
VALUE "CompanyName", "\0" |
|||
VALUE "FileDescription", "EmulateLGS MFC Application\0" |
|||
VALUE "FileVersion", "1, 0, 0, 1\0" |
|||
VALUE "InternalName", "EmulateLGS\0" |
|||
VALUE "LegalCopyright", "Copyright (C) 2004\0" |
|||
VALUE "LegalTrademarks", "\0" |
|||
VALUE "OriginalFilename","EmulateLGS.EXE\0" |
|||
VALUE "ProductName", "EmulateLGS Application\0" |
|||
VALUE "ProductVersion", "1, 0, 0, 1\0" |
|||
END |
|||
END |
|||
BLOCK "VarFileInfo" |
|||
BEGIN |
|||
VALUE "Translation", 0x409, 1200 |
|||
END |
|||
END |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// DESIGNINFO |
|||
// |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
GUIDELINES DESIGNINFO DISCARDABLE |
|||
BEGIN |
|||
IDD_ABOUTBOX, DIALOG |
|||
BEGIN |
|||
LEFTMARGIN, 7 |
|||
RIGHTMARGIN, 228 |
|||
TOPMARGIN, 7 |
|||
BOTTOMMARGIN, 48 |
|||
END |
|||
IDD_EMULATELGS_DIALOG, DIALOG |
|||
BEGIN |
|||
LEFTMARGIN, 7 |
|||
RIGHTMARGIN, 313 |
|||
TOPMARGIN, 7 |
|||
BOTTOMMARGIN,193 |
|||
END |
|||
END |
|||
#endif // APSTUDIO_INVOKED |
|||
|
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// String Table |
|||
// |
|||
|
|||
STRINGTABLE DISCARDABLE |
|||
BEGIN |
|||
IDS_ABOUTBOX "&About EmulateLGS..." |
|||
END |
|||
#endif |
|||
|
|||
#ifndef APSTUDIO_INVOKED |
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// |
|||
// Generated from the TEXTINCLUDE 3 resource. |
|||
// |
|||
#define _AFX_NO_SPLITTER_RESOURCES |
|||
#define _AFX_NO_OLE_RESOURCES |
|||
#define _AFX_NO_TRACKER_RESOURCES |
|||
#define _AFX_NO_PROPERTY_RESOURCES |
|||
|
|||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
|||
#ifdef _WIN32 |
|||
LANGUAGE 9, 1 |
|||
#pragma code_page(1252) |
|||
#endif //_WIN32 |
|||
#include "res\\EmulateLGS.rc2" // non-Microsoft Visual C++ edited resources |
|||
#include "afxres.rc" // Standard components |
|||
#endif |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
#endif // not APSTUDIO_INVOKED |
|||
|
|||
1010
EmulateLGS/EmulateLGS.vcproj
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="Windows-1252"?> |
|||
<VisualStudioUserFile |
|||
ProjectType="Visual C++" |
|||
Version="8.00" |
|||
ShowAllFiles="false" |
|||
> |
|||
<Configurations> |
|||
<Configuration |
|||
Name="Release|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="DUALCORE" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
<Configuration |
|||
Name="Debug|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="DUALCORE" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
</Configurations> |
|||
</VisualStudioUserFile> |
|||
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="windows-1255"?> |
|||
<VisualStudioUserFile |
|||
ProjectType="Visual C++" |
|||
Version="8.00" |
|||
ShowAllFiles="false" |
|||
> |
|||
<Configurations> |
|||
<Configuration |
|||
Name="Release|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="P2600HT" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
<Configuration |
|||
Name="Debug|Win32" |
|||
> |
|||
<DebugSettings |
|||
Command="$(TargetPath)" |
|||
WorkingDirectory="" |
|||
CommandArguments="" |
|||
Attach="false" |
|||
DebuggerType="3" |
|||
Remote="1" |
|||
RemoteMachine="P2600HT" |
|||
RemoteCommand="" |
|||
HttpUrl="" |
|||
PDBPath="" |
|||
SQLDebugging="" |
|||
Environment="" |
|||
EnvironmentMerge="true" |
|||
DebuggerFlavor="" |
|||
MPIRunCommand="" |
|||
MPIRunArguments="" |
|||
MPIRunWorkingDirectory="" |
|||
ApplicationCommand="" |
|||
ApplicationArguments="" |
|||
ShimCommand="" |
|||
MPIAcceptMode="" |
|||
MPIAcceptFilter="" |
|||
/> |
|||
</Configuration> |
|||
</Configurations> |
|||
</VisualStudioUserFile> |
|||
@ -0,0 +1,201 @@ |
|||
// EmulateLGSDlg.cpp : implementation file
|
|||
//
|
|||
|
|||
#include "stdafx.h"
|
|||
#include "EmulateLGS.h"
|
|||
#include "EmulateLGSDlg.h"
|
|||
|
|||
#ifdef _DEBUG
|
|||
#define new DEBUG_NEW
|
|||
#undef THIS_FILE
|
|||
static char THIS_FILE[] = __FILE__; |
|||
#endif
|
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CAboutDlg dialog used for App About
|
|||
|
|||
class CAboutDlg : public CDialog |
|||
{ |
|||
public: |
|||
CAboutDlg(); |
|||
|
|||
// Dialog Data
|
|||
//{{AFX_DATA(CAboutDlg)
|
|||
enum { IDD = IDD_ABOUTBOX }; |
|||
//}}AFX_DATA
|
|||
|
|||
// ClassWizard generated virtual function overrides
|
|||
//{{AFX_VIRTUAL(CAboutDlg)
|
|||
protected: |
|||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|||
//}}AFX_VIRTUAL
|
|||
|
|||
// Implementation
|
|||
protected: |
|||
//{{AFX_MSG(CAboutDlg)
|
|||
//}}AFX_MSG
|
|||
DECLARE_MESSAGE_MAP() |
|||
}; |
|||
|
|||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD) |
|||
{ |
|||
//{{AFX_DATA_INIT(CAboutDlg)
|
|||
//}}AFX_DATA_INIT
|
|||
} |
|||
|
|||
void CAboutDlg::DoDataExchange(CDataExchange* pDX) |
|||
{ |
|||
CDialog::DoDataExchange(pDX); |
|||
//{{AFX_DATA_MAP(CAboutDlg)
|
|||
//}}AFX_DATA_MAP
|
|||
} |
|||
|
|||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog) |
|||
//{{AFX_MSG_MAP(CAboutDlg)
|
|||
// No message handlers
|
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CEmulateLGSDlg dialog
|
|||
|
|||
CEmulateLGSDlg::CEmulateLGSDlg(CWnd* pParent /*=NULL*/) |
|||
: CDialog(CEmulateLGSDlg::IDD, pParent) |
|||
{ |
|||
//{{AFX_DATA_INIT(CEmulateLGSDlg)
|
|||
// NOTE: the ClassWizard will add member initialization here
|
|||
//}}AFX_DATA_INIT
|
|||
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
|
|||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); |
|||
} |
|||
|
|||
void CEmulateLGSDlg::DoDataExchange(CDataExchange* pDX) |
|||
{ |
|||
CDialog::DoDataExchange(pDX); |
|||
//{{AFX_DATA_MAP(CEmulateLGSDlg)
|
|||
// NOTE: the ClassWizard will add DDX and DDV calls here
|
|||
//}}AFX_DATA_MAP
|
|||
} |
|||
|
|||
BEGIN_MESSAGE_MAP(CEmulateLGSDlg, CDialog) |
|||
//{{AFX_MSG_MAP(CEmulateLGSDlg)
|
|||
ON_WM_SYSCOMMAND() |
|||
ON_WM_PAINT() |
|||
ON_WM_QUERYDRAGICON() |
|||
//}}AFX_MSG_MAP
|
|||
END_MESSAGE_MAP() |
|||
|
|||
/////////////////////////////////////////////////////////////////////////////
|
|||
// CEmulateLGSDlg message handlers
|
|||
|
|||
BOOL CEmulateLGSDlg::OnInitDialog() |
|||
{ |
|||
CDialog::OnInitDialog(); |
|||
|
|||
// Add "About..." menu item to system menu.
|
|||
|
|||
// IDM_ABOUTBOX must be in the system command range.
|
|||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); |
|||
ASSERT(IDM_ABOUTBOX < 0xF000); |
|||
|
|||
CMenu* pSysMenu = GetSystemMenu(FALSE); |
|||
if (pSysMenu != NULL) |
|||
{ |
|||
CString strAboutMenu; |
|||
strAboutMenu.LoadString(IDS_ABOUTBOX); |
|||
if (!strAboutMenu.IsEmpty()) |
|||
{ |
|||
pSysMenu->AppendMenu(MF_SEPARATOR); |
|||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); |
|||
} |
|||
} |
|||
|
|||
// Set the icon for this dialog. The framework does this automatically
|
|||
// when the application's main window is not a dialog
|
|||
SetIcon(m_hIcon, TRUE); // Set big icon
|
|||
SetIcon(m_hIcon, FALSE); // Set small icon
|
|||
|
|||
CLgThread::Start( TRUE ); |
|||
|
|||
return TRUE; // return TRUE unless you set the focus to a control
|
|||
} |
|||
|
|||
DWORD CEmulateLGSDlg::ThreadProc() |
|||
{ |
|||
m_Shadow.Create(); |
|||
m_Shadow.Load(); |
|||
m_Shadow.Load(); |
|||
m_Shadow.Load(); |
|||
m_Shadow.Load(); |
|||
m_Shadow.Load(); |
|||
|
|||
do |
|||
{ |
|||
// load comm speed
|
|||
INT nSpeed = 19200UL; |
|||
FILE *pFile = fopen( "SERIAL.INI", "rt" ); |
|||
if( pFile ) |
|||
{ |
|||
fscanf( pFile, "%ld\n", &nSpeed ); |
|||
fclose( pFile ); |
|||
} |
|||
|
|||
m_CommPort[0].Create(CComm485::_COM5, nSpeed,8,CComm485::_NOPARITY); |
|||
|
|||
m_Kernel.Create( &m_Board, &m_CommPort[0], &m_Shadow, &m_CommPort[1], CComm485::_COM3 ); |
|||
|
|||
m_Kernel.Run(); |
|||
} |
|||
while( TRUE ); |
|||
|
|||
return 0; |
|||
} |
|||
|
|||
void CEmulateLGSDlg::OnSysCommand(UINT nID, LPARAM lParam) |
|||
{ |
|||
if ((nID & 0xFFF0) == IDM_ABOUTBOX) |
|||
{ |
|||
CAboutDlg dlgAbout; |
|||
dlgAbout.DoModal(); |
|||
} |
|||
else |
|||
{ |
|||
CDialog::OnSysCommand(nID, lParam); |
|||
} |
|||
} |
|||
|
|||
// If you add a minimize button to your dialog, you will need the code below
|
|||
// to draw the icon. For MFC applications using the document/view model,
|
|||
// this is automatically done for you by the framework.
|
|||
|
|||
void CEmulateLGSDlg::OnPaint() |
|||
{ |
|||
if (IsIconic()) |
|||
{ |
|||
CPaintDC dc(this); // device context for painting
|
|||
|
|||
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0); |
|||
|
|||
// Center icon in client rectangle
|
|||
int cxIcon = GetSystemMetrics(SM_CXICON); |
|||
int cyIcon = GetSystemMetrics(SM_CYICON); |
|||
CRect rect; |
|||
GetClientRect(&rect); |
|||
int x = (rect.Width() - cxIcon + 1) / 2; |
|||
int y = (rect.Height() - cyIcon + 1) / 2; |
|||
|
|||
// Draw the icon
|
|||
dc.DrawIcon(x, y, m_hIcon); |
|||
} |
|||
else |
|||
{ |
|||
CDialog::OnPaint(); |
|||
} |
|||
} |
|||
|
|||
// The system calls this to obtain the cursor to display while the user drags
|
|||
// the minimized window.
|
|||
HCURSOR CEmulateLGSDlg::OnQueryDragIcon() |
|||
{ |
|||
return (HCURSOR) m_hIcon; |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
// EmulateLGSDlg.h : header file |
|||
// |
|||
|
|||
#if !defined(AFX_EMULATELGSDLG_H__7A90A99B_6ABB_4A33_AA18_5FB89D1A639F__INCLUDED_) |
|||
#define AFX_EMULATELGSDLG_H__7A90A99B_6ABB_4A33_AA18_5FB89D1A639F__INCLUDED_ |
|||
|
|||
#include "EmulateHW.h" // Added by ClassView |
|||
#include "..\LGS\KERNEL.H" // Added by ClassView |
|||
#include "..\LGS\Shadow.h" // Added by ClassView |
|||
#if _MSC_VER > 1000 |
|||
#pragma once |
|||
#endif // _MSC_VER > 1000 |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// CEmulateLGSDlg dialog |
|||
|
|||
class CEmulateLGSDlg : public CDialog, public CLgThread |
|||
{ |
|||
// Construction |
|||
public: |
|||
CEmulateLGSDlg(CWnd* pParent = NULL); // standard constructor |
|||
|
|||
// Dialog Data |
|||
//{{AFX_DATA(CEmulateLGSDlg) |
|||
enum { IDD = IDD_EMULATELGS_DIALOG }; |
|||
// NOTE: the ClassWizard will add data members here |
|||
//}}AFX_DATA |
|||
|
|||
// ClassWizard generated virtual function overrides |
|||
//{{AFX_VIRTUAL(CEmulateLGSDlg) |
|||
protected: |
|||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
|||
//}}AFX_VIRTUAL |
|||
|
|||
// Implementation |
|||
protected: |
|||
HICON m_hIcon; |
|||
|
|||
// Generated message map functions |
|||
//{{AFX_MSG(CEmulateLGSDlg) |
|||
virtual BOOL OnInitDialog(); |
|||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam); |
|||
afx_msg void OnPaint(); |
|||
afx_msg HCURSOR OnQueryDragIcon(); |
|||
//}}AFX_MSG |
|||
DECLARE_MESSAGE_MAP() |
|||
private: |
|||
CComm485 m_CommPort[2]; |
|||
CShadow m_Shadow; |
|||
CBoard m_Board; |
|||
CKernel m_Kernel; |
|||
|
|||
private: |
|||
virtual DWORD ThreadProc(); |
|||
}; |
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|||
|
|||
#endif // !defined(AFX_EMULATELGSDLG_H__7A90A99B_6ABB_4A33_AA18_5FB89D1A639F__INCLUDED_) |
|||
@ -0,0 +1,21 @@ |
|||
//{{NO_DEPENDENCIES}} |
|||
// Microsoft Visual C++ generated include file. |
|||
// Used by EMULATELGS.RC |
|||
// |
|||
#define IDR_MAINFRAME 128 |
|||
#define IDM_ABOUTBOX 0x0010 |
|||
#define IDD_ABOUTBOX 100 |
|||
#define IDS_ABOUTBOX 101 |
|||
#define IDD_EMULATELGS_DIALOG 102 |
|||
|
|||
// Next default values for new objects |
|||
// |
|||
#ifdef APSTUDIO_INVOKED |
|||
#ifndef APSTUDIO_READONLY_SYMBOLS |
|||
|
|||
#define _APS_NEXT_RESOURCE_VALUE 129 |
|||
#define _APS_NEXT_CONTROL_VALUE 1000 |
|||
#define _APS_NEXT_SYMED_VALUE 101 |
|||
#define _APS_NEXT_COMMAND_VALUE 32771 |
|||
#endif |
|||
#endif |
|||
@ -0,0 +1 @@ |
|||
115200 |
|||
@ -0,0 +1,12 @@ |
|||
SN = NOSERIALNUMBER |
|||
ADDRESS = 0 |
|||
CAMERA_TYPE = 11 |
|||
CAMERA_SHIFT = 0 |
|||
CAMERA_AUTO = 0 |
|||
CAMERA_DELAY = 0 |
|||
RELAY_AUTO = 0 |
|||
RELAY_DELAY = 0 |
|||
RELAY_NC = 0 |
|||
VOLTAGE_CONTROL = 0 |
|||
MASTER_DISABLED = 0 |
|||
SLAVE_DISABLED = 0 |
|||
@ -0,0 +1,8 @@ |
|||
// stdafx.cpp : source file that includes just the standard includes
|
|||
// EmulateLGS.pch will be the pre-compiled header
|
|||
// stdafx.obj will contain the pre-compiled type information
|
|||
|
|||
#include "stdafx.h"
|
|||
|
|||
|
|||
|
|||
@ -0,0 +1,19 @@ |
|||
#ifndef __STD__AFX__H__INCLUDED__WINDOWS__ |
|||
#define __STD__AFX__H__INCLUDED__WINDOWS__ |
|||
|
|||
#pragma once |
|||
|
|||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers |
|||
|
|||
#include <afxwin.h> // MFC core and standard components |
|||
#include <afxext.h> // MFC extensions |
|||
#include <afxdisp.h> // MFC Automation classes |
|||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls |
|||
#ifndef _AFX_NO_AFXCMN_SUPPORT |
|||
#include <afxcmn.h> // MFC support for Windows Common Controls |
|||
#endif // _AFX_NO_AFXCMN_SUPPORT |
|||
|
|||
|
|||
//{{AFX_INSERT_LOCATION}} |
|||
|
|||
#endif |
|||
@ -0,0 +1,13 @@ |
|||
AUTORESET_ENABLE=0 |
|||
AUTORESET_INTERLEAVE=2000 |
|||
AUTORESET_TIMEOUT=60000 |
|||
BOARD_TEMPERATURE=20 |
|||
BOARD_ZEROSHIFT=0 |
|||
BOARD_ENCODERSTEPS=6 |
|||
BOARD_GEARRATIO=61 |
|||
SWITCHER_TABLE=27,55,82 |
|||
SWITCHER_REPLY_TIMEOUT=100 |
|||
SWITCHER_COMMAND_TIMEOUT=500 |
|||
SWITCHER_AUTO_MODE=0 |
|||
SWITCHER_AUTO_ENTER_TIMEOUT=5 |
|||
SWITCHER_AUTO_SWITCH_TIMEOUT=3 |
|||
@ -0,0 +1 @@ |
|||
offset=8 delta=60 width=5400 order=1 sst=0 flip=16 sun=0 nowide=940364 |
|||
@ -0,0 +1 @@ |
|||
offset=8 delta=60 width=5400 order=1 sst=0 flip=16 sun=0 nowide=940364 |
|||
@ -0,0 +1,7 @@ |
|||
type 255 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
polygon 0 |
|||
Binary file not shown.
@ -0,0 +1,13 @@ |
|||
// |
|||
// EMULATELGS.RC2 - resources Microsoft Visual C++ does not edit directly |
|||
// |
|||
|
|||
#ifdef APSTUDIO_INVOKED |
|||
#error this file is not editable by Microsoft Visual C++ |
|||
#endif //APSTUDIO_INVOKED |
|||
|
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
// Add manually edited resources here... |
|||
|
|||
///////////////////////////////////////////////////////////////////////////// |
|||
@ -0,0 +1 @@ |
|||
115200 |
|||
@ -0,0 +1,12 @@ |
|||
SN = NOSERIALNUMBER |
|||
ADDRESS = 0 |
|||
CAMERA_TYPE = 11 |
|||
CAMERA_SHIFT = 0 |
|||
CAMERA_AUTO = 0 |
|||
CAMERA_DELAY = 0 |
|||
RELAY_AUTO = 0 |
|||
RELAY_DELAY = 0 |
|||
RELAY_NC = 0 |
|||
VOLTAGE_CONTROL = 0 |
|||
MASTER_DISABLED = 0 |
|||
SLAVE_DISABLED = 0 |
|||
@ -0,0 +1,13 @@ |
|||
AUTORESET_ENABLE=0 |
|||
AUTORESET_INTERLEAVE=2000 |
|||
AUTORESET_TIMEOUT=60000 |
|||
BOARD_TEMPERATURE=20 |
|||
BOARD_ZEROSHIFT=0 |
|||
BOARD_ENCODERSTEPS=6 |
|||
BOARD_GEARRATIO=61 |
|||
SWITCHER_TABLE=27,55,82 |
|||
SWITCHER_REPLY_TIMEOUT=100 |
|||
SWITCHER_COMMAND_TIMEOUT=500 |
|||
SWITCHER_AUTO_MODE=0 |
|||
SWITCHER_AUTO_ENTER_TIMEOUT=5 |
|||
SWITCHER_AUTO_SWITCH_TIMEOUT=3 |
|||
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue