From 9ab6ee652a4f94ed786f405d3fb158f8efafdadf Mon Sep 17 00:00:00 2001 From: ChenSiAn Date: Fri, 3 Feb 2023 10:07:52 +0800 Subject: [PATCH] First commit --- .gitignore | 12 + TestSimulator.sln | 20 + TestSimulator/BlockAnd.cpp | 226 +++ TestSimulator/BlockAnd.h | 55 + TestSimulator/BlockBasis.cpp | 191 +++ TestSimulator/BlockBasis.h | 68 + TestSimulator/BlockFun.cpp | 257 +++ TestSimulator/BlockFun.h | 62 + TestSimulator/BlockIn.cpp | 152 ++ TestSimulator/BlockIn.h | 43 + TestSimulator/BlockNot.cpp | 164 ++ TestSimulator/BlockNot.h | 47 + TestSimulator/BlockOr.cpp | 226 +++ TestSimulator/BlockOr.h | 55 + TestSimulator/BlockOut.cpp | 163 ++ TestSimulator/BlockOut.h | 57 + TestSimulator/Complex.cpp | 51 + TestSimulator/Complex.h | 22 + TestSimulator/FunDlg.cpp | 113 ++ TestSimulator/FunDlg.h | 41 + TestSimulator/Initial.ini | 6 + TestSimulator/InputDlg.cpp | 107 ++ TestSimulator/InputDlg.h | 42 + TestSimulator/OscDlg.cpp | 434 +++++ TestSimulator/OscDlg.h | 72 + TestSimulator/TestSimulator.cpp | 102 ++ TestSimulator/TestSimulator.h | 32 + TestSimulator/TestSimulator.rc | Bin 0 -> 18538 bytes TestSimulator/TestSimulator.vcxproj | 163 ++ TestSimulator/TestSimulator.vcxproj.filters | 129 ++ TestSimulator/TestSimulator.vcxproj.user | 7 + TestSimulator/TestSimulatorDlg.cpp | 1582 +++++++++++++++++++ TestSimulator/TestSimulatorDlg.h | 116 ++ TestSimulator/res/TestSimulator.ico | Bin 0 -> 67777 bytes TestSimulator/res/TestSimulator.rc2 | Bin 0 -> 682 bytes TestSimulator/resource.h | Bin 0 -> 5208 bytes TestSimulator/stdafx.cpp | 8 + TestSimulator/stdafx.h | 54 + TestSimulator/targetver.h | 8 + 39 files changed, 4887 insertions(+) create mode 100644 .gitignore create mode 100644 TestSimulator.sln create mode 100644 TestSimulator/BlockAnd.cpp create mode 100644 TestSimulator/BlockAnd.h create mode 100644 TestSimulator/BlockBasis.cpp create mode 100644 TestSimulator/BlockBasis.h create mode 100644 TestSimulator/BlockFun.cpp create mode 100644 TestSimulator/BlockFun.h create mode 100644 TestSimulator/BlockIn.cpp create mode 100644 TestSimulator/BlockIn.h create mode 100644 TestSimulator/BlockNot.cpp create mode 100644 TestSimulator/BlockNot.h create mode 100644 TestSimulator/BlockOr.cpp create mode 100644 TestSimulator/BlockOr.h create mode 100644 TestSimulator/BlockOut.cpp create mode 100644 TestSimulator/BlockOut.h create mode 100644 TestSimulator/Complex.cpp create mode 100644 TestSimulator/Complex.h create mode 100644 TestSimulator/FunDlg.cpp create mode 100644 TestSimulator/FunDlg.h create mode 100644 TestSimulator/Initial.ini create mode 100644 TestSimulator/InputDlg.cpp create mode 100644 TestSimulator/InputDlg.h create mode 100644 TestSimulator/OscDlg.cpp create mode 100644 TestSimulator/OscDlg.h create mode 100644 TestSimulator/TestSimulator.cpp create mode 100644 TestSimulator/TestSimulator.h create mode 100644 TestSimulator/TestSimulator.rc create mode 100644 TestSimulator/TestSimulator.vcxproj create mode 100644 TestSimulator/TestSimulator.vcxproj.filters create mode 100644 TestSimulator/TestSimulator.vcxproj.user create mode 100644 TestSimulator/TestSimulatorDlg.cpp create mode 100644 TestSimulator/TestSimulatorDlg.h create mode 100644 TestSimulator/res/TestSimulator.ico create mode 100644 TestSimulator/res/TestSimulator.rc2 create mode 100644 TestSimulator/resource.h create mode 100644 TestSimulator/stdafx.cpp create mode 100644 TestSimulator/stdafx.h create mode 100644 TestSimulator/targetver.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..df09299 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +#Build results +[Dd]ebug/ +[Rr]elease/ + +#Ext +*.bmp +*.txt +*.sdf +*.suo +*.db +*.opensdf + diff --git a/TestSimulator.sln b/TestSimulator.sln new file mode 100644 index 0000000..9ef1d9e --- /dev/null +++ b/TestSimulator.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestSimulator", "TestSimulator\TestSimulator.vcxproj", "{C1F3E95D-9580-4550-A748-674E1D31DF84}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C1F3E95D-9580-4550-A748-674E1D31DF84}.Debug|Win32.ActiveCfg = Debug|Win32 + {C1F3E95D-9580-4550-A748-674E1D31DF84}.Debug|Win32.Build.0 = Debug|Win32 + {C1F3E95D-9580-4550-A748-674E1D31DF84}.Release|Win32.ActiveCfg = Release|Win32 + {C1F3E95D-9580-4550-A748-674E1D31DF84}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TestSimulator/BlockAnd.cpp b/TestSimulator/BlockAnd.cpp new file mode 100644 index 0000000..dad179c --- /dev/null +++ b/TestSimulator/BlockAnd.cpp @@ -0,0 +1,226 @@ +#include "stdafx.h" + +#include "BlockAnd.h" + +#include "math.h" + +#define PIN_RADIUS 8 //Pinb| + +#define GOLD RGB (255, 215, 0) //Pin}C +#define BLACK RGB (0, 0, 0) //suC + +#define NO_VALUE -10 //sbJT +#define NO_OPER_FLAG -11 //sbB⤸ +#define COMPUTE_ERROR -13 //\B +#define NO_BLOCK_HEAD -14 //sbsBlock + +#define TOLERANCE 0.001 //eԻ~t + +#define DIGITAL_VALUE 4 //ƦTflag +#define ANALOG_VALUE 5 //Tflag + +#define BLK_AND 3 //Blocks + +CBlockAnd::CBlockAnd () +{ + m_rcPinIn1 = CRect (); + m_rcPinIn2 = CRect (); + m_rcPinOut = CRect (); + + m_pBlkHead1 = NULL; + m_pBlkHead2 = NULL; + + m_iBlkHead1Num = NO_BLOCK_HEAD; + m_iBlkHead2Num = NO_BLOCK_HEAD; +} + +CBlockAnd::~CBlockAnd () +{ +} + +void CBlockAnd::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + CBlockBasis::SetBlkRect (ptCenter, iWidth, iHeight); + + m_rcPinIn1.left = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn1.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn1.right = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn1.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinIn2.left = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn2.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn2.right = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn2.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +CRect CBlockAnd::GetPinIn1Rect () const +{ + return m_rcPinIn1; +} + +CRect CBlockAnd::GetPinIn2Rect () const +{ + return m_rcPinIn2; +} + +CRect CBlockAnd::GetPinOutRect () const +{ + return m_rcPinOut; +} + +CBlockBasis* CBlockAnd::GetBlkHead1Ptr () const +{ + return m_pBlkHead1; +} + +CBlockBasis* CBlockAnd::GetBlkHead2Ptr () const +{ + return m_pBlkHead2; +} + +void CBlockAnd::SetBlkHead1Ptr (CBlockBasis* pBlkHead) +{ + m_pBlkHead1 = pBlkHead; +} + +void CBlockAnd::SetBlkHead2Ptr (CBlockBasis* pBlkHead) +{ + m_pBlkHead2 = pBlkHead; +} + +int CBlockAnd::GetBlkHead1Num () const +{ + return m_iBlkHead1Num; +} + +int CBlockAnd::GetBlkHead2Num () const +{ + return m_iBlkHead2Num; +} + +void CBlockAnd::SetBlkHead1Num (int iHeadBlkNum) +{ + m_iBlkHead1Num = iHeadBlkNum; +} + +void CBlockAnd::SetBlkHead2Num (int iHeadBlkNum) +{ + m_iBlkHead2Num = iHeadBlkNum; +} + +double CBlockAnd::GetBlkValue () const +{ + //And޿ (YJҬ1Ah^1A_h^0) + if (abs (m_pBlkHead1->GetBlkValue () - 1) < TOLERANCE && abs (m_pBlkHead2->GetBlkValue () - 1) < TOLERANCE) + return 1.; + else + return 0.; +} + +int CBlockAnd::GetValueFlag () const +{ + if (m_pBlkHead1 == NULL || m_pBlkHead2 == NULL) //Ysb@JIsA^"L" + return NO_VALUE; + else if (m_pBlkHead1->GetValueFlag () == NO_VALUE || m_pBlkHead2->GetValueFlag () == NO_VALUE) //Ysb@JLȡA^"L" + return NO_VALUE; + else if (m_pBlkHead1->GetValueFlag () == COMPUTE_ERROR || m_pBlkHead2->GetValueFlag () == COMPUTE_ERROR) //Ysb@Jp~A^"p~" + return COMPUTE_ERROR; + else if (m_pBlkHead1->GetValueFlag () == ANALOG_VALUE || m_pBlkHead2->GetValueFlag () == ANALOG_VALUE) //\J + return COMPUTE_ERROR; + else if (m_pBlkHead1->GetValueFlag () == NO_OPER_FLAG || m_pBlkHead2->GetValueFlag () == NO_OPER_FLAG) //]wB⤸ + return NO_OPER_FLAG; + else if (m_pBlkHead1->GetValueFlag () == DIGITAL_VALUE && m_pBlkHead2->GetValueFlag () == DIGITAL_VALUE) //YJҬƦTAh^ǼƦT + return DIGITAL_VALUE; + else + return NO_VALUE; +} + +void CBlockAnd::Move (CPoint ptCursor) +{ + CBlockBasis::Move (ptCursor); + + m_rcPinIn1.left = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn1.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn1.right = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn1.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinIn2.left = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn2.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn2.right = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn2.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +void CBlockAnd::Draw (CDC* pDC) +{ + CBrush brushPin (GOLD), * pbrushOld; + pbrushOld = pDC->SelectObject (&brushPin); + pDC->Ellipse (m_rcPinIn1); + pDC->Ellipse (m_rcPinIn2); + pDC->Ellipse (m_rcPinOut); + pDC->SelectObject (pbrushOld); + + CBlockBasis::Draw (pDC); + pDC->DrawTextA (_T ("AND"), -1, &m_rcBlk, DT_SINGLELINE | DT_CENTER | DT_VCENTER); +} + +void CBlockAnd::DrawLine (CDC* pDC) +{ + if (m_pBlkHead1 != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead1->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn1.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } + + if (m_pBlkHead2 != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead2->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn2.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } +} + +int CBlockAnd::BlkTypeIs () const +{ + return BLK_AND; +} \ No newline at end of file diff --git a/TestSimulator/BlockAnd.h b/TestSimulator/BlockAnd.h new file mode 100644 index 0000000..6eae7b8 --- /dev/null +++ b/TestSimulator/BlockAnd.h @@ -0,0 +1,55 @@ +#pragma once + +//BlocklOGBlock And + +#include "BlockBasis.h" + +class CBlockAnd : public CBlockBasis +{ +private: + //Block rect(sbӿJPinA@ӿXPin) + CRect m_rcPinIn1; + CRect m_rcPinIn2; + CRect m_rcPinOut; + + //s(sbӳs) + CBlockBasis* m_pBlkHead1; + CBlockBasis* m_pBlkHead2; + + //sBlocks(sbӽs) + int m_iBlkHead1Num; + int m_iBlkHead2Num; + +public: + //غcBѺcl + CBlockAnd (); + virtual ~CBlockAnd (); + + //oB]wrect + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinIn1Rect () const; + virtual CRect GetPinIn2Rect () const; + virtual CRect GetPinOutRect () const; + + //oB]wsBlock + virtual CBlockBasis* GetBlkHead1Ptr () const; + virtual CBlockBasis* GetBlkHead2Ptr () const; + virtual void SetBlkHead1Ptr (CBlockBasis*); + virtual void SetBlkHead2Ptr (CBlockBasis*); + + //oB]wsBlocks + virtual int GetBlkHead1Num () const; + virtual int GetBlkHead2Num () const; + virtual void SetBlkHead1Num (int) ; + virtual void SetBlkHead2Num (int) ; + + virtual double GetBlkValue () const; //oBlock + virtual int GetValueFlag () const; //oValueX + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + virtual void DrawLine (CDC*); //øsBlocksu + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/BlockBasis.cpp b/TestSimulator/BlockBasis.cpp new file mode 100644 index 0000000..8fe17c1 --- /dev/null +++ b/TestSimulator/BlockBasis.cpp @@ -0,0 +1,191 @@ +#include "stdafx.h" + +#include "BlockBasis.h" + + +#define LIGHTGRAY RGB (211, 211, 211) //BlockC + +#define NO_VALUE -10 //sbJT +#define NO_OPER_FLAG -11 //Block FunsbB⤸ +#define NO_INPUT_FLAG -12 //Block InsbJi +#define NO_BLOCK_HEAD -14 //sbsBlock + +#define NO_BLK_TYPE 0 + +CBlockBasis::CBlockBasis () +{ + m_rcBlk = CRect (); + m_iBlkNum = 0; +} + +CBlockBasis::~CBlockBasis () +{ +} + +CRect CBlockBasis::GetBlkRect () const +{ + return m_rcBlk; +} + +//HIBBlockeסBBlock׳]wBlock rect +void CBlockBasis::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + m_rcBlk.SetRect (CPoint (ptCenter.x - int (iWidth / 2), ptCenter.y - int (iHeight / 2)), + CPoint (ptCenter.x + int (iWidth / 2), ptCenter.y + int (iHeight / 2))); +} + +CRect CBlockBasis::GetPinIn1Rect () const +{ + return CRect (); +} + +CRect CBlockBasis::GetPinIn2Rect () const +{ + return CRect (); +} + +CRect CBlockBasis::GetPinOutRect () const +{ + return CRect (); +} + +int CBlockBasis::GetBlkNum () const +{ + return m_iBlkNum; +} + +void CBlockBasis::SetBlkNum (int iNum) +{ + m_iBlkNum = iNum; +} + +CBlockBasis* CBlockBasis::GetBlkHead1Ptr () const +{ + return NULL; +} + +CBlockBasis* CBlockBasis::GetBlkHead1Ptr (int iIndex) const +{ + return NULL; +} + +CBlockBasis* CBlockBasis::GetBlkHead2Ptr () const +{ + return NULL; +} + +void CBlockBasis::SetBlkHead1Ptr (CBlockBasis* pBlkHead) +{ +} + +void CBlockBasis::SetBlkHead2Ptr (CBlockBasis* pBlkHead) +{ +} + +void CBlockBasis::DeleteBlkHead1Ptr (int iIndex) +{ +} + +int CBlockBasis::GetBlkHead1Num () const +{ + return NO_BLOCK_HEAD; +} + +int CBlockBasis::GetBlkHead1Num (int iIndex) const +{ + return NO_BLOCK_HEAD; +} + +int CBlockBasis::GetBlkHead2Num () const +{ + return NO_BLOCK_HEAD; +} + +void CBlockBasis::SetBlkHead1Num (int iHeadBlkNum) +{ +} + +void CBlockBasis::SetBlkHead2Num (int iHeadBlkNum) +{ +} + +void CBlockBasis::ClearBlkHead1Num () +{ +} + +int CBlockBasis::GetBlkHeadSize () const +{ + return NO_BLOCK_HEAD; +} + +void CBlockBasis::SetBlkHeadSize (int) +{ +} + +int CBlockBasis::GetInputFlag () const +{ + return NO_INPUT_FLAG; +} + +void CBlockBasis::SetInputFlag (int iInputFlag) +{ +} + +int CBlockBasis::GetOperFlag () const +{ + return NO_OPER_FLAG; +} + +void CBlockBasis::SetOperFlag (int iInputFlag) +{ +} + +double CBlockBasis::GetBlkValue () const +{ + return NO_VALUE; +} + +double CBlockBasis::GetBlkValue (int iIndex) const +{ + return NO_VALUE; +} + +void CBlockBasis::SetBlkValue (double dBlkValue) +{ +} + +void CBlockBasis::SetBlkValue () +{ +} + +int CBlockBasis::GetValueFlag () const +{ + return NO_VALUE; +} + +int CBlockBasis::GetValueFlag (int iIndex) const +{ + return NO_VALUE; +} + +//Blockɨ̹Цm]wBlock rect +void CBlockBasis::Move (CPoint ptCursor) +{ + m_rcBlk.SetRect (CPoint (ptCursor.x - int (m_rcBlk.Width () / 2.), ptCursor.y - int (m_rcBlk.Height () / 2.)), + CPoint (ptCursor.x + int (m_rcBlk.Width () / 2.), ptCursor.y + int (m_rcBlk.Height () / 2.))); +} + +void CBlockBasis::Draw (CDC* pDC) +{ + pDC->FillSolidRect (m_rcBlk, LIGHTGRAY); + pDC->DrawEdge (m_rcBlk, EDGE_RAISED, BF_RECT); +} + +void CBlockBasis::DrawLine (CDC* pDC) +{ +} + +int CBlockBasis::BlkTypeIs () const +{ + return NO_BLK_TYPE; +} \ No newline at end of file diff --git a/TestSimulator/BlockBasis.h b/TestSimulator/BlockBasis.h new file mode 100644 index 0000000..d70a6f8 --- /dev/null +++ b/TestSimulator/BlockBasis.h @@ -0,0 +1,68 @@ +#pragma once + +//Block¦O + +class CBlockBasis +{ +protected: + CRect m_rcBlk; //Block rect + + int m_iBlkNum; //Blockvectors + +public: + //غcBѺcl + CBlockBasis (); + virtual ~CBlockBasis (); + + //oB]wrect + CRect GetBlkRect () const; + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinIn1Rect () const; + virtual CRect GetPinIn2Rect () const; + virtual CRect GetPinOutRect () const; + + //oB]wBlocks + int GetBlkNum () const; + void SetBlkNum (int); + + //oB]wsBlock + virtual CBlockBasis* GetBlkHead1Ptr () const; + virtual CBlockBasis* GetBlkHead1Ptr (int) const; + virtual CBlockBasis* GetBlkHead2Ptr () const; + virtual void SetBlkHead1Ptr (CBlockBasis*); + virtual void SetBlkHead2Ptr (CBlockBasis*); + virtual void DeleteBlkHead1Ptr (int); //Block OutsvectorMw + + //oB]wsBlocks + virtual int GetBlkHead1Num () const; + virtual int GetBlkHead1Num (int) const; + virtual int GetBlkHead2Num () const; + virtual void SetBlkHead1Num (int) ; + virtual void SetBlkHead2Num (int) ; + virtual void ClearBlkHead1Num (); //MBlock Outssvector + + //oB]wsBlock Outƥ + virtual int GetBlkHeadSize () const; + virtual void SetBlkHeadSize (int); + + //oB]wBlock In, Funflag + virtual int GetInputFlag () const; + virtual void SetInputFlag (int); + virtual int GetOperFlag () const; + virtual void SetOperFlag (int); + + //oB]wBlock + virtual double GetBlkValue () const; + virtual double GetBlkValue (int) const; //oBlock Outwchannel + virtual void SetBlkValue (double); + virtual void SetBlkValue (); + virtual int GetValueFlag () const; + virtual int GetValueFlag (int) const; + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + virtual void DrawLine (CDC*); //øsBlocksu + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/BlockFun.cpp b/TestSimulator/BlockFun.cpp new file mode 100644 index 0000000..69772a3 --- /dev/null +++ b/TestSimulator/BlockFun.cpp @@ -0,0 +1,257 @@ +#include "stdafx.h" + +#include "BlockFun.h" + +#define PIN_RADIUS 8 //Pinb| + +#define GOLD RGB (255, 215, 0) //Pin}C +#define BLACK RGB (0, 0, 0) //suC + +#define FALSE_VALUE 10 //FALSE^ǭ +#define TRUE_VALUE 11 //TRUE^ǭ +#define NO_VALUE -10 //sbJT +#define NO_OPER_FLAG -11 //sbB⤸ +#define NO_INPUT_FLAG -12 //sbJi +#define COMPUTE_ERROR -13 //\B +#define NO_BLOCK_HEAD -14 //sbsBlock + +#define PLUS 1 // + flag +#define MINUS 2 // - flag +#define MULTI 3 // * flag +#define DIV 4 // / flag + +#define DIGITAL_VALUE 4 //ƦTflag +#define ANALOG_VALUE 5 //Tflag + +#define BLK_FUN 6 //Blocks + +CBlockFun::CBlockFun () +{ + m_rcPinIn1 = CRect (); + m_rcPinIn2 = CRect (); + m_rcPinOut = CRect (); + + m_pBlkHead1 = NULL; + m_pBlkHead2 = NULL; + + m_iBlkHead1Num = NO_BLOCK_HEAD; + m_iBlkHead2Num = NO_BLOCK_HEAD; + + m_iOperFlag = NO_OPER_FLAG; +} + +CBlockFun::~CBlockFun () +{ +} + +void CBlockFun::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + CBlockBasis::SetBlkRect (ptCenter, iWidth, iHeight); + + m_rcPinIn1.left = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn1.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn1.right = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn1.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinIn2.left = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn2.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn2.right = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn2.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +CRect CBlockFun::GetPinIn1Rect () const +{ + return m_rcPinIn1; +} + +CRect CBlockFun::GetPinIn2Rect () const +{ + return m_rcPinIn2; +} + +CRect CBlockFun::GetPinOutRect () const +{ + return m_rcPinOut; +} + +CBlockBasis* CBlockFun::GetBlkHead1Ptr () const +{ + return m_pBlkHead1; +} + +CBlockBasis* CBlockFun::GetBlkHead2Ptr () const +{ + return m_pBlkHead2; +} + +void CBlockFun::SetBlkHead1Ptr (CBlockBasis* pBlkHead1) +{ + m_pBlkHead1 = pBlkHead1; +} + +void CBlockFun::SetBlkHead2Ptr (CBlockBasis* pBlkHead2) +{ + m_pBlkHead2 = pBlkHead2; +} + +int CBlockFun::GetBlkHead1Num () const +{ + return m_iBlkHead1Num; +} + +int CBlockFun::GetBlkHead2Num () const +{ + return m_iBlkHead2Num; +} + +void CBlockFun::SetBlkHead1Num (int iHeadBlkNum) +{ + m_iBlkHead1Num = iHeadBlkNum; +} + +void CBlockFun::SetBlkHead2Num (int iHeadBlkNum) +{ + m_iBlkHead2Num = iHeadBlkNum; +} + +double CBlockFun::GetBlkValue () const +{ + switch (m_iOperFlag) + { + case PLUS: //NJȬۥ[ + return m_pBlkHead1->GetBlkValue () + m_pBlkHead2->GetBlkValue (); + break; + case MINUS: //NJȬ۴ + return m_pBlkHead1->GetBlkValue () - m_pBlkHead2->GetBlkValue (); + break; + case MULTI: //NJȬۭ + return m_pBlkHead1->GetBlkValue () * m_pBlkHead2->GetBlkValue (); + break; + case DIV: //NJȬ۰ + return m_pBlkHead1->GetBlkValue () / m_pBlkHead2->GetBlkValue (); + break; + default: + return NO_VALUE; + break; + } +} + +int CBlockFun::GetValueFlag () const +{ + if (m_pBlkHead1 == NULL || m_pBlkHead2 == NULL) //Ysb@JIsA^"L" + return NO_VALUE; + else if (m_pBlkHead1->GetValueFlag () == NO_VALUE || m_pBlkHead2->GetValueFlag () == NO_VALUE) //Ysb@JLȡA^"L" + return NO_VALUE; + else if (m_pBlkHead1->GetValueFlag () == COMPUTE_ERROR || m_pBlkHead2->GetValueFlag () == COMPUTE_ERROR) //Ysb@Jp~A^"p~" + return COMPUTE_ERROR; + else if (m_pBlkHead1->GetValueFlag () == DIGITAL_VALUE || m_pBlkHead2->GetValueFlag () == DIGITAL_VALUE) //\ƦJ + return COMPUTE_ERROR; + else if (m_iOperFlag == NO_OPER_FLAG) //]wB⤸ + return NO_OPER_FLAG; + else if (m_pBlkHead1->GetValueFlag () == NO_OPER_FLAG || m_pBlkHead2->GetValueFlag () == NO_OPER_FLAG) //]wB⤸ + return NO_OPER_FLAG; + else if (m_pBlkHead1->GetValueFlag () == ANALOG_VALUE && m_pBlkHead2->GetValueFlag () == ANALOG_VALUE) //YJҬTAh^T + return ANALOG_VALUE; + else + return NO_VALUE; +} + +int CBlockFun::GetOperFlag () const +{ + return m_iOperFlag; +} + +void CBlockFun::SetOperFlag (int iOperFlag) +{ + m_iOperFlag = iOperFlag; +} + +void CBlockFun::Move (CPoint ptCursor) +{ + CBlockBasis::Move (ptCursor); + + m_rcPinIn1.left = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn1.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn1.right = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn1.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinIn2.left = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn2.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn2.right = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn2.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +void CBlockFun::Draw (CDC* pDC) +{ + CBrush brushPin (GOLD), * pOldBrush; + pOldBrush = pDC->SelectObject (&brushPin); + pDC->Ellipse (m_rcPinIn1); + pDC->Ellipse (m_rcPinIn2); + pDC->Ellipse (m_rcPinOut); + pDC->SelectObject (pOldBrush); + + CBlockBasis::Draw (pDC); + pDC->DrawTextA (_T ("FUN"), -1, &m_rcBlk, DT_SINGLELINE | DT_CENTER | DT_VCENTER); +} + +void CBlockFun::DrawLine (CDC* pDC) +{ + if (m_pBlkHead1 != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead1->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn1.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } + + if (m_pBlkHead2 != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead2->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn2.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } +} + +int CBlockFun::BlkTypeIs () const +{ + return BLK_FUN; +} \ No newline at end of file diff --git a/TestSimulator/BlockFun.h b/TestSimulator/BlockFun.h new file mode 100644 index 0000000..a73a54d --- /dev/null +++ b/TestSimulator/BlockFun.h @@ -0,0 +1,62 @@ +#pragma once + +//BlocklOGBlock Fun + +#include "BlockBasis.h" + +class CBlockFun : public CBlockBasis +{ +private: + //Block rect(sbӿJPinA@ӿXPin) + CRect m_rcPinIn1; + CRect m_rcPinIn2; + CRect m_rcPinOut; + + //s(sbӳs) + CBlockBasis* m_pBlkHead1; + CBlockBasis* m_pBlkHead2; + + //sBlocks(sbӽs) + int m_iBlkHead1Num; + int m_iBlkHead2Num; + + //B⤸flag + int m_iOperFlag; + +public: + //غcBѺcl + CBlockFun (); + virtual ~CBlockFun (); + + //oB]wrect + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinIn1Rect () const; + virtual CRect GetPinIn2Rect () const; + virtual CRect GetPinOutRect () const; + + //oB]wsBlock + virtual CBlockBasis* GetBlkHead1Ptr () const; + virtual CBlockBasis* GetBlkHead2Ptr () const; + virtual void SetBlkHead1Ptr (CBlockBasis*); + virtual void SetBlkHead2Ptr (CBlockBasis*); + + //oB]wsBlocks + virtual int GetBlkHead1Num () const; + virtual int GetBlkHead2Num () const; + virtual void SetBlkHead1Num (int) ; + virtual void SetBlkHead2Num (int) ; + + //oB]wB⤸flag + virtual int GetOperFlag () const; + virtual void SetOperFlag (int); + + virtual double GetBlkValue () const; //oBlock + virtual int GetValueFlag () const; //oValueX + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + virtual void DrawLine (CDC*); //øsBlocksu + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/BlockIn.cpp b/TestSimulator/BlockIn.cpp new file mode 100644 index 0000000..9a1d199 --- /dev/null +++ b/TestSimulator/BlockIn.cpp @@ -0,0 +1,152 @@ +#include "stdafx.h" + +#include "BlockIn.h" + +#include "math.h" + +#define PIN_RADIUS 8 //Pinb| + +#define GOLD RGB (255, 215, 0) //Pin}C + +#define NO_VALUE -10 //sbJT +#define NO_INPUT_FLAG -12 //sbJi + +#define ZERO 0 //FALSE flag +#define ONE 1 //TRUE flag +#define SIN 2 //Sin flag +#define COS 3 //Cos flag + +#define DIGITAL_VALUE 4 //ƦTflag +#define ANALOG_VALUE 5 //Tflag + +#define BLK_IN 1 //Blocks + +CBlockIn::CBlockIn () +{ + m_rcPinOut = CRect (); + m_iInputFlag = NO_INPUT_FLAG; + m_dBlkValue = NO_VALUE; +} + +CBlockIn::~CBlockIn () +{ + +} + +void CBlockIn::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + CBlockBasis::SetBlkRect (ptCenter, iWidth, iHeight); + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +CRect CBlockIn::GetPinOutRect () const +{ + return m_rcPinOut; +} + +int CBlockIn::GetInputFlag() const +{ + return m_iInputFlag; +} + +void CBlockIn::SetInputFlag(int iInputFlag) +{ + m_iInputFlag = iInputFlag; +} + +double CBlockIn::GetBlkValue () const +{ + return m_dBlkValue; +} + +//ΥH]wwɶIUBlock (Sin, Cos) +void CBlockIn::SetBlkValue (double dTime) +{ + switch (m_iInputFlag) + { + case ZERO: + m_dBlkValue = 0.; + break; + case ONE: + m_dBlkValue = 1.; + break; + case SIN: + m_dBlkValue = sin (dTime); + break; + case COS: + m_dBlkValue = cos (dTime); + break; + default: + m_dBlkValue = NO_VALUE; + break; + } +} + +//]wBlock (TRUE, FALSE) +void CBlockIn::SetBlkValue () +{ + switch (m_iInputFlag) + { + case ZERO: + m_dBlkValue = 0.; + break; + case ONE: + m_dBlkValue = 1.; + break; + default: + m_dBlkValue = NO_VALUE; + break; + } +} + +int CBlockIn::GetValueFlag () const +{ + switch (m_iInputFlag) + { + case ZERO: //JiάTRUEɡA^ǼƦT + return DIGITAL_VALUE; + break; + case ONE: //JiάFALSEɡA^ǼƦT + return DIGITAL_VALUE; + break; + case SIN: //JiάSINɡA^T + return ANALOG_VALUE; + break; + case COS: //JiάCOSɡA^T + return ANALOG_VALUE; + break; + default: + return NO_VALUE; + break; + } +} + +void CBlockIn::Move (CPoint ptCursor) +{ + CBlockBasis::Move (ptCursor); + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.bottom - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.bottom + PIN_RADIUS; +} + +void CBlockIn::Draw (CDC* pDC) +{ + CBrush brushPin (GOLD), * pbrushOld; + pbrushOld = pDC->SelectObject (&brushPin); + pDC->Ellipse (m_rcPinOut); + pDC->SelectObject (pbrushOld); + + CBlockBasis::Draw (pDC); + pDC->DrawTextA (_T ("IN"), -1, &m_rcBlk, DT_SINGLELINE | DT_CENTER | DT_VCENTER); +} + +int CBlockIn::BlkTypeIs () const +{ + return BLK_IN; +} \ No newline at end of file diff --git a/TestSimulator/BlockIn.h b/TestSimulator/BlockIn.h new file mode 100644 index 0000000..cf607d6 --- /dev/null +++ b/TestSimulator/BlockIn.h @@ -0,0 +1,43 @@ +#pragma once + +//BlocklOGBlock In + +#include "BlockBasis.h" + +class CBlockIn : public CBlockBasis +{ +private: + //Block rect(sb@ӿXPin) + CRect m_rcPinOut; + + //Jiflag + int m_iInputFlag; + + //Block + double m_dBlkValue; + +public: + //غcBѺcl + CBlockIn (); + virtual ~CBlockIn (); + + //oB]wrect + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinOutRect () const; + + //oB]wJiflag + virtual int GetInputFlag () const; + virtual void SetInputFlag (int); + + //oB]wBlock + virtual double GetBlkValue () const; + virtual void SetBlkValue (double); + virtual void SetBlkValue (); + virtual int GetValueFlag () const; //oValueX + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/BlockNot.cpp b/TestSimulator/BlockNot.cpp new file mode 100644 index 0000000..c289b00 --- /dev/null +++ b/TestSimulator/BlockNot.cpp @@ -0,0 +1,164 @@ +#include "stdafx.h" + +#include "BlockNot.h" + +#define PIN_RADIUS 8 //Pinb| + +#define GOLD RGB (255, 215, 0) //Pin}C +#define BLACK RGB (0, 0, 0) //suC + +#define NO_VALUE -10 //sbJT +#define NO_OPER_FLAG -11 //sbB⤸ +#define COMPUTE_ERROR -13 //\B +#define NO_BLOCK_HEAD -14 //sbsBlock + +#define TOLERANCE 0.001 //eԻ~t + +#define DIGITAL_VALUE 4 //ƦTflag +#define ANALOG_VALUE 5 //Tflag + +#define BLK_NOT 5 //Blocks + +CBlockNot::CBlockNot () +{ + m_rcPinIn = CRect (); + m_rcPinOut = CRect (); + + m_pBlkHead = NULL; + + m_iBlkHeadNum = NO_BLOCK_HEAD; +} + +CBlockNot::~CBlockNot () +{ +} + +void CBlockNot::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + CBlockBasis::SetBlkRect (ptCenter, iWidth, iHeight); + + m_rcPinIn.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinIn.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinIn.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +CRect CBlockNot::GetPinIn1Rect () const +{ + return m_rcPinIn; +} + +CRect CBlockNot::GetPinOutRect () const +{ + return m_rcPinOut; +} + +CBlockBasis* CBlockNot::GetBlkHead1Ptr () const +{ + return m_pBlkHead; +} + +void CBlockNot::SetBlkHead1Ptr (CBlockBasis* pBlkHead) +{ + m_pBlkHead = pBlkHead; +} + +int CBlockNot::GetBlkHead1Num () const +{ + return m_iBlkHeadNum; +} + +void CBlockNot::SetBlkHead1Num (int iHeadBlkNum) +{ + m_iBlkHeadNum = iHeadBlkNum; +} + +double CBlockNot::GetBlkValue () const +{ + //Not޿ (YJ0Ah^1AϤ^0) + if (m_pBlkHead->GetBlkValue () < TOLERANCE) + return 1.; + else + return 0.; +} + +int CBlockNot::GetValueFlag () const +{ + if (m_pBlkHead == NULL) //YJIsA^"L" + return NO_VALUE; + else if (m_pBlkHead->GetValueFlag () == NO_VALUE) //YJLȡA^"L" + return NO_VALUE; + else if (m_pBlkHead->GetValueFlag () == COMPUTE_ERROR) //YJp~A^"p~" + return COMPUTE_ERROR; + else if (m_pBlkHead->GetValueFlag () == ANALOG_VALUE) //\J + return COMPUTE_ERROR; + else if (m_pBlkHead->GetValueFlag () == NO_OPER_FLAG) //]wB⤸ + return NO_OPER_FLAG; + else if (m_pBlkHead->GetValueFlag () == DIGITAL_VALUE) //YJƦTAh^ǼƦT + return DIGITAL_VALUE; + else + return NO_VALUE; +} + +void CBlockNot::Move (CPoint ptCursor) +{ + CBlockBasis::Move (ptCursor); + + m_rcPinIn.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinIn.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinIn.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + + +void CBlockNot::Draw (CDC* pDC) +{ + CBrush brushPin (GOLD), * pbrushOld; + pbrushOld = pDC->SelectObject (&brushPin); + pDC->Ellipse (m_rcPinIn); + pDC->Ellipse (m_rcPinOut); + pDC->SelectObject (pbrushOld); + + CBlockBasis::Draw (pDC); + pDC->DrawTextA (_T ("NOT"), -1, &m_rcBlk, DT_SINGLELINE | DT_CENTER | DT_VCENTER); +} + +void CBlockNot::DrawLine (CDC* pDC) +{ + if (m_pBlkHead != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } +} + +int CBlockNot::BlkTypeIs () const +{ + return BLK_NOT; +} \ No newline at end of file diff --git a/TestSimulator/BlockNot.h b/TestSimulator/BlockNot.h new file mode 100644 index 0000000..09f36a6 --- /dev/null +++ b/TestSimulator/BlockNot.h @@ -0,0 +1,47 @@ +#pragma once + +//BlocklOGBlock Not + +#include "BlockBasis.h" + +class CBlockNot : public CBlockBasis +{ +private: + //Block rect(sb@ӿJPinA@ӿXPin) + CRect m_rcPinIn; + CRect m_rcPinOut; + + //s + CBlockBasis* m_pBlkHead; + + //sBlocks + int m_iBlkHeadNum; + +public: + //غcBѺcl + CBlockNot (); + virtual ~CBlockNot (); + + //oB]wrect + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinIn1Rect () const; + virtual CRect GetPinOutRect () const; + + //oB]wsBlock + virtual CBlockBasis* GetBlkHead1Ptr () const; + virtual void SetBlkHead1Ptr (CBlockBasis*); + + //oB]wsBlocks + virtual int GetBlkHead1Num () const; + virtual void SetBlkHead1Num (int) ; + + virtual double GetBlkValue () const; //oBlock + virtual int GetValueFlag () const; //oValueX + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + virtual void DrawLine (CDC*); //øsBlocksu + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/BlockOr.cpp b/TestSimulator/BlockOr.cpp new file mode 100644 index 0000000..675ba06 --- /dev/null +++ b/TestSimulator/BlockOr.cpp @@ -0,0 +1,226 @@ +#include "stdafx.h" + +#include "BlockOr.h" + +#include "math.h" + +#define PIN_RADIUS 8 //Pinb| + +#define GOLD RGB (255, 215, 0) //Pin}C +#define BLACK RGB (0, 0, 0) //suC + +#define NO_VALUE -10 //sbJT +#define NO_OPER_FLAG -11 //sbB⤸ +#define COMPUTE_ERROR -13 //\B +#define NO_BLOCK_HEAD -14 //sbsBlock + +#define TOLERANCE 0.001 //eԻ~t + +#define DIGITAL_VALUE 4 //ƦTflag +#define ANALOG_VALUE 5 //Tflag + +#define BLK_OR 4 //Blocks + +CBlockOr::CBlockOr () +{ + m_rcPinIn1 = CRect (); + m_rcPinIn2 = CRect (); + m_rcPinOut = CRect (); + + m_pBlkHead1 = NULL; + m_pBlkHead2 = NULL; + + m_iBlkHead1Num = NO_BLOCK_HEAD; + m_iBlkHead2Num = NO_BLOCK_HEAD; +} + +CBlockOr::~CBlockOr () +{ +} + +void CBlockOr::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + CBlockBasis::SetBlkRect (ptCenter, iWidth, iHeight); + + m_rcPinIn1.left = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn1.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn1.right = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn1.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinIn2.left = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn2.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn2.right = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn2.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +CRect CBlockOr::GetPinIn1Rect () const +{ + return m_rcPinIn1; +} + +CRect CBlockOr::GetPinIn2Rect () const +{ + return m_rcPinIn2; +} + +CRect CBlockOr::GetPinOutRect () const +{ + return m_rcPinOut; +} + +CBlockBasis* CBlockOr::GetBlkHead1Ptr () const +{ + return m_pBlkHead1; +} + +CBlockBasis* CBlockOr::GetBlkHead2Ptr () const +{ + return m_pBlkHead2; +} + +void CBlockOr::SetBlkHead1Ptr (CBlockBasis* pBlkHead) +{ + m_pBlkHead1 = pBlkHead; +} + +void CBlockOr::SetBlkHead2Ptr (CBlockBasis* pBlkHead) +{ + m_pBlkHead2 = pBlkHead; +} + +int CBlockOr::GetBlkHead1Num () const +{ + return m_iBlkHead1Num; +} + +int CBlockOr::GetBlkHead2Num () const +{ + return m_iBlkHead2Num; +} + +void CBlockOr::SetBlkHead1Num (int iHeadBlkNum) +{ + m_iBlkHead1Num = iHeadBlkNum; +} + +void CBlockOr::SetBlkHead2Num (int iHeadBlkNum) +{ + m_iBlkHead2Num = iHeadBlkNum; +} + +double CBlockOr::GetBlkValue () const +{ + //Or޿ (Y䤤@J1Ah^1A_h^0) + if (abs (m_pBlkHead1->GetBlkValue () - 1) < TOLERANCE || abs (m_pBlkHead2->GetBlkValue () - 1) < TOLERANCE) + return 1.; + else + return 0.; +} + +int CBlockOr::GetValueFlag () const +{ + if (m_pBlkHead1 == NULL || m_pBlkHead2 == NULL) //Ysb@JIsA^"L" + return NO_VALUE; + else if (m_pBlkHead1->GetValueFlag () == NO_VALUE || m_pBlkHead2->GetValueFlag () == NO_VALUE) //Ysb@JLȡA^"L" + return NO_VALUE; + else if (m_pBlkHead1->GetValueFlag () == COMPUTE_ERROR || m_pBlkHead2->GetValueFlag () == COMPUTE_ERROR) //Ysb@Jp~A^"p~" + return COMPUTE_ERROR; + else if (m_pBlkHead1->GetValueFlag () == ANALOG_VALUE || m_pBlkHead2->GetValueFlag () == ANALOG_VALUE) //\J + return COMPUTE_ERROR; + else if (m_pBlkHead1->GetValueFlag () == NO_OPER_FLAG || m_pBlkHead2->GetValueFlag () == NO_OPER_FLAG) //]wB⤸ + return NO_OPER_FLAG; + else if (m_pBlkHead1->GetValueFlag () == DIGITAL_VALUE && m_pBlkHead2->GetValueFlag () == DIGITAL_VALUE) //YJҬƦTAh^ǼƦT + return DIGITAL_VALUE; + else + return NO_VALUE; +} + +void CBlockOr::Move (CPoint ptCursor) +{ + CBlockBasis::Move (ptCursor); + + m_rcPinIn1.left = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn1.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn1.right = m_rcBlk.CenterPoint ().x - int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn1.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinIn2.left = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) - PIN_RADIUS; + m_rcPinIn2.top = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinIn2.right = m_rcBlk.CenterPoint ().x + int (m_rcBlk.Width () / 4) + PIN_RADIUS; + m_rcPinIn2.bottom = m_rcBlk.CenterPoint ().y - int (m_rcBlk.Height () / 2) + PIN_RADIUS; + + m_rcPinOut.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinOut.top = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) - PIN_RADIUS; + m_rcPinOut.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinOut.bottom = m_rcBlk.CenterPoint ().y + int (m_rcBlk.Height () / 2) + PIN_RADIUS; +} + +void CBlockOr::Draw (CDC* pDC) +{ + CBrush brushPin (GOLD), * pbrushOld; + pbrushOld = pDC->SelectObject (&brushPin); + pDC->Ellipse (m_rcPinIn1); + pDC->Ellipse (m_rcPinIn2); + pDC->Ellipse (m_rcPinOut); + pDC->SelectObject (pbrushOld); + + CBlockBasis::Draw (pDC); + pDC->DrawTextA (_T ("OR"), -1, &m_rcBlk, DT_SINGLELINE | DT_CENTER | DT_VCENTER); +} + +void CBlockOr::DrawLine (CDC* pDC) +{ + if (m_pBlkHead1 != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead1->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn1.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } + + if (m_pBlkHead2 != NULL) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + CPoint ptStart = m_pBlkHead2->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn2.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + + pDC->SelectObject (pOldPen); + } +} + +int CBlockOr::BlkTypeIs () const +{ + return BLK_OR; +} \ No newline at end of file diff --git a/TestSimulator/BlockOr.h b/TestSimulator/BlockOr.h new file mode 100644 index 0000000..e4c8554 --- /dev/null +++ b/TestSimulator/BlockOr.h @@ -0,0 +1,55 @@ +#pragma once + +//BlocklOGBlock Or + +#include "BlockBasis.h" + +class CBlockOr : public CBlockBasis +{ +private: + //Block rect(sbӿJPinA@ӿXPin) + CRect m_rcPinIn1; + CRect m_rcPinIn2; + CRect m_rcPinOut; + + //s(sbӳs) + CBlockBasis* m_pBlkHead1; + CBlockBasis* m_pBlkHead2; + + //sBlocks(sbӽs) + int m_iBlkHead1Num; + int m_iBlkHead2Num; + +public: + //غcBѺcl + CBlockOr (); + virtual ~CBlockOr (); + + //oB]wrect + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinIn1Rect () const; + virtual CRect GetPinIn2Rect () const; + virtual CRect GetPinOutRect () const; + + //oB]wsBlock + virtual CBlockBasis* GetBlkHead1Ptr () const; + virtual CBlockBasis* GetBlkHead2Ptr () const; + virtual void SetBlkHead1Ptr (CBlockBasis*); + virtual void SetBlkHead2Ptr (CBlockBasis*); + + //oB]wsBlocks + virtual int GetBlkHead1Num () const; + virtual int GetBlkHead2Num () const; + virtual void SetBlkHead1Num (int) ; + virtual void SetBlkHead2Num (int) ; + + virtual double GetBlkValue () const; //oBlock + virtual int GetValueFlag () const; //oValueX + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + virtual void DrawLine (CDC*); //øsBlocksu + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/BlockOut.cpp b/TestSimulator/BlockOut.cpp new file mode 100644 index 0000000..99a50c3 --- /dev/null +++ b/TestSimulator/BlockOut.cpp @@ -0,0 +1,163 @@ +#include "stdafx.h" + +#include "BlockOut.h" + +#define PIN_RADIUS 8 //Pinb| + +#define GOLD RGB (255, 215, 0) //Pin}C +#define BLACK RGB (0, 0, 0) //suC + +#define NO_VALUE -10 //sbJT +#define NO_BLOCK_HEAD -14 //sbsBlock + +#define BLK_OUT 2 //Blocks + +CBlockOut::CBlockOut () +{ + m_rcPinIn = CRect (); + + m_iBlkHeadSize = (int) m_vcBlkHeadPtr.size (); +} + +CBlockOut::~CBlockOut () +{ +} + +void CBlockOut::SetBlkRect (CPoint ptCenter, int iWidth, int iHeight) +{ + CBlockBasis::SetBlkRect (ptCenter, iWidth, iHeight); + + m_rcPinIn.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinIn.top = m_rcBlk.top - PIN_RADIUS; + m_rcPinIn.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinIn.bottom = m_rcBlk.top + PIN_RADIUS; +} + +CRect CBlockOut::GetPinIn1Rect () const +{ + return m_rcPinIn; +} + +CBlockBasis* CBlockOut::GetBlkHead1Ptr (int iIndex) const +{ + //^ǫwindexs + if (iIndex < m_iBlkHeadSize) + return m_vcBlkHeadPtr[iIndex]; + else + return NULL; +} + +void CBlockOut::SetBlkHead1Ptr (CBlockBasis* pBlkHead) +{ + m_vcBlkHeadPtr.push_back (pBlkHead); //sWs +} + +void CBlockOut::DeleteBlkHead1Ptr (int iIndex) +{ + m_vcBlkHeadPtr.erase (m_vcBlkHeadPtr.begin () + iIndex); //Mwindexs +} + +int CBlockOut::GetBlkHead1Num (int iIndex) const +{ + //^ǫwindexsBlocks + if (iIndex < m_iBlkHeadSize) + return m_vcBlkHeadNum[iIndex]; + else + return NO_BLOCK_HEAD; +} + +void CBlockOut::SetBlkHead1Num (int iHeadBlkNum) +{ + m_vcBlkHeadNum.push_back (iHeadBlkNum); //sWsBlocks +} + +void CBlockOut::ClearBlkHead1Num () +{ + std::vector ().swap (m_vcBlkHeadNum); //Mųssvector +} + +int CBlockOut::GetBlkHeadSize () const +{ + return m_iBlkHeadSize; //^ǿJchannelƥ +} + +void CBlockOut::SetBlkHeadSize (int iFlag) +{ + //]wJchannelƥ + if (iFlag == FALSE) //flagFALSEɡA̳ssvectorjp]w + m_iBlkHeadSize = (int) m_vcBlkHeadNum.size (); + else if (iFlag == TRUE) //flagTRUEɡA̳svectorjp]w + m_iBlkHeadSize = (int) m_vcBlkHeadPtr.size (); +} + +double CBlockOut::GetBlkValue (int iIndex) const +{ + //owchannelBlock + if (!m_vcBlkHeadPtr.empty () && iIndex < m_iBlkHeadSize) + return m_vcBlkHeadPtr[iIndex]->GetBlkValue (); + else + return NO_VALUE; +} + +int CBlockOut::GetValueFlag (int iIndex) const +{ + //owchannelValueX + if (!m_vcBlkHeadPtr.empty () && iIndex < m_iBlkHeadSize) + return m_vcBlkHeadPtr[iIndex]->GetValueFlag (); + else + return NO_VALUE; +} + +void CBlockOut::Move (CPoint ptCursor) +{ + CBlockBasis::Move (ptCursor); + + m_rcPinIn.left = m_rcBlk.CenterPoint ().x - PIN_RADIUS; + m_rcPinIn.top = m_rcBlk.top - PIN_RADIUS; + m_rcPinIn.right = m_rcBlk.CenterPoint ().x + PIN_RADIUS; + m_rcPinIn.bottom = m_rcBlk.top + PIN_RADIUS; +} + +void CBlockOut::Draw (CDC* pDC) +{ + CBrush brushPin (GOLD), * pbrushOld; + pbrushOld = pDC->SelectObject (&brushPin); + pDC->Ellipse (m_rcPinIn); + pDC->SelectObject (pbrushOld); + + CBlockBasis::Draw (pDC); + pDC->DrawTextA (_T ("OUT"), -1, &m_rcBlk, DT_SINGLELINE | DT_CENTER | DT_VCENTER); +} + +void CBlockOut::DrawLine (CDC* pDC) +{ + if (!m_vcBlkHeadPtr.empty ()) + { + CPen penLine (PS_SOLID, 5, BLACK); + CPen* pOldPen; + + pOldPen = pDC->SelectObject (&penLine); + + for (int i = 0; i < m_iBlkHeadSize; i++) + { + CPoint ptStart = m_vcBlkHeadPtr[i]->GetPinOutRect ().CenterPoint (); //su_IJBlockXPin}I + CPoint ptEnd = m_rcPinIn.CenterPoint (); //suIBlockJPin}I + int iGrid = (int) (m_rcBlk.Height () / 2. + 0.5); //Ij + int iCornerGridY = (int) (((ptStart.y + ptEnd.y) / 2. - ptStart.y) / iGrid + 0.5); //psuBZJBlockXӹjI + int iCornerY = iCornerGridY * iGrid + ptStart.y; //suBYyЦm + pDC->MoveTo (ptStart); + pDC->LineTo (CPoint (ptStart.x, iCornerY)); + pDC->MoveTo (CPoint (ptStart.x, iCornerY)); + pDC->LineTo (CPoint (ptEnd.x, iCornerY)); + pDC->MoveTo (CPoint (ptEnd.x, iCornerY)); + pDC->LineTo (ptEnd); + } + + pDC->SelectObject (pOldPen); + } +} + +int CBlockOut::BlkTypeIs () const +{ + return BLK_OUT; +} \ No newline at end of file diff --git a/TestSimulator/BlockOut.h b/TestSimulator/BlockOut.h new file mode 100644 index 0000000..7cc06fb --- /dev/null +++ b/TestSimulator/BlockOut.h @@ -0,0 +1,57 @@ +#pragma once + +//BlocklOGBlock Out + +#include "BlockBasis.h" + +#include + +class CBlockOut : public CBlockBasis +{ +private: + //Block rect(sb@ӿJPin) + CRect m_rcPinIn; + + //svector(sbhӿJchannel) + std::vector m_vcBlkHeadPtr; + + //ssvector(sbhӿJchannel) + std::vector m_vcBlkHeadNum; + + //Jchannelƥ + int m_iBlkHeadSize; + + +public: + //غcBѺcl + CBlockOut (); + virtual ~CBlockOut (); + + //oB]wrect + virtual void SetBlkRect (CPoint, int, int); + virtual CRect GetPinIn1Rect () const; + + //oB]wsBlock + virtual CBlockBasis* GetBlkHead1Ptr (int) const; + virtual void SetBlkHead1Ptr (CBlockBasis*); + virtual void DeleteBlkHead1Ptr (int); + + //oB]wsBlocks + virtual int GetBlkHead1Num (int) const; + virtual void SetBlkHead1Num (int) ; + virtual void ClearBlkHead1Num (); + + //oB]wJchannelƥ + virtual int GetBlkHeadSize () const; + virtual void SetBlkHeadSize (int); + + virtual double GetBlkValue (int) const; //oBlock + virtual int GetValueFlag (int) const; //oValueX + + virtual void Move (CPoint); //Block + virtual void Draw (CDC*); //øsBlock + virtual void DrawLine (CDC*); //øsBlocksu + + //P_Block + virtual int BlkTypeIs () const; +}; \ No newline at end of file diff --git a/TestSimulator/Complex.cpp b/TestSimulator/Complex.cpp new file mode 100644 index 0000000..056155e --- /dev/null +++ b/TestSimulator/Complex.cpp @@ -0,0 +1,51 @@ +#include "stdafx.h" + +#include "Complex.h" + +#include "math.h" + + +CComplex::CComplex () +{ + m_dReal = 0.; + m_dImag = 0.; +} + +CComplex::CComplex (double dReal, double dImag) +{ + m_dReal = dReal; + m_dImag = dImag; +} + +CComplex::~CComplex () +{ +} + +CComplex CComplex::operator+ (const CComplex & complexNumber) +{ + double dTempReal = m_dReal + complexNumber.m_dReal; + double dTempImag = m_dImag + complexNumber.m_dImag; + + return CComplex (dTempReal, dTempImag); +} + +CComplex CComplex::operator- (const CComplex & complexNumber) +{ + double dTempReal = m_dReal - complexNumber.m_dReal; + double dTempImag = m_dImag - complexNumber.m_dImag; + + return CComplex (dTempReal, dTempImag); +} + +CComplex CComplex::operator* (const CComplex & complexNumber) +{ + double dTempReal = m_dReal * complexNumber.m_dReal - m_dImag * complexNumber.m_dImag; + double dTempImag = m_dReal * complexNumber.m_dImag + m_dImag * complexNumber.m_dReal; + + return CComplex (dTempReal, dTempImag); +} + +double CComplex::ComputeAmplitude () const +{ + return sqrt (m_dReal * m_dReal + m_dImag * m_dImag); +} \ No newline at end of file diff --git a/TestSimulator/Complex.h b/TestSimulator/Complex.h new file mode 100644 index 0000000..f970a45 --- /dev/null +++ b/TestSimulator/Complex.h @@ -0,0 +1,22 @@ +#pragma once + +class CComplex +{ +public: + double m_dReal; //Ƽƹ곡 + double m_dImag; //ƼƵ곡 + +public: + //غcBѺcl + CComplex (); + CComplex (double, double); + ~CComplex (); + + //B⤸ + CComplex operator+ (const CComplex &); + CComplex operator- (const CComplex &); + CComplex operator* (const CComplex &); + + //pƼƮTjp + double ComputeAmplitude () const; +}; \ No newline at end of file diff --git a/TestSimulator/FunDlg.cpp b/TestSimulator/FunDlg.cpp new file mode 100644 index 0000000..cbaf2fc --- /dev/null +++ b/TestSimulator/FunDlg.cpp @@ -0,0 +1,113 @@ + +// FunDlg.cpp : @ +// + + +#include "stdafx.h" +#include "TestSimulator.h" +#include "FunDlg.h" +#include "afxdialogex.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + +#define NO_OPER_FLAG -11 //sbB⤸ + +#define PLUS 1 // + flag +#define MINUS 2 // - flag +#define MULTI 3 // * flag +#define DIV 4 // / flag + + +CFunDlg::CFunDlg (CWnd* pParent) + : CDialogEx (CFunDlg::IDD, pParent) +{ + m_hIcon = AfxGetApp ()->LoadIcon (IDR_MAINFRAME); + m_iOperFlag = NO_OPER_FLAG; +} + +CFunDlg::~CFunDlg () +{ +} + + +BEGIN_MESSAGE_MAP (CFunDlg, CDialogEx) + ON_BN_CLICKED(IDC_BUTTON_PLUS, &CFunDlg::OnBnClickedButtonPlus) + ON_BN_CLICKED(IDC_BUTTON_MINUS, &CFunDlg::OnBnClickedButtonMinus) + ON_BN_CLICKED(IDC_BUTTON_MULTI, &CFunDlg::OnBnClickedButtonMulti) + ON_BN_CLICKED(IDC_BUTTON_DIV, &CFunDlg::OnBnClickedButtonDiv) +END_MESSAGE_MAP () + + +void CFunDlg::DoDataExchange (CDataExchange* pDX) +{ + CDialogEx::DoDataExchange (pDX); +} + +BOOL CFunDlg::OnInitDialog () +{ + CDialogEx::OnInitDialog (); + + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetReadOnly (); + + //lƮŪB⤸flagAñNܩEdit + switch (m_iOperFlag) + { + case PLUS: + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("+")); + break; + case MINUS: + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("-")); + break; + case MULTI: + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("*")); + break; + case DIV: + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("/")); + break; + default: + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("Please select operator")); + break; + } + + return TRUE; +} + +int CFunDlg::GetOperFlag () const +{ + return m_iOperFlag; +} + +void CFunDlg::SetOperFlag (int iOperFlag) +{ + m_iOperFlag = iOperFlag; +} + +void CFunDlg::OnBnClickedButtonPlus () +{ + m_iOperFlag = PLUS; //U+]wJiflagPLUS + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("+")); +} + + +void CFunDlg::OnBnClickedButtonMinus () +{ + m_iOperFlag = MINUS; //U-]wJiflagMINUS + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("-")); +} + + +void CFunDlg::OnBnClickedButtonMulti () +{ + m_iOperFlag = MULTI; //U*]wJiflagMULTI + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("*")); +} + + +void CFunDlg::OnBnClickedButtonDiv () +{ + m_iOperFlag = DIV; //U/]wJiflagDIV + ( (CEdit* ) GetDlgItem (IDC_EDIT_OPERATOR))->SetWindowTextA (_T ("/")); +} \ No newline at end of file diff --git a/TestSimulator/FunDlg.h b/TestSimulator/FunDlg.h new file mode 100644 index 0000000..b88c4c3 --- /dev/null +++ b/TestSimulator/FunDlg.h @@ -0,0 +1,41 @@ + +// FunDlg.h : Y +// + +#pragma once + + +// InputDlg ܤ +class CFunDlg: public CDialogEx +{ + // غc +public: + CFunDlg (CWnd* pParent = NULL); // зǫغc禡 + ~CFunDlg (); + +// ܤ + enum { IDD = IDD_DIALOG_FUN }; + +private: + int m_iOperFlag; +protected: + virtual void DoDataExchange (CDataExchange* pDX); // DDX/DDV 䴩 + + // {X@ +protected: + HICON m_hIcon; + + // ͪT禡 + virtual BOOL OnInitDialog (); + DECLARE_MESSAGE_MAP () + +public: + //oB]wB⤸flag + int GetOperFlag () const; + void SetOperFlag (int); + + afx_msg void OnBnClickedButtonPlus (); + afx_msg void OnBnClickedButtonMinus (); + afx_msg void OnBnClickedButtonMulti (); + afx_msg void OnBnClickedButtonDiv (); +}; diff --git a/TestSimulator/Initial.ini b/TestSimulator/Initial.ini new file mode 100644 index 0000000..fcd4e84 --- /dev/null +++ b/TestSimulator/Initial.ini @@ -0,0 +1,6 @@ +[BgParameter] +BgPicBOOL=FALSE +BgPicPath=None +BgColor=65535 +GridBOOL=TRUE +LockBOOL=TRUE diff --git a/TestSimulator/InputDlg.cpp b/TestSimulator/InputDlg.cpp new file mode 100644 index 0000000..ba754b7 --- /dev/null +++ b/TestSimulator/InputDlg.cpp @@ -0,0 +1,107 @@ + +// InputDlg.cpp : @ +// + + +#include "stdafx.h" +#include "TestSimulator.h" +#include "InputDlg.h" +#include "afxdialogex.h" + + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + +#define NO_INPUT_FLAG -12 //sbJi + +#define ZERO 0 //FALSE flag +#define ONE 1 //TRUE flag +#define SIN 2 //Sin flag +#define COS 3 //Cos flag + + +CInputDlg::CInputDlg (CWnd* pParent) + : CDialogEx (CInputDlg::IDD, pParent) +{ + m_hIcon = AfxGetApp ()->LoadIcon (IDR_MAINFRAME); + m_iInputFlag = NO_INPUT_FLAG; //lƿJiflag +} + +CInputDlg::~CInputDlg () +{ +} + +BEGIN_MESSAGE_MAP (CInputDlg, CDialogEx) + ON_BN_CLICKED(IDC_BUTTON_TRUE, &CInputDlg::OnBnClickedButtonTrue) + ON_BN_CLICKED(IDC_BUTTON_FALSE, &CInputDlg::OnBnClickedButtonFalse) + ON_BN_CLICKED(IDC_BUTTON_SIN, &CInputDlg::OnBnClickedButtonSin) + ON_BN_CLICKED(IDC_BUTTON_COS, &CInputDlg::OnBnClickedButtonCos) +END_MESSAGE_MAP () + +void CInputDlg::DoDataExchange (CDataExchange* pDX) +{ + CDialogEx::DoDataExchange (pDX); +} + +BOOL CInputDlg::OnInitDialog () +{ + CDialogEx::OnInitDialog (); + + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetReadOnly (); + + //lƮŪJiflagAñNܩEdit + switch (m_iInputFlag) + { + case ZERO: + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("False")); + break; + case ONE: + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("True")); + break; + case SIN: + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("Sin (t)")); + break; + case COS: + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("Cos (t)")); + break; + default: + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("Please select input")); + } + + return TRUE; +} + +int CInputDlg::GetInputFlag () const +{ + return m_iInputFlag; +} + +void CInputDlg::SetInputFlag (int iInputFlag) +{ + m_iInputFlag = iInputFlag; +} + +void CInputDlg::OnBnClickedButtonTrue () +{ + m_iInputFlag = ONE; //UTrue]wJiflagONE + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("True")); +} + +void CInputDlg::OnBnClickedButtonFalse () +{ + m_iInputFlag = ZERO; //UFalse]wJiflagZERO + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("False")); +} + +void CInputDlg::OnBnClickedButtonSin () +{ + m_iInputFlag = SIN; //USin]wJiflagSIN + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("Sin (t)")); +} + +void CInputDlg::OnBnClickedButtonCos () +{ + m_iInputFlag = COS; //UCos]wJiflagCOS + ( (CEdit*) GetDlgItem (IDC_EDIT_INPUT_VALUE))->SetWindowTextA (_T ("Cos (t)")); +} \ No newline at end of file diff --git a/TestSimulator/InputDlg.h b/TestSimulator/InputDlg.h new file mode 100644 index 0000000..d48e689 --- /dev/null +++ b/TestSimulator/InputDlg.h @@ -0,0 +1,42 @@ + +// InputDlg.h : Y +// + +#pragma once + + +// InputDlg ܤ +class CInputDlg : public CDialogEx +{ + // غc +public: + CInputDlg (CWnd* pParent = NULL); // зǫغc禡 + virtual ~CInputDlg (); + +// ܤ + enum { IDD = IDD_DIALOG_INPUT }; + +private: + int m_iInputFlag; + +protected: + virtual void DoDataExchange (CDataExchange* pDX); // DDX/DDV 䴩 + + // {X@ +protected: + HICON m_hIcon; + + // ͪT禡 + virtual BOOL OnInitDialog (); + DECLARE_MESSAGE_MAP () + +public: + //oB]wJiflag + int GetInputFlag () const; + void SetInputFlag (int); + + afx_msg void OnBnClickedButtonTrue(); + afx_msg void OnBnClickedButtonFalse(); + afx_msg void OnBnClickedButtonSin(); + afx_msg void OnBnClickedButtonCos(); +}; diff --git a/TestSimulator/OscDlg.cpp b/TestSimulator/OscDlg.cpp new file mode 100644 index 0000000..1a1ad48 --- /dev/null +++ b/TestSimulator/OscDlg.cpp @@ -0,0 +1,434 @@ + +// OscDlg.cpp : @ +// + +#include "stdafx.h" +#include "TestSimulator.h" +#include "OscDlg.h" +#include "afxdialogex.h" + +#include "TestSimulatorDlg.h" + +#include +#include + +//#include +//using namespace std; + +//u@ϰѼ +#define WORK_LEFT 0 +#define WORK_TOP 0 +#define WORK_RIGHT 500 +#define WORK_BOTTOM 500 + +#define BLACK RGB (0, 0, 0) //IC +#define BLUE RGB (0, 0, 255) //C +#define WHITE RGB (255, 255, 255) //y = 0uC +#define YELLOW RGB (255, 255, 0) //Zu@ӳ쪺uC +#define RED RGB (255, 0, 0) //Zuӳ쪺uC +#define GOLD RGB (255, 215, 0) //outputiC + +#define GRID 10 +#define UNITY 100 + +#define MAX_PLOT_NUM 501 //̤jøsdata +#define OFFSET_Y 250 //ܲyХWIAFøøsܪiAGøϮɻݼW[@Ӱq(0, 0)ܪiϥI + + +// COscDlg ܤ + +COscDlg::COscDlg (CWnd* pParent /*=NULL*/) + : CDialogEx(COscDlg::IDD, pParent) +{ + m_hIcon = AfxGetApp ()->LoadIcon (IDR_MAINFRAME); + + m_pSimulatorDlg = (CTestSimulatorDlg*) pParent; + + m_rcWork.SetRect (WORK_LEFT, WORK_TOP, WORK_RIGHT, WORK_BOTTOM); + + m_dTime = 0.; + m_dSlctOutputValue = 0.; + m_dMaxDataValue = 0.; + m_dFreq = 0.; + + m_iOutputSize = 0; + m_iSlctOutputNum = 0; + m_dYInterval = 0; + m_iXInterval = 0; + m_iYPos = 0; + m_iXPos = 0; + + m_bSim = FALSE; + m_bModify = TRUE; + m_bFFT = TRUE; +} + +COscDlg::~COscDlg () +{ + if (!m_deqPenPtr.empty ()) + { + int iSize = (int) m_deqPenPtr.size (); + for (int i = 0; i < iSize; i++) + delete m_deqPenPtr[i]; + } +} + +void COscDlg::DoDataExchange (CDataExchange* pDX) +{ + CDialogEx::DoDataExchange (pDX); + DDX_Text (pDX, IDC_EDIT_TIME, m_dTime); + DDX_Text (pDX, IDC_EDIT_VALUE, m_dSlctOutputValue); + DDX_Control (pDX, IDC_COMBO_OUTPUT, m_ctrlComboOutput); + DDX_Control (pDX, IDC_COMBO_VALUE_INTERVAL, m_ctrlComboYInterval); + DDX_Control (pDX, IDC_COMBO_TIME_INTERVAL, m_ctrlComboXInterval); + DDX_Text (pDX, IDC_EDIT_FREQUENCY, m_dFreq); +} + + +BEGIN_MESSAGE_MAP (COscDlg, CDialogEx) + ON_WM_CLOSE() + ON_WM_PAINT() + ON_BN_CLICKED(IDC_BUTTON_START, &COscDlg::OnBnClickedButtonStart) + ON_BN_CLICKED(IDC_BUTTON_STOP, &COscDlg::OnBnClickedButtonStop) + ON_CBN_SELCHANGE(IDC_COMBO_OUTPUT, &COscDlg::OnCbnSelchangeComboOutput) + ON_CBN_SELCHANGE(IDC_COMBO_VALUE_INTERVAL, &COscDlg::OnCbnSelchangeComboValueInterval) + ON_CBN_SELCHANGE(IDC_COMBO_TIME_INTERVAL, &COscDlg::OnCbnSelchangeComboTimeInterval) +END_MESSAGE_MAP () + + +// COscDlg TBz` + +BOOL COscDlg::OnInitDialog () +{ + CDialogEx::OnInitDialog(); + + //]wüƺؤl + srand ((unsigned int) time (NULL)); + + //]wYbjCombo boxe + for (int i = 0; i < 4; i++) + { + CString strYInterval; + double dInterval = 0.5; + for (int j = 0 ; j < i; j++) + dInterval *= 2; + strYInterval.Format (_T ("%g"), dInterval); + m_ctrlComboYInterval.AddString (strYInterval); + } + + //lYbj + m_ctrlComboYInterval.SetCurSel (0); + m_dYInterval = 0.5; + m_iYPos = 0; + m_dMaxDataValue = m_dYInterval * 2.5; + + + //]wXbjCombo boxe + m_ctrlComboXInterval.AddString (_T ("5")); + m_ctrlComboXInterval.AddString (_T ("10")); + m_ctrlComboXInterval.AddString (_T ("50")); + m_ctrlComboXInterval.AddString (_T ("100")); + m_ctrlComboXInterval.AddString (_T ("500")); + + //lXbj + m_ctrlComboXInterval.SetCurSel (0); + m_iXInterval = 5; + m_iXPos = 0; + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX ݩʭǦ^ FALSE +} + + +void COscDlg::OnPaint () +{ + //wīإ + CPaintDC dcOsc (this); //ܪiܲdc + CDC dcMem; //sdc + CBitmap bitmapMem; + CBitmap* pOldBitmap; + + dcMem.CreateCompatibleDC (&dcOsc); //إ߻Pܪiܲۮedc + bitmapMem.CreateCompatibleBitmap (&dcOsc, WORK_RIGHT, WORK_BOTTOM); + pOldBitmap = dcMem.SelectObject (&bitmapMem); + + //øsI + dcMem.SetBkMode (TRANSPARENT); + dcMem.FillSolidRect (m_rcWork, BLACK); + + //ŦAC 10 pixels + CPen penBlue (PS_SOLID, 1, BLUE); + CPen* pOldPen = dcMem.SelectObject (&penBlue); + + for (int i = 0; i < m_rcWork.Width (); i += GRID) + { + dcMem.MoveTo (i, 0); //u + dcMem.LineTo (i, m_rcWork.Height ()); + dcMem.MoveTo (0, i); //u + dcMem.LineTo (m_rcWork.Width (), i); + } + + //øsܪiu(Xb) + CPen penWhite (PS_SOLID, 2, WHITE); + CString strValueZero ("Value = 0"); + dcMem.SelectObject (&penWhite); + SetTextColor (dcMem, WHITE); + + dcMem.MoveTo (0, m_rcWork.Height () / 2); + dcMem.LineTo (m_rcWork.Width (), m_rcWork.Height () / 2); //eu + dcMem.TextOutA (0, m_rcWork.Height () / 2, strValueZero, strValueZero.GetLength ()); //аOr + + + //Zu@UNITY (@UNITY 100 piexls) + CPen penYellow (PS_SOLID, 1, YELLOW); + CString strValueNOne; + strValueNOne.Format (_T ("Value = %g"), -m_dYInterval); + CString strValuePOne; + strValuePOne.Format (_T ("Value = %g"), m_dYInterval); + dcMem.SelectObject (&penYellow); + SetTextColor (dcMem, YELLOW); + + dcMem.MoveTo (0, m_rcWork.Height () / 2 + UNITY); + dcMem.LineTo (m_rcWork.Width (), m_rcWork.Height () / 2 + UNITY); + dcMem.TextOutA (0, m_rcWork.Height () / 2 + UNITY, strValueNOne, strValueNOne.GetLength ()); + + dcMem.MoveTo (0, m_rcWork.Height () / 2 - UNITY); + dcMem.LineTo (m_rcWork.Width (), m_rcWork.Height () / 2 - UNITY); + dcMem.TextOutA (0, m_rcWork.Height () / 2 - UNITY, strValuePOne, strValuePOne.GetLength ()); + + + //ZuUNITY (@UNITY 100 piexls) + CPen penRed (PS_SOLID, 2, RED); + CString strValueNTwo; + strValueNTwo.Format (_T ("Value = %g"), -2 * m_dYInterval); + CString strValuePTwo; + strValuePTwo.Format (_T ("Value = %g"), 2 * m_dYInterval); + dcMem.SelectObject (&penRed); + SetTextColor (dcMem, RED); + + dcMem.MoveTo (0, m_rcWork.Height () / 2 + (2 * UNITY)); + dcMem.LineTo (m_rcWork.Width (), m_rcWork.Height () / 2 + (2 * UNITY)); + dcMem.TextOutA (0, m_rcWork.Height () / 2 + (2 * UNITY), strValueNTwo, strValueNTwo.GetLength ()); + + dcMem.MoveTo (0, m_rcWork.Height () / 2 - (2 * UNITY)); + dcMem.LineTo (m_rcWork.Width (), m_rcWork.Height () / 2 - (2 * UNITY)); + dcMem.TextOutA (0, m_rcWork.Height () / 2 - (2 * UNITY), strValuePTwo, strValuePTwo.GetLength ()); + + + //}l + if (m_bSim) + { + CPen penGold (PS_SOLID, 6, GOLD); + + int iDataSize = (int) m_pSimulatorDlg->m_deq2DOutputValue.size (); //odataƥ + + //dataƤj1A}løsoutputi + if (iDataSize > 1) + { + int iPlotStart = 0; //øsdata_I + if (iDataSize > MAX_PLOT_NUM) + iPlotStart = iDataSize - MAX_PLOT_NUM; + + for (int i = 0; i < m_iOutputSize; i++) + { + //]woutputeʪe + if (m_iSlctOutputNum >= 0 && i == m_iSlctOutputNum) + dcMem.SelectObject (&penGold); + else + dcMem.SelectObject (m_deqPenPtr[i]); + + for (int j = 1; j < iDataSize; j++) + { + //WXiøsdataơAhߧYXj + if (j >= MAX_PLOT_NUM) + break; + + double dForwardValue = m_pSimulatorDlg->m_deq2DOutputValue[j - 1 + iPlotStart][i]; + double dPostValue = m_pSimulatorDlg->m_deq2DOutputValue[j + iPlotStart][i]; + + //P_dataȬO_WXܪiiܤ̤j + if (dForwardValue > m_dMaxDataValue) + dForwardValue = m_dMaxDataValue; + else if (dForwardValue < -m_dMaxDataValue) + dForwardValue = -m_dMaxDataValue; + + if (dPostValue > m_dMaxDataValue) + dPostValue = m_dMaxDataValue; + else if (dPostValue < -m_dMaxDataValue) + dPostValue = -m_dMaxDataValue; + + dcMem.MoveTo (j - 1, -(int) (dForwardValue / m_dYInterval * UNITY) + OFFSET_Y); + dcMem.LineTo (j, -(int) (dPostValue / m_dYInterval * UNITY) + OFFSET_Y); + } + } + } + } + + //Ѥsdcܥܪiܲdc + dcOsc.BitBlt (WORK_LEFT, WORK_TOP, m_rcWork.Width (), m_rcWork.Height (), &dcMem, WORK_LEFT, WORK_TOP, SRCCOPY); + + //Mz + dcMem.SelectObject (pOldPen); + dcMem.SelectObject (pOldBitmap); + bitmapMem.DeleteObject (); + dcMem.DeleteDC (); +} + +//ѥDܲǭ(eɶ, output value, Wv) +void COscDlg::SetData (double dTime, double dValue, double dFreq) +{ + m_dTime = dTime; + m_dSlctOutputValue = dValue; + m_dFreq = dFreq; +} + +// ѥDܲǭ(eɶ, output value) +void COscDlg::SetData (double dTime, double dValue) +{ + m_dTime = dTime; + m_dSlctOutputValue = dValue; +} + +//UStart +void COscDlg::OnBnClickedButtonStart () +{ + if (!m_bSim) + { + m_bModify = FALSE; //}liXbjCombo box + m_bSim = TRUE; + m_pSimulatorDlg->SetTimer (0, 10, NULL); + } +} + +//UStop +void COscDlg::OnBnClickedButtonStop () +{ + if (m_bSim) + { + m_bSim = FALSE; + m_pSimulatorDlg->KillTimer (0); + } +} + +//output combo box +void COscDlg::OnCbnSelchangeComboOutput () +{ + m_iSlctOutputNum = m_ctrlComboOutput.GetCurSel (); + m_bFFT = TRUE; +} + +//Ybj combo box +void COscDlg::OnCbnSelchangeComboValueInterval () +{ + m_iYPos = m_ctrlComboYInterval.GetCurSel (); + double dIni = 0.5; + for (int i = 0; i < m_iYPos; i++) + dIni *= 2; + m_dYInterval = dIni; + m_dMaxDataValue = 2.5 * m_dYInterval; + + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//Xbj combo box +void COscDlg::OnCbnSelchangeComboTimeInterval () +{ + if (m_bModify && (!m_bSim)) + { + m_iXPos = m_ctrlComboXInterval.GetCurSel (); + switch (m_iXPos) + { + case 0: + m_iXInterval = 5; + break; + case 1: + m_iXInterval = 10; + break; + case 2: + m_iXInterval = 50; + break; + case 3: + m_iXInterval = 100; + break; + case 4: + m_iXInterval = 500; + break; + default: + break; + } + } + else + m_ctrlComboXInterval.SetCurSel (m_iXPos); +} + +BOOL COscDlg::PreTranslateMessage(MSG* pMsg) +{ + if (pMsg->message == WM_KEYDOWN) + { + if (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_RETURN) + return TRUE; + } + + return CDialogEx::PreTranslateMessage(pMsg); +} + + +// +void COscDlg::OnClose () +{ + //MHedeque + if (!m_deqPenPtr.empty ()) + { + for (int i = 0; i < m_iOutputSize; i++) + delete m_deqPenPtr[i]; + } + + m_pSimulatorDlg->m_bSimulate = FALSE; // + m_deqPenPtr.clear (); + m_ctrlComboOutput.ResetContent (); //Moutput combo boxe + m_bSim = FALSE; // + m_bModify = TRUE; //icombo box + m_bFFT = TRUE; + m_iSlctOutputNum = 0; + m_dTime = 0.; + m_dSlctOutputValue = 0.; + m_dFreq = 0.; + m_pSimulatorDlg->m_iStep = 0; + m_pSimulatorDlg->KillTimer (0); + + CDialogEx::OnClose (); +} + +//]wchannelƥ +void COscDlg::SetOutputSize (int iOutSize) +{ + m_iOutputSize = iOutSize; +} + +//lƥܪiܲ(channelƥ, He) +void COscDlg::InitialData () +{ + //]woutput combo boxe + for (int i = 0; i < m_iOutputSize; i++) + { + CString strOutput; + strOutput.Format (_T ("Output %d"), i + 1); + m_ctrlComboOutput.AddString (strOutput); + } + + //إHe + for (int i = 0; i < m_iOutputSize; i++) + { + CPen* pRandPen = new CPen (PS_SOLID, 3, RGB (rand () % 256, rand () % 256, rand () % 256)); + m_deqPenPtr.push_back (pRandPen); + } + + m_ctrlComboOutput.SetCurSel (0); +} + +//oɶj +int COscDlg::GetTimeInterval () const +{ + return m_iXInterval; +} \ No newline at end of file diff --git a/TestSimulator/OscDlg.h b/TestSimulator/OscDlg.h new file mode 100644 index 0000000..361651f --- /dev/null +++ b/TestSimulator/OscDlg.h @@ -0,0 +1,72 @@ + +// OscDlg.h : Y +// + +#pragma once + +#include "afxwin.h" +#include + +class CTestSimulatorDlg; + +// COscDlg ܤ + +class COscDlg : public CDialogEx +{ +public: + COscDlg (CWnd* pParent = NULL); // зǫغc禡 + virtual ~COscDlg (); + +// ܤ + enum { IDD = IDD_DIALOG_OSC }; + +private: + CTestSimulatorDlg* m_pSimulatorDlg; //Dܲ + + CComboBox m_ctrlComboOutput; //Output combo boxܼ + CComboBox m_ctrlComboYInterval; //Ybj combo boxܼ + CComboBox m_ctrlComboXInterval; //Xbj combo boxܼ + + std::deque m_deqPenPtr; //Hedeque + + double m_dTime; //ɶ + double m_dSlctOutputValue; //output value + double m_dMaxDataValue; //ܪi̤ܳj + double m_dFreq; //Wv + + int m_iOutputSize; //channelƥ + double m_dYInterval; //Ybj + int m_iXInterval; //Xbj + int m_iYPos; //Ybj combo boxm + int m_iXPos; //Xbj combo boxm + +protected: + HICON m_hIcon; + + virtual void DoDataExchange (CDataExchange* pDX); // DDX/DDV 䴩 + + DECLARE_MESSAGE_MAP () +public: + CRect m_rcWork; //ܪiܲu@ + + int m_iSlctOutputNum; //outputs + + BOOL m_bSim; //P_ + BOOL m_bModify; //P_combo box + BOOL m_bFFT; //P_iFFT + + virtual BOOL OnInitDialog (); + afx_msg void OnPaint (); + afx_msg void OnBnClickedButtonStart (); + afx_msg void OnBnClickedButtonStop (); + afx_msg void OnCbnSelchangeComboOutput (); + afx_msg void OnCbnSelchangeComboValueInterval (); + afx_msg void OnCbnSelchangeComboTimeInterval (); + virtual BOOL PreTranslateMessage (MSG* pMsg); + afx_msg void OnClose (); + void SetData (double, double, double); + void SetData (double, double); + void SetOutputSize (int); + void InitialData (); + int GetTimeInterval () const; +}; diff --git a/TestSimulator/TestSimulator.cpp b/TestSimulator/TestSimulator.cpp new file mode 100644 index 0000000..3b30a62 --- /dev/null +++ b/TestSimulator/TestSimulator.cpp @@ -0,0 +1,102 @@ + +// TestSimulator.cpp : wqε{O欰C +// + +#include "stdafx.h" +#include "TestSimulator.h" +#include "TestSimulatorDlg.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// CTestSimulatorApp + +BEGIN_MESSAGE_MAP(CTestSimulatorApp, CWinApp) + ON_COMMAND(ID_HELP, &CWinApp::OnHelp) +END_MESSAGE_MAP() + + +// CTestSimulatorApp غc + +CTestSimulatorApp::CTestSimulatorApp() +{ + // 䴩sҰʺ޲z + m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; + + // TODO: b[Jغc{XA + // NҦnl]w[J InitInstance +} + + +// Ȧ@ CTestSimulatorApp + +CTestSimulatorApp theApp; + + +// CTestSimulatorApp l]w + +BOOL CTestSimulatorApp::InitInstance() +{ + // pε{TMwϥ ComCtl32.dll 6 (t) H᪩A + // ӱҰʵıƼ˦Ab Windows XP WAhݭn InitCommonControls()C + // _hإ߳NѡC + INITCOMMONCONTROLSEX InitCtrls; + InitCtrls.dwSize = sizeof(InitCtrls); + // ]wn]tҦzQnΩε{ + // qαOC + InitCtrls.dwICC = ICC_WIN95_CLASSES; + InitCommonControlsEx(&InitCtrls); + + CWinApp::InitInstance(); + + + AfxEnableControlContainer(); + + // إߴ߼h޲zAHܤ]t + // ߼h˵δ߼hM˵C + CShellManager *pShellManager = new CShellManager; + + // Ұ [Windows ] ıƺ޲ziҥ MFC DD + CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); + + // зǪl]w + // pGzϥγoǥ\åBQ + // ̫᧹iɤjpAziH + // qUC{XݭnlƱ`A + // ܧxs]wȪnX + // TODO: zӾA׭ק惡r + // (ҦpAqW٩β´W) + SetRegistryKey(_T(" AppWizard Ҳͪε{")); + + CTestSimulatorDlg dlg; + m_pMainWnd = &dlg; + INT_PTR nResponse = dlg.DoModal(); + if (nResponse == IDOK) + { + // TODO: bmϥ [Tw] Ӱϥιܤ + // Bz{X + } + else if (nResponse == IDCANCEL) + { + // TODO: bmϥ [] Ӱϥιܤ + // Bz{X + } + else if (nResponse == -1) + { + TRACE(traceAppMsg, 0, "ĵi: ܤإߥѡA]Aε{N~פC\n"); + TRACE(traceAppMsg, 0, "ĵi: pGznbܤWϥ MFC AhLk #define _AFX_NO_MFC_CONTROLS_IN_DIALOGSC\n"); + } + + // RWҫإߪ߼h޲zC + if (pShellManager != NULL) + { + delete pShellManager; + } + + // ]wgܤAǦ^ FALSEAҥHڭ̷|ε{A + // ӫDܶ}lε{TC + return FALSE; +} + diff --git a/TestSimulator/TestSimulator.h b/TestSimulator/TestSimulator.h new file mode 100644 index 0000000..5989cd0 --- /dev/null +++ b/TestSimulator/TestSimulator.h @@ -0,0 +1,32 @@ + +// TestSimulator.h : PROJECT_NAME ε{DnY +// + +#pragma once + +#ifndef __AFXWIN_H__ + #error " PCH ]tɮ׫e]t 'stdafx.h'" +#endif + +#include "resource.h" // DnŸ + + +// CTestSimulatorApp: +// аѾ\@O TestSimulator.cpp +// + +class CTestSimulatorApp : public CWinApp +{ +public: + CTestSimulatorApp(); + +// мg +public: + virtual BOOL InitInstance(); + +// {X@ + + DECLARE_MESSAGE_MAP() +}; + +extern CTestSimulatorApp theApp; \ No newline at end of file diff --git a/TestSimulator/TestSimulator.rc b/TestSimulator/TestSimulator.rc new file mode 100644 index 0000000000000000000000000000000000000000..54c9859692662a555ab776f4ff6125e7905a57a4 GIT binary patch literal 18538 zcmd^{&u?5;700jGAgXo?VmC~rDxq%Tu^lHt2x^aiG^*`!J!7|l2rG5s5bD^$c0y7C zs!%01m8eu&P&X{u@dqF_tk|$*344~T5F2Q}pL=}r-ko{x&5Xy5U7?ZvJn!9m&$;KG z^F2TAeg5=+m%^n`3(MhN*b4h$FC6G+I~?lXhVC7Nhv8P((YI!JNuOG{8}5W%{p{=h zp{}=eZ(mpXJ=9-Y`n#rYjCLajIF z&&77zu^(g4gw@avov+YQXU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ulator/TestSimulator.vcxproj b/TestSimulator/TestSimulator.vcxproj new file mode 100644 index 0000000..34ed872 --- /dev/null +++ b/TestSimulator/TestSimulator.vcxproj @@ -0,0 +1,163 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {C1F3E95D-9580-4550-A748-674E1D31DF84} + TestSimulator + MFCProj + 8.1 + + + + Application + true + v110 + MultiByte + Static + + + Application + false + v140 + true + MultiByte + Static + + + + + + + + + + + + + true + true + + + false + + + + Use + Level3 + Disabled + WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) + true + + + Windows + true + + + false + true + _DEBUG;%(PreprocessorDefinitions) + + + 0x0404 + _DEBUG;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + + + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) + true + + + Windows + true + true + true + + + false + true + NDEBUG;%(PreprocessorDefinitions) + + + 0x0404 + NDEBUG;%(PreprocessorDefinitions) + $(IntDir);%(AdditionalIncludeDirectories) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/TestSimulator/TestSimulator.vcxproj.filters b/TestSimulator/TestSimulator.vcxproj.filters new file mode 100644 index 0000000..8e65d90 --- /dev/null +++ b/TestSimulator/TestSimulator.vcxproj.filters @@ -0,0 +1,129 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + 標頭檔 + + + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + 原始程式檔 + + + + + 資源檔 + + + + + 資源檔 + + + + + 資源檔 + + + \ No newline at end of file diff --git a/TestSimulator/TestSimulator.vcxproj.user b/TestSimulator/TestSimulator.vcxproj.user new file mode 100644 index 0000000..deea718 --- /dev/null +++ b/TestSimulator/TestSimulator.vcxproj.user @@ -0,0 +1,7 @@ + + + + $(TargetPath) + WindowsLocalDebugger + + \ No newline at end of file diff --git a/TestSimulator/TestSimulatorDlg.cpp b/TestSimulator/TestSimulatorDlg.cpp new file mode 100644 index 0000000..6147074 --- /dev/null +++ b/TestSimulator/TestSimulatorDlg.cpp @@ -0,0 +1,1582 @@ + +// TestSimulatorDlg.cpp : @ +// + + +#include "stdafx.h" +#include "TestSimulator.h" +#include "TestSimulatorDlg.h" +#include "afxdialogex.h" + +#define _USE_MATH_DEFINES +#include "math.h" + +//#include +//using namespace std; + +#define WIN_WIDTH 1316 //ܲȤϼe +#define WIN_HEIGHT 559 //ܲȤϰ +#define GRID_R 1 //@Ib|jp +#define MAX_STR_LEN 100 //̤jr (ΩŪini) + +#define WHITE RGB (255, 255, 255) //u@ϭIw]C +#define GRAY RGB (240, 240, 240) //IC +#define LIGHT_BLUE RGB (176, 224, 230) //BlockC +#define RED RGB (255, 0, 0) //BlockC +#define BLACK RGB (0, 0, 0) //suC + +#define MARK_FONTSIZE 120 //ҦMarkrjp +#define MARK_WIDTH 90 //Markϰe +#define MARK_LOCK_WIDTH 60 //Lock Markϰe +#define MARK_HEIGHT 40 //Markϰ찪 + +#define NO_VALUE -10 //sbJT +#define NO_OPER_FLAG -11 //sbB⤸ +#define NO_INPUT_FLAG -12 //sbJi +#define COMPUTE_ERROR -13 //\B +#define NO_BLOCK_HEAD -14 //sbsBlock +#define NO_SEL_NUM -15 //sbBlocks + +#define NO_BLK_TYPE 0 //Blockݩ{type +#define BLK_IN 1 //BlockIN +#define BLK_OUT 2 //BlockOUT +#define BLK_AND 3 //BlockAND +#define BLK_OR 4 //BlockOR +#define BLK_NOT 5 //BlockNOT +#define BLK_FUN 6 //BlockFUN + +#define ZERO 0 //FALSE flag +#define ONE 1 //TRUE flag +#define SIN 2 //Sin flag +#define COS 3 //Cos flag + +#define MSEC 0.001 //millisecond +#define MAX_DATA_NUM 512 //̤jxsdataƥ (2) + + +#ifdef _DEBUG +#define new DEBUG_NEW +#endif + + +// App About ϥ CAboutDlg ܤ + +class CAboutDlg : public CDialogEx +{ +public: + CAboutDlg(); + +// ܤ + enum { IDD = IDD_ABOUTBOX }; + + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 䴩 + +// {X@ +protected: + DECLARE_MESSAGE_MAP() +}; + +CAboutDlg::CAboutDlg() : CDialogEx(CAboutDlg::IDD) +{ +} + +void CAboutDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialogEx::DoDataExchange(pDX); +} + +BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx) +END_MESSAGE_MAP() + + +// CTestSimulatorDlg ܤ + + + +CTestSimulatorDlg::CTestSimulatorDlg(CWnd* pParent /*=NULL*/) + : CDialogEx(CTestSimulatorDlg::IDD, pParent) +{ + m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); + + m_rcWork.SetRect (0, 0, 0, 0); + m_rcClient.SetRect(0, 0, 0, 0); + m_ptLEnd.SetPoint (0, 0); + m_pOscDlg = NULL; + m_pOldBitmap = NULL; + m_clrBg = WHITE; + + m_bInitDlg = FALSE; + m_bSelectBlk = FALSE; + m_bMoveBlk = FALSE; + m_bLineMode = FALSE; + m_bConnect = FALSE; + m_bDelBlk = FALSE; + m_bSimulate = FALSE; + m_bBgPic = FALSE; + m_bGrid = FALSE; + m_bLock = FALSE; + + m_iWorkLeft = 150; + m_iWorkTop = 10; + m_iWorkRight = 1150; + m_iWorkBottom = 510; + m_iBlkWidth = 100; + m_iBlkHeight = 50; + m_iGridX = (int) (m_iBlkWidth / 4.); + m_iGridY = (int) (m_iBlkHeight / 2.); + m_iContainerSize = 0; + m_iSlctBlkNum = 0; + m_iHeadBlkNum = 0; + m_iSimBlkNum = 0; + m_iOutSize = 0; + + m_iStep = 0; +} + +void CTestSimulatorDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialogEx::DoDataExchange(pDX); +} + +BEGIN_MESSAGE_MAP(CTestSimulatorDlg, CDialogEx) + ON_WM_SYSCOMMAND() + ON_WM_PAINT() + ON_WM_QUERYDRAGICON() + ON_WM_TIMER() + ON_WM_SIZE() + ON_WM_LBUTTONDOWN() + ON_WM_MOUSEMOVE() + ON_WM_LBUTTONUP() + ON_WM_LBUTTONDBLCLK() + ON_WM_DESTROY() + ON_BN_CLICKED(IDC_BUTTON_IN, &CTestSimulatorDlg::OnBnClickedButtonIn) + ON_BN_CLICKED(IDC_BUTTON_OUT, &CTestSimulatorDlg::OnBnClickedButtonOut) + ON_BN_CLICKED(IDC_BUTTON_LINE, &CTestSimulatorDlg::OnBnClickedButtonLine) + ON_BN_CLICKED(IDC_BUTTON_AND, &CTestSimulatorDlg::OnBnClickedButtonAnd) + ON_BN_CLICKED(IDC_BUTTON_OR, &CTestSimulatorDlg::OnBnClickedButtonOr) + ON_BN_CLICKED(IDC_BUTTON_NOT, &CTestSimulatorDlg::OnBnClickedButtonNot) + ON_BN_CLICKED(IDC_BUTTON_FUNCTION, &CTestSimulatorDlg::OnBnClickedButtonFunction) + ON_BN_CLICKED(IDC_BUTTON_SIMULATE, &CTestSimulatorDlg::OnBnClickedButtonSimulate) + ON_BN_CLICKED(IDC_BUTTON_BGCOLOR, &CTestSimulatorDlg::OnBnClickedButtonBgcolor) + ON_BN_CLICKED(IDC_BUTTON_BGPIC, &CTestSimulatorDlg::OnBnClickedButtonBgpic) + ON_BN_CLICKED(IDC_BUTTON_OPEN, &CTestSimulatorDlg::OnBnClickedButtonOpen) + ON_BN_CLICKED(IDC_BUTTON_SAVE, &CTestSimulatorDlg::OnBnClickedButtonSave) + ON_BN_CLICKED(IDC_BUTTON_GRID, &CTestSimulatorDlg::OnBnClickedButtonGrid) + ON_BN_CLICKED(IDC_BUTTON_LOCK, &CTestSimulatorDlg::OnBnClickedButtonLock) +END_MESSAGE_MAP() + + +// CTestSimulatorDlg TBz` + +BOOL CTestSimulatorDlg::OnInitDialog() +{ + this->SetWindowPos (NULL, 0, 0, WIN_WIDTH, WIN_HEIGHT, SWP_NOZORDER | SWP_NOMOVE); //]wܲȤϰ + m_rcWork.SetRect (m_iWorkLeft, m_iWorkTop, m_iWorkRight, m_iWorkBottom); //]wu@ϰ + this->GetClientRect (&m_rcClient); //ŪܲȤϰ + m_dcBgPic.CreateCompatibleDC (NULL); //إ߻PܲۮedcAHJIϤ + + CString strIniPath (_T (".\\Initial.ini")); //.ini| + CString strAppName (_T ("BgParameter")); //.ini[`W] + + CString strBgPicBOOL; //xsIϤLȪr + CString strBgPicPath; //xsIϤ|r + CString strBgColor; //xsICȪr + CString strGridBOOL; //xsILȪr + CString strLockBOOL; //xswLȪr + + CString strKeyName (_T ("BgPicBOOL")); //.iniܼƦW + GetPrivateProfileString (strAppName, strKeyName, _T ("None"), strBgPicBOOL.GetBuffer (MAX_STR_LEN), MAX_STR_LEN, strIniPath); + strKeyName.Format (_T ("BgPicPath")); + GetPrivateProfileString (strAppName, strKeyName, _T ("None"), strBgPicPath.GetBuffer (MAX_STR_LEN), MAX_STR_LEN, strIniPath); + strKeyName.Format (_T ("BgColor")); + GetPrivateProfileString (strAppName, strKeyName, _T ("None"), strBgColor.GetBuffer (MAX_STR_LEN), MAX_STR_LEN, strIniPath); + strKeyName.Format (_T ("GridBOOL")); + GetPrivateProfileString (strAppName, strKeyName, _T ("None"), strGridBOOL.GetBuffer (MAX_STR_LEN), MAX_STR_LEN, strIniPath); + strKeyName.Format (_T ("LockBOOL")); + GetPrivateProfileString (strAppName, strKeyName, _T ("None"), strLockBOOL.GetBuffer (MAX_STR_LEN), MAX_STR_LEN, strIniPath); + + //JIϤ(orC) + if (strBgPicBOOL == _T ("TRUE")) + { + m_strPicPath = strBgPicPath; + + //NŪ.bmpwHBITMAP + HBITMAP hbBgPic; + //QHBITMAP[ϡALoadImage (handle, Ϥ|, J˦, ϥܼe(), ϥܪ(), LR_LOADFROMFILE: ھڸ|ȸ˦bϹ) + hbBgPic = (HBITMAP)::LoadImage (AfxGetInstanceHandle (), m_strPicPath, IMAGE_BITMAP, m_rcWork.Width (), m_rcWork.Height (), LR_LOADFROMFILE); + m_bitmapBgPic.Attach (hbBgPic); + m_pOldBitmap = m_dcBgPic.SelectObject (&m_bitmapBgPic); + + m_bBgPic = TRUE; + } + else if (strBgPicBOOL == _T ("FALSE")) + m_clrBg = _ttoi (strBgColor); + + //]wIlA + if (strGridBOOL == _T ("TRUE")) + m_bGrid = TRUE; + + //JwlA + if (strLockBOOL == _T ("TRUE")) + m_bLock = TRUE; + + + CDialogEx::OnInitDialog(); + + // N [...] \[JtΥ\C + + // IDM_ABOUTBOX btΩROd򤧤C + ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX); + ASSERT(IDM_ABOUTBOX < 0xF000); + + CMenu* pSysMenu = GetSystemMenu(FALSE); + if (pSysMenu != NULL) + { + BOOL bNameValid; + CString strAboutMenu; + bNameValid = strAboutMenu.LoadString(IDS_ABOUTBOX); + ASSERT(bNameValid); + if (!strAboutMenu.IsEmpty()) + { + pSysMenu->AppendMenu(MF_SEPARATOR); + pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu); + } + } + + // ]wܤϥܡCε{DOܤɡA + // ج[|۰ʱqƦ@~ + SetIcon(m_hIcon, TRUE); // ]wjϥ + SetIcon(m_hIcon, FALSE); // ]wpϥ + + m_bInitDlg = TRUE; + + return TRUE; // Ǧ^ TRUEADzﱱ]wJI +} + +void CTestSimulatorDlg::OnSysCommand(UINT nID, LPARAM lParam) +{ + if ((nID & 0xFFF0) == IDM_ABOUTBOX) + { + CAboutDlg dlgAbout; + dlgAbout.DoModal(); + } + else + { + CDialogEx::OnSysCommand(nID, lParam); + } +} + +// pGN̤pƫs[JzܤAzݭnUC{XA +// HKøsϥܡCϥΤ/˵Ҧ MFC ε{A +// ج[|۰ʧ@~C + +void CTestSimulatorDlg::OnPaint () +{ + //wīإ + CPaintDC dcSim (this); //Dܲdc + CDC dcMem; //sdc + CBitmap bitmapMem; + CBitmap * pOldBitmap; + + dcMem.CreateCompatibleDC (&dcSim); //إ߻PDܲۮedc + bitmapMem.CreateCompatibleBitmap (&dcSim, m_iWorkRight, m_iWorkBottom); + pOldBitmap = dcMem.SelectObject (&bitmapMem); + + //øsI + dcMem.SetBkMode (TRANSPARENT); + dcMem.FillSolidRect (m_rcWork, m_clrBg); + + //ҦMarkrect + CPoint ptMarkTL (m_iWorkRight - MARK_WIDTH, m_iWorkTop); + CPoint ptMarkBR (m_iWorkRight, m_iWorkTop + MARK_HEIGHT); + CRect rcModeMark (ptMarkTL, ptMarkBR); + + //ҦMarkr + CFont fontModeMark, * pOldFont; + fontModeMark.CreatePointFont (MARK_FONTSIZE, _T ("Arial"), &dcMem); + + //ѦsIϤdcܤsdc + if (m_bBgPic) + dcMem.BitBlt (m_iWorkLeft, m_iWorkTop, m_rcWork.Width (), m_rcWork.Height (), &m_dcBgPic, 0, 0, SRCCOPY); + + //øsI + if (m_bGrid) + { + CBrush brushGray (GRAY); + CBrush* pOldBrush; + pOldBrush = dcMem.SelectObject (&brushGray); + + for (int i = m_iWorkLeft; i < m_iWorkRight; i += m_iGridX) + { + for (int j = m_iWorkTop; j < m_iWorkBottom; j += m_iGridY) + dcMem.Ellipse (CRect (i - GRID_R, j - GRID_R, i + GRID_R, j + GRID_R)); + } + + dcMem.SelectObject (pOldBrush); + } + + //øswMark + if (m_bLock) + { + CPoint ptLockMarkTL (m_iWorkLeft, m_iWorkTop); + CPoint ptLockMarkBR (m_iWorkLeft + MARK_LOCK_WIDTH, m_iWorkTop + MARK_HEIGHT); + CRect rcLockMark (ptLockMarkTL, ptLockMarkBR); + + pOldFont = dcMem.SelectObject (&fontModeMark); + dcMem.DrawText (_T ("Lock"), -1, &rcLockMark, DT_SINGLELINE | DT_CENTER | DT_VCENTER); + dcMem.SelectObject (pOldFont); + } + + //øsBlocksu + for (int i = 0; i < m_iContainerSize; i++) + m_vcBlkContainer[i]->DrawLine (&dcMem); + + //øsBlock + if (m_bSelectBlk) + { + if (m_iSlctBlkNum >= 0 && m_iSlctBlkNum < m_iContainerSize) + { + CPen penLightBlue (PS_SOLID, 10, LIGHT_BLUE); + CPen* pOldPen; + pOldPen = dcMem.SelectObject (&penLightBlue); + + dcMem.Rectangle (m_vcBlkContainer[m_iSlctBlkNum]->GetBlkRect ()); + dcMem.SelectObject (pOldPen); + } + } + + //øsҦMarkPBlock + if (m_bSimulate) + { + //øsҦMark + pOldFont = dcMem.SelectObject (&fontModeMark); + dcMem.DrawText (_T ("Simulation"), -1, &rcModeMark, DT_SINGLELINE | DT_CENTER | DT_VCENTER); + dcMem.SelectObject (pOldFont); + + //øsBlock + CPen penRed (PS_SOLID, 10, RED); + CPen* pOldPen; + pOldPen = dcMem.SelectObject (&penRed); + + dcMem.Rectangle (m_vcBlkContainer[m_iSimBlkNum]->GetBlkRect ()); + dcMem.SelectObject (pOldPen); + } + + //øsBlock + for (int i = 0; i < m_iContainerSize; i++) + m_vcBlkContainer[i]->Draw (&dcMem); + + //øssuҦMarkPsuuuq + if (m_bLineMode) + { + //øssuҦMar + pOldFont = dcMem.SelectObject (&fontModeMark); + dcMem.DrawText (_T ("LineMode"), -1, &rcModeMark, DT_SINGLELINE | DT_CENTER | DT_VCENTER); + dcMem.SelectObject (pOldFont); + + //øssuuuq + if (m_bConnect) + { + CPen penBlack (PS_DASH, 1, BLACK); + CPen* pOldPen; + + pOldPen = dcMem.SelectObject (&penBlack); + + CPoint ptLStart = m_vcBlkContainer[m_iHeadBlkNum]->GetPinOutRect ().CenterPoint (); //uq_IBlockXPinI + int iCornerGridY = (int) (((ptLStart.y + m_ptLEnd.y) / 2. - m_iWorkTop) / m_iGridY + 0.5); //suBZu@ϤWXӮI + int iCornerY = iCornerGridY * m_iGridY + m_iWorkTop; //suBYy + dcMem.MoveTo (ptLStart); + dcMem.LineTo (CPoint (ptLStart.x, iCornerY)); + dcMem.MoveTo (CPoint (ptLStart.x, iCornerY)); + dcMem.LineTo (CPoint (m_ptLEnd.x, iCornerY)); + dcMem.MoveTo (CPoint (m_ptLEnd.x, iCornerY)); + dcMem.LineTo (m_ptLEnd); + + dcMem.SelectObject (pOldPen); + } + } + + //ѤsdcܥDܲdc + dcSim.BitBlt (m_iWorkLeft, m_iWorkTop, m_rcWork.Width (), m_rcWork.Height (), &dcMem, m_iWorkLeft, m_iWorkTop, SRCCOPY); + + //Mz + dcMem.SelectObject (pOldBitmap); + bitmapMem.DeleteObject (); + dcMem.DeleteDC (); +} + +// ϥΪ̩즲̤pƵɡA +// tΩIsoӥ\oܡC +HCURSOR CTestSimulatorDlg::OnQueryDragIcon () +{ + return static_cast(m_hIcon); +} + +//UINs +void CTestSimulatorDlg::OnBnClickedButtonIn () +{ + m_bLineMode = FALSE; //suҦ + + CBlockBasis* pBlk = new CBlockIn; //new@CBlockIn + pBlk->SetBlkRect (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y), m_iBlkWidth, m_iBlkHeight); //]wBlock Inrect + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); //]wBlocks + m_vcBlkContainer.push_back (pBlk); //sJBlockvector + m_iContainerSize = (int) m_vcBlkContainer.size (); //Blockvector size + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//UOUTs +void CTestSimulatorDlg::OnBnClickedButtonOut () +{ + m_bLineMode = FALSE; //suҦ + + CBlockBasis* pBlk = new CBlockOut; //new@CBlockOut + pBlk->SetBlkRect (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y), m_iBlkWidth, m_iBlkHeight); //]wBlock Outrect + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); //]wBlocks + m_vcBlkContainer.push_back (pBlk); //sJBlockvector + m_iContainerSize = (int) m_vcBlkContainer.size (); //Blockvector size + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//UANDs +void CTestSimulatorDlg::OnBnClickedButtonAnd () +{ + m_bLineMode = FALSE; //suҦ + + CBlockBasis* pBlk = new CBlockAnd; //new@CBlockAnd + pBlk->SetBlkRect (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y), m_iBlkWidth, m_iBlkHeight); //]wBlock Andrect + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); //]wBlocks + m_vcBlkContainer.push_back (pBlk); //sJBlockvector + m_iContainerSize = (int) m_vcBlkContainer.size (); //Blockvector size + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//UORs +void CTestSimulatorDlg::OnBnClickedButtonOr () +{ + m_bLineMode = FALSE; //suҦ + + CBlockBasis* pBlk = new CBlockOr; //new@CBlockOr + pBlk->SetBlkRect (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y), m_iBlkWidth, m_iBlkHeight); //]wBlock Orrect + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); //]wBlocks + m_vcBlkContainer.push_back (pBlk); //sJBlockvector + m_iContainerSize = (int) m_vcBlkContainer.size (); //Blockvector size + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//UNOTs +void CTestSimulatorDlg::OnBnClickedButtonNot () +{ + m_bLineMode = FALSE; //suҦ + + CBlockBasis* pBlk = new CBlockNot; //new@CBlockNot + pBlk->SetBlkRect (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y), m_iBlkWidth, m_iBlkHeight); //]wBlock Notrect + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); //]wBlocks + m_vcBlkContainer.push_back (pBlk); //sJBlockvector + m_iContainerSize = (int) m_vcBlkContainer.size (); //Blockvector size + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//UFunctions +void CTestSimulatorDlg::OnBnClickedButtonFunction () +{ + m_bLineMode = FALSE; //suҦ + + CBlockBasis* pBlk = new CBlockFun; //new@CBlockFun + pBlk->SetBlkRect (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y), m_iBlkWidth, m_iBlkHeight); //]wBlock Funrect + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); //]wBlocks + m_vcBlkContainer.push_back (pBlk); //sJBlockvector + m_iContainerSize = (int) m_vcBlkContainer.size (); //Blockvector size + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//ULines +void CTestSimulatorDlg::OnBnClickedButtonLine () +{ + //]wsuҦíøu@ + if (!m_bSimulate) + { + if (m_bLineMode) + m_bLineMode = FALSE; + else + { + if (!m_vcBlkContainer.empty ()) + { + m_bLineMode = TRUE; + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } + } + } +} + +//USimulates +void CTestSimulatorDlg::OnBnClickedButtonSimulate () +{ + if (!m_bSimulate) + { + if (m_bSelectBlk && m_iSlctBlkNum >= 0 && m_iSlctBlkNum < m_iContainerSize && + m_vcBlkContainer[m_iSlctBlkNum]->BlkTypeIs () == BLK_OUT && m_vcBlkContainer[m_iSlctBlkNum]->GetBlkHeadSize () > 0) + { + m_iSimBlkNum = m_iSlctBlkNum; //]wBlocks + m_bSimulate = TRUE; //]wҦ + m_bLineMode = FALSE; //suҦ + m_bDelBlk = FALSE; //TRBlock + + //YܪiܲХwOAhnew@ӥܪiܲ + if (m_pOscDlg == NULL) + { + m_pOscDlg = new COscDlg (this); + m_pOscDlg->Create (IDD_DIALOG_OSC, this); + m_pOscDlg->SetWindowPos (this, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_SHOWWINDOW); + m_pOscDlg->UpdateData (FALSE); + } + else + { + m_pOscDlg->ShowWindow (SW_SHOW); + m_pOscDlg->UpdateData (FALSE); + } + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } + else + MessageBox (_T ("Please select output block and check if it is connected.")); + } +} + +//UGrids +void CTestSimulatorDlg::OnBnClickedButtonGrid () +{ + //]wIҦ + if (!m_bGrid) + m_bGrid = TRUE; + else + { + m_bGrid = FALSE; + m_bLock = FALSE; + } + + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//ULocks +void CTestSimulatorDlg::OnBnClickedButtonLock () +{ + if (m_bGrid) + { + if (!m_bLock) + { + m_bLock = TRUE; //]wwҦ + + //]w{Blockw̬F񪺮IW + for (int i = 0; i < m_iContainerSize; i++) + { + int GridX = (int) ((m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x - m_iWorkLeft) / (double) m_iGridX + 0.5); + int GridY = (int) ((m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y - m_iWorkTop) / (double) m_iGridY + 0.5); + m_vcBlkContainer[i]->SetBlkRect (CPoint (GridX * m_iGridX + m_iWorkLeft, GridY * m_iGridY + m_iWorkTop), m_iBlkWidth, m_iBlkHeight); + } + } + else + m_bLock = FALSE; + } + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); +} + +//UIϤs +void CTestSimulatorDlg::OnBnClickedButtonBgpic () +{ + //إCFileDialog (TRUE}ɮ, w]ɦW, lɮצW, OFN_HIDEREADONLY: , z) + CFileDialog fileDlg (TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, _T (" bitmap (*.bmp)|*.bmp||")); + + //YFileܲUTw + if (fileDlg.DoModal () == IDOK) + { + m_strPicPath = fileDlg.GetPathName (); //Ūɮ׸| + + //NŪ.bmpwHBITMAP + HBITMAP hbBgPic; + hbBgPic = (HBITMAP)::LoadImage (AfxGetInstanceHandle (), m_strPicPath, IMAGE_BITMAP, m_rcWork.Width (), m_rcWork.Height (), LR_LOADFROMFILE); + m_bitmapBgPic.Detach (); + m_bitmapBgPic.Attach (hbBgPic); + + //ȩ󭺦JϤɬlbitmap + if (!m_bBgPic) + m_pOldBitmap = m_dcBgPic.SelectObject (&m_bitmapBgPic); + else + m_dcBgPic.SelectObject (&m_bitmapBgPic); + + m_bBgPic = TRUE; + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } +} + +//UICs +void CTestSimulatorDlg::OnBnClickedButtonBgcolor () +{ + //إߦmܲ + CColorDialog clrDlg (m_clrBg, CC_PREVENTFULLOPEN); + + //YmܲUTw + if (clrDlg.DoModal () == IDOK) + { + if (m_bBgPic && m_pOldBitmap != NULL) + { + m_dcBgPic.SelectObject (m_pOldBitmap); + m_bBgPic = FALSE; + } + + m_clrBg = clrDlg.GetColor (); //]wIC + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } +} + +//UOpens +void CTestSimulatorDlg::OnBnClickedButtonOpen () +{ + //ҦUiiŪ + if (!m_bSimulate) + { + //إCFileDialog (TRUE}ɮ, w]ɦW, lɮצW, OFN_HIDEREADONLY: , z) + CFileDialog fileDlg (TRUE, _T ("txt"), NULL, OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, _T (" txt (*.txt)|*.txt||")); + + //إCStdioFileHŪɮ׸ + CStdioFile fileSim; + + //Yɮ׹ܲUTw + if (fileDlg.DoModal () == IDOK) + { + //}ɮ (ɮ׸|, CFile::modeNoTruncate: MŤ󤺮e | CFile::modeRead: Ū) + fileSim.Open (fileDlg.GetPathName (), CFile::modeNoTruncate | CFile::modeRead); + + CString strData; //xsC@Cr + CStringArray strArray; //xsC@BlockU + + fileSim.ReadString (strData); //Ūɮ׸ƶir + if (strData == "BlockData: ") //ƶ}YBlockDate + { + //Ūɮ׮ɨBlock + m_bSelectBlk = FALSE; + m_iSlctBlkNum = NO_SEL_NUM; + + //Mܪiܲ + if (m_pOscDlg != NULL) + { + m_pOscDlg->DestroyWindow (); + delete m_pOscDlg; + m_pOscDlg = NULL; + } + + //MsBlockvector + for (int i = 0; i < m_iContainerSize; i++) + delete m_vcBlkContainer[i]; + std::vector ().swap (m_vcBlkContainer); + + //CɮŪ@ + while (fileSim.ReadString (strData)) + { + SplitString (strData, ',', strArray); //NŪ쪺rjBlockUơAxsܰ}C + + if (strArray[0] == "IN") //Block InƤe]tIm, iflag + { + CBlockBasis* pBlk = new CBlockIn; + pBlk->SetBlkRect (CPoint (_ttoi (strArray[1]), _ttoi (strArray[2])), m_iBlkWidth, m_iBlkHeight); + pBlk->SetInputFlag (_ttoi (strArray[3])); + pBlk->SetBlkValue (); + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); + m_vcBlkContainer.push_back (pBlk); + m_iContainerSize = (int) m_vcBlkContainer.size (); + } + else if (strArray[0] == "OUT") //Block OutƤe]tIm, Jchannelƥ, JBlocks + { + CBlockBasis* pBlk = new CBlockOut; + pBlk->SetBlkRect (CPoint (_ttoi (strArray[1]), _ttoi (strArray[2])), m_iBlkWidth, m_iBlkHeight); + int iBlkHeadSize = _ttoi (strArray[3]); + for (int i = 0; i < iBlkHeadSize; i++) + { + pBlk->SetBlkHead1Num (_ttoi (strArray[4 + i])); + pBlk->SetBlkHeadSize (FALSE); + } + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); + m_vcBlkContainer.push_back (pBlk); + m_iContainerSize = (int) m_vcBlkContainer.size (); + } + else if (strArray[0] == "AND") //Block AndƤe]tIm, JBlocks + { + CBlockBasis* pBlk = new CBlockAnd; + pBlk->SetBlkRect (CPoint (_ttoi (strArray[1]), _ttoi (strArray[2])), m_iBlkWidth, m_iBlkHeight); + pBlk->SetBlkHead1Num (_ttoi (strArray[3])); + pBlk->SetBlkHead2Num (_ttoi (strArray[4])); + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); + m_vcBlkContainer.push_back (pBlk); + m_iContainerSize = (int) m_vcBlkContainer.size (); + } + else if (strArray[0] == "OR") //Block OrƤe]tIm, JBlocks + { + CBlockBasis* pBlk = new CBlockOr; + pBlk->SetBlkRect (CPoint (_ttoi (strArray[1]), _ttoi (strArray[2])), m_iBlkWidth, m_iBlkHeight); + pBlk->SetBlkHead1Num (_ttoi (strArray[3])); + pBlk->SetBlkHead2Num (_ttoi (strArray[4])); + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); + m_vcBlkContainer.push_back (pBlk); + m_iContainerSize = (int) m_vcBlkContainer.size (); + } + else if (strArray[0] == "NOT") //Block NotƤe]tIm, JBlocks + { + CBlockBasis* pBlk = new CBlockNot; + pBlk->SetBlkRect (CPoint (_ttoi (strArray[1]), _ttoi (strArray[2])), m_iBlkWidth, m_iBlkHeight); + pBlk->SetBlkHead1Num (_ttoi (strArray[3])); + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); + m_vcBlkContainer.push_back (pBlk); + m_iContainerSize = (int) m_vcBlkContainer.size (); + } + else if (strArray[0] == "FUN") //Block FunƤe]tIm, JBlocks, B⤸flag + { + CBlockBasis* pBlk = new CBlockFun; + pBlk->SetBlkRect (CPoint (_ttoi (strArray[1]), _ttoi (strArray[2])), m_iBlkWidth, m_iBlkHeight); + pBlk->SetBlkHead1Num (_ttoi (strArray[3])); + pBlk->SetBlkHead2Num (_ttoi (strArray[4])); + pBlk->SetOperFlag (_ttoi (strArray[5])); + pBlk->SetBlkNum ((int) m_vcBlkContainer.size ()); + m_vcBlkContainer.push_back (pBlk); + m_iContainerSize = (int) m_vcBlkContainer.size (); + } + } + + //ŪAɮ + fileSim.Close (); + + //Ū쪺JBlocksAs]wC@BlocksBlock + m_iContainerSize = (int) m_vcBlkContainer.size (); + for (int i = 0; i < m_iContainerSize; i++) + { + if (!(m_vcBlkContainer[i]->BlkTypeIs () == BLK_OUT)) + { + int iHeadBlk1Num = m_vcBlkContainer[i]->GetBlkHead1Num (); + if (iHeadBlk1Num >= 0) + m_vcBlkContainer[i]->SetBlkHead1Ptr (m_vcBlkContainer[iHeadBlk1Num]); + int iHeadBlk2Num = m_vcBlkContainer[i]->GetBlkHead2Num (); + if (iHeadBlk2Num >= 0) + m_vcBlkContainer[i]->SetBlkHead2Ptr (m_vcBlkContainer[iHeadBlk2Num]); + } + else + { + int iBlkHeadSize = m_vcBlkContainer[i]->GetBlkHeadSize (); + for (int j = 0; j < iBlkHeadSize; j++) + { + int iBlkHeadNum = m_vcBlkContainer[i]->GetBlkHead1Num (j); + m_vcBlkContainer[i]->SetBlkHead1Ptr (m_vcBlkContainer[iBlkHeadNum]); + } + } + } + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } + else + fileSim.Close (); + } + } +} + +//USaves +void CTestSimulatorDlg::OnBnClickedButtonSave () +{ + //إCFileDialog (FALSExsɮ, w]ɦW, lɮצW, OFN_HIDEREADONLY: , z) + CFileDialog fileDlg (FALSE, _T ("txt"), _T ("Simulator"), OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T (" txt (*.txt)|*.txt||")); + + //إCStdioFileHxs + CStdioFile fileSim; + + //Yɮ׹ܲUTw + if (fileDlg.DoModal () == IDOK) + { + // }ɮ (ɮ׸|, CFile::modeCreate: Hsؤ覡} | CFile::modeWrite: ug) + fileSim.Open (fileDlg.GetPathName (), CFile::modeCreate | CFile::modeWrite); + + CString strData; //ΥHgJɮתr + strData.Format (_T ("BlockData: \n")); + fileSim.WriteString (strData); + + for (int i = 0; i < m_iContainerSize; i++) + { + int iBlkFlag = m_vcBlkContainer[i]->BlkTypeIs (); + switch (iBlkFlag) + { + case BLK_IN: //Block Inxse]tIm, iflag + strData.Format (_T ("%3s, %3d, %3d, %2d\n"), "IN", m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x, m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y, + m_vcBlkContainer[i]->GetInputFlag ()); + break; + case BLK_OUT: //Block Outxse]tIm, Jchannelƥ, JBlocks + strData.Format (_T ("%3s, %3d, %3d, %1d"), "OUT", m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x, m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y, + m_vcBlkContainer[i]->GetBlkHeadSize ()); + + for (int j = 0; j < m_vcBlkContainer[i]->GetBlkHeadSize (); j++) + { + CString strNum; + strNum.Format (_T ("%1d"), m_vcBlkContainer[i]->GetBlkHead1Num (j)); + strData.Append (_T (", ")); + strData.Append (strNum); + } + strData.Append (_T ("\n")); + break; + case BLK_AND: //Block Andxse]tIm, JBlocks + strData.Format (_T ("%3s, %3d, %3d, %1d, %1d\n"), "AND", m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x, m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y, + m_vcBlkContainer[i]->GetBlkHead1Num (), m_vcBlkContainer[i]->GetBlkHead2Num ()); + break; + case BLK_OR: //Block Orxse]tIm, JBlocks + strData.Format (_T ("%3s, %3d, %3d, %1d, %1d\n"), "OR", m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x, m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y, + m_vcBlkContainer[i]->GetBlkHead1Num (), m_vcBlkContainer[i]->GetBlkHead2Num ()); + break; + case BLK_NOT: //Block Notxse]tIm, JBlocks + strData.Format (_T ("%3s, %3d, %3d, %1d\n"), "NOT", m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x, m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y, + m_vcBlkContainer[i]->GetBlkHead1Num ()); + break; + case BLK_FUN: //Block Funxse]tIm, JBlocks, B⤸flag + strData.Format (_T ("%3s, %3d, %3d, %1d, %1d, %2d\n"), "FUN", m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().x, m_vcBlkContainer[i]->GetBlkRect ().CenterPoint ().y, + m_vcBlkContainer[i]->GetBlkHead1Num (), m_vcBlkContainer[i]->GetBlkHead2Num (), m_vcBlkContainer[i]->GetOperFlag ()); + break; + default: + break; + } + + fileSim.WriteString (strData); //NrꤺegJɮ + } + + fileSim.Close (); //gJAɮ + } +} + +//ƹU +void CTestSimulatorDlg::OnLButtonDown (UINT nFlags, CPoint ptCursor) +{ + SetCapture (); + + m_bDelBlk = FALSE; //ƹUɸTRBlock + + //P_ЬO_Block rectd + for (int i = m_iContainerSize - 1; i >= 0; i--) + { + if (m_vcBlkContainer[i]->GetBlkRect ().PtInRect (ptCursor)) + { + SetCursor (LoadCursor (NULL, IDC_SIZEALL)); + m_iSlctBlkNum = i; //Blocks + m_bSelectBlk = TRUE; + m_bMoveBlk = TRUE; + m_bLineMode = FALSE; //suҦ + break; + } + else //IDBlockmɡAаO + { + m_bSelectBlk = FALSE; + m_iSlctBlkNum = NO_SEL_NUM; + } + } + + //YBlockAߧYøu@ + if (m_bSelectBlk) + { + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } + + //suҦɡAP_ЫUmO_XPin}d + if (m_bLineMode) + { + for (int i = 0; i < m_iContainerSize; i++) + { + if (m_vcBlkContainer[i]->GetPinOutRect ().PtInRect (ptCursor)) + { + m_iHeadBlkNum = i; + m_bConnect = TRUE; + break; + } + } + } + + CDialogEx::OnLButtonDown (nFlags, ptCursor); +} + +//ƹ +void CTestSimulatorDlg::OnMouseMove (UINT nFlags, CPoint ptCursor) +{ + //ʿBlock + if (m_bMoveBlk) + { + //wҦUp⹫Цm̾F񤧮IANʪBlock߳]mӮIm + if (m_bLock) + { + int iGridX = (int) ((ptCursor.x - m_iWorkLeft) / (double) m_iGridX + 0.5); + int iGridY = (int) ((ptCursor.y - m_iWorkTop) / (double) m_iGridY + 0.5); + + m_vcBlkContainer[m_iSlctBlkNum]->Move (CPoint (iGridX * m_iGridX + m_iWorkLeft, iGridY * m_iGridY + m_iWorkTop)); + } + else + m_vcBlkContainer[m_iSlctBlkNum]->Move (ptCursor); + } + + //suҦ + if (m_bLineMode) + { + for (int i = 0; i < m_iContainerSize ; i++) + { + //оaBlockXPin}ɡA]wм˦QrbY + if (m_vcBlkContainer[i]->GetPinOutRect ().PtInRect (ptCursor)) + SetCursor (LoadCursor (NULL, IDC_CROSS)); + + //suɡA]wЦmuuq + if (m_bConnect) + m_ptLEnd = ptCursor; + } + } + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + + CDialogEx::OnMouseMove (nFlags, ptCursor); +} + +//ƹ} +void CTestSimulatorDlg::OnLButtonUp (UINT nFlags, CPoint ptCursor) +{ + //BlockɡAiRBlock + if (m_bSelectBlk) + m_bDelBlk = TRUE; + + if (m_bMoveBlk) + { + //BlockAUAƹ}mWXu@ϡAh]wBlock^u@Ϥ + if (!(m_rcWork.PtInRect (m_vcBlkContainer[m_iSlctBlkNum]->GetBlkRect ().TopLeft ()) && + m_rcWork.PtInRect (m_vcBlkContainer[m_iSlctBlkNum]->GetBlkRect ().BottomRight ()))) + m_vcBlkContainer[m_iSlctBlkNum]->Move (CPoint (m_rcWork.CenterPoint ().x, m_rcWork.CenterPoint ().y)); + + m_bMoveBlk = FALSE; + } + + //suҦU + if (m_bLineMode && m_bConnect) + { + //P_ƹ}mO_BlockJPin}dAYOAh]wBlocks_lBlock + for (int i = 0; i < m_iContainerSize; i++) + { + if (m_vcBlkContainer[i]->GetPinIn1Rect ().PtInRect (ptCursor)) + { + m_vcBlkContainer[i]->SetBlkHead1Ptr (m_vcBlkContainer[m_iHeadBlkNum]); + m_vcBlkContainer[i]->SetBlkHead1Num (m_iHeadBlkNum); + m_vcBlkContainer[i]->SetBlkHeadSize (FALSE); + break; + } + + if (m_vcBlkContainer[i]->GetPinIn2Rect ().PtInRect (ptCursor)) + { + m_vcBlkContainer[i]->SetBlkHead2Ptr (m_vcBlkContainer[m_iHeadBlkNum]); + m_vcBlkContainer[i]->SetBlkHead2Num (m_iHeadBlkNum); + m_vcBlkContainer[i]->SetBlkHeadSize (FALSE); + break; + } + } + + m_bConnect = FALSE; //ƹ}ɡAsuuq + } + + ReleaseCapture (); + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + + CDialogEx::OnLButtonUp(nFlags, ptCursor); +} + +//ƹ +void CTestSimulatorDlg::OnLButtonDblClk (UINT nFlags, CPoint ptCursor) +{ + //ҦUiBlock flag + if (!m_bSimulate) + { + for (int i = 0; i < m_iContainerSize; i++) + { + if (m_vcBlkContainer[i]->GetBlkRect ().PtInRect (ptCursor)) + { + if (m_vcBlkContainer[i]->BlkTypeIs () == BLK_IN) //Block InJiflag + { + CInputDlg inputdlgSim; + inputdlgSim.SetInputFlag (m_vcBlkContainer[i]->GetInputFlag ()); + + if (inputdlgSim.DoModal () == IDOK) + { + m_vcBlkContainer[i]->SetInputFlag (inputdlgSim.GetInputFlag ()); + m_vcBlkContainer[i]->SetBlkValue (); + } + + else + MessageBox (_T ("The input has not been changed.")); + } + else if (m_vcBlkContainer[i]->BlkTypeIs () == BLK_FUN) //Block FunB⤸flag + { + CFunDlg fundlgSim; + fundlgSim.SetOperFlag (m_vcBlkContainer[i]->GetOperFlag ()); + + if (fundlgSim.DoModal () == IDOK) + m_vcBlkContainer[i]->SetOperFlag (fundlgSim.GetOperFlag ()); + else + MessageBox (_T ("The operator has not been changed.")); + } + + break; + } + } + } + + CDialogEx::OnLButtonDblClk (nFlags, ptCursor); +} + +void CTestSimulatorDlg::OnTimer (UINT_PTR nIDEvent) +{ + if (nIDEvent == 0) + KillTimer (0); + + int iTimeInterval = m_pOscDlg->GetTimeInterval (); //oϥΪ̳]wɶj(ms) + double dTime = m_iStep * iTimeInterval * MSEC; //i`ɶ(s) + + std::deque deqRowValue; //ΥHxsC@ӮɶIUUinput channel + + //eP_inputO_Xz(ȧP_@) + if (m_iStep == 0) + { + m_iOutSize = m_vcBlkContainer[m_iSimBlkNum]->GetBlkHeadSize (); //Ūchannelƥ + + for (int i = 0; i < m_iOutSize; i++) + { + int iValueFlag = m_vcBlkContainer[m_iSimBlkNum]->GetValueFlag (i); + + if (iValueFlag == NO_VALUE) //sbinput signal + { + MessageBox (_T ("Please check if the output block exists input signal.")); + m_pOscDlg->m_bSim = FALSE; + m_pOscDlg->m_bModify = TRUE; + break; + } + else if (iValueFlag == COMPUTE_ERROR) //sb\B覡 + { + MessageBox (_T ("Operation is not allowed.")); + m_pOscDlg->m_bSim = FALSE; + m_pOscDlg->m_bModify = TRUE; + break; + } + else if (iValueFlag == NO_OPER_FLAG) //Block Fun]wB⤸ + { + MessageBox (_T ("Please check if the operator in function block has been set up.")); + m_pOscDlg->m_bSim = FALSE; + m_pOscDlg->m_bModify = TRUE; + break; + } + else + m_pOscDlg->m_bSim = TRUE; + } + } + + //inputXzBA}l + if (m_pOscDlg->m_bSim) + { + if (m_iStep == 0) + { + m_pOscDlg->SetOutputSize (m_iOutSize); //]wܪiܲchannel + m_pOscDlg->InitialData (); //lƥܪiܲ(channelƥ, He) + m_deq2DOutputValue.clear (); //}leMŤGx} + } + + //]wӮɶUAC@Block In + for (int i = 0; i < m_iContainerSize; i++) + { + if (m_vcBlkContainer[i]->BlkTypeIs () == BLK_IN) + { + if (m_vcBlkContainer[i]->GetInputFlag () == SIN) + m_vcBlkContainer[i]->SetBlkValue (dTime); + else if (m_vcBlkContainer[i]->GetInputFlag () == COS) + m_vcBlkContainer[i]->SetBlkValue (dTime); + } + } + + //oBlock Out(hchannel) + for (int i = 0; i < m_iOutSize; i++) + { + double dValue = m_vcBlkContainer[m_iSimBlkNum]->GetBlkValue (i); + deqRowValue.push_back (dValue); //sJCVq(ӮɶIUC@input channel) + } + + int iDataSize = (int) m_deq2DOutputValue.size (); //Ū`dataƥ + + //Y`dataƥضWLw]̤jdataơARĤ@dataAåѥݥ[Jsdata + if (iDataSize < MAX_DATA_NUM) + m_deq2DOutputValue.push_back (deqRowValue); + else + { + m_deq2DOutputValue.pop_front (); + m_deq2DOutputValue.push_back (deqRowValue); + } + + //FFTDYWv + double dOutFreq = 0.; + if (iDataSize == MAX_DATA_NUM /*&& m_pOscDlg->m_bFFT*/) + { + std::deque deqOutputData; + for (int i = 0; i < MAX_DATA_NUM; i++) + { + double dValue = m_deq2DOutputValue[i][m_pOscDlg->m_iSlctOutputNum]; + deqOutputData.push_back (dValue); + } + + dOutFreq = FFT (deqOutputData, MAX_DATA_NUM, iTimeInterval * MSEC); + } + + //ǭȦܥܪiܲ(eɶ, output value, Wv) + m_pOscDlg->SetData(dTime, deqRowValue[m_pOscDlg->m_iSlctOutputNum], dOutFreq); + //m_pOscDlg->SetData (dTime, deqRowValue[m_pOscDlg->m_iSlctOutputNum]); + + m_iStep++; + + //sܪiܲ + m_pOscDlg->UpdateData (FALSE); + m_pOscDlg->InvalidateRect (m_pOscDlg->m_rcWork, FALSE); + m_pOscDlg->UpdateWindow (); + } + + CDialogEx::OnTimer (nIDEvent); + + if (m_pOscDlg->m_bSim && nIDEvent == 0) + SetTimer (0, 10, NULL); +} + +//Dܲjp +void CTestSimulatorDlg::OnSize (UINT nType, int cx, int cy) +{ + CDialogEx::OnSize(nType, cx, cy); + + //ͦDܲɤiJ + if (m_bInitDlg) + { + //P_O_̤p + if (!IsIconic ()) + { + //oDܲȤ + CRect rcCurClient; + this->GetClientRect (&rcCurClient); + + //px, yVY + double dMultipleWid = rcCurClient.Width () / (double) m_rcClient.Width (); + m_rcClient.right = rcCurClient.Width (); + double dMultipleHeight = rcCurClient.Height () / (double) m_rcClient.Height (); + m_rcClient.bottom = rcCurClient.Height (); + + //]wsu@ϰ + m_iWorkLeft = (int) (dMultipleWid * m_iWorkLeft + 0.5); + m_iWorkTop = (int) (dMultipleHeight * m_iWorkTop + 0.5); + m_iWorkRight = (int) (dMultipleWid * m_iWorkRight + 0.5); + m_iWorkBottom = (int) (dMultipleHeight * m_iWorkBottom + 0.5); + m_rcWork.SetRect (m_iWorkLeft, m_iWorkTop, m_iWorkRight, m_iWorkBottom); + + //]wsmPjp + Resize (IDC_BUTTON_IN , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_OUT , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_AND , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_OR , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_NOT , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_FUNCTION , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_LINE , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_SIMULATE , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_GRID , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_LOCK , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_BGPIC , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_BGCOLOR , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_OPEN , dMultipleWid, dMultipleHeight); + Resize (IDC_BUTTON_SAVE , dMultipleWid, dMultipleHeight); + + //sJIϤ + if (m_bBgPic) + { + HBITMAP hbBgPic; + hbBgPic = (HBITMAP)::LoadImage (AfxGetInstanceHandle (), m_strPicPath, IMAGE_BITMAP, m_rcWork.Width (), m_rcWork.Height (), LR_LOADFROMFILE); + m_bitmapBgPic.Detach (); + m_bitmapBgPic.Attach (hbBgPic); + m_dcBgPic.SelectObject (&m_bitmapBgPic); + } + + //]wsBlockmPjp + m_iBlkWidth = (int) (m_iBlkWidth * dMultipleWid + 0.5); + m_iBlkHeight = (int) (m_iBlkHeight * dMultipleHeight + 0.5); + m_iGridX = (int) (m_iBlkWidth / 4. + 0.5); + m_iGridY = (int) (m_iBlkHeight / 2. + 0.5); + for (int i = 0; i < m_iContainerSize; i++) + Resize (m_vcBlkContainer[i], dMultipleWid, dMultipleHeight); + + //øu@ + Invalidate (TRUE); + UpdateWindow (); + + //YsbܪiܲAhܵ + if (m_bSimulate && m_pOscDlg != NULL) + m_pOscDlg->ShowWindow (SW_SHOW); + } + } +} + +BOOL CTestSimulatorDlg::PreTranslateMessage (MSG* pMsg) +{ + if (pMsg->message == WM_KEYDOWN) + { + //UR + if (pMsg->wParam == VK_DELETE && !m_vcBlkContainer.empty () && m_bDelBlk && !m_bSimulate) + { + //P_LBlockO_sܸӧRBlockAYAhMs + for (int i = 0; i < m_iContainerSize; i++) + { + if (!(m_vcBlkContainer[i]->BlkTypeIs () == BLK_OUT)) + { + if (m_vcBlkContainer[i]->GetBlkHead1Ptr () == m_vcBlkContainer[m_iSlctBlkNum]) + { + m_vcBlkContainer[i]->SetBlkHead1Ptr (NULL); + m_vcBlkContainer[i]->SetBlkHead1Num (NO_BLOCK_HEAD); + } + + if (m_vcBlkContainer[i]->GetBlkHead2Ptr () == m_vcBlkContainer[m_iSlctBlkNum]) + { + m_vcBlkContainer[i]->SetBlkHead2Ptr (NULL); + m_vcBlkContainer[i]->SetBlkHead2Num (NO_BLOCK_HEAD); + } + } + else + { + int iBlkHeadSize = m_vcBlkContainer[i]->GetBlkHeadSize (); + for (int j = 0; j < iBlkHeadSize; j++) + { + if (m_vcBlkContainer[i]->GetBlkHead1Ptr (j) == m_vcBlkContainer[m_iSlctBlkNum]) + { + m_vcBlkContainer[i]->DeleteBlkHead1Ptr (j); + m_vcBlkContainer[i]->SetBlkHeadSize (TRUE); + } + } + } + } + + //MBlock + delete m_vcBlkContainer[m_iSlctBlkNum]; + + m_vcBlkContainer.erase (m_vcBlkContainer.begin () + m_iSlctBlkNum); + m_iContainerSize = (int) m_vcBlkContainer.size (); + + //ss + for (int i = 0; i < m_iContainerSize; i++) + m_vcBlkContainer[i]->SetBlkNum (i); + + //s]wss + for (int i = 0; i < m_iContainerSize; i++) + { + if (!(m_vcBlkContainer[i]->BlkTypeIs () == BLK_OUT)) + { + if (m_vcBlkContainer[i]->GetBlkHead1Ptr () != NULL) + { + int iBlkHead1Num = m_vcBlkContainer[i]->GetBlkHead1Ptr ()->GetBlkNum (); + m_vcBlkContainer[i]->SetBlkHead1Num (iBlkHead1Num); + } + + if (m_vcBlkContainer[i]->GetBlkHead2Ptr () != NULL) + { + int iBlkHead2Num = m_vcBlkContainer[i]->GetBlkHead2Ptr ()->GetBlkNum (); + m_vcBlkContainer[i]->SetBlkHead2Num (iBlkHead2Num); + } + } + else + { + int iBlkHeadSize = m_vcBlkContainer[i]->GetBlkHeadSize (); + m_vcBlkContainer[i]->ClearBlkHead1Num (); + for (int j = 0; j < iBlkHeadSize; j++) + { + int iBlkHeadNum = m_vcBlkContainer[i]->GetBlkHead1Ptr (j)->GetBlkNum (); + m_vcBlkContainer[i]->SetBlkHead1Num (iBlkHeadNum); + } + } + } + + //RA + m_bSelectBlk = FALSE; + m_iSlctBlkNum = NO_SEL_NUM; + m_bDelBlk = FALSE; + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + } + //UESC + else if (pMsg->wParam == VK_ESCAPE) + { + m_bSelectBlk = FALSE; + m_iSlctBlkNum = NO_SEL_NUM; + m_bMoveBlk = FALSE; + m_bLineMode = FALSE; + m_bConnect = FALSE; + m_bDelBlk = FALSE; + + //øu@ + InvalidateRect (m_rcWork, FALSE); + UpdateWindow (); + + return TRUE; + } + //UENTER + else if (pMsg->wParam == VK_RETURN) + return TRUE; + } + + return CDialogEx::PreTranslateMessage(pMsg); +} + +void CTestSimulatorDlg::OnDestroy () +{ + CString strIniPath (_T (".\\Initial.ini")); //.ini| + CString strAppName (_T ("BgParameter")); //.ini[`W] + CString strColorRef; //Cܼ + strColorRef.Format (_T ("%u"), m_clrBg); //NCରr + + //IT + CString strKeyName (_T ("BgPicBOOL")); //.iniܼƦW + if (m_bBgPic) + { + WritePrivateProfileString (strAppName, strKeyName, _T ("TRUE"), strIniPath); //JIϤ + strKeyName.Format (_T ("BgPicPath")); + WritePrivateProfileString (strAppName, strKeyName, m_strPicPath, strIniPath); //IϤ| + strKeyName.Format (_T ("BgColor")); + WritePrivateProfileString (strAppName, strKeyName, _T ("None"), strIniPath); //IC⬰None + } + else + { + WritePrivateProfileString (strAppName, strKeyName, _T ("FALSE"), strIniPath); //JIϤ + strKeyName.Format (_T ("BgPicPath")); + WritePrivateProfileString (strAppName, strKeyName, _T ("None"), strIniPath); //IϤ|None + strKeyName.Format (_T ("BgColor")); + WritePrivateProfileString (strAppName, strKeyName, strColorRef, strIniPath); //IC + } + + //I}һP_ + strKeyName.Format (_T ("GridBOOL")); + if (m_bGrid) + WritePrivateProfileString (strAppName, strKeyName, _T ("TRUE"), strIniPath); + else + WritePrivateProfileString (strAppName, strKeyName, _T ("FALSE"), strIniPath); + + //w}һP_ + strKeyName.Format (_T ("LockBOOL")); + if (m_bLock) + WritePrivateProfileString (strAppName, strKeyName, _T ("TRUE"), strIniPath); + else + WritePrivateProfileString (strAppName, strKeyName, _T ("FALSE"), strIniPath); + + //MsIϤdc + m_dcBgPic.SelectObject (m_pOldBitmap); + m_dcBgPic.DeleteDC (); + + //Mܪiܲ + if (m_pOscDlg != NULL) + { + m_pOscDlg->DestroyWindow (); + delete m_pOscDlg; + } + + //MBlock vector + for (int i = 0; i < m_iContainerSize; i++) + delete m_vcBlkContainer[i]; + + CDialogEx::OnDestroy(); +} + +//N@Cr̾ڤjŸάWߦr +void CTestSimulatorDlg::SplitString (CString str, char cSplit, CStringArray& strarray) +{ + strarray.RemoveAll (); + CString strTemp = str; + + while (1) + { + int iIndex = strTemp.Find (cSplit); + + if (iIndex >= 0) + { + CString strLeft = strTemp.Left (iIndex); + strLeft.Remove (' '); + strarray.Add (strLeft); + strTemp = strTemp.Right (strTemp.GetLength () - 1 - iIndex); + } + else + break; + } + + strTemp.Remove (' '); + strarray.Add (strTemp); +} + +//s]wmΤjp +void CTestSimulatorDlg::Resize (int nID, double dMulWid, double dMulHei) +{ + CRect rcItem; + GetDlgItem (nID)->GetWindowRect (&rcItem); + ScreenToClient (&rcItem); + rcItem.TopLeft ().x = (int) (rcItem.TopLeft ().x * dMulWid + 0.5); + rcItem.TopLeft ().y = (int) (rcItem.TopLeft ().y * dMulHei + 0.5); + rcItem.BottomRight ().x = (int) (rcItem.BottomRight ().x * dMulWid + 0.5); + rcItem.BottomRight ().y = (int) (rcItem.BottomRight ().y * dMulHei + 0.5); + + GetDlgItem (nID)->MoveWindow (rcItem); +} + +//s]wBlockmΤjp +void CTestSimulatorDlg::Resize (CBlockBasis* pBlk, double dMulWid, double dMulHei) +{ + CRect rcItem = pBlk->GetBlkRect (); + + rcItem.TopLeft ().x = (int) (rcItem.TopLeft ().x * dMulWid + 0.5); + rcItem.TopLeft ().y = (int) (rcItem.TopLeft ().y * dMulHei + 0.5); + rcItem.BottomRight ().x = (int) (rcItem.BottomRight ().x * dMulWid + 0.5); + rcItem.BottomRight ().y = (int) (rcItem.BottomRight ().y * dMulHei + 0.5); + + pBlk->SetBlkRect (rcItem.CenterPoint (), m_iBlkWidth, m_iBlkHeight); +} + +//pdatah(ΩFFT) +int CTestSimulatorDlg::GetComputationLayers(int iDataSize) +{ + int m_iLayers = 1; + + if (iDataSize == 2) + return 1; + while (1) + { + iDataSize = iDataSize / 2; + m_iLayers++; + + if (iDataSize == 2) + return m_iLayers; + if (iDataSize <= 1) + return -1; + } +} + +//FFTDYWv +double CTestSimulatorDlg::FFT (const std::deque & deq2dData, int iSize, double dUnitTime) +{ + std::deque deqFData; + std::deque deqWeights; + std::deque deqX; + std::deque deqAmplitude; + + int iDeqLen = iSize; + int iLayers = GetComputationLayers (iSize); + + for (int i = 0; i < iDeqLen; i++) + deqFData.push_back (CComplex (deq2dData[i], 0)); + + double dFixedFactors = (-2 * M_PI) / iDeqLen; + + //pvǦC + for (int i = 0; i < iDeqLen / 2; i++) + { + double dAngle = i * dFixedFactors; + deqWeights.push_back (CComplex (cos (dAngle), sin (dAngle))); + } + + for (int i = 0; i < iDeqLen / 2; i++) + deqWeights.push_back (CComplex (-deqWeights[i].m_dReal, -deqWeights[i].m_dImag)); + + //p˧ǦX + for (int i = 0; i < iDeqLen; i++) + { + int iIndex = 0; + for (int j = iLayers - 1; j >= 0; j--) + iIndex += (1 && (i & (1 << j))) << (iLayers - j - 1); + + deqX.push_back (deqFData[iIndex]); + } + + //pFFT + for (int L = 1; L <= iLayers; L++) + { + int iDistance = 1 << (L - 1); + int iW = 1 << (iLayers - L); //`ƪ׳QѪ + + int iB = iDeqLen >> L; //ݭpXƪ׬iNť߸ഫ + int iN = iDeqLen / iB; //ݭpť߸ഫƪ + + for (int b = 0; b < iB; b++) + { + int iMid = b * iN; + for (int n = 0; n < iN / 2; n++) + { + int iIndex = n + iMid; + deqFData[iIndex] = deqX[iIndex] + deqWeights[n * iW] * deqX[iIndex + iDistance]; //Fe + W*Fo + } + + for (int n = iN / 2; n < iN; n++) + { + int iIndex = n + iMid; + deqFData[iIndex] = deqX[iIndex - iDistance] + deqWeights[n * iW] * deqX[iIndex]; //Fe - W*Fo + } + } + + deqX = deqFData; + } + + //p⮶T + for (int i = 0; i < iDeqLen; i++) + deqAmplitude.push_back (deqFData[i].ComputeAmplitude ()); + + double dMaxAmp = 0.; //ŧi̤jTܼ + double dCornerFreq = 1 / dUnitTime / 2; //pIWv + double dOutFreq = 0.; //̤j֥X{Wv + + //W줤X{̤jTmAWvYXWv + for (int i = 0; i < iDeqLen; i++) + { + double dFreq = i / (dUnitTime * (iDeqLen - 1)); + if (dFreq > dCornerFreq) + break; + + if (deqAmplitude[i] > dMaxAmp) + { + dMaxAmp = deqAmplitude[i]; + dOutFreq = dFreq; + } + } + + return dOutFreq; +} \ No newline at end of file diff --git a/TestSimulator/TestSimulatorDlg.h b/TestSimulator/TestSimulatorDlg.h new file mode 100644 index 0000000..6dabef0 --- /dev/null +++ b/TestSimulator/TestSimulatorDlg.h @@ -0,0 +1,116 @@ + +// TestSimulatorDlg.h : Y +// + +#pragma once + +#include "BlockBasis.h" +#include "BlockIn.h" +#include "BlockOut.h" +#include "BlockAnd.h" +#include "BlockOr.h" +#include "BlockNot.h" +#include "BlockFun.h" +#include "InputDlg.h" +#include "FunDlg.h" +#include "OscDlg.h" +#include "Complex.h" + +#include +#include + + +// CTestSimulatorDlg ܤ +class CTestSimulatorDlg : public CDialogEx +{ +// غc +public: + CTestSimulatorDlg(CWnd* pParent = NULL); // зǫغc禡 + +// ܤ + enum { IDD = IDD_TESTSIMULATOR_DIALOG }; + + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 䴩 + +private: + std::vector m_vcBlkContainer; //s񤣦PBlockvector + + CRect m_rcWork; //u@ + CRect m_rcClient; //ܲȤ + CPoint m_ptLEnd; //suuqI + COscDlg* m_pOscDlg; //ܪiܲ + CDC m_dcBgPic; //sIϤdc + CBitmap m_bitmapBgPic; //sIϤbitmap + CBitmap* m_pOldBitmap; //Vbitmap + CString m_strPicPath; //IϤ| + COLORREF m_clrBg; //IC + + BOOL m_bInitDlg; //P_ܵl + BOOL m_bSelectBlk; //P_Block + BOOL m_bMoveBlk; //P_Block + BOOL m_bLineMode; //P_euҦ + BOOL m_bConnect; //P_su + BOOL m_bDelBlk; //P_BlockR + BOOL m_bBgPic; //P_JIϤ + BOOL m_bGrid; //P_I + BOOL m_bLock; //P_wI + + int m_iWorkLeft; //u@ϥy + int m_iWorkTop; //u@ϤWy + int m_iWorkRight; //u@ϥky + int m_iWorkBottom; //u@ϤUy + int m_iBlkWidth; //Blocke + int m_iBlkHeight; //Block + int m_iGridX; //XVIj + int m_iGridY; //YVIj + int m_iContainerSize; //sBlockvectorjp + int m_iSlctBlkNum; //Blocks + int m_iHeadBlkNum; //sBlocks + int m_iSimBlkNum; //Blocks + int m_iOutSize; //Blockchannelƥ + +// {X@ +protected: + HICON m_hIcon; + + // ͪT禡 + virtual BOOL OnInitDialog (); + afx_msg void OnSysCommand (UINT nID, LPARAM lParam); + afx_msg void OnPaint (); + afx_msg HCURSOR OnQueryDragIcon (); + DECLARE_MESSAGE_MAP () +public: + std::deque > m_deq2DOutputValue; //soutput valuedeque + BOOL m_bSimulate; //P_Ҧ + int m_iStep; //iB + + afx_msg void OnBnClickedButtonIn (); + afx_msg void OnBnClickedButtonOut (); + afx_msg void OnBnClickedButtonAnd (); + afx_msg void OnBnClickedButtonOr (); + afx_msg void OnBnClickedButtonNot (); + afx_msg void OnBnClickedButtonFunction (); + afx_msg void OnBnClickedButtonLine (); + afx_msg void OnBnClickedButtonSimulate (); + afx_msg void OnBnClickedButtonGrid (); + afx_msg void OnBnClickedButtonLock (); + afx_msg void OnBnClickedButtonBgpic (); + afx_msg void OnBnClickedButtonBgcolor (); + afx_msg void OnBnClickedButtonOpen (); + afx_msg void OnBnClickedButtonSave (); + afx_msg void OnLButtonDown (UINT nFlags, CPoint ptCursor); + afx_msg void OnMouseMove (UINT nFlags, CPoint ptCursor); + afx_msg void OnLButtonUp (UINT nFlags, CPoint ptCursor); + afx_msg void OnLButtonDblClk (UINT nFlags, CPoint point); + afx_msg void OnTimer (UINT_PTR nIDEvent); + afx_msg void OnSize (UINT nType, int cx, int cy); + virtual BOOL PreTranslateMessage (MSG* pMsg); + afx_msg void OnDestroy (); + + void SplitString (CString, char, CStringArray&); + void Resize (int nID, double dMulWid, double dMulHei); + void Resize (CBlockBasis* pBlk, double dMulWid, double dMulHei); + int GetComputationLayers (int iDataSize); + double FFT (const std::deque &, int, double); +}; diff --git a/TestSimulator/res/TestSimulator.ico b/TestSimulator/res/TestSimulator.ico new file mode 100644 index 0000000000000000000000000000000000000000..d56fbcdfdf6eac0f4727c34770c26689271d96af GIT binary patch literal 67777 zcmeFYc|4U}`!{@SGetCs%!DQx%1~mPDN~e)khut%$88(;HqRkMBs9@rPAH+2l%z67 zGG~a|g#E0oy6)?`?(6>jp5NzvKkxhe@vJ)cI@em?<5=T)Oy>yz1I!>U&WdsxaG(Qt z3jln4Kg*+301ET~+qV5GV*rGi09aXnmPJvSWj!EzK=cey!~!7AOrif(W&r5hPNDx< zZbAGbgedes%MP>vy1P+_C}DsPT9X0F5wD;8_@HP9Kyc%4eyEJ-c8>q%#|K14fLBYu z`SF1R4S)#^21F4*#0D(a_@YXb@ISM)`@jC+Q6s9s<9}x87u})@5B2r+sDZrpAIN0N z9lFpzN)_ej?};A&_Zmu>-cH@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9j3e|(V7;2nicn91jtiRVq|&!i3zavK4WH(+31;{U2~ zzkF;})}yHT-`&Sl#`A(J89|<8m}zx`u4#3$h12yBFaIy{)zqHTr_X!&;6Lv3@#IUd NK9A-8OQnhX{{?OVn?wKr literal 0 HcmV?d00001 diff --git a/TestSimulator/res/TestSimulator.rc2 b/TestSimulator/res/TestSimulator.rc2 new file mode 100644 index 0000000000000000000000000000000000000000..1770830550a0d177c679d34b7973f49f1293b850 GIT binary patch literal 682 zcmd5(OAY}+6s*KfGIwaPk%*bZ4Fn09FpS?)Ff;xpzB{q8l(29B8)tC>cW?k})FZQJ zC!N=w?yh=O@4e^4fB_9*?gkX9a52XM74$L25+k&D^D%=C8)+noNiZ(E!$hG#REK{) zIX*lh73zGOli4CykrC%o(2Ak%eRb~K*2X?ilT#u}h6jhr9+4@Os9r@48RTK1$-T&| z7EEOM_F=eG72O#bk?D1`v0}?#{D=={cpT(_ zc49e>z3W|7mSwMhK96VSjK}-$@0M)I4=jm{WG-Fl$rx*5_7dqxAEQ)$VtFEuaqX5w zGL$npmTS3^1=dr!!Lb>REo3R5X`90h|H?&h+e`%Y015`u*6tx{O$wzo#Ow{`r4KO;Wc#1Y} zTgkk8hI?81*WQdhf^JzO$0)=PtOpU32q{v59IuuQ*Eb`vCGjsEL==vFtb^ zShaZse|Nme_6T<1jXm@3j9G#aJzl)AYfrPzo_AHYYRARQ&nY{^?l$c1dReY)d+ycQ zJ@Fz(M&T{Q(x&n%oAojCqO0An1K65>9q{`my193&TV=lqU=K{D_-InuZv)unTH<nmKh%Qr9@tN0mLD?a?%;1S>06R>V{Q9IGbhSG~m(-451y^>6E}0{# zM|Nu+jK!_Xp7{=Et8b2ef#--PedF@H+8v_Hu_5|cuIvz94voL39)2NvJ4lz>PqBJe z)lxp9>=0eD2bwi<`4nZlb(!KD!@iI8X}zP08=jzSw=Qk$Z7;T4mqiY0onoh{-D}yu zntz8**J zE8DHhb#@-fW^&GU>(Um>CcfJ3)@7OPZ@IGFx-7H#SKO12=1a->lq0M9mF=rbe{K;= z)g}8)oySQqYjSU9Z#XM+iuo4Kx^On<7WZ^^7 kp5P58uzk=#cV&MaTRq8GxUJ5!D7X5=M2wMB@0Z8_0jGCrP5=M^ literal 0 HcmV?d00001 diff --git a/TestSimulator/stdafx.cpp b/TestSimulator/stdafx.cpp new file mode 100644 index 0000000..d10ef63 --- /dev/null +++ b/TestSimulator/stdafx.cpp @@ -0,0 +1,8 @@ + +// stdafx.cpp : ȥ]tз Include ɪl{ +// TestSimulator.pch |sĶY +// stdafx.obj |]tsĶOT + +#include "stdafx.h" + + diff --git a/TestSimulator/stdafx.h b/TestSimulator/stdafx.h new file mode 100644 index 0000000..e25c3ed --- /dev/null +++ b/TestSimulator/stdafx.h @@ -0,0 +1,54 @@ + +// stdafx.h : ibYɤ]tзǪt Include ɡA +// άOg`ϥΫoܤܧ +// MױM Include ɮ + +#pragma once + +#ifndef VC_EXTRALEAN +#define VC_EXTRALEAN // q Windows Yư`ϥΪ +#endif + +#include "targetver.h" + +#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // Twq CString غc禡 + +// MFC ä@DZ`ΥiĵiT\ +#define _AFX_ALL_WARNINGS + +#include // MFC ֤߻PзǤ +#include // MFC XR\ + + +#include // MFC Automation O + + + +#ifndef _AFX_NO_OLE_SUPPORT +#include // MFC 䴩 Internet Explorer 4 qα +#endif +#ifndef _AFX_NO_AFXCMN_SUPPORT +#include // MFC 䴩 Windows qα +#endif // _AFX_NO_AFXCMN_SUPPORT + +#include // \ϩMC MFC 䴩 + + + + + + + + + +#ifdef _UNICODE +#if defined _M_IX86 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +#elif defined _M_X64 +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +#else +#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +#endif +#endif + + diff --git a/TestSimulator/targetver.h b/TestSimulator/targetver.h new file mode 100644 index 0000000..b7ae53c --- /dev/null +++ b/TestSimulator/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// [W SDKDDKVer.h iwq̰iΪ Windows xC + +// pGnwe Windows xظmε{AХ[W WinSDKVer.hA +// æb[W SDKDDKVer.h eN _WIN32_WINNT ]n䴩xC + +#include