From 3628a707a38e1c590216c5983c9b97b9c742f86c Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期一, 24 三月 2025 09:01:42 +0800
Subject: [PATCH] Merge branch 'clh' into liuyang
---
SourceCode/Bond/Servo/CPanel.cpp | 41
SourceCode/Bond/Servo/CPageGraph2.h | 42
SourceCode/Bond/Servo/CVacuumBake.cpp | 60
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.h | 21
SourceCode/Bond/Servo/CEFEM.h | 6
SourceCode/Bond/Servo/CPanelEquipment.cpp | 29
SourceCode/Bond/Servo/CBakeCooling.cpp | 61
SourceCode/Bond/Servo/CPanelAttributes.cpp | 2
SourceCode/Bond/Servo/Intent.h | 25
SourceCode/Bond/Servo/EqsGraphWnd.cpp | 2400 +++++++++++++++++++
SourceCode/Bond/Servo/ToolUnits.cpp | 10
SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp | 38
SourceCode/Bond/Servo/CAligner.h | 24
SourceCode/Bond/Servo/Servo.rc | 0
Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx | 0
SourceCode/Bond/Servo/CBonder.h | 6
SourceCode/Bond/Servo/ServoDlg.h | 25
SourceCode/Bond/Servo/HmTab.cpp | 529 ++++
SourceCode/Bond/Servo/MapPosWnd.cpp | 536 ++++
SourceCode/Bond/Servo/CPanelMaster.h | 2
SourceCode/Bond/Servo/CPin.h | 42
SourceCode/Bond/Servo/CWriteStep.cpp | 3
SourceCode/Bond/Servo/CLoadPort.cpp | 79
SourceCode/Bond/Servo/CMeasurement.h | 24
SourceCode/Bond/Servo/ColorTransfer.h | 16
SourceCode/Bond/Servo/CSample.h | 12
SourceCode/Bond/Servo/CEqModeChangeStep.h | 23
SourceCode/Bond/Servo/CEqModeStep.cpp | 2
SourceCode/Bond/Servo/CMeasurement.cpp | 57
SourceCode/Bond/Servo/Servo.vcxproj.filters | 42
SourceCode/Bond/Servo/Intent.cpp | 51
SourceCode/Bond/Servo/CEqStatusStep.cpp | 3
SourceCode/Bond/Servo/CEFEM.cpp | 20
SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp | 36
SourceCode/Bond/Servo/CEquipment.h | 27
SourceCode/Bond/Servo/HmTab.h | 130 +
SourceCode/Bond/Servo/CEqCimMessageCmdStep.h | 21
SourceCode/Bond/Servo/CSample.cpp | 15
SourceCode/Bond/Servo/Servo.vcxproj | 42
Document/simulator/DEFAULT.SMD | 2
SourceCode/Bond/Servo/resource.h | 0
SourceCode/Bond/Servo/Context.cpp | 132 +
SourceCode/Bond/Servo/MapPosWnd.h | 86
SourceCode/Bond/Servo/CPageGraph1.h | 52
SourceCode/Bond/Servo/CFliper.cpp | 60
SourceCode/Bond/Servo/Servo.cpp | 6
SourceCode/Bond/Servo/CPanelMaster.cpp | 21
SourceCode/Bond/Servo/CMaster.h | 15
SourceCode/Bond/Servo/CEqModeChangeStep.cpp | 46
SourceCode/Bond/Servo/ColorTransfer.cpp | 123
SourceCode/Bond/Servo/CStep.h | 1
SourceCode/Bond/Servo/CBakeCooling.h | 24
SourceCode/Bond/Servo/CEquipment.cpp | 238 +
SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp | 37
SourceCode/Bond/Servo/CEqVCREnableStep.h | 22
SourceCode/Bond/Servo/CMaster.cpp | 397 +++
SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp | 3
SourceCode/Bond/Servo/CPanel.h | 23
SourceCode/Bond/Servo/Context.h | 39
SourceCode/Bond/Servo/ToolUnits.h | 1
SourceCode/Bond/Servo/CPageGraph2.cpp | 274 ++
SourceCode/Bond/Servo/CReadStep.cpp | 4
SourceCode/Bond/Servo/EqsGraphWnd.h | 235 +
SourceCode/Bond/Servo/CLoadPort.h | 27
SourceCode/Bond/Servo/CPanelEquipment.h | 2
SourceCode/Bond/Servo/CVacuumBake.h | 24
SourceCode/Bond/Servo/ServoDlg.cpp | 380 --
SourceCode/Bond/Servo/CPageGraph1.cpp | 406 +++
/dev/null | 0
SourceCode/Bond/Servo/CEqCimMessageClearStep.h | 21
SourceCode/Bond/Servo/CEqVCREnableStep.cpp | 48
SourceCode/Bond/Servo/CAligner.cpp | 61
SourceCode/Bond/Servo/CPin.cpp | 129 +
SourceCode/Bond/x64/Debug/AlarmList.csv | 3
SourceCode/Bond/Servo/CBonder.cpp | 22
SourceCode/Bond/Servo/CFliper.h | 24
SourceCode/Bond/Servo/Common.h | 29
77 files changed, 7,187 insertions(+), 332 deletions(-)
diff --git "a/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1\0501\051.xlsx" "b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1\0501\051.xlsx"
deleted file mode 100644
index 312cbab..0000000
--- "a/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1\0501\051.xlsx"
+++ /dev/null
Binary files differ
diff --git a/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx
new file mode 100644
index 0000000..544f8a8
--- /dev/null
+++ b/Document/ESWIN_EAS_Bonder_Inline_Mapping_Address_v1.1.1.xlsx
Binary files differ
diff --git a/Document/simulator/DEFAULT.SMD b/Document/simulator/DEFAULT.SMD
new file mode 100644
index 0000000..c7f1960
--- /dev/null
+++ b/Document/simulator/DEFAULT.SMD
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<SECSMessage><AreYouThere><Header><MessageName>AreYouThere</MessageName><Description>Are You There Request</Description><Stream>1</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></AreYouThere><OnLineData><Header><MessageName>OnLineData</MessageName><Description>Data signifying that the equipment is alive</Description><Stream>1</Stream><Function>2</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="True" ItemName="MDLN">AIMFAb</A><A Count="6" Fixed="True" ItemName="SOFTREV">V01R01</A></L></DataItem></OnLineData><IAmHere><Header><MessageName>IAmHere</MessageName><Description>Host replies to the equipment</Description><Stream>1</Stream><Function>2</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="0" Fixed="True" ItemName=""/></DataItem></IAmHere><S1F3><Header><MessageName>S1F3</MessageName><Description>Selected Equipment Status Request</Description><Stream>1</Stream><Function>3</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="20" Fixed="False" ItemName="SVIDCOUNT"><I2 Count="1" Fixed="True" ItemName="SVID">0</I2></L></DataItem></S1F3><S1F4><Header><MessageName>S1F4</MessageName><Description>Selected Equipment Status Data</Description><Stream>1</Stream><Function>4</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="20" Fixed="False" ItemName="SVCOUNT"><X Count="16" Fixed="False" ItemName="SV"></X></L></DataItem></S1F4><S1F5><Header><MessageName>S1F5</MessageName><Description>Formatted Status Request</Description><Stream>1</Stream><Function>5</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="SFCD">0</B></DataItem></S1F5><S1F6><Header><MessageName>S1F6</MessageName><Description>Formatted Status Data</Description><Stream>1</Stream><Function>6</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S1F6><S1F7><Header><MessageName>S1F7</MessageName><Description>Fixed Status Request</Description><Stream>1</Stream><Function>7</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="SFCD">0</B></DataItem></S1F7><S1F8><Header><MessageName>S1F8</MessageName><Description>Fixed Status Data</Description><Stream>1</Stream><Function>8</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S1F8><S1F9><Header><MessageName>S1F9</MessageName><Description>Material Transfer Status Request</Description><Stream>1</Stream><Function>9</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S1F9><S1F10><Header><MessageName>S1F10</MessageName><Description>Material Transfer Status Data</Description><Stream>1</Stream><Function>10</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="6" Fixed="False" ItemName="TSIP"></B><B Count="6" Fixed="False" ItemName="TSOP"></B></L></DataItem></S1F10><S1F11><Header><MessageName>S1F11</MessageName><Description>Status Variable Namelist Request</Description><Stream>1</Stream><Function>11</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="20" Fixed="False" ItemName="SVIDCOUNT"><I2 Count="1" Fixed="True" ItemName="SVID">0</I2></L></DataItem></S1F11><S1F12><Header><MessageName>S1F12</MessageName><Description>Status Variable Namelist Reply</Description><Stream>1</Stream><Function>12</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="20" Fixed="False" ItemName="SVIDCOUNT"><L Count="3" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="SVID">0</I2><A Count="10" Fixed="False" ItemName="SVNAME"></A><A Count="6" Fixed="False" ItemName="UNITS"></A></L></L></DataItem></S1F12><ConnectHost><Header><MessageName>ConnectHost</MessageName><Description>Establish Communications Request</Description><Stream>1</Stream><Function>13</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="True" ItemName="MDLN">AIMFAB</A><A Count="6" Fixed="True" ItemName="SOFTREV">V01R01</A></L></DataItem></ConnectHost><ConnectEquip><Header><MessageName>ConnectEquip</MessageName><Description>Establish Communications Request</Description><Stream>1</Stream><Function>13</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="0" Fixed="True" ItemName=""/></DataItem></ConnectEquip><HostConnected><Header><MessageName>HostConnected</MessageName><Description>Establish Communications Request Acknowledge</Description><Stream>1</Stream><Function>14</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="COMMACK">0</B><L Count="0" Fixed="True" ItemName=""/></L></DataItem></HostConnected><EquipConnected><Header><MessageName>EquipConnected</MessageName><Description>Establish Communications Request Acknowledge</Description><Stream>1</Stream><Function>14</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="COMMACK">0</B><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="True" ItemName="MDLN">AIMFAB</A><A Count="6" Fixed="True" ItemName="SOFTREV">V01R01</A></L></L></DataItem></EquipConnected><S1F15><Header><MessageName>S1F15</MessageName><Description>Request OFF-LINE</Description><Stream>1</Stream><Function>15</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S1F15><S1F16><Header><MessageName>S1F16</MessageName><Description>Request OFF-LINE Acknowledge</Description><Stream>1</Stream><Function>16</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="OFLACK">0</B></DataItem></S1F16><S1F17><Header><MessageName>S1F17</MessageName><Description>Request ON-LINE</Description><Stream>1</Stream><Function>17</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S1F17><S1F18><Header><MessageName>S1F18</MessageName><Description>Request ON-LINE Acknowledge</Description><Stream>1</Stream><Function>18</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ONLACK">0</B></DataItem></S1F18><S1F19><Header><MessageName>S1F19</MessageName><Description>Get Attribute</Description><Stream>1</Stream><Function>19</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="10" Fixed="False" ItemName="OBJTYPE"></A><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><A Count="6" Fixed="True" ItemName="OBJECTID"> </A></L><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><A Count="6" Fixed="True" ItemName="ATTRID"> </A></L></L></DataItem></S1F19><S1F20><Header><MessageName>S1F20</MessageName><Description>Attribute Data</Description><Stream>1</Stream><Function>20</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><A Count="6" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S1F20><S2F1><Header><MessageName>S2F1</MessageName><Description>Service Program Load Inquire</Description><Stream>2</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="10" Fixed="False" ItemName="SPID"></A><I2 Count="1" Fixed="True" ItemName="LENGTH">0</I2></L></DataItem></S2F1><S2F2><Header><MessageName>S2F2</MessageName><Description>Service Program Load Grant</Description><Stream>2</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F2><S2F3><Header><MessageName>S2F3</MessageName><Description>Service Program Send</Description><Stream>2</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="128" Fixed="False" ItemName="EPD"></B></DataItem></S2F3><S2F4><Header><MessageName>S2F4</MessageName><Description>Service Program Acknowledge</Description><Stream>2</Stream><Function>4</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F4><S2F5><Header><MessageName>S2F5</MessageName><Description>Service Program Load Request</Description><Stream>2</Stream><Function>5</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="10" Fixed="False" ItemName="SPID"></A></DataItem></S2F5><S2F6><Header><MessageName>S2F6</MessageName><Description>Service Program Load Data</Description><Stream>2</Stream><Function>6</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F6><S2F7><Header><MessageName>S2F7</MessageName><Description>Service Program Run Send</Description><Stream>2</Stream><Function>7</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="10" Fixed="False" ItemName="SPID"></A></DataItem></S2F7><S2F8><Header><MessageName>S2F8</MessageName><Description>Service Program Run Acknowledge</Description><Stream>2</Stream><Function>8</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F8><S2F9><Header><MessageName>S2F9</MessageName><Description>Service Program Results Request</Description><Stream>2</Stream><Function>9</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="10" Fixed="False" ItemName="SPID"></A></DataItem></S2F9><S2F10><Header><MessageName>S2F10</MessageName><Description>Service Program Results Data</Description><Stream>2</Stream><Function>10</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><X Count="100" Fixed="False" ItemName="ACKC"></X></DataItem></S2F10><S2F11><Header><MessageName>S2F11</MessageName><Description>Service Program Directory Request</Description><Stream>2</Stream><Function>11</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S2F11><S2F12><Header><MessageName>S2F12</MessageName><Description>Service Program Directory Data</Description><Stream>2</Stream><Function>12</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="PROGRAMCOUNT"><A Count="10" Fixed="False" ItemName="SPID"></A></L></DataItem></S2F12><S2F13><Header><MessageName>S2F13</MessageName><Description>Equipment Constant Request</Description><Stream>2</Stream><Function>13</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="ECIDCOUNT"><U2 Count="1" Fixed="True" ItemName="ECID">0</U2></L></DataItem></S2F13><S2F14><Header><MessageName>S2F14</MessageName><Description>Equipment Constant Data</Description><Stream>2</Stream><Function>14</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="ECVCOUNT"><U2 Count="1" Fixed="True" ItemName="ECV">0</U2></L></DataItem></S2F14><S2F15><Header><MessageName>S2F15</MessageName><Description>New Equipment Constant Send</Description><Stream>2</Stream><Function>15</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="ECIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ECID">0</U2><A Count="10" Fixed="False" ItemName="ECV"></A></L></L></DataItem></S2F15><S2F16><Header><MessageName>S2F16</MessageName><Description>New Equipment Constant Acknowledge</Description><Stream>2</Stream><Function>16</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="EAC">0</B></DataItem></S2F16><DateTimeRequest><Header><MessageName>DateTimeRequest</MessageName><Description>Date and Time Request</Description><Stream>2</Stream><Function>17</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></DateTimeRequest><DateTimeData><Header><MessageName>DateTimeData</MessageName><Description>Date and Time Data</Description><Stream>2</Stream><Function>18</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="True" ItemName="TIMEDATE"> </A></DataItem></DateTimeData><S2F19><Header><MessageName>S2F19</MessageName><Description>Reset or Initialize Send</Description><Stream>2</Stream><Function>19</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="CCODE">0</B></DataItem></S2F19><S2F20><Header><MessageName>S2F20</MessageName><Description>Reset Acknowledge</Description><Stream>2</Stream><Function>20</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F20><S2F21><Header><MessageName>S2F21</MessageName><Description>Remote Command Send</Description><Stream>2</Stream><Function>21</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="False" ItemName="RCMD"></A></DataItem></S2F21><S2F22><Header><MessageName>S2F22</MessageName><Description>Remote Command Acknowledge</Description><Stream>2</Stream><Function>22</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="CMDA">0</B></DataItem></S2F22><S2F23><Header><MessageName>S2F23</MessageName><Description>Trace Initialize Send</Description><Stream>2</Stream><Function>23</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><A Count="6" Fixed="True" ItemName="DSPER"> </A><U2 Count="1" Fixed="True" ItemName="TOTSMP">0</U2><U2 Count="1" Fixed="True" ItemName="REPGSZ">0</U2><L Count="10" Fixed="False" ItemName="SVIDCOUNT"><U2 Count="1" Fixed="True" ItemName="SVID">0</U2></L></L></DataItem></S2F23><S2F24><Header><MessageName>S2F24</MessageName><Description>Trace Initialize Acknowledge</Description><Stream>2</Stream><Function>24</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F24><S2F25><Header><MessageName>S2F25</MessageName><Description>Loopback Diagnostic Request</Description><Stream>2</Stream><Function>25</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="20" Fixed="False" ItemName="DATA"></B></DataItem></S2F25><S2F26><Header><MessageName>S2F26</MessageName><Description>Loopback Diagnostic Data</Description><Stream>2</Stream><Function>26</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="20" Fixed="False" ItemName="DATA"></B></DataItem></S2F26><S2F27><Header><MessageName>S2F27</MessageName><Description>Initiate Processing Request</Description><Stream>2</Stream><Function>27</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="LOC"></A><A Count="16" Fixed="False" ItemName="PPID"></A><L Count="10" Fixed="False" ItemName="MTIDCOUNT"><A Count="16" Fixed="False" ItemName="MTID"></A></L></L></DataItem></S2F27><S2F28><Header><MessageName>S2F28</MessageName><Description>Initiate Processing Acknowledge</Description><Stream>2</Stream><Function>28</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U1 Count="1" Fixed="True" ItemName="CMDA">0</U1></DataItem></S2F28><S2F29><Header><MessageName>S2F29</MessageName><Description>Equipment Constant Namelist Request</Description><Stream>2</Stream><Function>29</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="ECIDCOUNT"><U2 Count="1" Fixed="True" ItemName="ECID">0</U2></L></DataItem></S2F29><S2F30><Header><MessageName>S2F30</MessageName><Description>Equipment Constant Namelist</Description><Stream>2</Stream><Function>30</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="ECIDCOUNT"><L Count="6" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ECID">0</U2><A Count="16" Fixed="False" ItemName="ECNAME"></A><A Count="10" Fixed="False" ItemName="ECMIN"></A><A Count="10" Fixed="False" ItemName="ECMAX"></A><A Count="10" Fixed="False" ItemName="ECDEF"></A><A Count="6" Fixed="False" ItemName="ECUNIT"></A></L></L></DataItem></S2F30><S2F31><Header><MessageName>S2F31</MessageName><Description>Date and Time Set Request</Description><Stream>2</Stream><Function>31</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="True" ItemName="TIMEDATE"> </A></DataItem></S2F31><S2F32><Header><MessageName>S2F32</MessageName><Description>Date and Time Set Acknowledge</Description><Stream>2</Stream><Function>32</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F32><S2F33><Header><MessageName>S2F33</MessageName><Description>Define Report</Description><Stream>2</Stream><Function>33</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><L Count="10" Fixed="False" ItemName="RPTIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="10" Fixed="False" ItemName="VIDCOUNT"><U2 Count="1" Fixed="True" ItemName="VID">0</U2></L></L></L></L></DataItem></S2F33><S2F34><Header><MessageName>S2F34</MessageName><Description>Define Report Acknowledge</Description><Stream>2</Stream><Function>34</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="DRACK">0</B></DataItem></S2F34><S2F35><Header><MessageName>S2F35</MessageName><Description>Link Event Report</Description><Stream>2</Stream><Function>35</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><L Count="10" Fixed="False" ItemName="CEIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="RPTIDCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></L></L></L></DataItem></S2F35><S2F36><Header><MessageName>S2F36</MessageName><Description>Link Event Report Acknowledge</Description><Stream>2</Stream><Function>36</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="LRACK">0</B></DataItem></S2F36><S2F37><Header><MessageName>S2F37</MessageName><Description>Enable or Disable Event Report</Description><Stream>2</Stream><Function>37</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="CEED">False</BOOLEAN><L Count="40" Fixed="False" ItemName="CEIDCOUNT"><U2 Count="1" Fixed="True" ItemName="CEID">0</U2></L></L></DataItem></S2F37><S2F38><Header><MessageName>S2F38</MessageName><Description>Enable or Disable Event Report Acknowledge</Description><Stream>2</Stream><Function>38</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ERACK">0</B></DataItem></S2F38><S2F39><Header><MessageName>S2F39</MessageName><Description>Multi-block Inquire</Description><Stream>2</Stream><Function>39</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="DATALENGTH">0</U2></L></DataItem></S2F39><S2F40><Header><MessageName>S2F40</MessageName><Description>Multi-block Inquire</Description><Stream>2</Stream><Function>40</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S2F40><S2F41><Header><MessageName>S2F41</MessageName><Description>Host Command Send</Description><Stream>2</Stream><Function>41</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="RCMD"></A><L Count="10" Fixed="False" ItemName="CPCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="CPNAME"></A><A Count="10" Fixed="False" ItemName="CPVAL"></A></L></L></L></DataItem></S2F41><S2F42><Header><MessageName>S2F42</MessageName><Description>Host Command Acknowledge</Description><Stream>2</Stream><Function>42</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="HCACK">0</B><L Count="10" Fixed="False" ItemName="CPCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="CPNAME"></A><B Count="1" Fixed="True" ItemName="CPACK">0</B></L></L></L></DataItem></S2F42><S2F43><Header><MessageName>S2F43</MessageName><Description>Reset Spooling Streams and Functions</Description><Stream>2</Stream><Function>43</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="STRIDCOUNT"><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="STRID">0</B><L Count="10" Fixed="False" ItemName="FCNIDCOUNT"><B Count="1" Fixed="True" ItemName="FCNID">0</B></L></L></L></DataItem></S2F43><S2F44><Header><MessageName>S2F44</MessageName><Description>Reset Spooling Acknowledge</Description><Stream>2</Stream><Function>44</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="RSACK">0</B><L Count="10" Fixed="False" ItemName="STRIDCOUNT"><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="STRID">0</B><B Count="1" Fixed="True" ItemName="STRACK">0</B><L Count="10" Fixed="False" ItemName="FCNIDCOUNT"><B Count="1" Fixed="True" ItemName="FCNID">0</B></L></L></L></L></DataItem></S2F44><S2F45><Header><MessageName>S2F45</MessageName><Description>Define Variable Limit Attributes</Description><Stream>2</Stream><Function>45</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><L Count="10" Fixed="False" ItemName="VARCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="VID">0</U2><L Count="10" Fixed="False" ItemName="LIMITCOUNT"><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="LIMITID">0</B><L Count="2" Fixed="True" ItemName="Limits"><A Count="10" Fixed="False" ItemName="UPPERDB"></A><A Count="10" Fixed="False" ItemName="LOWERDB"></A></L></L></L></L></L></L></DataItem></S2F45><S2F46><Header><MessageName>S2F46</MessageName><Description>Variable Limit Attribute Acknowledge</Description><Stream>2</Stream><Function>46</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="ACKC">0</B><L Count="10" Fixed="False" ItemName="VARCOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="VID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><L Count="2" Fixed="True" ItemName="Limits"><B Count="1" Fixed="True" ItemName="LIMITID">0</B><B Count="1" Fixed="True" ItemName="LIMITERROR">0</B></L></L></L></L></DataItem></S2F46><S2F47><Header><MessageName>S2F47</MessageName><Description>Variable Limit Attribute Request</Description><Stream>2</Stream><Function>47</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="VARCOUNT"><U2 Count="1" Fixed="True" ItemName="VID">0</U2></L></DataItem></S2F47><S2F48><Header><MessageName>S2F48</MessageName><Description>Variable Limit Attribute Send</Description><Stream>2</Stream><Function>48</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="VARCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="VID">0</U2><L Count="4" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="UNITS"></A><A Count="10" Fixed="False" ItemName="LIMITMIN"></A><A Count="10" Fixed="False" ItemName="LIMITMAX"></A><L Count="10" Fixed="False" ItemName="LIMITCOUNT"><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="LIMITID">0</B><A Count="10" Fixed="False" ItemName="UPPERDB"></A><A Count="10" Fixed="False" ItemName="LOWERDB"></A></L></L></L></L></L></DataItem></S2F48><S2F49><Header><MessageName>S2F49</MessageName><Description>Data Report Create Request</Description><Stream>2</Stream><Function>49</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><A Count="16" Fixed="False" ItemName="DATASRC"></A><L Count="10" Fixed="False" ItemName="VARCOUNT"><U2 Count="1" Fixed="True" ItemName="VID">0</U2></L></L></DataItem></S2F49><S2F50><Header><MessageName>S2F50</MessageName><Description>Data Report Create Acknowledge</Description><Stream>2</Stream><Function>50</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S2F50><S2F51><Header><MessageName>S2F51</MessageName><Description>Data Report Delete Request</Description><Stream>2</Stream><Function>51</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></DataItem></S2F51><S2F52><Header><MessageName>S2F52</MessageName><Description>Data Report Delete Acknowledge</Description><Stream>2</Stream><Function>52</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S2F52><S2F53><Header><MessageName>S2F53</MessageName><Description>Trace Create Request</Description><Stream>2</Stream><Function>53</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="6" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><BOOLEAN Count="1" Fixed="True" ItemName="CEED">False</BOOLEAN><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L><F4 Count="1" Fixed="True" ItemName="TRSPER">0</F4><L Count="8" Fixed="True" ItemName="TRACECOUNT"><U2 Count="1" Fixed="True" ItemName="TOTSMP">0</U2><U2 Count="1" Fixed="True" ItemName="REPGSZ">0</U2><A Count="80" Fixed="False" ItemName="STARTEVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="STARTCEID">0</U2><A Count="80" Fixed="False" ItemName="STOPEVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="STOPCEID">0</U2><BOOLEAN Count="1" Fixed="True" ItemName="TRAUTOD">False</BOOLEAN><BOOLEAN Count="1" Fixed="True" ItemName="RPTOC">False</BOOLEAN></L></L></DataItem></S2F53><S2F54><Header><MessageName>S2F54</MessageName><Description>Trace Create Acknowledge</Description><Stream>2</Stream><Function>54</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S2F54><S2F55><Header><MessageName>S2F55</MessageName><Description>Trace Delete Request</Description><Stream>2</Stream><Function>55</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="TRACECOUNT"><U2 Count="1" Fixed="True" ItemName="TRID">0</U2></L></DataItem></S2F55><S2F56><Header><MessageName>S2F56</MessageName><Description>Trace Delete Acknowledge</Description><Stream>2</Stream><Function>56</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKC">False</BOOLEAN><L Count="10" Fixed="False" ItemName="TRACECOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S2F56><S2F57><Header><MessageName>S2F57</MessageName><Description>Collection Event Link Request</Description><Stream>2</Stream><Function>57</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="16" Fixed="False" ItemName="REPORTCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></L></DataItem></S2F57><S2F58><Header><MessageName>S2F58</MessageName><Description>Collection Event Link Acknowledge</Description><Stream>2</Stream><Function>58</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S2F58><S2F59><Header><MessageName>S2F59</MessageName><Description>Collection Event Unlink Request</Description><Stream>2</Stream><Function>59</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></DataItem></S2F59><S2F60><Header><MessageName>S2F60</MessageName><Description>Collection Event Unlink Acknowledge</Description><Stream>2</Stream><Function>60</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S2F60><S2F61><Header><MessageName>S2F61</MessageName><Description>Trace Reset Request</Description><Stream>2</Stream><Function>61</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="16" Fixed="False" ItemName="TRACECOUNT"><U2 Count="1" Fixed="True" ItemName="TRID">0</U2></L></DataItem></S2F61><S2F62><Header><MessageName>S2F62</MessageName><Description>Trace Report Reset Acknowledge</Description><Stream>2</Stream><Function>62</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKC">False</BOOLEAN><L Count="16" Fixed="False" ItemName="TRACECOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S2F62><S2F63><Header><MessageName>S2F63</MessageName><Description>Enhanced Remote Command</Description><Stream>2</Stream><Function>63</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJSPEC"></A><A Count="80" Fixed="False" ItemName="RCMD"></A><L Count="10" Fixed="False" ItemName="PARMCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="CPNAME">0</U2><U2 Count="1" Fixed="True" ItemName="CPVAL">0</U2></L></L></L></DataItem></S2F63><S2F64><Header><MessageName>S2F64</MessageName><Description>Enhanced Remote Command Acknowledge</Description><Stream>2</Stream><Function>64</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="HCACK">False</BOOLEAN><L Count="10" Fixed="False" ItemName="PARMCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="CPNAME">0</U2><U2 Count="1" Fixed="True" ItemName="CEPACK">0</U2></L></L></L></DataItem></S2F64><S3F1><Header><MessageName>S3F1</MessageName><Description>Material Status Request</Description><Stream>3</Stream><Function>1</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S3F1><S3F2><Header><MessageName>S3F2</MessageName><Description>Material Status Data</Description><Stream>3</Stream><Function>2</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="MF">0</B><L Count="5" Fixed="False" ItemName="MTCOUNT"><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="LOC"></A><U2 Count="1" Fixed="True" ItemName="QUA">0</U2><A Count="16" Fixed="False" ItemName="MTID"></A></L></L></L></DataItem></S3F2><S3F3><Header><MessageName>S3F3</MessageName><Description>Time to Completion Request</Description><Stream>3</Stream><Function>3</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S3F3><S3F4><Header><MessageName>S3F4</MessageName><Description>Time to Completion Data</Description><Stream>3</Stream><Function>4</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="CCODE">0</B><L Count="5" Fixed="False" ItemName="MTCOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TTC">0</U2><U2 Count="1" Fixed="True" ItemName="QUA">0</U2><A Count="16" Fixed="False" ItemName="MTID"></A></L></L></L></DataItem></S3F4><S3F5><Header><MessageName>S3F5</MessageName><Description>Material Found Send</Description><Stream>3</Stream><Function>5</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="CCODE">0</B><U2 Count="1" Fixed="True" ItemName="QUA">0</U2></L></DataItem></S3F5><S3F6><Header><MessageName>S3F6</MessageName><Description>Material Found Acknowledge</Description><Stream>3</Stream><Function>6</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC3">0</B></DataItem></S3F6><S3F7><Header><MessageName>S3F7</MessageName><Description>Material Lost Send</Description><Stream>3</Stream><Function>7</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S3F7><S3F8><Header><MessageName>S3F8</MessageName><Description>Material Lost Acknowledge</Description><Stream>3</Stream><Function>8</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC3">0</B></DataItem></S3F8><S3F9><Header><MessageName>S3F9</MessageName><Description>Material ID Equate Send</Description><Stream>3</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><A Count="16" Fixed="False" ItemName="EMID"></A></L></DataItem></S3F9><S3F10><Header><MessageName>S3F10</MessageName><Description>Material ID Equate Acknowledge</Description><Stream>3</Stream><Function>10</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC3">0</B></DataItem></S3F10><S3F11><Header><MessageName>S3F11</MessageName><Description>Material ID Request</Description><Stream>3</Stream><Function>11</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="PTN">0</B></DataItem></S3F11><S3F12><Header><MessageName>S3F12</MessageName><Description>Material ID Request Acknowledge</Description><Stream>3</Stream><Function>12</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><B Count="1" Fixed="True" ItemName="MIDRA">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S3F12><S3F13><Header><MessageName>S3F13</MessageName><Description>Material ID Send</Description><Stream>3</Stream><Function>13</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S3F13><S3F14><Header><MessageName>S3F14</MessageName><Description>Material ID Acknowledge</Description><Stream>3</Stream><Function>14</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="MIDAC">0</B></DataItem></S3F14><S4F1><Header><MessageName>S4F1</MessageName><Description>Ready to Send Materials</Description><Stream>4</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F1><S4F2><Header><MessageName>S4F2</MessageName><Description>Ready to Send Acknowledge</Description><Stream>4</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="RSACK">0</B></DataItem></S4F2><S4F3><Header><MessageName>S4F3</MessageName><Description>Send Material</Description><Stream>4</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F3><S4F5><Header><MessageName>S4F5</MessageName><Description>Handshake Complete</Description><Stream>4</Stream><Function>5</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F5><S4F7><Header><MessageName>S4F7</MessageName><Description>Not Ready to Send</Description><Stream>4</Stream><Function>7</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F7><S4F9><Header><MessageName>S4F9</MessageName><Description>Stuck in Sender</Description><Stream>4</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F9><S4F11><Header><MessageName>S4F11</MessageName><Description>Stuck in Receiver</Description><Stream>4</Stream><Function>11</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F11><S4F13><Header><MessageName>S4F13</MessageName><Description>Send Incomplete Timeout</Description><Stream>4</Stream><Function>13</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F13><S4F15><Header><MessageName>S4F15</MessageName><Description>Material Received</Description><Stream>4</Stream><Function>15</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F15><S4F17><Header><MessageName>S4F17</MessageName><Description>Request to Receive</Description><Stream>4</Stream><Function>17</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PTN">0</B><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S4F17><S4F18><Header><MessageName>S4F18</MessageName><Description>Request to Receive Acknowledge</Description><Stream>4</Stream><Function>18</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S4F18><S4F19><Header><MessageName>S4F19</MessageName><Description>Transfer Job Create</Description><Stream>4</Stream><Function>19</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="TRJOBNAME"></A><L Count="5" Fixed="False" ItemName="TRANSFERCOUNT"><L Count="12" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><U2 Count="1" Fixed="True" ItemName="TRPORT">0</U2><A Count="16" Fixed="False" ItemName="TROBJNAME"></A><U2 Count="1" Fixed="True" ItemName="TROBJTYPE">0</U2><U1 Count="1" Fixed="True" ItemName="TRROLE">0</U1><A Count="16" Fixed="False" ItemName="TRRCP"></A><A Count="16" Fixed="False" ItemName="TRPTNR"></A><U2 Count="1" Fixed="True" ItemName="TRPTPORT">0</U2><U1 Count="1" Fixed="True" ItemName="TRDIR">0</U1><U1 Count="1" Fixed="True" ItemName="TRTYPE">0</U1><U2 Count="16" Fixed="False" ItemName="TRLOCATION"></U2><BOOLEAN Count="1" Fixed="True" ItemName="TRAUTOSTART">False</BOOLEAN></L></L></L></L></DataItem></S4F19><S4F20><Header><MessageName>S4F20</MessageName><Description>Transfer Job Acknowledge</Description><Stream>4</Stream><Function>20</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRJOBID">0</U2><L Count="5" Fixed="False" ItemName="TRANSFERCOUNT"><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2><L Count="5" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S4F20><S4F21><Header><MessageName>S4F21</MessageName><Description>Transfer Job Command</Description><Stream>4</Stream><Function>21</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRJOBID">0</U2><A Count="16" Fixed="False" ItemName="TRCMDNAME"></A><L Count="5" Fixed="False" ItemName="PARMCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="CPNAME"></A><A Count="16" Fixed="False" ItemName="CPVAL"></A></L></L></L></DataItem></S4F21><S4F22><Header><MessageName>S4F22</MessageName><Description>Transfer Command Acknowledge</Description><Stream>4</Stream><Function>22</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2><L Count="5" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S4F22><S4F23><Header><MessageName>S4F23</MessageName><Description>Transfer Lot Alert</Description><Stream>4</Stream><Function>23</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRJOBID">0</U2><A Count="16" Fixed="False" ItemName="TRJOBNAME"></A><B Count="1" Fixed="True" ItemName="TRJOBMS">0</B><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2><L Count="5" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S4F23><S4F24><Header><MessageName>S4F24</MessageName><Description>Transfer Alert Acknowledge</Description><Stream>4</Stream><Function>24</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S4F24><S4F25><Header><MessageName>S4F25</MessageName><Description>Multi-block Inquire</Description><Stream>4</Stream><Function>25</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="DATALENGTH">0</U2></L></DataItem></S4F25><S4F26><Header><MessageName>S4F26</MessageName><Description>Multi-block Grant</Description><Stream>4</Stream><Function>26</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S4F26><S4F27><Header><MessageName>S4F27</MessageName><Description>Handoff Ready</Description><Stream>4</Stream><Function>27</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="EQNAME"></A><L Count="11" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><U2 Count="1" Fixed="True" ItemName="TRPORT">0</U2><A Count="16" Fixed="False" ItemName="TROBJNAME"></A><U2 Count="1" Fixed="True" ItemName="TROBJTYPE">0</U2><U1 Count="1" Fixed="True" ItemName="TRROLE">0</U1><A Count="16" Fixed="False" ItemName="TRRCP"></A><A Count="16" Fixed="False" ItemName="TRPTNR"></A><U2 Count="1" Fixed="True" ItemName="TRPTPORT">0</U2><U1 Count="1" Fixed="True" ItemName="TRDIR">0</U1><U1 Count="1" Fixed="True" ItemName="TRTYPE">0</U1><U2 Count="16" Fixed="False" ItemName="TRLOCATION"></U2></L></L></DataItem></S4F27><S4F29><Header><MessageName>S4F29</MessageName><Description>Handoff Command</Description><Stream>4</Stream><Function>29</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><U2 Count="1" Fixed="True" ItemName="MCINDEX">0</U2><A Count="16" Fixed="False" ItemName="CNAME"></A><L Count="5" Fixed="False" ItemName="PARMCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="CPNAME"></A><A Count="10" Fixed="False" ItemName="CPVAL"></A></L></L></L></DataItem></S4F29><S4F31><Header><MessageName>S4F31</MessageName><Description>Handoff Command Complete</Description><Stream>4</Stream><Function>31</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><U2 Count="1" Fixed="True" ItemName="MCINDEX">0</U2><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2><L Count="5" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S4F31><S4F33><Header><MessageName>S4F33</MessageName><Description>Handoff Verified</Description><Stream>4</Stream><Function>33</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2><L Count="5" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S4F33><S4F35><Header><MessageName>S4F35</MessageName><Description>Handoff Cancel Ready</Description><Stream>4</Stream><Function>35</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2></DataItem></S4F35><S4F37><Header><MessageName>S4F37</MessageName><Description>Handoff Cancel Ready Acknowledge</Description><Stream>4</Stream><Function>37</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><U2 Count="1" Fixed="True" ItemName="ACKC">0</U2></L></DataItem></S4F37><S4F39><Header><MessageName>S4F39</MessageName><Description>Handoff Halt</Description><Stream>4</Stream><Function>39</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2></DataItem></S4F39><S4F41><Header><MessageName>S4F41</MessageName><Description>Handoff Halt Acknowledge</Description><Stream>4</Stream><Function>41</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRLINK">0</U2><U2 Count="1" Fixed="True" ItemName="HOHALTACK">0</U2></L></DataItem></S4F41><S5F1><Header><MessageName>S5F1</MessageName><Description>Alarm Report Send</Description><Stream>5</Stream><Function>1</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="ALCD">0</B><B Count="1" Fixed="True" ItemName="ALID">0</B><A Count="80" Fixed="False" ItemName="ALTX"></A></L></DataItem></S5F1><S5F2><Header><MessageName>S5F2</MessageName><Description>Alarm Report Acknowledge</Description><Stream>5</Stream><Function>2</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC5">0</B></DataItem></S5F2><S5F3><Header><MessageName>S5F3</MessageName><Description>Enable or Disable Alarm Send</Description><Stream>5</Stream><Function>3</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="ALED">0</B><B Count="1" Fixed="True" ItemName="ALID">0</B></L></DataItem></S5F3><S5F4><Header><MessageName>S5F4</MessageName><Description>Enable or Disable Alarm Acknowledge</Description><Stream>5</Stream><Function>4</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC5">0</B></DataItem></S5F4><S5F5><Header><MessageName>S5F5</MessageName><Description>List Alarms Request</Description><Stream>5</Stream><Function>5</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="ALIDCOUNT"><B Count="1" Fixed="True" ItemName="ALID">0</B></L></DataItem></S5F5><S5F6><Header><MessageName>S5F6</MessageName><Description>List Alarm Data</Description><Stream>5</Stream><Function>6</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="20" Fixed="False" ItemName="ALIDCOUNT"><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="ALCD">0</B><B Count="1" Fixed="True" ItemName="ALID">0</B><A Count="80" Fixed="False" ItemName="ALTX"></A></L></L></DataItem></S5F6><S5F7><Header><MessageName>S5F7</MessageName><Description>List Enabled Alarms Request</Description><Stream>5</Stream><Function>7</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S5F7><S5F8><Header><MessageName>S5F8</MessageName><Description>List Enabled Alarm Data</Description><Stream>5</Stream><Function>8</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="20" Fixed="False" ItemName="ALIDCOUNT"><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="ALCD">0</B><B Count="1" Fixed="True" ItemName="ALID">0</B><A Count="80" Fixed="False" ItemName="ALTX"></A></L></L></DataItem></S5F8><S5F9><Header><MessageName>S5F9</MessageName><Description>Exception Post Notify</Description><Stream>5</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><A Count="20" Fixed="False" ItemName="EXID"></A><A Count="20" Fixed="False" ItemName="EXTYPE"></A><A Count="80" Fixed="False" ItemName="EXMESSAGE"></A><L Count="20" Fixed="False" ItemName="EXCOUNT"><A Count="20" Fixed="False" ItemName="EXRECVRA"></A></L></L></DataItem></S5F9><S5F10><Header><MessageName>S5F10</MessageName><Description>Exception Post Confirm</Description><Stream>5</Stream><Function>10</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S5F10><S5F11><Header><MessageName>S5F11</MessageName><Description>Exception Clear Notify</Description><Stream>5</Stream><Function>11</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><A Count="20" Fixed="False" ItemName="EXID"></A><A Count="20" Fixed="False" ItemName="EXTYPE"></A><A Count="80" Fixed="False" ItemName="EXMESSAGE"></A></L></DataItem></S5F11><S5F12><Header><MessageName>S5F12</MessageName><Description>Exception Clear Confirm</Description><Stream>5</Stream><Function>12</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S5F12><S5F13><Header><MessageName>S5F13</MessageName><Description>Exception Recover Request</Description><Stream>5</Stream><Function>13</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="EXID"></A><A Count="40" Fixed="False" ItemName="EXRECVRA"></A></L></DataItem></S5F13><S5F14><Header><MessageName>S5F14</MessageName><Description>Exception Recover Acknowledge</Description><Stream>5</Stream><Function>14</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="EXID"></A><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="2" Fixed="True" ItemName="ERRORCOUNT"><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S5F14><S5F15><Header><MessageName>S5F15</MessageName><Description>Exception Recovery Complete Notify</Description><Stream>5</Stream><Function>15</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><A Count="20" Fixed="False" ItemName="EXID"></A><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="2" Fixed="True" ItemName="ERRORCOUNT"><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S5F15><S5F16><Header><MessageName>S5F16</MessageName><Description>Exception Recovery Complete Confirm</Description><Stream>5</Stream><Function>16</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S5F16><S5F17><Header><MessageName>S5F17</MessageName><Description>Exception Recovery Abort Request</Description><Stream>5</Stream><Function>17</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="20" Fixed="False" ItemName="EXID"></A></DataItem></S5F17><S5F18><Header><MessageName>S5F18</MessageName><Description>Exception Recovery Abort Acknowledge</Description><Stream>5</Stream><Function>18</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="EXID"></A><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="2" Fixed="True" ItemName="ERRORCOUNT"><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S5F18><S6F1><Header><MessageName>S6F1</MessageName><Description>Trace Data Send</Description><Stream>6</Stream><Function>1</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="SMPLN">0</U2><A Count="12" Fixed="True" ItemName="STIME"> </A><L Count="10" Fixed="False" ItemName="SVCOUNT"><A Count="10" Fixed="False" ItemName="SV"></A></L></L></DataItem></S6F1><S6F2><Header><MessageName>S6F2</MessageName><Description>Trace Data Acknowledge</Description><Stream>6</Stream><Function>2</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC6">0</B></DataItem></S6F2><S6F3><Header><MessageName>S6F3</MessageName><Description>Discrete Variable Data Send</Description><Stream>6</Stream><Function>3</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="DSIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DSID">0</U2><L Count="5" Fixed="False" ItemName="DVCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="DVNAME"></A><A Count="16" Fixed="False" ItemName="DVVALUE"></A></L></L></L></L></L></DataItem></S6F3><S6F4><Header><MessageName>S6F4</MessageName><Description>Discrete Variable Data Acknowledge</Description><Stream>6</Stream><Function>4</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC6">0</B></DataItem></S6F4><S6F5><Header><MessageName>S6F5</MessageName><Description>Multi-block Data Send Inquire</Description><Stream>6</Stream><Function>5</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="LENGTH">0</U2></L></DataItem></S6F5><S6F6><Header><MessageName>S6F6</MessageName><Description>Multi-block Grant</Description><Stream>6</Stream><Function>6</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="GRANT6">0</B></DataItem></S6F6><S6F7><Header><MessageName>S6F7</MessageName><Description>Data Transfer Request</Description><Stream>6</Stream><Function>7</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2></DataItem></S6F7><S6F8><Header><MessageName>S6F8</MessageName><Description>Data Transfer Data</Description><Stream>6</Stream><Function>8</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="DSIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DSID">0</U2><L Count="15" Fixed="False" ItemName="DVCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="DVNAME"></A><A Count="16" Fixed="False" ItemName="DVVALUE"></A></L></L></L></L></L></DataItem></S6F8><S6F9><Header><MessageName>S6F9</MessageName><Description>Formatted Variable Send</Description><Stream>6</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="PFCD">0</B><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="DSIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DSID">0</U2><L Count="5" Fixed="False" ItemName="DVCOUNT"><A Count="16" Fixed="False" ItemName="DVVALUE"></A></L></L></L></L></DataItem></S6F9><S6F10><Header><MessageName>S6F10</MessageName><Description>Formatted Variable Acknowledge</Description><Stream>6</Stream><Function>10</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC6">0</B></DataItem></S6F10><S6F11><Header><MessageName>S6F11</MessageName><Description>Event Report Send</Description><Stream>6</Stream><Function>11</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="RPTIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="5" Fixed="False" ItemName="VCOUNT"><A Count="16" Fixed="False" ItemName="V"></A></L></L></L></L></DataItem></S6F11><S6F12><Header><MessageName>S6F12</MessageName><Description>Event Report Acknowledge</Description><Stream>6</Stream><Function>12</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC6">0</B></DataItem></S6F12><S6F13><Header><MessageName>S6F13</MessageName><Description>Annotated Event Report Send</Description><Stream>6</Stream><Function>13</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="5" Fixed="False" ItemName="VARCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="VID">0</U2><A Count="16" Fixed="False" ItemName="V"></A></L></L></L></L></L></DataItem></S6F13><S6F14><Header><MessageName>S6F14</MessageName><Description>Annotated Event Report Acknowledge</Description><Stream>6</Stream><Function>14</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC6">0</B></DataItem></S6F14><S6F15><Header><MessageName>S6F15</MessageName><Description>Event Report Request</Description><Stream>6</Stream><Function>15</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="CEID">0</U2></DataItem></S6F15><S6F16><Header><MessageName>S6F16</MessageName><Description>Event Report Data</Description><Stream>6</Stream><Function>16</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="RPTIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="5" Fixed="False" ItemName="VCOUNT"><A Count="16" Fixed="False" ItemName="V"></A></L></L></L></L></DataItem></S6F16><S6F17><Header><MessageName>S6F17</MessageName><Description>Annotated Event Report Request</Description><Stream>6</Stream><Function>17</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="CEID">0</U2></DataItem></S6F17><S6F18><Header><MessageName>S6F18</MessageName><Description>Annotated Event Report Data</Description><Stream>6</Stream><Function>18</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="RPTIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="5" Fixed="False" ItemName="VIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="VID">0</U2><A Count="16" Fixed="False" ItemName="V"></A></L></L></L></L></L></DataItem></S6F18><S6F19><Header><MessageName>S6F19</MessageName><Description>Individual Report Request</Description><Stream>6</Stream><Function>19</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></DataItem></S6F19><S6F20><Header><MessageName>S6F20</MessageName><Description>Individual Report Data</Description><Stream>6</Stream><Function>20</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="VCOUNT"><A Count="16" Fixed="False" ItemName="V"></A></L></DataItem></S6F20><S6F21><Header><MessageName>S6F21</MessageName><Description>Annotated Individual Report Request</Description><Stream>6</Stream><Function>21</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></DataItem></S6F21><S6F22><Header><MessageName>S6F22</MessageName><Description>Annotated Individual Report Data</Description><Stream>6</Stream><Function>22</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="VIDCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="VID">0</U2><A Count="16" Fixed="False" ItemName="V"></A></L></L></DataItem></S6F22><S6F23><Header><MessageName>S6F23</MessageName><Description>Request Spooled Data</Description><Stream>6</Stream><Function>23</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="CCODE">0</B></DataItem></S6F23><S6F24><Header><MessageName>S6F24</MessageName><Description>Request Spooled Data Acknowledge</Description><Stream>6</Stream><Function>24</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S6F24><S6F25><Header><MessageName>S6F25</MessageName><Description>Notification Report Send</Description><Stream>6</Stream><Function>25</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="7" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="OPID">0</U2><U4 Count="1" Fixed="True" ItemName="LINKID">0</U4><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><U2 Count="1" Fixed="True" ItemName="RMCHGSTAT">0</U2><L Count="10" Fixed="False" ItemName="VARCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S6F25><S6F26><Header><MessageName>S6F26</MessageName><Description>Notification Report Send Acknowledge</Description><Stream>6</Stream><Function>26</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC6">0</B></DataItem></S6F26><S6F27><Header><MessageName>S6F27</MessageName><Description>Trace Report Send</Description><Stream>6</Stream><Function>27</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><L Count="1" Fixed="True" ItemName="GROUPCOUNT"><L Count="16" Fixed="False" ItemName="REPORTCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="5" Fixed="False" ItemName="VCOUNT"><A Count="16" Fixed="False" ItemName="V"></A></L></L></L></L></L></DataItem></S6F27><S6F28><Header><MessageName>S6F28</MessageName><Description>Trace Report Request</Description><Stream>6</Stream><Function>28</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="TRID">0</U2></DataItem></S6F28><S6F29><Header><MessageName>S6F29</MessageName><Description>Trace Report Request</Description><Stream>6</Stream><Function>29</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="TRID">0</U2></DataItem></S6F29><S6F30><Header><MessageName>S6F30</MessageName><Description>Trace Report Data</Description><Stream>6</Stream><Function>30</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><L Count="16" Fixed="False" ItemName="REPORTCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><L Count="5" Fixed="False" ItemName="VCOUNT"><A Count="16" Fixed="False" ItemName="V"></A></L></L></L></L></DataItem></S6F30><S7F1><Header><MessageName>S7F1</MessageName><Description>Process Program Load Inquire</Description><Stream>7</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><U2 Count="1" Fixed="True" ItemName="LENGTH">0</U2></L></DataItem></S7F1><S7F2><Header><MessageName>S7F2</MessageName><Description>Process Program Load Grant</Description><Stream>7</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="PPGNT">0</B></DataItem></S7F2><S7F3><Header><MessageName>S7F3</MessageName><Description>Process Program Send</Description><Stream>7</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><B Count="256" Fixed="False" ItemName="PPBODY"></B></L></DataItem></S7F3><S7F4><Header><MessageName>S7F4</MessageName><Description>Process Program Acknowledge</Description><Stream>7</Stream><Function>4</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F4><S7F5><Header><MessageName>S7F5</MessageName><Description>Process Program Request</Description><Stream>7</Stream><Function>5</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="False" ItemName="PPID"></A></DataItem></S7F5><S7F6><Header><MessageName>S7F6</MessageName><Description>Process Program Data</Description><Stream>7</Stream><Function>6</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><B Count="256" Fixed="False" ItemName="PPBODY"></B></L></DataItem></S7F6><S7F7><Header><MessageName>S7F7</MessageName><Description>Process Program ID Request</Description><Stream>7</Stream><Function>7</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="False" ItemName="MTID"></A></DataItem></S7F7><S7F8><Header><MessageName>S7F8</MessageName><Description>Process Program ID Data</Description><Stream>7</Stream><Function>8</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><A Count="16" Fixed="False" ItemName="MTID"></A></L></DataItem></S7F8><S7F9><Header><MessageName>S7F9</MessageName><Description>Material or Process Matrix Request</Description><Stream>7</Stream><Function>9</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S7F9><S7F10><Header><MessageName>S7F10</MessageName><Description>Material or Process Matrix Data</Description><Stream>7</Stream><Function>10</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="PIDCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><L Count="25" Fixed="False" ItemName="MTIDCOUNT"><A Count="16" Fixed="False" ItemName="MTID"></A></L></L></L></DataItem></S7F10><S7F11><Header><MessageName>S7F11</MessageName><Description>Material or Process Matrix Update Send</Description><Stream>7</Stream><Function>11</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="PPIDCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><L Count="25" Fixed="False" ItemName="MTIDCOUNT"><A Count="16" Fixed="False" ItemName="MTID"></A></L></L></L></DataItem></S7F11><S7F12><Header><MessageName>S7F12</MessageName><Description>Material or Process Matrix Update Acknowledge</Description><Stream>7</Stream><Function>12</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F12><S7F13><Header><MessageName>S7F13</MessageName><Description>Material or Process Matrix Entry Send</Description><Stream>7</Stream><Function>13</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="PPIDCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><L Count="25" Fixed="False" ItemName="MTIDCOUNT"><A Count="16" Fixed="False" ItemName="MTID"></A></L></L></L></DataItem></S7F13><S7F14><Header><MessageName>S7F14</MessageName><Description>Material or Process Matrix Entry Acknowledge</Description><Stream>7</Stream><Function>14</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F14><S7F15><Header><MessageName>S7F15</MessageName><Description>Matrix Mode Select Send</Description><Stream>7</Stream><Function>15</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="MMODE">0</B></DataItem></S7F15><S7F16><Header><MessageName>S7F16</MessageName><Description>Matrix Mode Select Acknowledge</Description><Stream>7</Stream><Function>16</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F16><S7F17><Header><MessageName>S7F17</MessageName><Description>Delete Process Program Send</Description><Stream>7</Stream><Function>17</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="PPIDCOUNT"><A Count="16" Fixed="False" ItemName="PPID"></A></L></DataItem></S7F17><S7F18><Header><MessageName>S7F18</MessageName><Description>Delete Process Program Acknowledge</Description><Stream>7</Stream><Function>18</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F18><S7F19><Header><MessageName>S7F19</MessageName><Description>Current Equipment Process Program Directory Request</Description><Stream>7</Stream><Function>19</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S7F19><S7F20><Header><MessageName>S7F20</MessageName><Description>Current Equipment Process Program Directory Data</Description><Stream>7</Stream><Function>20</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="False" ItemName="PPIDCOUNT"><A Count="16" Fixed="False" ItemName="PPID"></A></L></DataItem></S7F20><S7F21><Header><MessageName>S7F21</MessageName><Description>Equipment Process Capabilities Request</Description><Stream>7</Stream><Function>21</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S7F21><S7F22><Header><MessageName>S7F22</MessageName><Description>Equipment Process Capabilities Data</Description><Stream>7</Stream><Function>22</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="MDLN"></A><A Count="6" Fixed="False" ItemName="SOFTREV"></A><U2 Count="1" Fixed="True" ItemName="CMDMAX">0</U2><U2 Count="1" Fixed="True" ItemName="BYTMAX">0</U2><L Count="5" Fixed="False" ItemName="COMMANDCOUNT"><L Count="11" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="CCODE">0</B><A Count="16" Fixed="False" ItemName="CNAME"></A><B Count="1" Fixed="True" ItemName="RQCMD">0</B><B Count="1" Fixed="True" ItemName="BLKDEF">0</B><U2 Count="1" Fixed="True" ItemName="BCDS">0</U2><U2 Count="1" Fixed="True" ItemName="IBCDS">0</U2><U2 Count="1" Fixed="True" ItemName="NBCDS">0</U2><U2 Count="1" Fixed="True" ItemName="ACDS">0</U2><U2 Count="1" Fixed="True" ItemName="IACDS">0</U2><U2 Count="1" Fixed="True" ItemName="NACDS">0</U2><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PNAME"></A><B Count="1" Fixed="True" ItemName="RQPAR">0</B><A Count="16" Fixed="False" ItemName="PDFLT"></A><A Count="16" Fixed="False" ItemName="PMAX"></A></L></L></L></L></DataItem></S7F22><S7F23><Header><MessageName>S7F23</MessageName><Description>Formatted Process Program Send</Description><Stream>7</Stream><Function>23</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><A Count="6" Fixed="False" ItemName="MDLN"></A><A Count="6" Fixed="False" ItemName="SOFTREV"></A><L Count="5" Fixed="False" ItemName="COMMANDCOUNT"><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="CCODE">0</B><L Count="5" Fixed="False" ItemName="PPARMCOUNT"><A Count="80" Fixed="False" ItemName="PPARM"></A></L></L></L></L></DataItem></S7F23><S7F24><Header><MessageName>S7F24</MessageName><Description>Formatted Process Program Acknowledge</Description><Stream>7</Stream><Function>24</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F24><S7F25><Header><MessageName>S7F25</MessageName><Description>Formatted Process Program Request</Description><Stream>7</Stream><Function>25</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="False" ItemName="PPID"></A></DataItem></S7F25><S7F26><Header><MessageName>S7F26</MessageName><Description>Formatted Process Program Data</Description><Stream>7</Stream><Function>26</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><A Count="6" Fixed="False" ItemName="MDLN"></A><A Count="6" Fixed="False" ItemName="SOFTREV"></A><L Count="5" Fixed="False" ItemName="COMMANDCOUNT"><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="CCODE">0</B><L Count="5" Fixed="False" ItemName="PPARMCOUNT"><A Count="80" Fixed="False" ItemName="PPARM"></A></L></L></L></L></DataItem></S7F26><S7F27><Header><MessageName>S7F27</MessageName><Description>Process Program Verification Send</Description><Stream>7</Stream><Function>27</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><L Count="5" Fixed="False" ItemName="ERRORCOUNT"><L Count="3" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="ACKC7A">0</B><U2 Count="1" Fixed="True" ItemName="SEQNUM">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S7F27><S7F28><Header><MessageName>S7F28</MessageName><Description>Process Program Verification Acknowledge</Description><Stream>7</Stream><Function>28</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S7F28><S7F29><Header><MessageName>S7F29</MessageName><Description>Process Program Verification Inquire</Description><Stream>7</Stream><Function>29</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><U2 Count="1" Fixed="True" ItemName="LENGTH">0</U2></DataItem></S7F29><S7F30><Header><MessageName>S7F30</MessageName><Description>Process Program Verification Grant</Description><Stream>7</Stream><Function>30</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S7F30><S7F31><Header><MessageName>S7F31</MessageName><Description>Verification Request Send</Description><Stream>7</Stream><Function>31</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><A Count="6" Fixed="False" ItemName="MDLN"></A><A Count="6" Fixed="False" ItemName="SOFTREV"></A><L Count="5" Fixed="False" ItemName="CCODECOUNT"><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="CCODE">0</B><L Count="5" Fixed="False" ItemName="PPARMCOUNT"><A Count="80" Fixed="False" ItemName="PPARM"></A></L></L></L></L></DataItem></S7F31><S7F32><Header><MessageName>S7F32</MessageName><Description>Verification Request Acknowledge</Description><Stream>7</Stream><Function>32</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC7">0</B></DataItem></S7F32><S7F33><Header><MessageName>S7F33</MessageName><Description>Process Program Available Request</Description><Stream>7</Stream><Function>33</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="False" ItemName="PPID"></A></DataItem></S7F33><S7F34><Header><MessageName>S7F34</MessageName><Description>Process Program Availability Data</Description><Stream>7</Stream><Function>34</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="PPID"></A><U2 Count="1" Fixed="True" ItemName="UNFLEN">0</U2><U2 Count="1" Fixed="True" ItemName="FRMLEN">0</U2></L></DataItem></S7F34><S7F35><Header><MessageName>S7F35</MessageName><Description>Process Program for Mid$ Request</Description><Stream>7</Stream><Function>35</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="16" Fixed="False" ItemName="MTID"></A></DataItem></S7F35><S7F36><Header><MessageName>S7F36</MessageName><Description>Process Program for Mid$ Data</Description><Stream>7</Stream><Function>36</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><A Count="16" Fixed="False" ItemName="PPID"></A><B Count="256" Fixed="False" ItemName="PPBODY"></B></L></DataItem></S7F36><S8F1><Header><MessageName>S8F1</MessageName><Description>Boot Program Request</Description><Stream>8</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S8F1><S8F2><Header><MessageName>S8F2</MessageName><Description>Boot Program Data</Description><Stream>8</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="False" ItemName="BPD"></B></DataItem></S8F2><S8F3><Header><MessageName>S8F3</MessageName><Description>Executive Program Request</Description><Stream>8</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S8F3><S8F4><Header><MessageName>S8F4</MessageName><Description>Executive Program Data</Description><Stream>8</Stream><Function>4</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="False" ItemName="EPD"></B></DataItem></S8F4><S9F1><Header><MessageName>S9F1</MessageName><Description>Unrecognized Device Id</Description><Stream>9</Stream><Function>1</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="True" ItemName="MHEAD">0 0 0 0 0 0 0 0 0 0</B></DataItem></S9F1><S9F3><Header><MessageName>S9F3</MessageName><Description>Unrecognized Stream Type</Description><Stream>9</Stream><Function>3</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="True" ItemName="MHEAD">0 0 0 0 0 0 0 0 0 0</B></DataItem></S9F3><S9F5><Header><MessageName>S9F5</MessageName><Description>Unrecognized Function Type</Description><Stream>9</Stream><Function>5</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="True" ItemName="MHEAD">0 0 0 0 0 0 0 0 0 0</B></DataItem></S9F5><S9F7><Header><MessageName>S9F7</MessageName><Description>Illegal Data</Description><Stream>9</Stream><Function>7</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="True" ItemName="MHEAD">0 0 0 0 0 0 0 0 0 0</B></DataItem></S9F7><S9F9><Header><MessageName>S9F9</MessageName><Description>Transaction Timer Timeout</Description><Stream>9</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="True" ItemName="SHEAD">0 0 0 0 0 0 0 0 0 0</B></DataItem></S9F9><S9F11><Header><MessageName>S9F11</MessageName><Description>Data Too Long</Description><Stream>9</Stream><Function>11</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="10" Fixed="True" ItemName="MHEAD">0 0 0 0 0 0 0 0 0 0</B></DataItem></S9F11><S9F13><Header><MessageName>S9F13</MessageName><Description>Conversation Timeout</Description><Stream>9</Stream><Function>13</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="MEXP"></A><X Count="64" Fixed="False" ItemName="EDID"></X></L></DataItem></S9F13><S10F1><Header><MessageName>S10F1</MessageName><Description>Terminal Request</Description><Stream>10</Stream><Function>1</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="TID">0</B><A Count="80" Fixed="False" ItemName="TEXT"></A></L></DataItem></S10F1><S10F2><Header><MessageName>S10F2</MessageName><Description>Terminal Request Acknowledge</Description><Stream>10</Stream><Function>2</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC10">0</B></DataItem></S10F2><S10F3><Header><MessageName>S10F3</MessageName><Description>Terminal Display, Single</Description><Stream>10</Stream><Function>3</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="TID">0</B><A Count="80" Fixed="False" ItemName="TEXT"></A></L></DataItem></S10F3><S10F4><Header><MessageName>S10F4</MessageName><Description>Terminal Display, Single Acknowledge</Description><Stream>10</Stream><Function>4</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC10">0</B></DataItem></S10F4><S10F5><Header><MessageName>S10F5</MessageName><Description>Terminal Display, Multi-Block</Description><Stream>10</Stream><Function>5</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="TID">0</B><L Count="6" Fixed="False" ItemName="TEXTCOUNT"><A Count="80" Fixed="False" ItemName="TEXT"></A></L></L></DataItem></S10F5><S10F6><Header><MessageName>S10F6</MessageName><Description>Terminal Display, Multi-block Acknowledge</Description><Stream>10</Stream><Function>6</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC10">0</B></DataItem></S10F6><S10F7><Header><MessageName>S10F7</MessageName><Description>Multi-block Not Allowed</Description><Stream>10</Stream><Function>7</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="TID">0</B></DataItem></S10F7><S10F9><Header><MessageName>S10F9</MessageName><Description>Broadcast</Description><Stream>10</Stream><Function>9</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="80" Fixed="False" ItemName="TEXT"></A></DataItem></S10F9><S10F10><Header><MessageName>S10F10</MessageName><Description>Broadcast Acknowledge</Description><Stream>10</Stream><Function>10</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC10">0</B></DataItem></S10F10><S12F1><Header><MessageName>S12F1</MessageName><Description>Map Set-up Data Send</Description><Stream>12</Stream><Function>1</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="15" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><U2 Count="1" Fixed="True" ItemName="FNLOC">0</U2><U2 Count="1" Fixed="True" ItemName="FFROT">0</U2><B Count="1" Fixed="True" ItemName="ORLOC">0</B><B Count="1" Fixed="True" ItemName="RPSEL">0</B><L Count="10" Fixed="False" ItemName="POINTCOUNT"><I2 Count="1" Fixed="True" ItemName="REFP">0</I2></L><A Count="6" Fixed="False" ItemName="DUTMS"></A><U2 Count="1" Fixed="True" ItemName="XDIES">0</U2><U2 Count="1" Fixed="True" ItemName="YDIES">0</U2><U2 Count="1" Fixed="True" ItemName="ROWCT">0</U2><U2 Count="1" Fixed="True" ItemName="COLCT">0</U2><B Count="1" Fixed="True" ItemName="NULBC">0</B><U2 Count="1" Fixed="True" ItemName="PRDCT">0</U2><B Count="1" Fixed="True" ItemName="PRAXI">0</B></L></DataItem></S12F1><S12F2><Header><MessageName>S12F2</MessageName><Description>Map Set-up Data Send Acknowledge</Description><Stream>12</Stream><Function>2</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S12F2><S12F3><Header><MessageName>S12F3</MessageName><Description>Map Set-up Data Request</Description><Stream>12</Stream><Function>3</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="9" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><B Count="1" Fixed="True" ItemName="MAPFT">0</B><U2 Count="1" Fixed="True" ItemName="FNLOC">0</U2><U2 Count="1" Fixed="True" ItemName="FFROT">0</U2><B Count="1" Fixed="True" ItemName="ORLOC">0</B><B Count="1" Fixed="True" ItemName="PRAXI">0</B><B Count="1" Fixed="True" ItemName="BCEQU">0</B><B Count="1" Fixed="True" ItemName="NULBC">0</B></L></DataItem></S12F3><S12F4><Header><MessageName>S12F4</MessageName><Description>Map Set-up Data</Description><Stream>12</Stream><Function>4</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="15" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><U2 Count="1" Fixed="True" ItemName="FNLOC">0</U2><B Count="1" Fixed="True" ItemName="ORLOC">0</B><B Count="1" Fixed="True" ItemName="RPSEL">0</B><L Count="10" Fixed="False" ItemName="POINTCOUNT"><I2 Count="1" Fixed="True" ItemName="REFP">0</I2></L><A Count="6" Fixed="False" ItemName="DUTMS"></A><U2 Count="1" Fixed="True" ItemName="XDIES">0</U2><U2 Count="1" Fixed="True" ItemName="YDIES">0</U2><U2 Count="1" Fixed="True" ItemName="ROWCT">0</U2><U2 Count="1" Fixed="True" ItemName="COLCT">0</U2><U2 Count="1" Fixed="True" ItemName="PRDCT">0</U2><B Count="1" Fixed="True" ItemName="BCEQU">0</B><B Count="1" Fixed="True" ItemName="NULBC">0</B><U2 Count="1" Fixed="True" ItemName="MLCL">0</U2></L></DataItem></S12F4><S12F5><Header><MessageName>S12F5</MessageName><Description>Map Transmit Inquire</Description><Stream>12</Stream><Function>5</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><B Count="1" Fixed="True" ItemName="MAPFT">0</B><U2 Count="1" Fixed="True" ItemName="MLCL">0</U2></L></DataItem></S12F5><S12F6><Header><MessageName>S12F6</MessageName><Description>Map Transmit Grant</Description><Stream>12</Stream><Function>6</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S12F6><S12F7><Header><MessageName>S12F7</MessageName><Description>Map Data Send Type 1</Description><Stream>12</Stream><Function>7</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><L Count="5" Fixed="False" ItemName="MAPDATACOUNT"><L Count="2" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="RSINF">0</I2><B Count="1" Fixed="True" ItemName="BINLT">0</B></L></L></L></DataItem></S12F7><S12F8><Header><MessageName>S12F8</MessageName><Description>Map Data Send Type 1 Acknowledge</Description><Stream>12</Stream><Function>8</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S12F8><S12F9><Header><MessageName>S12F9</MessageName><Description>Map Data Send Type 2</Description><Stream>12</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><I2 Count="1" Fixed="True" ItemName="STRP">0</I2><B Count="1" Fixed="True" ItemName="BINLT">0</B></L></DataItem></S12F9><S12F10><Header><MessageName>S12F10</MessageName><Description>Map Data Send Type 2 Acknowledge</Description><Stream>12</Stream><Function>10</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S12F10><S12F11><Header><MessageName>S12F11</MessageName><Description>Map Data Send Type 3</Description><Stream>12</Stream><Function>11</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><L Count="5" Fixed="False" ItemName="MAPDATACOUNT"><L Count="2" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="RSINF">0</I2><B Count="1" Fixed="True" ItemName="BINLT">0</B></L></L></L></DataItem></S12F11><S12F12><Header><MessageName>S12F12</MessageName><Description>Map Data Send Type 3 Acknowledge</Description><Stream>12</Stream><Function>12</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="ACKC">0</B></DataItem></S12F12><S12F13><Header><MessageName>S12F13</MessageName><Description>Map Data Request Type 1</Description><Stream>12</Stream><Function>13</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B></L></DataItem></S12F13><S12F14><Header><MessageName>S12F14</MessageName><Description>Map Data Type 1</Description><Stream>12</Stream><Function>14</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><L Count="5" Fixed="False" ItemName="MAPDATACOUNT"><L Count="2" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="RSINF">0</I2><B Count="1" Fixed="True" ItemName="BINLT">0</B></L></L></L></DataItem></S12F14><S12F15><Header><MessageName>S12F15</MessageName><Description>Map Data Request Type 2</Description><Stream>12</Stream><Function>15</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B></L></DataItem></S12F15><S12F16><Header><MessageName>S12F16</MessageName><Description>Map Data Type 2</Description><Stream>12</Stream><Function>16</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><I2 Count="1" Fixed="True" ItemName="STRP">0</I2><B Count="1" Fixed="True" ItemName="BINLT">0</B></L></DataItem></S12F16><S12F17><Header><MessageName>S12F17</MessageName><Description>Map Data Request Type 3</Description><Stream>12</Stream><Function>17</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><I2 Count="1" Fixed="True" ItemName="STRP">0</I2></L></DataItem></S12F17><S12F18><Header><MessageName>S12F18</MessageName><Description>Map Data Type 3</Description><Stream>12</Stream><Function>18</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="MTID"></A><B Count="1" Fixed="True" ItemName="IDTYP">0</B><L Count="5" Fixed="False" ItemName="MAPDATACOUNT"><L Count="2" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="RSINF">0</I2><B Count="1" Fixed="True" ItemName="BINLT">0</B></L></L></L></DataItem></S12F18><S12F19><Header><MessageName>S12F19</MessageName><Description>Map Error Report</Description><Stream>12</Stream><Function>19</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="MAPER">0</B><B Count="1" Fixed="True" ItemName="DATLC">0</B></L></DataItem></S12F19><S13F1><Header><MessageName>S13F1</MessageName><Description>Send Data Set Send</Description><Stream>13</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="1" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="DSNAME"></A></L></DataItem></S13F1><S13F2><Header><MessageName>S13F2</MessageName><Description>Send Data Set Acknowledge</Description><Stream>13</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="DSNAME"></A><B Count="1" Fixed="True" ItemName="ACKC13">0</B></L></DataItem></S13F2><S13F3><Header><MessageName>S13F3</MessageName><Description>Open Data Set Request</Description><Stream>13</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="HANDLE">0</I2><A Count="16" Fixed="False" ItemName="DSNAME"></A><U4 Count="1" Fixed="True" ItemName="CKPNT">0</U4></L></DataItem></S13F3><S13F4><Header><MessageName>S13F4</MessageName><Description>Open Data Set Data</Description><Stream>13</Stream><Function>4</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="HANDLE">0</I2><A Count="16" Fixed="False" ItemName="DSNAME"></A><B Count="1" Fixed="True" ItemName="ACKC13">0</B><I1 Count="1" Fixed="True" ItemName="RTYPE">0</I1><I2 Count="1" Fixed="True" ItemName="RECLEN">0</I2></L></DataItem></S13F4><S13F5><Header><MessageName>S13F5</MessageName><Description>Read Data Set Request</Description><Stream>13</Stream><Function>5</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="HANDLE">0</I2><I2 Count="1" Fixed="True" ItemName="READLN">0</I2></L></DataItem></S13F5><S13F6><Header><MessageName>S13F6</MessageName><Description>Read Data Set Data</Description><Stream>13</Stream><Function>6</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="HANDLE">0</I2><B Count="1" Fixed="True" ItemName="ACKC13">0</B><U4 Count="1" Fixed="True" ItemName="CKPNT">0</U4><L Count="5" Fixed="False" ItemName="DATASETCOUNT"><B Count="128" Fixed="False" ItemName="FILDAT"></B></L></L></DataItem></S13F6><S13F7><Header><MessageName>S13F7</MessageName><Description>Close Data Set Send</Description><Stream>13</Stream><Function>7</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><I2 Count="1" Fixed="True" ItemName="HANDLE">0</I2></DataItem></S13F7><S13F8><Header><MessageName>S13F8</MessageName><Description>Close Data Set Acknowledge</Description><Stream>13</Stream><Function>8</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><I2 Count="1" Fixed="True" ItemName="HANDLE">0</I2><B Count="1" Fixed="True" ItemName="ACKC13">0</B></L></DataItem></S13F8><S13F9><Header><MessageName>S13F9</MessageName><Description>Reset Data Set Send</Description><Stream>13</Stream><Function>9</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S13F9><S13F10><Header><MessageName>S13F10</MessageName><Description>Reset Data Set Acknowledge</Description><Stream>13</Stream><Function>10</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S13F10><S13F11><Header><MessageName>S13F11</MessageName><Description>Data Set Multi-Block Inquire</Description><Stream>13</Stream><Function>11</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><U2 Count="1" Fixed="True" ItemName="DATALENGTH">0</U2></L></DataItem></S13F11><S13F12><Header><MessageName>S13F12</MessageName><Description>Data Set Object Multi-Block Grant</Description><Stream>13</Stream><Function>12</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><BOOLEAN Count="1" Fixed="True" ItemName="GRANT">False</BOOLEAN></DataItem></S13F12><S13F13><Header><MessageName>S13F13</MessageName><Description>Table Data Send</Description><Stream>13</Stream><Function>13</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="8" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="20" Fixed="False" ItemName="TBLTYP"></A><A Count="20" Fixed="False" ItemName="TBLID"></A><U1 Count="1" Fixed="True" ItemName="TBLCMD">0</U1><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="20" Fixed="False" ItemName="COLUMN"><A Count="80" Fixed="False" ItemName="COLHDR"></A></L><L Count="20" Fixed="False" ItemName="ROW"><L Count="20" Fixed="False" ItemName="TABLECOUNT"><A Count="20" Fixed="False" ItemName="TBLELT"></A></L></L></L></DataItem></S13F13><S13F14><Header><MessageName>S13F14</MessageName><Description>Table Data Acknowledge</Description><Stream>13</Stream><Function>14</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="False" ItemName="TBLACK"></U1><L Count="20" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S13F14><S13F15><Header><MessageName>S13F15</MessageName><Description>Table Data Request</Description><Stream>13</Stream><Function>15</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="7" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="20" Fixed="False" ItemName="TBLTYP"></A><A Count="20" Fixed="False" ItemName="TBLID"></A><U1 Count="1" Fixed="True" ItemName="TBLCMD">0</U1><L Count="20" Fixed="False" ItemName="COLUMN"><A Count="80" Fixed="False" ItemName="COLHDR"></A></L><L Count="20" Fixed="False" ItemName="ROW"><A Count="20" Fixed="False" ItemName="TBLELT"></A></L></L></DataItem></S13F15><S13F16><Header><MessageName>S13F16</MessageName><Description>Table Data</Description><Stream>13</Stream><Function>16</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="6" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="TBLTYP"></A><A Count="20" Fixed="False" ItemName="TBLID"></A><L Count="20" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="20" Fixed="False" ItemName="COLUMN"><A Count="80" Fixed="False" ItemName="COLHDR"></A></L><L Count="20" Fixed="False" ItemName="ROW"><L Count="20" Fixed="False" ItemName="TABLECOUNT"><A Count="20" Fixed="False" ItemName="TBLELT"></A></L></L><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="TBLACK"></A><L Count="20" Fixed="False" ItemName="ERRCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S13F16><S14F1><Header><MessageName>S14F1</MessageName><Description>GetAttr Request</Description><Stream>14</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="10" Fixed="False" ItemName="OBJTYPE"></A><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><A Count="6" Fixed="False" ItemName="OBJECTID"></A></L><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="3" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A><U1 Count="1" Fixed="False" ItemName="ATTRRELN"></U1></L></L><L Count="10" Fixed="False" ItemName="ATTRIBUTECOUNT"><A Count="6" Fixed="False" ItemName="ATTRIBUTEID"></A></L></L></DataItem></S14F1><S14F2><Header><MessageName>S14F2</MessageName><Description>GetAttr Data</Description><Stream>14</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="OBJECTID"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F2><S14F3><Header><MessageName>S14F3</MessageName><Description>SetAttr Request</Description><Stream>14</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="10" Fixed="False" ItemName="OBJTYPE"></A><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><A Count="6" Fixed="False" ItemName="OBJECTID"></A></L><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></DataItem></S14F3><S14F4><Header><MessageName>S14F4</MessageName><Description>SetAttr Data</Description><Stream>14</Stream><Function>4</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="OBJECTID"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F4><S14F5><Header><MessageName>S14F5</MessageName><Description>GetType Request</Description><Stream>14</Stream><Function>5</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A></DataItem></S14F5><S14F6><Header><MessageName>S14F6</MessageName><Description>GetType Data</Description><Stream>14</Stream><Function>6</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><A Count="10" Fixed="False" ItemName="OBJTYPE"></A></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F6><S14F7><Header><MessageName>S14F7</MessageName><Description>GetType Data</Description><Stream>14</Stream><Function>7</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><A Count="10" Fixed="False" ItemName="OBJTYPE"></A></L></L></DataItem></S14F7><S14F8><Header><MessageName>S14F8</MessageName><Description>GetAttrName Data</Description><Stream>14</Stream><Function>8</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="OBJECTCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="10" Fixed="False" ItemName="OBJTYPE"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><A Count="6" Fixed="False" ItemName="ATTRID"></A></L></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F8><S14F9><Header><MessageName>S14F9</MessageName><Description>Create Object Request</Description><Stream>14</Stream><Function>9</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="10" Fixed="False" ItemName="OBJTYPE"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></DataItem></S14F9><S14F10><Header><MessageName>S14F10</MessageName><Description>Create Object Acknowledge</Description><Stream>14</Stream><Function>10</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S14F10><S14F11><Header><MessageName>S14F11</MessageName><Description>Delete Object Request</Description><Stream>14</Stream><Function>11</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></DataItem></S14F11><S14F12><Header><MessageName>S14F12</MessageName><Description>Delete Object Acknowledge</Description><Stream>14</Stream><Function>12</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F12><S14F13><Header><MessageName>S14F13</MessageName><Description>Object Attach Request</Description><Stream>14</Stream><Function>13</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></DataItem></S14F13><S14F14><Header><MessageName>S14F14</MessageName><Description>Object Attach Acknowledge</Description><Stream>14</Stream><Function>14</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U4 Count="1" Fixed="True" ItemName="OBJTOKEN">0</U4><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F14><S14F15><Header><MessageName>S14F15</MessageName><Description>Attached Object Request</Description><Stream>14</Stream><Function>15</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><U1 Count="1" Fixed="True" ItemName="OBJCMD">0</U1><U4 Count="1" Fixed="True" ItemName="OBJTOKEN">0</U4><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></DataItem></S14F15><S14F16><Header><MessageName>S14F16</MessageName><Description>Attached Object Action Acknowledge</Description><Stream>14</Stream><Function>16</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F16><S14F17><Header><MessageName>S14F17</MessageName><Description>Supervised Object Request</Description><Stream>14</Stream><Function>17</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><U1 Count="1" Fixed="True" ItemName="OBJCMD">0</U1><A Count="80" Fixed="False" ItemName="TARGETSPEC"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L></L></DataItem></S14F17><S14F18><Header><MessageName>S14F18</MessageName><Description>Supervised Object Action Acknowledge</Description><Stream>14</Stream><Function>18</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="6" Fixed="False" ItemName="ATTRID"></A><A Count="80" Fixed="False" ItemName="ATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OBJACK">0</U2><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S14F18><S15F1><Header><MessageName>S15F1</MessageName><Description>Recipe Management Multi-Block Inquire</Description><Stream>15</Stream><Function>1</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><U2 Count="1" Fixed="True" ItemName="RMDATASIZE">0</U2></L></DataItem></S15F1><S15F2><Header><MessageName>S15F2</MessageName><Description>Recipe Management Multi-Block Grant</Description><Stream>15</Stream><Function>2</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><BOOLEAN Count="1" Fixed="True" ItemName="RMGRANT">False</BOOLEAN></DataItem></S15F2><S15F3><Header><MessageName>S15F3</MessageName><Description>Recipe NameSpace Action Request</Description><Stream>15</Stream><Function>3</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RMNSSPEC"></A><U1 Count="1" Fixed="True" ItemName="RMNSCMD">0</U1></L></DataItem></S15F3><S15F4><Header><MessageName>S15F4</MessageName><Description>Recipe Namespace Action Acknowledge</Description><Stream>15</Stream><Function>4</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F4><S15F5><Header><MessageName>S15F5</MessageName><Description>Recipe NameSpace Rename Request</Description><Stream>15</Stream><Function>5</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RMNSSPEC"></A><A Count="80" Fixed="False" ItemName="RMNEWNS"></A></L></DataItem></S15F5><S15F6><Header><MessageName>S15F6</MessageName><Description>Recipe NameSpace Rename Acknowledge</Description><Stream>15</Stream><Function>6</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F6><S15F7><Header><MessageName>S15F7</MessageName><Description>Recipe Space$ Request</Description><Stream>15</Stream><Function>7</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A></DataItem></S15F7><S15F8><Header><MessageName>S15F8</MessageName><Description>Recipe Space$ Data</Description><Stream>15</Stream><Function>8</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RMSPACE">0</U2><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F8><S15F9><Header><MessageName>S15F9</MessageName><Description>Recipe Status Request</Description><Stream>15</Stream><Function>9</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="80" Fixed="False" ItemName="RCPSPEC"></A></DataItem></S15F9><S15F10><Header><MessageName>S15F10</MessageName><Description>Recipe StatusData</Description><Stream>15</Stream><Function>10</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RCPSTAT">0</U2><A Count="20" Fixed="False" ItemName="RCPVERS"></A><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F10><S15F11><Header><MessageName>S15F11</MessageName><Description>Recipe NameSpace Rename Request</Description><Stream>15</Stream><Function>11</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RMNSSPEC"></A><A Count="20" Fixed="False" ItemName="RCPCLASS"></A><A Count="20" Fixed="False" ItemName="RCPNAME"></A><A Count="20" Fixed="False" ItemName="AGENT"></A></L></DataItem></S15F11><S15F12><Header><MessageName>S15F12</MessageName><Description>Recipe Status Data</Description><Stream>15</Stream><Function>12</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="AGENT"></A><A Count="20" Fixed="False" ItemName="RCPVERS"></A><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F12><S15F13><Header><MessageName>S15F13</MessageName><Description>Recipe Create Request</Description><Stream>15</Stream><Function>13</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><BOOLEAN Count="1" Fixed="True" ItemName="RCPUPDT">False</BOOLEAN><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><L Count="10" Fixed="False" ItemName="RECIPEATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L><A Count="20" Fixed="False" ItemName="RCPBODY"></A></L></DataItem></S15F13><S15F14><Header><MessageName>S15F14</MessageName><Description>Recipe Create Acknowledge</Description><Stream>15</Stream><Function>14</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F14><S15F15><Header><MessageName>S15F15</MessageName><Description>Recipe Store Request</Description><Stream>15</Stream><Function>15</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><BOOLEAN Count="1" Fixed="True" ItemName="RCPSECCODE">False</BOOLEAN><L Count="3" Fixed="True" ItemName="COUNT"><L Count="2" Fixed="True" ItemName="RCPCOUNT"><A Count="20" Fixed="False" ItemName="GENRCPSECNM"></A><L Count="20" Fixed="False" ItemName="GENRCPATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="GENRCPATTRID"></A><A Count="80" Fixed="False" ItemName="GENRCPATTRDATA"></A></L></L></L><A Count="20" Fixed="False" ItemName="RCPBODY"></A><L Count="10" Fixed="False" ItemName="RCPSECCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPSECNM"></A><L Count="10" Fixed="False" ItemName="RCPATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L></L></L></L></L></DataItem></S15F15><S15F16><Header><MessageName>S15F16</MessageName><Description>Recipe Store Acknowledge</Description><Stream>15</Stream><Function>16</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><B Count="1" Fixed="True" ItemName="RCPSECCODE">0</B><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="RECIPEATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L></L></L></DataItem></S15F16><S15F17><Header><MessageName>S15F17</MessageName><Description>Recipe Retrieve Request</Description><Stream>15</Stream><Function>17</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><B Count="1" Fixed="True" ItemName="RCPSECCODE">0</B></L></DataItem></S15F17><S15F18><Header><MessageName>S15F18</MessageName><Description>Recipe Retrieve Data</Description><Stream>15</Stream><Function>18</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="3" Fixed="True" ItemName="COUNT"><L Count="2" Fixed="True" ItemName="VARCOUNT"><A Count="20" Fixed="False" ItemName="RCPSECNM"></A><L Count="10" Fixed="False" ItemName="RECIPEATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L></L><A Count="20" Fixed="False" ItemName="RCPBODY"></A><L Count="10" Fixed="False" ItemName="RECIPESECTIONNAMECOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPSECNAME"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRIBUTEID"></A><A Count="80" Fixed="False" ItemName="RCPATTRIBUTEDATA"></A></L></L></L></L></L><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F18><S15F19><Header><MessageName>S15F19</MessageName><Description>Recipe Rename Request</Description><Stream>15</Stream><Function>19</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><BOOLEAN Count="1" Fixed="True" ItemName="RCPRENAME">False</BOOLEAN><A Count="80" Fixed="False" ItemName="RCPNEWID"></A></L></DataItem></S15F19><S15F20><Header><MessageName>S15F20</MessageName><Description>Recipe Rename Acknowledge</Description><Stream>15</Stream><Function>20</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F20><S15F21><Header><MessageName>S15F21</MessageName><Description>Recipe Action Request</Description><Stream>15</Stream><Function>21</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="6" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U1 Count="1" Fixed="True" ItemName="RCPCMD">0</U1><A Count="80" Fixed="False" ItemName="RMNSSPEC"></A><U2 Count="1" Fixed="True" ItemName="OPID">0</U2><A Count="20" Fixed="False" ItemName="AGENT"></A><L Count="10" Fixed="False" ItemName="RECIPECOUNT"><A Count="80" Fixed="False" ItemName="RCPID"></A></L></L></DataItem></S15F21><S15F22><Header><MessageName>S15F22</MessageName><Description>Recipe Action Acknowledge</Description><Stream>15</Stream><Function>22</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="AGENT"></A><U4 Count="1" Fixed="True" ItemName="LINKID">0</U4><U1 Count="1" Fixed="True" ItemName="RCPCMD">0</U1><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F22><S15F23><Header><MessageName>S15F23</MessageName><Description>Recipe Descriptor Request</Description><Stream>15</Stream><Function>23</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><L Count="10" Fixed="False" ItemName="RECIPECOUNT"><A Count="80" Fixed="False" ItemName="RCPID"></A></L></L></DataItem></S15F23><S15F24><Header><MessageName>S15F24</MessageName><Description>Recipe Retrieve Data</Description><Stream>15</Stream><Function>24</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="20" Fixed="False" ItemName="RECIPECOUNT"><L Count="20" Fixed="False" ItemName="DESCRIPTORCOUNT"><L Count="3" Fixed="True" ItemName="DESCRIPTOR"><A Count="80" Fixed="False" ItemName="RCPDESCNM"></A><A Count="20" Fixed="False" ItemName="RCPDESCTIME"></A><U2 Count="1" Fixed="True" ItemName="RCPDESCLTH">0</U2></L></L></L><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F24><S15F25><Header><MessageName>S15F25</MessageName><Description>Recipe Parameter Update Request</Description><Stream>15</Stream><Function>25</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="RMNSSpec"></A><A Count="20" Fixed="False" ItemName="AGENT"></A><A Count="20" Fixed="False" ItemName="RCPBODY"></A><L Count="10" Fixed="False" ItemName="RECIPEPARMCOUNT"><L Count="3" Fixed="True" ItemName=""><A Count="40" Fixed="False" ItemName="RCPPARNM"></A><A Count="80" Fixed="False" ItemName="RCPPARVAL"></A><A Count="80" Fixed="False" ItemName="RCPPARRULE"></A></L></L></L></DataItem></S15F25><S15F26><Header><MessageName>S15F26</MessageName><Description>Recipe Parameter Update Acknowledge</Description><Stream>15</Stream><Function>26</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F26><S15F27><Header><MessageName>S15F27</MessageName><Description>Recipe Download Request</Description><Stream>15</Stream><Function>27</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><BOOLEAN Count="1" Fixed="True" ItemName="RCPOWCODE">False</BOOLEAN><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><L Count="20" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L><A Count="80" Fixed="False" ItemName="RCPBODY"></A></L></DataItem></S15F27><S15F28><Header><MessageName>S15F28</MessageName><Description>Recipe Download Acknowledge</Description><Stream>15</Stream><Function>28</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="10" Fixed="False" ItemName="RCPID"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="False" ItemName="RMACK"></U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="False" ItemName="ERRCODE"></U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F28><S15F29><Header><MessageName>S15F29</MessageName><Description>Recipe Verify Request</Description><Stream>15</Stream><Function>29</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="OPID">0</U2><A Count="80" Fixed="False" ItemName="RESPEC"></A><L Count="10" Fixed="False" ItemName="RECIPECOUNT"><A Count="80" Fixed="False" ItemName="RCPID"></A></L></L></DataItem></S15F29><S15F30><Header><MessageName>S15F30</MessageName><Description>Recipe Verify Acknowledge</Description><Stream>15</Stream><Function>30</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="OPID">0</U2><U4 Count="1" Fixed="True" ItemName="LINKID">0</U4><A Count="10" Fixed="False" ItemName="RCPID"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="False" ItemName="RMACK"></U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="False" ItemName="ERRCODE"></U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F30><S15F31><Header><MessageName>S15F31</MessageName><Description>Recipe Unload Request</Description><Stream>15</Stream><Function>31</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><A Count="80" Fixed="False" ItemName="RCPSPEC"></A></DataItem></S15F31><S15F32><Header><MessageName>S15F32</MessageName><Description>Recipe Unload Data</Description><Stream>15</Stream><Function>32</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><L Count="10" Fixed="False" ItemName="ATTRCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="RCPATTRID"></A><A Count="80" Fixed="False" ItemName="RCPATTRDATA"></A></L></L><A Count="80" Fixed="False" ItemName="RCPBODY"></A><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="False" ItemName="RMACK"></U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="False" ItemName="ERRCODE"></U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F32><S15F33><Header><MessageName>S15F33</MessageName><Description>Recipe Select Request</Description><Stream>15</Stream><Function>33</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="RESPEC"></A><L Count="10" Fixed="False" ItemName="RECIPECOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="40" Fixed="False" ItemName="RCPPARNM"></A><A Count="80" Fixed="False" ItemName="RCPPARVAL"></A></L></L></L></DataItem></S15F33><S15F34><Header><MessageName>S15F34</MessageName><Description>Recipe Select Acknowledge</Description><Stream>15</Stream><Function>34</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F34><S15F35><Header><MessageName>S15F35</MessageName><Description>Recipe Delete Request</Description><Stream>15</Stream><Function>35</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="20" Fixed="False" ItemName="RESPEC"></A><A Count="80" Fixed="False" ItemName="RCPDEL"></A><L Count="80" Fixed="False" ItemName="RECIPECOUNT"><A Count="10" Fixed="False" ItemName="RCPID"></A></L></L></DataItem></S15F35><S15F36><Header><MessageName>S15F36</MessageName><Description>Recipe Select Acknowledge</Description><Stream>15</Stream><Function>36</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F36><S15F37><Header><MessageName>S15F37</MessageName><Description>DRNS Segment Approve Action Request</Description><Stream>15</Stream><Function>37</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="6" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="RMSEGSPEC"></A><U4 Count="1" Fixed="True" ItemName="OBJTOKEN">0</U4><B Count="1" Fixed="True" ItemName="RMGRNT">0</B><U4 Count="1" Fixed="True" ItemName="OPID">0</U4><A Count="10" Fixed="False" ItemName="RCPID"></A><U4 Count="1" Fixed="True" ItemName="RMCHGTYPE">0</U4></L></DataItem></S15F37><S15F38><Header><MessageName>S15F38</MessageName><Description>DRNS Segment Approve Action Acknowledge</Description><Stream>15</Stream><Function>38</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F38><S15F39><Header><MessageName>S15F39</MessageName><Description>DRNS Recorder Segment Request</Description><Stream>15</Stream><Function>39</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U1 Count="1" Fixed="True" ItemName="RMNSCMD">0</U1><A Count="80" Fixed="False" ItemName="RMRECSPEC"></A><A Count="80" Fixed="False" ItemName="RMSEGSPEC"></A><U4 Count="1" Fixed="True" ItemName="OBJTOKEN">0</U4></L></DataItem></S15F39><S15F40><Header><MessageName>S15F40</MessageName><Description>DRNS Recorder Segment Acknowledge</Description><Stream>15</Stream><Function>40</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F40><S15F41><Header><MessageName>S15F41</MessageName><Description>DRNS Recorder Modify Request</Description><Stream>15</Stream><Function>41</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="RMRECSPEC"></A><U4 Count="1" Fixed="True" ItemName="OBJTOKEN">0</U4><U1 Count="1" Fixed="True" ItemName="RMNSCMD">0</U1><L Count="7" Fixed="True" ItemName="RecipeField"><A Count="10" Fixed="False" ItemName="RCPID"></A><A Count="10" Fixed="False" ItemName="RCPNEWID"></A><A Count="80" Fixed="False" ItemName="RMSEGSPEC"></A><U4 Count="1" Fixed="True" ItemName="RMCHGTYPE">0</U4><U4 Count="1" Fixed="True" ItemName="OPID">0</U4><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><BOOLEAN Count="1" Fixed="True" ItemName="RMREQUESTOR">False</BOOLEAN></L></L></DataItem></S15F41><S15F42><Header><MessageName>S15F42</MessageName><Description>DRNS Recorder Modify Acknowledge</Description><Stream>15</Stream><Function>42</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F42><S15F43><Header><MessageName>S15F43</MessageName><Description>DRNS Get Change Request</Description><Stream>15</Stream><Function>43</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="80" Fixed="False" ItemName="TARGETSPEC"></A></L></DataItem></S15F43><S15F44><Header><MessageName>S15F44</MessageName><Description>DRN Get Change Request Data</Description><Stream>15</Stream><Function>44</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><L Count="20" Fixed="False" ItemName="RequestsCount"><L Count="7" Fixed="True" ItemName=""><A Count="10" Fixed="False" ItemName="RCPID"></A><A Count="10" Fixed="False" ItemName="RCPNEWID"></A><A Count="80" Fixed="False" ItemName="RMSEGSPEC"></A><U4 Count="1" Fixed="True" ItemName="RMCHGTYPE">0</U4><U4 Count="1" Fixed="True" ItemName="OPID">0</U4><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><BOOLEAN Count="1" Fixed="True" ItemName="RMREQUESTOR">False</BOOLEAN></L></L><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S15F44><S15F45><Header><MessageName>S15F45</MessageName><Description>DRNS Manager Segment Change Approval Request</Description><Stream>15</Stream><Function>45</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><A Count="10" Fixed="False" ItemName="RCPNEWID"></A><U4 Count="1" Fixed="True" ItemName="RMCHGTYPE">0</U4></L></DataItem></S15F45><S15F46><Header><MessageName>S15F46</MessageName><Description>DRNS Manager Segment Approval Acknowledge</Description><Stream>15</Stream><Function>46</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><U4 Count="1" Fixed="True" ItemName="RMCHGTYPE">0</U4><B Count="1" Fixed="True" ItemName="RMGRNT">0</B><U4 Count="1" Fixed="True" ItemName="OPID">0</U4></L></DataItem></S15F46><S15F47><Header><MessageName>S15F47</MessageName><Description>DRNS Manager Rebuild Request</Description><Stream>15</Stream><Function>47</Function><Direction>H<->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="OBJECTSPEC"></A><A Count="80" Fixed="False" ItemName="RMNSSPEC"></A><A Count="80" Fixed="False" ItemName="RMRECSPEC"></A><L Count="80" Fixed="False" ItemName="SpecCount"><A Count="80" Fixed="False" ItemName="RMSEGSPEC"></A></L></L></DataItem></S15F47><S15F48><Header><MessageName>S15F48</MessageName><Description>DRNS Manager Rebuild Acknowledge</Description><Stream>15</Stream><Function>48</Function><Direction>H<->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U1 Count="1" Fixed="True" ItemName="RMACK">0</U1><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S15F48><S16F1><Header><MessageName>S16F1</MessageName><Description>Multi-block Process Job Data Inquire</Description><Stream>16</Stream><Function>1</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="DATALENGTH">0</U2></L></DataItem></S16F1><S16F2><Header><MessageName>S16F2</MessageName><Description>Multi-block Process Job Data Grant</Description><Stream>16</Stream><Function>2</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><B Count="1" Fixed="True" ItemName="GRANT">0</B></DataItem></S16F2><S16F3><Header><MessageName>S16F3</MessageName><Description>Process Job Create Request</Description><Stream>16</Stream><Function>3</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="5" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="MF"></A><L Count="10" Fixed="False" ItemName="MTCOUNT"><A Count="80" Fixed="False" ItemName="MTID"></A></L><L Count="3" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="PRRECIPMETHOD"></A><A Count="80" Fixed="False" ItemName="RCPSPEC"></A><L Count="10" Fixed="False" ItemName="RECIPEPARMCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="40" Fixed="False" ItemName="RCPPARNM"></A><A Count="80" Fixed="False" ItemName="RCPPARVAL"></A></L></L></L><BOOLEAN Count="1" Fixed="True" ItemName="PCPPARVAL">False</BOOLEAN></L></DataItem></S16F3><S16F4><Header><MessageName>S16F4</MessageName><Description>Process Job Create Acknowledge</Description><Stream>16</Stream><Function>4</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="10" Fixed="False" ItemName="PRJOBID"></A><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S16F4><S16F5><Header><MessageName>S16F5</MessageName><Description>Process Job Command Request</Description><Stream>16</Stream><Function>5</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="PRJOBID"></A><A Count="80" Fixed="False" ItemName="PRCMDNAME"></A><L Count="10" Fixed="False" ItemName="COMMANDPARMCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="CPNAME"></A><A Count="16" Fixed="False" ItemName="CPVAL"></A></L></L></L></DataItem></S16F5><S16F6><Header><MessageName>S16F6</MessageName><Description>Process Job Command Acknowledge</Description><Stream>16</Stream><Function>6</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="PRJOBID"></A><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S16F6><S16F7><Header><MessageName>S16F7</MessageName><Description>Process Job Alert Notify</Description><Stream>16</Stream><Function>7</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><A Count="80" Fixed="False" ItemName="PRJOBID"></A><A Count="80" Fixed="False" ItemName="PRJOBMILESTONE"></A><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="10" Fixed="False" ItemName="ERRORCOUNT"><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></L></DataItem></S16F7><S16F8><Header><MessageName>S16F8</MessageName><Description>Process Job Alert Confirm</Description><Stream>16</Stream><Function>8</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S16F8><S16F9><Header><MessageName>S16F9</MessageName><Description>Process Job Event Notify</Description><Stream>16</Stream><Function>9</Function><Direction>H<-E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="PREVENTID">0</U2><A Count="16" Fixed="False" ItemName="TIMESTAMP"></A><A Count="80" Fixed="False" ItemName="PRJOBID"></A><L Count="10" Fixed="False" ItemName="VCOUNT"><L Count="2" Fixed="True" ItemName=""><A Count="20" Fixed="False" ItemName="VID"></A><A Count="80" Fixed="False" ItemName="VARIABLEDATA"></A></L></L></L></DataItem></S16F9><S16F10><Header><MessageName>S16F10</MessageName><Description>Process Job Event Confirm</Description><Stream>16</Stream><Function>10</Function><Direction>H->E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem/></S16F10><S17F1><Header><MessageName>S17F1</MessageName><Description>Data Report Create Request</Description><Stream>17</Stream><Function>1</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><A Count="16" Fixed="False" ItemName="DATASRC"></A><L Count="10" Fixed="False" ItemName="VCOUNT"><A Count="20" Fixed="False" ItemName="VID"></A></L></L></DataItem></S17F1><S17F2><Header><MessageName>S17F2</MessageName><Description>Data Report Create Acknowledge</Description><Stream>17</Stream><Function>2</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S17F2><S17F3><Header><MessageName>S17F3</MessageName><Description>Data Report Delete Request</Description><Stream>17</Stream><Function>3</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></DataItem></S17F3><S17F4><Header><MessageName>S17F4</MessageName><Description>Data Report Delete Acknowledge</Description><Stream>17</Stream><Function>4</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="1" Fixed="True" ItemName="ACKA">False</BOOLEAN><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S17F4><S17F5><Header><MessageName>S17F5</MessageName><Description>Trace Create Request</Description><Stream>17</Stream><Function>5</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="6" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><BOOLEAN Count="1" Fixed="True" ItemName="CEED">False</BOOLEAN><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L><F4 Count="1" Fixed="True" ItemName="TRSPER">0</F4><L Count="8" Fixed="True" ItemName="TRACEPARMCOUNT"><U2 Count="1" Fixed="True" ItemName="TOTSMP">0</U2><U2 Count="1" Fixed="True" ItemName="REPGSZ">0</U2><A Count="80" Fixed="False" ItemName="STARTEVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="STARTCEID">0</U2><A Count="80" Fixed="False" ItemName="STOPEVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="STOPCEID">0</U2><BOOLEAN Count="1" Fixed="True" ItemName="TRAUTOD">False</BOOLEAN><BOOLEAN Count="1" Fixed="True" ItemName="RPTOC">False</BOOLEAN></L></L></DataItem></S17F5><S17F6><Header><MessageName>S17F6</MessageName><Description>Trace Create Acknowledge</Description><Stream>17</Stream><Function>6</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S17F6><S17F7><Header><MessageName>S17F7</MessageName><Description>Trace Delete Request</Description><Stream>17</Stream><Function>7</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="TRACECOUNT"><U2 Count="1" Fixed="True" ItemName="TRID">0</U2></L></DataItem></S17F7><S17F8><Header><MessageName>S17F8</MessageName><Description>Trace Delete Acknowledge</Description><Stream>17</Stream><Function>8</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="20" Fixed="False" ItemName="ACKA"></BOOLEAN><L Count="10" Fixed="False" ItemName="TRACECOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S17F8><S17F9><Header><MessageName>S17F9</MessageName><Description>Collection Event Link Request</Description><Stream>17</Stream><Function>9</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="DATAID">0</U2><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><L Count="10" Fixed="False" ItemName="REPORTCOUNT"><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></L></DataItem></S17F9><S17F10><Header><MessageName>S17F10</MessageName><Description>Collection Event Link Acknowledge</Description><Stream>17</Stream><Function>10</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S17F10><S17F11><Header><MessageName>S17F11</MessageName><Description>Collection Event Unlink Request</Description><Stream>17</Stream><Function>11</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>True</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="3" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2></L></DataItem></S17F11><S17F12><Header><MessageName>S17F12</MessageName><Description>Collection Event Unlink Acknowledge</Description><Stream>17</Stream><Function>12</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="4" Fixed="True" ItemName=""><A Count="80" Fixed="False" ItemName="EVNTSRC"></A><U2 Count="1" Fixed="True" ItemName="CEID">0</U2><U2 Count="1" Fixed="True" ItemName="RPTID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2></L></DataItem></S17F12><S17F13><Header><MessageName>S17F13</MessageName><Description>Trace Delete Request</Description><Stream>17</Stream><Function>13</Function><Direction>H->E</Direction><Wait>True</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="10" Fixed="False" ItemName="TRACECOUNT"><U2 Count="1" Fixed="True" ItemName="TRID">0</U2></L></DataItem></S17F13><S17F14><Header><MessageName>S17F14</MessageName><Description>Trace Delete Acknowledge</Description><Stream>17</Stream><Function>14</Function><Direction>H<-E</Direction><Wait>False</Wait><AutoReply>False</AutoReply><NoLogging>False</NoLogging></Header><DataItem><L Count="2" Fixed="True" ItemName=""><BOOLEAN Count="20" Fixed="False" ItemName="ACKA"></BOOLEAN><L Count="10" Fixed="False" ItemName="TRACECOUNT"><L Count="3" Fixed="True" ItemName=""><U2 Count="1" Fixed="True" ItemName="TRID">0</U2><U2 Count="1" Fixed="True" ItemName="ERRCODE">0</U2><A Count="80" Fixed="False" ItemName="ERRTEXT"></A></L></L></L></DataItem></S17F14></SECSMessage>
diff --git a/SourceCode/Bond/Servo/CAligner.cpp b/SourceCode/Bond/Servo/CAligner.cpp
new file mode 100644
index 0000000..6b76fd9
--- /dev/null
+++ b/SourceCode/Bond/Servo/CAligner.cpp
@@ -0,0 +1,61 @@
+#include "stdafx.h"
+#include "CAligner.h"
+
+namespace SERVO {
+ CAligner::CAligner() : CEquipment()
+ {
+
+ }
+
+ CAligner::~CAligner()
+ {
+
+ }
+
+ const char* CAligner::getClassName()
+ {
+ static char* pszName = "CAligner";
+ return pszName;
+ }
+
+ void CAligner::init()
+ {
+ CEquipment::init();
+ }
+
+ void CAligner::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CAligner::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CAligner>initPins");
+ addPin(SERVO::PinType::INPUT, _T("In1"));
+ addPin(SERVO::PinType::INPUT, _T("In2"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out1"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out2"));
+ }
+
+ void CAligner::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CAligner::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+
+ void CAligner::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CAligner::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CAligner.h b/SourceCode/Bond/Servo/CAligner.h
new file mode 100644
index 0000000..8a6be18
--- /dev/null
+++ b/SourceCode/Bond/Servo/CAligner.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CAligner :
+ public CEquipment
+ {
+ public:
+ CAligner();
+ virtual ~CAligner();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CBakeCooling.cpp b/SourceCode/Bond/Servo/CBakeCooling.cpp
new file mode 100644
index 0000000..1dcbc72
--- /dev/null
+++ b/SourceCode/Bond/Servo/CBakeCooling.cpp
@@ -0,0 +1,61 @@
+#include "stdafx.h"
+#include "CBakeCooling.h"
+
+namespace SERVO {
+ CBakeCooling::CBakeCooling() : CEquipment()
+ {
+
+ }
+
+ CBakeCooling::~CBakeCooling()
+ {
+
+ }
+
+ const char* CBakeCooling::getClassName()
+ {
+ static char* pszName = "CBakeCooling";
+ return pszName;
+ }
+
+ void CBakeCooling::init()
+ {
+ CEquipment::init();
+ }
+
+ void CBakeCooling::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CBakeCooling::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CBakeCooling>initPins");
+ addPin(SERVO::PinType::INPUT, _T("In1"));
+ addPin(SERVO::PinType::INPUT, _T("In2"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out1"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out2"));
+ }
+
+ void CBakeCooling::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CBakeCooling::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+
+ void CBakeCooling::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CBakeCooling::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CBakeCooling.h b/SourceCode/Bond/Servo/CBakeCooling.h
new file mode 100644
index 0000000..22f3c14
--- /dev/null
+++ b/SourceCode/Bond/Servo/CBakeCooling.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CBakeCooling :
+ public CEquipment
+ {
+ public:
+ CBakeCooling();
+ virtual ~CBakeCooling();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CBonder.cpp b/SourceCode/Bond/Servo/CBonder.cpp
index 11d90d8..f9f27b9 100644
--- a/SourceCode/Bond/Servo/CBonder.cpp
+++ b/SourceCode/Bond/Servo/CBonder.cpp
@@ -1,8 +1,9 @@
#include "stdafx.h"
#include "CBonder.h"
+
namespace SERVO {
- CBonder::CBonder()
+ CBonder::CBonder() : CEquipment()
{
}
@@ -28,6 +29,15 @@
CEquipment::term();
}
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CBonder::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CBonder>initPins");
+ addPin(SERVO::PinType::INPUT, _T("In"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out"));
+ }
+
void CBonder::onTimer(UINT nTimerid)
{
CEquipment::onTimer(nTimerid);
@@ -37,4 +47,14 @@
{
CEquipment::serialize(ar);
}
+
+ void CBonder::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CBonder::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
}
diff --git a/SourceCode/Bond/Servo/CBonder.h b/SourceCode/Bond/Servo/CBonder.h
index 3cf9c78..1785a5c 100644
--- a/SourceCode/Bond/Servo/CBonder.h
+++ b/SourceCode/Bond/Servo/CBonder.h
@@ -1,20 +1,24 @@
#pragma once
#include "CEquipment.h"
+
namespace SERVO {
class CBonder :
public CEquipment
{
public:
CBonder();
- ~CBonder();
+ virtual ~CBonder();
public:
virtual const char* getClassName();
virtual void init();
virtual void term();
+ virtual void initPins();
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
};
}
diff --git a/SourceCode/Bond/Servo/CEFEM.cpp b/SourceCode/Bond/Servo/CEFEM.cpp
index 665aa25..e68f73f 100644
--- a/SourceCode/Bond/Servo/CEFEM.cpp
+++ b/SourceCode/Bond/Servo/CEFEM.cpp
@@ -1,8 +1,9 @@
#include "stdafx.h"
#include "CEFEM.h"
+
namespace SERVO {
- CEFEM::CEFEM()
+ CEFEM::CEFEM() : CEquipment()
{
}
@@ -28,6 +29,13 @@
CEquipment::term();
}
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CEFEM::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CEFEM>initPins");
+ }
+
void CEFEM::onTimer(UINT nTimerid)
{
CEquipment::onTimer(nTimerid);
@@ -37,4 +45,14 @@
{
CEquipment::serialize(ar);
}
+
+ void CEFEM::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CEFEM::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
}
diff --git a/SourceCode/Bond/Servo/CEFEM.h b/SourceCode/Bond/Servo/CEFEM.h
index 7a7be7e..76b0ded 100644
--- a/SourceCode/Bond/Servo/CEFEM.h
+++ b/SourceCode/Bond/Servo/CEFEM.h
@@ -1,20 +1,24 @@
#pragma once
#include "CEquipment.h"
+
namespace SERVO {
class CEFEM :
public CEquipment
{
public:
CEFEM();
- ~CEFEM();
+ virtual ~CEFEM();
public:
virtual const char* getClassName();
virtual void init();
virtual void term();
+ virtual void initPins();
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
};
}
diff --git a/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp b/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp
new file mode 100644
index 0000000..3a4acee
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqCimMessageClearStep.cpp
@@ -0,0 +1,37 @@
+#include "stdafx.h"
+#include "CEqCimMessageClearStep.h"
+
+
+namespace SERVO {
+ CEqCimMessageClearStep::CEqCimMessageClearStep() : CWriteStep()
+ {
+ m_nClearCimMessageDev = 0;
+ }
+
+ CEqCimMessageClearStep::~CEqCimMessageClearStep()
+ {
+
+ }
+
+ void CEqCimMessageClearStep::setClearCimMessageDev(int nDev)
+ {
+ m_nClearCimMessageDev = nDev;
+ }
+
+ int CEqCimMessageClearStep::clearCimMessage(short id, short nTouchPanelNo)
+ {
+ char szBuffer[4] = {0};
+ memcpy(&szBuffer[0], &id, sizeof(short));
+ memcpy(&szBuffer[2], &nTouchPanelNo, sizeof(short));
+ return writeData(m_nClearCimMessageDev, (const char*)szBuffer, 4);
+ }
+
+ void CEqCimMessageClearStep::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ CWriteStep::getAttributeVector(attrubutes);
+
+ std::string strTemp;
+ attrubutes.addAttribute(new CAttribute("Clear Cim Message Dev",
+ ("W" + CToolUnits::toHexString(m_nClearCimMessageDev, strTemp)).c_str(), ""));
+ }
+}
diff --git a/SourceCode/Bond/Servo/CEqCimMessageClearStep.h b/SourceCode/Bond/Servo/CEqCimMessageClearStep.h
new file mode 100644
index 0000000..b4306f9
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqCimMessageClearStep.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "CWriteStep.h"
+
+
+namespace SERVO {
+ class CEqCimMessageClearStep : public CWriteStep
+ {
+ public:
+ CEqCimMessageClearStep();
+ ~CEqCimMessageClearStep();
+
+ public:
+ void setClearCimMessageDev(int nDev);
+ int clearCimMessage(short id, short nTouchPanelNo);
+ void getAttributeVector(CAttributeVector& attrubutes);
+
+ private:
+ int m_nClearCimMessageDev;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp b/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp
new file mode 100644
index 0000000..3439d3a
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqCimMessageCmdStep.cpp
@@ -0,0 +1,38 @@
+#include "stdafx.h"
+#include "CEqCimMessageCmdStep.h"
+
+
+namespace SERVO {
+ CEqCimMessageCmdStep::CEqCimMessageCmdStep() : CWriteStep()
+ {
+ m_nCimMessageDev = 0;
+ }
+
+ CEqCimMessageCmdStep::~CEqCimMessageCmdStep()
+ {
+
+ }
+
+ void CEqCimMessageCmdStep::setCimMessageDev(int nDev)
+ {
+ m_nCimMessageDev = nDev;
+ }
+
+ int CEqCimMessageCmdStep::setCimMessage(const char* pszMessage, short id, short nTouchPanelNo)
+ {
+ char szBuffer[36] = {0};
+ strcpy_s(szBuffer, 32, pszMessage);
+ memcpy(&szBuffer[32], &id, sizeof(short));
+ memcpy(&szBuffer[34], &nTouchPanelNo, sizeof(short));
+ return writeData(m_nCimMessageDev, (const char*)szBuffer, 36);
+ }
+
+ void CEqCimMessageCmdStep::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ CWriteStep::getAttributeVector(attrubutes);
+
+ std::string strTemp;
+ attrubutes.addAttribute(new CAttribute("Cim Message Dev",
+ ("W" + CToolUnits::toHexString(m_nCimMessageDev, strTemp)).c_str(), ""));
+ }
+}
diff --git a/SourceCode/Bond/Servo/CEqCimMessageCmdStep.h b/SourceCode/Bond/Servo/CEqCimMessageCmdStep.h
new file mode 100644
index 0000000..61378ed
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqCimMessageCmdStep.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "CWriteStep.h"
+
+
+namespace SERVO {
+ class CEqCimMessageCmdStep : public CWriteStep
+ {
+ public:
+ CEqCimMessageCmdStep();
+ ~CEqCimMessageCmdStep();
+
+ public:
+ void setCimMessageDev(int nDev);
+ int setCimMessage(const char* pszMessage, short id, short nTouchPanelNo);
+ void getAttributeVector(CAttributeVector& attrubutes);
+
+ private:
+ int m_nCimMessageDev;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp b/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
index 9e2d40c..cbb8e17 100644
--- a/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqCimModeChangeStep.cpp
@@ -39,7 +39,8 @@
{
CWriteStep::getAttributeVector(attrubutes);
+ std::string strTemp;
attrubutes.addAttribute(new CAttribute("Cim Mode Dev",
- std::to_string(m_nCimModeDev).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nCimModeDev, strTemp)).c_str(), ""));
}
}
diff --git a/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp b/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp
new file mode 100644
index 0000000..57a8d92
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.cpp
@@ -0,0 +1,36 @@
+#include "stdafx.h"
+#include "CEqDateTimeSetCmdStep.h"
+
+
+namespace SERVO {
+ CEqDateTimeSetCmdStep::CEqDateTimeSetCmdStep() : CWriteStep()
+ {
+ m_nDateTimeDev = 0;
+ }
+
+ CEqDateTimeSetCmdStep::~CEqDateTimeSetCmdStep()
+ {
+
+ }
+
+ void CEqDateTimeSetCmdStep::setDateTimeDev(int nDev)
+ {
+ m_nDateTimeDev = nDev;
+ }
+
+ int CEqDateTimeSetCmdStep::setDateTime(short year, short month, short day, short hour, short minute, short second)
+ {
+ char szBuffer[16] = {0};
+ sprintf_s(szBuffer, 16, "%d%02d%02d%02d%02d%02d", year, month, day, hour, minute, second);
+ return writeData(m_nDateTimeDev, (const char*)szBuffer, 16);
+ }
+
+ void CEqDateTimeSetCmdStep::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ CWriteStep::getAttributeVector(attrubutes);
+
+ std::string strTemp;
+ attrubutes.addAttribute(new CAttribute("DateTime Dev",
+ ("W" + CToolUnits::toHexString(m_nDateTimeDev, strTemp)).c_str(), ""));
+ }
+}
diff --git a/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.h b/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.h
new file mode 100644
index 0000000..b110a05
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqDateTimeSetCmdStep.h
@@ -0,0 +1,21 @@
+#pragma once
+#include "CWriteStep.h"
+
+
+namespace SERVO {
+ class CEqDateTimeSetCmdStep : public CWriteStep
+ {
+ public:
+ CEqDateTimeSetCmdStep();
+ ~CEqDateTimeSetCmdStep();
+
+ public:
+ void setDateTimeDev(int nDev);
+ int setDateTime(short year, short month, short day, short hour, short minute, short second);
+ void getAttributeVector(CAttributeVector& attrubutes);
+
+ private:
+ int m_nDateTimeDev;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CEqModeChangeStep.cpp b/SourceCode/Bond/Servo/CEqModeChangeStep.cpp
new file mode 100644
index 0000000..6bb6f1e
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqModeChangeStep.cpp
@@ -0,0 +1,46 @@
+#include "stdafx.h"
+#include "CEqModeChangeStep.h"
+
+
+namespace SERVO {
+ CEqModeChangeStep::CEqModeChangeStep() : CWriteStep()
+ {
+ m_nEqModeDev = 0;
+ }
+
+ CEqModeChangeStep::~CEqModeChangeStep()
+ {
+
+ }
+
+ void CEqModeChangeStep::setEqModeDev(int nDev)
+ {
+ m_nEqModeDev = nDev;
+ }
+
+ int CEqModeChangeStep::equipmentOn()
+ {
+ short mode = 1;
+ return writeData(m_nEqModeDev, (const char*)&mode, sizeof(short));
+ }
+
+ int CEqModeChangeStep::equipmentOff()
+ {
+ short mode = 2;
+ return writeData(m_nEqModeDev, (const char*)&mode, sizeof(short));
+ }
+
+ int CEqModeChangeStep::setEqMode(short mode)
+ {
+ return writeData(m_nEqModeDev, (const char*)&mode, sizeof(short));
+ }
+
+ void CEqModeChangeStep::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ CWriteStep::getAttributeVector(attrubutes);
+
+ std::string strTemp;
+ attrubutes.addAttribute(new CAttribute("Equipment Mode Dev",
+ ("W" + CToolUnits::toHexString(m_nEqModeDev, strTemp)).c_str(), ""));
+ }
+}
diff --git a/SourceCode/Bond/Servo/CEqModeChangeStep.h b/SourceCode/Bond/Servo/CEqModeChangeStep.h
new file mode 100644
index 0000000..420014d
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqModeChangeStep.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "CWriteStep.h"
+
+
+namespace SERVO {
+ class CEqModeChangeStep : public CWriteStep
+ {
+ public:
+ CEqModeChangeStep();
+ ~CEqModeChangeStep();
+
+ public:
+ void setEqModeDev(int nDev);
+ int equipmentOn();
+ int equipmentOff();
+ int setEqMode(short mode);
+ void getAttributeVector(CAttributeVector& attrubutes);
+
+ private:
+ int m_nEqModeDev;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CEqModeStep.cpp b/SourceCode/Bond/Servo/CEqModeStep.cpp
index 3b416b2..8b21988 100644
--- a/SourceCode/Bond/Servo/CEqModeStep.cpp
+++ b/SourceCode/Bond/Servo/CEqModeStep.cpp
@@ -23,7 +23,7 @@
attrubutes.addAttribute(new CAttribute("Mode",
std::to_string(m_nMode).c_str(), getModeDescription(strTemp).c_str()));
attrubutes.addAttribute(new CAttribute("Mode Dev",
- std::to_string(m_nModeDev).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nModeDev, strTemp)).c_str(), ""));
}
int CEqModeStep::onReadData()
diff --git a/SourceCode/Bond/Servo/CEqStatusStep.cpp b/SourceCode/Bond/Servo/CEqStatusStep.cpp
index b525e6f..52eaa0f 100644
--- a/SourceCode/Bond/Servo/CEqStatusStep.cpp
+++ b/SourceCode/Bond/Servo/CEqStatusStep.cpp
@@ -35,8 +35,9 @@
std::to_string(m_nReasonCode[i]).c_str(), ""));
}
+ std::string strTemp;
attrubutes.addAttribute(new CAttribute("Status Dev",
- std::to_string(m_nStatusDev).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nStatusDev, strTemp)).c_str(), ""));
}
int CEqStatusStep::getStatus(unsigned int uint)
diff --git a/SourceCode/Bond/Servo/CEqVCREnableStep.cpp b/SourceCode/Bond/Servo/CEqVCREnableStep.cpp
new file mode 100644
index 0000000..5f07263
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqVCREnableStep.cpp
@@ -0,0 +1,48 @@
+#include "stdafx.h"
+#include "CEqVCREnableStep.h"
+#include "Log.h"
+
+
+namespace SERVO {
+ CEqVCREnableStep::CEqVCREnableStep() : CWriteStep()
+ {
+ m_nEqVCRModeDev = 0;
+ }
+
+ CEqVCREnableStep::~CEqVCREnableStep()
+ {
+
+ }
+
+ void CEqVCREnableStep::setEqVCRModeDev(int nDev)
+ {
+ m_nEqVCRModeDev = nDev;
+ }
+
+ int CEqVCREnableStep::vcrEanble(short id)
+ {
+ char szBuffer[16];
+ int mode = 1;
+ memcpy(szBuffer, &id, sizeof(short));
+ memcpy(&szBuffer[2], &mode, sizeof(short));
+ return writeData(m_nEqVCRModeDev, (const char*)szBuffer, 4);
+ }
+
+ int CEqVCREnableStep::vcrDisable(short id)
+ {
+ char szBuffer[16];
+ int mode = 2;
+ memcpy(szBuffer, &id, sizeof(short));
+ memcpy(&szBuffer[2], &mode, sizeof(short));
+ return writeData(m_nEqVCRModeDev, (const char*)szBuffer, 4);
+ }
+
+ void CEqVCREnableStep::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ CWriteStep::getAttributeVector(attrubutes);
+
+ std::string strTemp;
+ attrubutes.addAttribute(new CAttribute("VCR Mode Dev",
+ ("W" + CToolUnits::toHexString(m_nEqVCRModeDev, strTemp)).c_str(), ""));
+ }
+}
diff --git a/SourceCode/Bond/Servo/CEqVCREnableStep.h b/SourceCode/Bond/Servo/CEqVCREnableStep.h
new file mode 100644
index 0000000..ebd605d
--- /dev/null
+++ b/SourceCode/Bond/Servo/CEqVCREnableStep.h
@@ -0,0 +1,22 @@
+#pragma once
+#include "CWriteStep.h"
+
+
+namespace SERVO {
+ class CEqVCREnableStep : public CWriteStep
+ {
+ public:
+ CEqVCREnableStep();
+ ~CEqVCREnableStep();
+
+ public:
+ void setEqVCRModeDev(int nDev);
+ int vcrEanble(short id);
+ int vcrDisable(short id);
+ void getAttributeVector(CAttributeVector& attrubutes);
+
+ private:
+ int m_nEqVCRModeDev;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CEquipment.cpp b/SourceCode/Bond/Servo/CEquipment.cpp
index 3fa85bb..ad4a356 100644
--- a/SourceCode/Bond/Servo/CEquipment.cpp
+++ b/SourceCode/Bond/Servo/CEquipment.cpp
@@ -27,6 +27,16 @@
}
m_mapStep.clear();
+ for (auto item : m_inputPins) {
+ delete item;
+ }
+ m_inputPins.clear();
+
+ for (auto item : m_outputPins) {
+ delete item;
+ }
+ m_outputPins.clear();
+
DeleteCriticalSection(&m_criticalSection);
}
@@ -72,6 +82,17 @@
return iter->second;
}
+ CStep* CEquipment::getStepWithName(const char* pszName)
+ {
+ for (auto item : m_mapStep) {
+ if (item.second->getName().compare(pszName) == 0) {
+ return item.second;
+ }
+ }
+
+ return nullptr;
+ }
+
int CEquipment::addStep(unsigned int addr, CStep* pStep)
{
auto iter = m_mapStep.find(addr);
@@ -84,6 +105,7 @@
void CEquipment::init()
{
+ initPins();
for (auto item : m_mapStep) {
item.second->init();
}
@@ -135,6 +157,54 @@
const StationIdentifier& CEquipment::getStation()
{
return m_station;
+ }
+
+ void CEquipment::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ attrubutes.clear();
+ attrubutes.addAttribute(new CAttribute("Network",
+ std::to_string(m_station.nNetNo).c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Station",
+ std::to_string(m_station.nStNo).c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("ID",
+ std::to_string(m_nID).c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Name",
+ m_strName.c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Description",
+ m_strDescription.c_str(), ""));
+ attrubutes.addAttribute(new CAttribute("Alive",
+ this->isAlive() ? _T("TRUE") : _T("FALSE"), ""));
+ attrubutes.addAttribute(new CAttribute("CIM State",
+ m_bCimState ? _T("ON") : _T("OFF"), ""));
+ attrubutes.addAttribute(new CAttribute("Upstream",
+ m_bUpstreamInline ? _T("Inline") : _T("Offline"), ""));
+ attrubutes.addAttribute(new CAttribute("Downstream",
+ m_bDownstreamInline ? _T("Inline") : _T("Offline"), ""));
+ attrubutes.addAttribute(new CAttribute("Local Alarm",
+ m_bLocalAlarm ? _T("TRUE") : _T("FALSE"), ""));
+ attrubutes.addAttribute(new CAttribute("Auto Recipe Change",
+ m_bAutoRecipeChange ? _T("TRUE") : _T("FALSE"), ""));
+ char szTemp[256];
+ for (int i = 0; i < VCR_MAX; i++) {
+ sprintf_s(szTemp, 256, "VCR-%d", i + 1);
+ attrubutes.addAttribute(new CAttribute(szTemp,
+ m_bVCREnable[i] ? _T("Enable") : _T("Disable"), ""));
+ }
+
+ for (auto item : m_inputPins) {
+ attrubutes.addAttribute(new CAttribute(item->getName().c_str(),
+ std::to_string((int)item->getType()).c_str(), ""));
+ }
+
+ for (auto item : m_outputPins) {
+ attrubutes.addAttribute(new CAttribute(item->getName().c_str(),
+ std::to_string((int)item->getType()).c_str(), ""));
+ }
+
+ for (auto item : m_panelList) {
+ attrubutes.addAttribute(new CAttribute("Panel",
+ item->getID().c_str(), ""));
+ }
}
void CEquipment::setReadBitBlock(unsigned int start, unsigned int end)
@@ -328,4 +398,172 @@
if (index >= VCR_MAX) return FALSE;
return m_bVCREnable[index];
}
+
+ CPin* CEquipment::addPin(PinType type, char* pszName)
+ {
+ // 不允许名字添加重复的pin
+ CPin* pPin = getPin(pszName);
+ if (pPin != nullptr) return nullptr;
+
+
+ // 添加到Pin列表,看是输入pin或输出pin
+ if (type == PinType::INPUT) {
+ pPin = new CPin(this, type, pszName);
+ m_inputPins.push_back(pPin);
+ return pPin;
+ }
+ else if (type == PinType::OUTPUT) {
+ pPin = new CPin(this, type, pszName);
+ m_outputPins.push_back(pPin);
+ return pPin;
+ }
+
+ return nullptr;
+ }
+
+ CPin* CEquipment::getPin(char* pszName)
+ {
+ for (auto item : m_inputPins) {
+ if (item->getName().compare(pszName) == 0) {
+ return item;
+ }
+ }
+
+ for (auto item : m_outputPins) {
+ if (item->getName().compare(pszName) == 0) {
+ return item;
+ }
+ }
+
+ return nullptr;
+ }
+
+ std::vector<CPin*>& CEquipment::getInputPins()
+ {
+ return m_inputPins;
+ }
+
+ std::vector<CPin*>& CEquipment::getOutputPins()
+ {
+ return m_outputPins;
+ }
+
+ int CEquipment::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ ASSERT(pPin);
+ CPin* pFromPin = pPin->getConnectedPin();
+ ASSERT(pFromPin);
+ CEquipment* pFromEq = pFromPin->getEquipment();
+ ASSERT(pFromEq);
+
+ LOGI("<CEquipment><%s-%s>收到来自<%s.%s>的Intent<%d,%s,0x%x>",
+ this->getName().c_str(),
+ pPin->getName().c_str(),
+ pFromEq->getName().c_str(),
+ pFromPin->getName().c_str(),
+ pIntent->getCode(),
+ pIntent->getMsg(),
+ pIntent->getContext());
+
+
+
+ // 以下解释处理数据
+ int code = pIntent->getCode();
+
+
+ // 测试
+ if (code == FLOW_TEST) {
+ AfxMessageBox(pIntent->getMsg());
+ return FLOW_ACCEPT;
+ }
+
+
+ // 信号
+ if (code == FLOW_SIGNAL) {
+ return FLOW_ACCEPT;
+ }
+
+
+ // 数据
+ if (code == FLOW_SIGNAL) {
+ return FLOW_ACCEPT;
+ }
+
+
+ // 物料
+ if (code == FLOW_MOVE_MATERIAL) {
+ CPanel* pPanel = (CPanel*)pIntent->getContext();
+ ASSERT(pPanel);
+ if (!glassWillArrive(pPanel)) {
+ return FLOW_REJECT;
+ }
+ return glassArrived(pPanel);
+ }
+
+
+
+ return FLOW_ACCEPT;
+ }
+
+ int CEquipment::outputGlass(int port)
+ {
+ CPin* pOutPin = nullptr;
+ if (port == 0) {
+ pOutPin = getPin("Out");
+ if (pOutPin == nullptr) {
+ pOutPin = getPin("Out1");
+ }
+ }
+ else if (port == 1) {
+ pOutPin = getPin("Out2");
+ }
+ if (pOutPin == nullptr) {
+ return -1;
+ }
+
+
+ // 模拟取出第一张Panel,传送到下一环节
+ Lock();
+ CPanel* pContext = m_panelList.front();
+ pContext->addRef();
+
+ CIntent intent(FLOW_MOVE_MATERIAL, "", pContext);
+ int nRet = pOutPin->sendIntent(&intent);
+ if (nRet == FLOW_REJECT) {
+ LOGE("<CEquipment>对方拒绝接收Intent.");
+ }
+ else if (nRet == FLOW_ACCEPT) {
+ m_panelList.pop_front();
+ pContext->release(); // 添加到列队时addRef, 取出时release
+ }
+
+ pContext->release();
+ Unlock();
+
+ return 0;
+ }
+
+ BOOL CEquipment::glassWillArrive(CPanel* pPanel)
+ {
+ return TRUE;
+ }
+
+ int CEquipment::glassArrived(CPanel* pPanel)
+ {
+ Lock();
+ pPanel->addRef();
+ m_panelList.push_back(pPanel);
+ Unlock();
+ return FLOW_ACCEPT;
+ }
+
+ void CEquipment::addPanelToList(CPanel* pPanel)
+ {
+ ASSERT(pPanel);
+
+ Lock();
+ pPanel->addRef();
+ m_panelList.push_back(pPanel);
+ Unlock();
+ }
}
diff --git a/SourceCode/Bond/Servo/CEquipment.h b/SourceCode/Bond/Servo/CEquipment.h
index c13e71e..0ada23c 100644
--- a/SourceCode/Bond/Servo/CEquipment.h
+++ b/SourceCode/Bond/Servo/CEquipment.h
@@ -1,12 +1,22 @@
#pragma once
#include "Log.h"
#include "CCLinkIEControl.h"
+#include "CSample.h"
+#include "CPin.h"
#include "CEqModeStep.h"
#include "CEqStatusStep.h"
#include "CEqAlarmStep.h"
#include "CEqProcessStep.h"
#include "CEqCimModeChangeStep.h"
+#include "CEqModeChangeStep.h"
+#include "CEqCimMessageCmdStep.h"
+#include "CEqCimMessageClearStep.h"
+#include "CEqDateTimeSetCmdStep.h"
+#include "CEqVCREnableStep.h"
+#include <vector>
#include <map>
+#include <list>
+#include "CPanel.h"
namespace SERVO {
@@ -58,6 +68,7 @@
std::string& getDescription();
void setStation(int network, int station);
const StationIdentifier& getStation();
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
void setReadBitBlock(unsigned int start, unsigned int end);
MemoryBlock& getReadBitBlock();
void setWriteBitBlock(unsigned int start, unsigned int end);
@@ -65,13 +76,22 @@
void getProperties(std::vector<std::pair<std::string, std::string>>& container);
int addStep(unsigned int addr, CStep* pStep);
CStep* getStep(unsigned int addr);
+ CStep* getStepWithName(const char* pszName);
std::map<unsigned int, CStep*>& getSteps();
virtual void init();
virtual void term();
+ virtual void initPins() = 0;
virtual void onTimer(UINT nTimerid);
virtual void serialize(CArchive& ar);
virtual void onReceiveLBData(const char* pszData, size_t size);
-
+ virtual CPin* addPin(PinType type, char* pszName);
+ CPin* getPin(char* pszName);
+ std::vector<CPin*>& CEquipment::getInputPins();
+ std::vector<CPin*>& CEquipment::getOutputPins();
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+ virtual BOOL glassWillArrive(CPanel* pPanel);
+ virtual int outputGlass(int port);
+ virtual int glassArrived(CPanel* pPanel);
// 以下为从CC-Link读取到的Bit标志位检测函数
public:
@@ -91,6 +111,7 @@
protected:
inline void Lock() { EnterCriticalSection(&m_criticalSection); }
inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
+ void addPanelToList(CPanel* pPanel);
protected:
EquipmentListener m_listener;
@@ -101,6 +122,10 @@
StationIdentifier m_station;
MemoryBlock m_blockReadBit;
MemoryBlock m_blockWriteBit;
+ std::vector<CPin*> m_inputPins;
+ std::vector<CPin*> m_outputPins;
+ std::list<CPanel*> m_panelList;
+
// 以下为从CC-Link读取到的Bit标志位
private:
diff --git a/SourceCode/Bond/Servo/CFliper.cpp b/SourceCode/Bond/Servo/CFliper.cpp
new file mode 100644
index 0000000..cbf9a53
--- /dev/null
+++ b/SourceCode/Bond/Servo/CFliper.cpp
@@ -0,0 +1,60 @@
+#include "stdafx.h"
+#include "CFliper.h"
+
+namespace SERVO {
+ CFliper::CFliper() : CEquipment()
+ {
+
+ }
+
+ CFliper::~CFliper()
+ {
+
+ }
+
+ const char* CFliper::getClassName()
+ {
+ static char* pszName = "CFliper";
+ return pszName;
+ }
+
+ void CFliper::init()
+ {
+ CEquipment::init();
+ }
+
+ void CFliper::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CFliper::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CFliper>initPins");
+ addPin(SERVO::PinType::INPUT, _T("In1"));
+ addPin(SERVO::PinType::INPUT, _T("In2"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out"));
+ }
+
+ void CFliper::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CFliper::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+
+ void CFliper::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CFliper::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CFliper.h b/SourceCode/Bond/Servo/CFliper.h
new file mode 100644
index 0000000..2bb285f
--- /dev/null
+++ b/SourceCode/Bond/Servo/CFliper.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CFliper :
+ public CEquipment
+ {
+ public:
+ CFliper();
+ virtual ~CFliper();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CLoadPort.cpp b/SourceCode/Bond/Servo/CLoadPort.cpp
new file mode 100644
index 0000000..079b3f2
--- /dev/null
+++ b/SourceCode/Bond/Servo/CLoadPort.cpp
@@ -0,0 +1,79 @@
+#include "stdafx.h"
+#include "CLoadPort.h"
+
+
+namespace SERVO {
+ CLoadPort::CLoadPort() : CEquipment()
+ {
+
+ }
+
+ CLoadPort::~CLoadPort()
+ {
+
+ }
+
+ const char* CLoadPort::getClassName()
+ {
+ static char* pszName = "CLoadPort";
+ return pszName;
+ }
+
+ void CLoadPort::init()
+ {
+ CEquipment::init();
+ }
+
+ void CLoadPort::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CLoadPort::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CLoadPort>initPins");
+ addPin(SERVO::PinType::INPUT, _T("In"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out1"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out2"));
+ }
+
+ void CLoadPort::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CLoadPort::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+
+ void CLoadPort::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CLoadPort::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
+
+ int CLoadPort::outputGlass(int port)
+ {
+ // 如果列表中没有Panel,模拟生成10张
+ if (m_panelList.empty()) {
+ static int ii = 0;
+ char szBuffer[64];
+ LOGI("<CLoadPort>模拟生成10张PANEL");
+ for (int i = 0; i < 10; i++) {
+ sprintf_s(szBuffer, "P20250320A1A%d", ++ii);
+ CPanel* pPanel = new CPanel();
+ pPanel->setID(szBuffer);
+ addPanelToList(pPanel);
+ }
+ }
+
+ return __super::outputGlass(port);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CLoadPort.h b/SourceCode/Bond/Servo/CLoadPort.h
new file mode 100644
index 0000000..355bd1d
--- /dev/null
+++ b/SourceCode/Bond/Servo/CLoadPort.h
@@ -0,0 +1,27 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CLoadPort :
+ public CEquipment
+ {
+ public:
+ CLoadPort();
+ virtual ~CLoadPort();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+
+ public:
+ virtual int outputGlass(int port);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CMaster.cpp b/SourceCode/Bond/Servo/CMaster.cpp
index 63157a6..8c4f87d 100644
--- a/SourceCode/Bond/Servo/CMaster.cpp
+++ b/SourceCode/Bond/Servo/CMaster.cpp
@@ -72,19 +72,19 @@
// 初始化添加各子设备
+ addLoadPort(0, listener);
+ addLoadPort(1, listener);
+ addLoadPort(2, listener);
+ addLoadPort(3, listener);
+ addFliper(listener);
+ addVacuumBake(listener);
+ addAligner(listener);
addEFEM(listener);
+ addBonder(0, listener);
+ addBonder(1, listener);
+ addBakeCooling(listener);
+ connectEquipments();
- /*
- {
- CBonder* pBonder = new CBonder();
- pBonder->setName("Bonder 1");
- pBonder->setDescription("Bonder 1.");
- pBonder->setReadBitBlock(0x4600, 0x4bff);
- pBonder->setStation(1, 3);
- addEquipment(pBonder);
- LOGE("已添加“Bonder 1”.");
- }
- */
// 定时器
g_pMaster = this;
@@ -105,7 +105,7 @@
return 0;
}
- int CMaster::addEquipment(CEquipment* pEquipment)
+ int CMaster::addToEquipmentList(CEquipment* pEquipment)
{
EquipmentListener listener;
listener.onAlive = [&](void* pEquipment, BOOL bAlive) -> void {
@@ -141,6 +141,78 @@
return nullptr;
}
+ /* 添加LoadPort1
+ * index -- 0~3
+ */
+ int CMaster::addLoadPort(int index, StepListener& listener)
+ {
+ ASSERT(index == 0 || index == 1 || index == 2 || index == 3);
+ char szName[64];
+ sprintf_s(szName, 64, "LoadPort %d", index + 1);
+ CLoadPort* pEquipment = new CLoadPort();
+ pEquipment->setID(EQ_ID_LOADPORT1 + index);
+ pEquipment->setName(szName);
+ pEquipment->setDescription(szName);
+ addToEquipmentList(pEquipment);
+
+ pEquipment->init();
+ LOGE("已添加“%s”.", pEquipment->getName().c_str());
+
+
+ return 0;
+ }
+
+ int CMaster::addFliper(StepListener& listener)
+ {
+ CFliper* pEquipment = new CFliper();
+ pEquipment->setID(EQ_ID_FLIPER);
+ pEquipment->setBaseAlarmId(BASE_ALARM_EFEM);
+ pEquipment->setName("Fliper");
+ pEquipment->setDescription("Fliper.");
+ pEquipment->setReadBitBlock(0x4000, 0x45ff);
+ pEquipment->setStation(0, 255);
+ addToEquipmentList(pEquipment);
+
+
+ pEquipment->init();
+ LOGE("已添加“Fliper”.");
+ return 0;
+ }
+
+ int CMaster::addVacuumBake(StepListener& listener)
+ {
+ CVacuumBake* pEquipment = new CVacuumBake();
+ pEquipment->setID(EQ_ID_VACUUMBAKE);
+ pEquipment->setBaseAlarmId(BASE_ALARM_EFEM);
+ pEquipment->setName("VacuumBake");
+ pEquipment->setDescription("VacuumBake.");
+ pEquipment->setReadBitBlock(0x4000, 0x45ff);
+ pEquipment->setStation(0, 255);
+ addToEquipmentList(pEquipment);
+
+
+ pEquipment->init();
+ LOGE("已添加“VacuumBake”.");
+ return 0;
+ }
+
+ int CMaster::addAligner(StepListener& listener)
+ {
+ CAligner* pEquipment = new CAligner();
+ pEquipment->setID(EQ_ID_ALIGNER);
+ pEquipment->setBaseAlarmId(BASE_ALARM_EFEM);
+ pEquipment->setName("Aligner");
+ pEquipment->setDescription("Aligner.");
+ pEquipment->setReadBitBlock(0x4000, 0x45ff);
+ pEquipment->setStation(0, 255);
+ addToEquipmentList(pEquipment);
+
+
+ pEquipment->init();
+ LOGE("已添加“Aligner”.");
+ return 0;
+ }
+
int CMaster::addEFEM(StepListener& listener)
{
CEFEM* pEquipment = new CEFEM();
@@ -150,7 +222,7 @@
pEquipment->setDescription("EFEM(ROBOT).");
pEquipment->setReadBitBlock(0x4000, 0x45ff);
pEquipment->setStation(0, 255);
- addEquipment(pEquipment);
+ addToEquipmentList(pEquipment);
// 添加 step
@@ -229,7 +301,7 @@
pStep->setName(STEP_PROCESS);
pStep->setListener(listener);
pStep->setWriteSignalDev(0x37);
- pStep->setProcessDev(0x1864);
+ pStep->setProcessDev(0x5864);
if (pEquipment->addStep(0x367, pStep) != 0) {
delete pStep;
}
@@ -244,9 +316,233 @@
delete pStep;
}
}
+ {
+ CEqCimMessageCmdStep* pStep = new CEqCimMessageCmdStep();
+ pStep->setName(STEP_CIM_MESSAGE_CMD);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(0x51);
+ pStep->setCimMessageDev(0x0);
+ if (pEquipment->addStep(0x351, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimMessageClearStep* pStep = new CEqCimMessageClearStep();
+ pStep->setName(STEP_CIM_MESSAGE_CLEAR);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(0x52);
+ pStep->setClearCimMessageDev(0x13);
+ if (pEquipment->addStep(0x352, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqDateTimeSetCmdStep* pStep = new CEqDateTimeSetCmdStep();
+ pStep->setName(STEP_DATETIME_SET_CMD);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(0x53);
+ pStep->setDateTimeDev(0x16);
+ if (pEquipment->addStep(0x353, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqVCREnableStep* pStep = new CEqVCREnableStep();
+ pStep->setName(STEP_EQ_VCR_ENABLE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(0x54);
+ pStep->setEqVCRModeDev(0x1F);
+ if (pEquipment->addStep(0x354, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqModeChangeStep* pStep = new CEqModeChangeStep();
+ pStep->setName(STEP_EQ_MODE_CHANGE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(0x55);
+ pStep->setEqModeDev(0x1E);
+ if (pEquipment->addStep(0x355, pStep) != 0) {
+ delete pStep;
+ }
+ }
pEquipment->init();
LOGE("已添加“EFEM(ROBOT)”.");
+ return 0;
+ }
+
+ /* 添加bonder1 或 bonder2
+ * index -- 0, bonder1
+ * index -- 1, bonder2
+ */
+ int CMaster::addBonder(int index, StepListener& listener)
+ {
+ ASSERT(index == 0 || index == 1);
+ CBonder* pEquipment = new CBonder();
+ pEquipment->setID(EQ_ID_Bonder1 + index);
+ pEquipment->setName(index == 0 ? "Bonder 1" : "Bonder 2");
+ pEquipment->setDescription(index == 0 ? "Bonder 1." : "Bonder 2.");
+ pEquipment->setStation(1, index == 0 ? 3 : 4);
+ pEquipment->setReadBitBlock(index == 0 ? 0x4600 : 0x4c00,
+ index == 0 ? 0x4c00 : 0x5200);
+ addToEquipmentList(pEquipment);
+
+
+ // 添加 step
+ {
+ CEqModeStep* pStep = new CEqModeStep();
+ pStep->setName(STEP_MODE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x330 : 0x630);
+ pStep->setModeDev(index == 0 ? 0x6a8c : 0x848c);
+ if (pEquipment->addStep(0x360, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqStatusStep* pStep = new CEqStatusStep();
+ pStep->setName(STEP_STATUS);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x331 : 0x631);
+ pStep->setStatusDev(index == 0 ? 0x6a68 : 0x8a68);
+ if (pEquipment->addStep(0x361, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK1);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x332 : 0x632);
+ pStep->setAlarmDev(index == 0 ? 0x6c1d : 0x8c1d);
+ if (pEquipment->addStep(0x362, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK2);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x333 : 0x633);
+ pStep->setAlarmDev(index == 0 ? 0x6c4a : 0x8c4a);
+ if (pEquipment->addStep(0x363, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK3);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x334 : 0x634);
+ pStep->setAlarmDev(index == 0 ? 0x6c77 : 0x8c77);
+ if (pEquipment->addStep(0x364, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK4);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x335 : 0x635);
+ pStep->setAlarmDev(index == 0 ? 0x6ca4 : 0x8ca4);
+ if (pEquipment->addStep(0x365, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqAlarmStep* pStep = new CEqAlarmStep();
+ pStep->setName(STEP_ALARM_BLOCK5);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x336 : 0x636);
+ pStep->setAlarmDev(index == 0 ? 0x6cd1 : 0x8cd1);
+ if (pEquipment->addStep(0x366, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqProcessStep* pStep = new CEqProcessStep();
+ pStep->setName(STEP_PROCESS);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x337 : 0x637);
+ pStep->setProcessDev(index == 0 ? 0x7864 : 0x9864);
+ if (pEquipment->addStep(0x367, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimModeChangeStep* pStep = new CEqCimModeChangeStep();
+ pStep->setName(STEP_CIM_MODE_CHANGE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x350 : 0x650);
+ pStep->setCimModeDev(index == 0 ? 0x965 : 0x12b5);
+ if (pEquipment->addStep(0x350, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimMessageCmdStep* pStep = new CEqCimMessageCmdStep();
+ pStep->setName(STEP_CIM_MESSAGE_CMD);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x351 : 0x651);
+ pStep->setCimMessageDev(index == 0 ? 0x950 : 0x12a0);
+ if (pEquipment->addStep(0x351, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqCimMessageClearStep* pStep = new CEqCimMessageClearStep();
+ pStep->setName(STEP_CIM_MESSAGE_CLEAR);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x352 : 0x652);
+ pStep->setClearCimMessageDev(index == 0 ? 0x963 : 0x12b3);
+ if (pEquipment->addStep(0x352, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqDateTimeSetCmdStep* pStep = new CEqDateTimeSetCmdStep();
+ pStep->setName(STEP_DATETIME_SET_CMD);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x353 : 0x653);
+ pStep->setDateTimeDev(index == 0 ? 0x966 : 0x12b6);
+ if (pEquipment->addStep(0x353, pStep) != 0) {
+ delete pStep;
+ }
+ }
+ {
+ CEqModeChangeStep* pStep = new CEqModeChangeStep();
+ pStep->setName(STEP_EQ_MODE_CHANGE);
+ pStep->setListener(listener);
+ pStep->setWriteSignalDev(index == 0 ? 0x355 : 0x655);
+ pStep->setEqModeDev(index == 0 ? 0x96E : 0x12be);
+ if (pEquipment->addStep(0x355, pStep) != 0) {
+ delete pStep;
+ }
+ }
+
+
+ pEquipment->init();
+ LOGE("已添加“%s”.", pEquipment->getName().c_str());
+
+
+ return 0;
+ }
+
+ int CMaster::addBakeCooling(StepListener& listener)
+ {
+ CBakeCooling* pEquipment = new CBakeCooling();
+ pEquipment->setID(EQ_ID_BAKE_COOLING);
+ pEquipment->setBaseAlarmId(BASE_ALARM_EFEM);
+ pEquipment->setName("BakeCooling");
+ pEquipment->setDescription("BakeCooling.");
+ pEquipment->setReadBitBlock(0x4000, 0x45ff);
+ pEquipment->setStation(0, 255);
+ addToEquipmentList(pEquipment);
+
+
+ pEquipment->init();
+ LOGE("已添加“Aligner”.");
return 0;
}
@@ -274,4 +570,77 @@
}
}
}
+
+ void CMaster::connectEquipments()
+ {
+ int nRet;
+ CLoadPort* pLoadPort1 = (CLoadPort*)getEquipment(EQ_ID_LOADPORT1);
+ CLoadPort* pLoadPort2 = (CLoadPort*)getEquipment(EQ_ID_LOADPORT2);
+ CLoadPort* pLoadPort3 = (CLoadPort*)getEquipment(EQ_ID_LOADPORT3);
+ CLoadPort* pLoadPort4 = (CLoadPort*)getEquipment(EQ_ID_LOADPORT4);
+ CFliper* pFliper = (CFliper*)getEquipment(EQ_ID_FLIPER);
+ CVacuumBake* pVacuumBake = (CVacuumBake*)getEquipment(EQ_ID_VACUUMBAKE);
+ CAligner* pAligner = (CAligner*)getEquipment(EQ_ID_ALIGNER);
+ CBonder* pBonder1 = (CBonder*)getEquipment(EQ_ID_Bonder1);
+ CBonder* pBonder2 = (CBonder*)getEquipment(EQ_ID_Bonder2);
+ CBakeCooling* pBakeCooling = (CBakeCooling*)getEquipment(EQ_ID_BAKE_COOLING);
+
+ nRet = pLoadPort1->getPin("Out1")->connectPin(pFliper->getPin("In1"));
+ if (nRet < 0) {
+ LOGE("连接LoadPort1-Fliper失败");
+ }
+ nRet = pLoadPort2->getPin("Out1")->connectPin(pFliper->getPin("In2"));
+ if (nRet < 0) {
+ LOGE("连接LoadPort1-Fliper失败");
+ }
+
+ nRet = pLoadPort1->getPin("Out2")->connectPin(pVacuumBake->getPin("In1"));
+ if (nRet < 0) {
+ LOGE("连接LoadPort1-VacuumBake失败");
+ }
+ nRet = pLoadPort2->getPin("Out2")->connectPin(pVacuumBake->getPin("In2"));
+ if (nRet < 0) {
+ LOGE("连接LoadPort1-VacuumBake失败");
+ }
+
+ nRet = pFliper->getPin("Out")->connectPin(pAligner->getPin("In1"));
+ if (nRet < 0) {
+ LOGE("连接Fliper-Aligner失败");
+ }
+
+ nRet = pVacuumBake->getPin("Out")->connectPin(pAligner->getPin("In2"));
+ if (nRet < 0) {
+ LOGE("连接VacuumBake-Aligner失败");
+ }
+
+ nRet = pAligner->getPin("Out1")->connectPin(pBonder1->getPin("In"));
+ if (nRet < 0) {
+ LOGE("连接Aligner-Bondere1失败");
+ }
+
+ nRet = pAligner->getPin("Out2")->connectPin(pBonder2->getPin("In"));
+ if (nRet < 0) {
+ LOGE("连接Aligner-Bondere2失败");
+ }
+
+ nRet = pBonder1->getPin("Out")->connectPin(pBakeCooling->getPin("In1"));
+ if (nRet < 0) {
+ LOGE("连接Bonder1-BakeCooling失败");
+ }
+
+ nRet = pBonder2->getPin("Out")->connectPin(pBakeCooling->getPin("In2"));
+ if (nRet < 0) {
+ LOGE("连接Bonder2-BakeCooling失败");
+ }
+
+ nRet = pBakeCooling->getPin("Out1")->connectPin(pLoadPort3->getPin("In"));
+ if (nRet < 0) {
+ LOGE("连接BakeCooling-LoadPort3失败");
+ }
+
+ nRet = pBakeCooling->getPin("Out2")->connectPin(pLoadPort4->getPin("In"));
+ if (nRet < 0) {
+ LOGE("连接BakeCooling-LoadPort4失败");
+ }
+ }
}
diff --git a/SourceCode/Bond/Servo/CMaster.h b/SourceCode/Bond/Servo/CMaster.h
index 0fefda3..12b8de3 100644
--- a/SourceCode/Bond/Servo/CMaster.h
+++ b/SourceCode/Bond/Servo/CMaster.h
@@ -3,6 +3,11 @@
#include "CEquipment.h"
#include "CEFEM.h"
#include "CBonder.h"
+#include "CLoadPort.h"
+#include "CFliper.h"
+#include "CAligner.h"
+#include "CVacuumBake.h"
+#include "CBakeCooling.h"
#include "CCLinkIEControl.h"
@@ -32,8 +37,16 @@
CEquipment* getEquipment(int id);
private:
- int addEquipment(CEquipment* pEquipment);
+ int addToEquipmentList(CEquipment* pEquipment);
+ int addLoadPort(int index, StepListener& listener);
+ int addFliper(StepListener& listener);
+ int addVacuumBake(StepListener& listener);
+ int addAligner(StepListener& listener);
int addEFEM(StepListener& listener);
+ int addBonder(int index, StepListener& listener);
+ int addBakeCooling(StepListener& listener);
+ void connectEquipments();
+
private:
MasterListener m_listener;
diff --git a/SourceCode/Bond/Servo/CMeasurement.cpp b/SourceCode/Bond/Servo/CMeasurement.cpp
new file mode 100644
index 0000000..217e092
--- /dev/null
+++ b/SourceCode/Bond/Servo/CMeasurement.cpp
@@ -0,0 +1,57 @@
+#include "stdafx.h"
+#include "CMeasurement.h"
+
+namespace SERVO {
+ CMeasurement::CMeasurement() : CEquipment()
+ {
+
+ }
+
+ CMeasurement::~CMeasurement()
+ {
+
+ }
+
+ const char* CMeasurement::getClassName()
+ {
+ static char* pszName = "CMeasurement";
+ return pszName;
+ }
+
+ void CMeasurement::init()
+ {
+ CEquipment::init();
+ }
+
+ void CMeasurement::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CMeasurement::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CMeasurement>initPins");
+ }
+
+ void CMeasurement::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CMeasurement::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+
+ void CMeasurement::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CMeasurement::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CMeasurement.h b/SourceCode/Bond/Servo/CMeasurement.h
new file mode 100644
index 0000000..9b13681
--- /dev/null
+++ b/SourceCode/Bond/Servo/CMeasurement.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CMeasurement :
+ public CEquipment
+ {
+ public:
+ CMeasurement();
+ virtual ~CMeasurement();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CPageGraph1.cpp b/SourceCode/Bond/Servo/CPageGraph1.cpp
new file mode 100644
index 0000000..be12698
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPageGraph1.cpp
@@ -0,0 +1,406 @@
+锘�// CPageGraph1.cpp: 瀹炵幇鏂囦欢
+//
+
+#include "stdafx.h"
+#include "Servo.h"
+#include "CPageGraph1.h"
+#include "afxdialogex.h"
+#include "Common.h"
+
+
+
+// Image
+#define IMAGE_ROBOT 2
+
+#define INDICATE_BONDER1 1
+#define INDICATE_BONDER2 2
+#define INDICATE_FLIPER 3
+#define INDICATE_ALIGNER 4
+#define INDICATE_LPORT4 5
+#define INDICATE_LPORT3 6
+#define INDICATE_LPORT2 7
+#define INDICATE_LPORT1 8
+#define INDICATE_ROBOT_ARM1 9
+#define INDICATE_ROBOT_ARM2 10
+#define INDICATE_VACUUM_BAKE 11
+#define INDICATE_BAKE_COOLING 12
+#define INDICATE_MEASUREMENT 13
+
+// CPageGraph1 瀵硅瘽妗�
+
+IMPLEMENT_DYNAMIC(CPageGraph1, CDialogEx)
+
+CPageGraph1::CPageGraph1(CWnd* pParent /*=nullptr*/)
+ : CDialogEx(IDD_PAGE_GRAPH1, pParent)
+{
+ m_pGraph = nullptr;
+ m_pObserver = nullptr;
+ m_bIsRobotMoving = FALSE;
+ m_crBkgnd = PAGE_GRPAH1_BACKGROUND_COLOR;
+ m_hbrBkgnd = nullptr;
+}
+
+CPageGraph1::~CPageGraph1()
+{
+}
+
+void CPageGraph1::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+}
+
+
+BEGIN_MESSAGE_MAP(CPageGraph1, CDialogEx)
+ ON_WM_CTLCOLOR()
+ ON_WM_DESTROY()
+ ON_WM_SIZE()
+ ON_NOTIFY(BYSERVOGRAPH_ITEM_CLICKED, IDC_SERVO_GRAPH1, &CPageGraph1::OnGraphItemClicked)
+ ON_WM_ERASEBKGND()
+ ON_WM_TIMER()
+END_MESSAGE_MAP()
+
+
+// CPageGraph1 娑堟伅澶勭悊绋嬪簭
+
+
+void CPageGraph1::InitRxWindows()
+{
+ /* code */
+ // 璁㈤槄鏁版嵁
+ IRxWindows* pRxWindows = RX_GetRxWindows();
+ pRxWindows->enableLog(5);
+ if (m_pObserver == NULL) {
+ m_pObserver = pRxWindows->allocObserver([&](IAny* pAny) -> void {
+ // onNext
+ pAny->addRef();
+ int code = pAny->getCode();
+ if (RX_CODE_EQ_ALIVE == code) {
+ // 閫氱煡璁惧鐘舵��
+ SERVO::CEquipment* pEquipment = nullptr;
+ if (pAny->getPtrValue("ptr", (void*&)pEquipment)) {
+ if (pEquipment != nullptr) {
+ int nID = pEquipment->getID();
+ BOOL bAlive = pEquipment->isAlive();
+ if (EQ_ID_EFEM == nID) {
+ DeviceStatus status = bAlive ? DeviceStatus::ONLINE : DeviceStatus::OFFLINE;
+ UpdateDeviceStatus(INDICATE_ROBOT_ARM1, status);
+ UpdateDeviceStatus(INDICATE_ROBOT_ARM2, status);
+ }
+ }
+ }
+ }
+
+ pAny->release();
+ }, [&]() -> void {
+ // onComplete
+ }, [&](IThrowable* pThrowable) -> void {
+ // onErrorm
+ pThrowable->printf();
+ });
+
+ theApp.m_model.getObservable()->observeOn(pRxWindows->mainThread())
+ ->subscribe(m_pObserver);
+ }
+}
+
+BOOL CPageGraph1::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+ SetTimer(1, 3000, nullptr);
+
+
+ // 鍥剧ず
+ m_pGraph = CServoGraph::Hook(GetDlgItem(IDC_SERVO_GRAPH1)->GetSafeHwnd());
+ CString strPath;
+ strPath.Format(_T("%s\\res\\Servo001.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+ m_pGraph->AddImage(1, (LPTSTR)(LPCTSTR)strPath, 0, 0);
+
+ strPath.Format(_T("%s\\res\\Robot001.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+ m_pGraph->AddImage(IMAGE_ROBOT, (LPTSTR)(LPCTSTR)strPath, 170, 270);
+
+ // 娣诲姞鎸囩ず鍣�
+ // Bonder
+ m_pGraph->AddIndicateBox(INDICATE_BONDER1, 220, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_BONDER1, "10", "Bonder 1");
+ m_pGraph->AddIndicateBox(INDICATE_BONDER2, 220, 516, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_BONDER2, "11", "Bonder 2");
+
+
+ // 缈昏浆
+ m_pGraph->AddIndicateBox(INDICATE_FLIPER, 338, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_FLIPER, "8", "Fliper");
+
+
+ // 瀵逛綅
+ m_pGraph->AddIndicateBox(INDICATE_ALIGNER, 428, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_ALIGNER, "7", "Aligner");
+
+
+ // Load port 4
+ m_pGraph->AddIndicateBox(INDICATE_LPORT4, 518, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_LPORT4, "4", "LPort4");
+
+
+ // Load port 3
+ m_pGraph->AddIndicateBox(INDICATE_LPORT3, 606, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_LPORT3, "3", "LPort3");
+
+
+ // Load port 2
+ m_pGraph->AddIndicateBox(INDICATE_LPORT2, 690, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_LPORT2, "2", "LPort2");
+
+
+ // Load port 1
+ m_pGraph->AddIndicateBox(INDICATE_LPORT1, 774, 172, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_LPORT1, "1", "LPort1");
+
+
+ // Robot
+ m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM1, 190, 294, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_ROBOT_ARM1, "5", "Robot");
+ m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM2, 243, 294, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_ROBOT_ARM2, "6", "Robot");
+
+
+
+
+ // Vacuum bake
+ m_pGraph->AddIndicateBox(INDICATE_VACUUM_BAKE, 396, 516, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_VACUUM_BAKE, "9", "Vacuum bake");
+
+
+ // Bake cooling
+ m_pGraph->AddIndicateBox(INDICATE_BAKE_COOLING, 566, 516, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_BAKE_COOLING, "12", "Bake cooling");
+
+
+ // 绮惧害妫�
+ m_pGraph->AddIndicateBox(INDICATE_MEASUREMENT, 737, 516, 48, RGB(22, 22, 22),
+ RGB(255, 127, 39), EQ_BOX_OFFLINE);
+ m_pGraph->SetBoxText(INDICATE_MEASUREMENT, "13", "Measurement");
+
+
+ // 缁戝畾鏁版嵁
+ {
+ SERVO::CEquipment* pEquipment = theApp.m_model.m_master.getEquipment(EQ_ID_EFEM);
+ m_pGraph->SetIndicateBoxData(INDICATE_ROBOT_ARM1, pEquipment);
+ }
+
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // 寮傚父: OCX 灞炴�ч〉搴旇繑鍥� FALSE
+}
+
+void CPageGraph1::UpdateDeviceStatus(int id, DeviceStatus status)
+{
+ // 鏍规嵁鐘舵�佽缃鑹�
+ COLORREF newBackgroundColor;
+ COLORREF newFrameColor1;
+ COLORREF newFrameColor2;
+
+ switch (status) {
+ case ONLINE:
+ newBackgroundColor = EQ_BOX_ONLINE;
+ newFrameColor1 = EQ_BOX_FRAME1;
+ newFrameColor2 = EQ_BOX_FRAME2;
+ break;
+ case OFFLINE:
+ newBackgroundColor = RGB(222, 222, 222);
+ newFrameColor1 = EQ_BOX_FRAME1;
+ newFrameColor2 = EQ_BOX_FRAME2;
+ break;
+ default:
+ newBackgroundColor = RGB(255, 255, 255); // 榛樿鐧借壊鑳屾櫙
+ newFrameColor1 = RGB(0, 0, 0); // 榛樿榛戣壊妗嗘灦1
+ newFrameColor2 = RGB(0, 0, 0); // 榛樿榛戣壊妗嗘灦2
+ break;
+ }
+
+ m_pGraph->UpdateIndicateBox1Colors(id, newBackgroundColor, newFrameColor1, newFrameColor2);
+
+ // 鍒锋柊鐣岄潰
+ Invalidate();
+ UpdateWindow();
+}
+
+BOOL CPageGraph1::OnEraseBkgnd(CDC* pDC)
+{
+ // TODO: 鍦ㄦ娣诲姞娑堟伅澶勭悊绋嬪簭浠g爜鍜�/鎴栬皟鐢ㄩ粯璁ゅ��
+ if (m_bIsRobotMoving) {
+ // 绂佹鍒锋柊鑳屾櫙锛岄伩鍏嶉棯鐑�
+ return TRUE;
+ }
+
+ return CDialogEx::OnEraseBkgnd(pDC);
+}
+
+HBRUSH CPageGraph1::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
+{
+ HBRUSH hbr = CDialogEx::OnCtlColor(pDC, pWnd, nCtlColor);
+
+ if (nCtlColor == CTLCOLOR_STATIC) {
+ pDC->SetBkColor(m_crBkgnd);
+ pDC->SetTextColor(RGB(0, 0, 0));
+ }
+
+ if (m_hbrBkgnd == nullptr) {
+ m_hbrBkgnd = CreateSolidBrush(m_crBkgnd);
+ }
+
+ return m_hbrBkgnd;
+}
+
+void CPageGraph1::OnDestroy()
+{
+ CDialogEx::OnDestroy();
+
+ if (m_hbrBkgnd != nullptr) {
+ ::DeleteObject(m_hbrBkgnd);
+ }
+}
+
+void CPageGraph1::OnSize(UINT nType, int cx, int cy)
+{
+ CDialogEx::OnSize(nType, cx, cy);
+ if (GetDlgItem(IDC_SERVO_GRAPH1) == nullptr) return;
+
+ CRect rcClient;
+ GetClientRect(&rcClient);
+ GetDlgItem(IDC_SERVO_GRAPH1)->MoveWindow(0, 0, rcClient.Width(), rcClient.Height());
+}
+
+void CPageGraph1::UpdateRobotPosition(float percentage)
+{
+ // 闄愬埗鐧惧垎姣旇寖鍥村湪 [0, 1] 涔嬮棿
+ if (percentage < 0.0f) percentage = 0.0f;
+ if (percentage > 1.0f) percentage = 1.0f;
+
+ // 鏍规嵁鐧惧垎姣旇绠楃洰鏍� X 鍧愭爣
+ int startX = m_pGraph->GetImage(IMAGE_ROBOT)->x;
+ int endX = static_cast<int>(170 + percentage * (700 - 170));
+
+ int arm1Offset = 20; // 浠庡浘鐗囧埌ARM1鐨勫亸绉�
+ int arm2Offset = 73; // 浠庡浘鐗囧埌ARM2鐨勫亸绉�
+
+ // 璁$畻绉诲姩鎵�闇�鐨勬椂闂�
+ int distance = abs(endX - startX);
+ int duration = static_cast<int>((distance / 100.0) * 1000);
+
+ auto startTime = std::chrono::steady_clock::now();
+ auto endTime = startTime + std::chrono::milliseconds(duration);
+
+ // 寮�濮嬬Щ鍔紝璁剧疆鏍囪
+ m_bIsRobotMoving = TRUE;
+
+ // 寮�濮嬪钩婊戠Щ鍔�
+ while (std::chrono::steady_clock::now() < endTime) {
+ auto currentTime = std::chrono::steady_clock::now();
+ float progress = std::chrono::duration<float, std::milli>(currentTime - startTime).count() / duration;
+ progress = min(progress, 1.0f);
+
+ // 鏍规嵁杩涘害璁$畻褰撳墠浣嶇疆
+ int currentX = static_cast<int>(startX + progress * (endX - startX));
+ m_pGraph->UpdateImageCoordinates(IMAGE_ROBOT, currentX, 270);
+ m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, currentX + arm1Offset, 294);
+ m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, currentX + arm2Offset, 294);
+
+ // 鍒锋柊鐣岄潰
+ Invalidate();
+ UpdateWindow();
+
+ // 鎺у埗甯х巼绾︿负 60 FPS
+ std::this_thread::sleep_for(std::chrono::milliseconds(16));
+ }
+
+ // 纭繚鏈�鍚庝綅缃簿纭埌鐩爣浣嶇疆
+ m_pGraph->UpdateImageCoordinates(IMAGE_ROBOT, endX, 270);
+ m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, endX + arm1Offset, 294);
+ m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, endX + arm2Offset, 294);
+
+ // 鐣岄潰閲嶇粯
+ Invalidate();
+
+ // 鍔ㄧ敾缁撴潫锛岃缃爣璁�
+ m_bIsRobotMoving = FALSE;
+}
+
+void CPageGraph1::RotateRobot(float angleInDegrees)
+{
+ // 灏嗚搴﹁浆鎹负寮у害
+ float angleInRadians = static_cast<float>(std::acos(-1)) / 180.0f * angleInDegrees;
+
+ // 鑾峰彇鏈哄櫒浜哄浘鐗囩殑褰撳墠鍧愭爣鍜屼腑蹇�
+ auto* pImage = m_pGraph->GetImage(IMAGE_ROBOT);
+ if (!pImage) return;
+
+ // 鏇存柊 Rotate 鍥剧墖鐨勮搴︼紝纭繚瑙掑害淇濇寔鍦� [0, 360) 鑼冨洿鍐�
+ m_pGraph->UpdateImageAngle(IMAGE_ROBOT, static_cast<float>(fmod(pImage->angle + angleInDegrees + 360, 360)));
+
+ int cx = pImage->x + pImage->bmWidth / 2; // 鍥剧墖涓績 X
+ int cy = pImage->y + pImage->bmHeight / 2; // 鍥剧墖涓績 Y
+
+ // 鏃嬭浆鎸囩ず妗嗙殑鍧愭爣
+ auto* pRobot1 = m_pGraph->GetIndicateBox(INDICATE_ROBOT_ARM1);
+ auto* pRobot2 = m_pGraph->GetIndicateBox(INDICATE_ROBOT_ARM2);
+
+ if (pRobot1 && pRobot2) {
+ int newArmX1 = pImage->x + 20;
+ int newArmY1 = 294;
+
+ int newArmX2 = pImage->x + 73;
+ int newArmY2 = 294;
+
+ if (angleInDegrees != 0.0f) {
+ // 璁$畻鎸囩ず妗�1鐨勬柊鍧愭爣
+ newArmX1 = static_cast<int>(cx + (pRobot1->x - cx) * cos(angleInRadians) - (pRobot1->y - cy) * sin(angleInRadians));
+ newArmY1 = static_cast<int>(cy + (pRobot1->x - cx) * sin(angleInRadians) + (pRobot1->y - cy) * cos(angleInRadians));
+
+ // 璁$畻鎸囩ず妗�2鐨勬柊鍧愭爣
+ newArmX2 = static_cast<int>(cx + (pRobot2->x - cx) * cos(angleInRadians) - (pRobot2->y - cy) * sin(angleInRadians));
+ newArmY2 = static_cast<int>(cy + (pRobot2->x - cx) * sin(angleInRadians) + (pRobot2->y - cy) * cos(angleInRadians));
+ }
+
+ // 鏇存柊鎸囩ず妗嗙殑浣嶇疆
+ m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, newArmX1, newArmY1);
+ m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, newArmX2, newArmY2);
+ }
+
+ // 寮哄埗閲嶇粯鐣岄潰
+ Invalidate();
+}
+
+void CPageGraph1::OnGraphItemClicked(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ BYSERVOGRAPH_NMHDR* pGraphNmhdr = reinterpret_cast<BYSERVOGRAPH_NMHDR*>(pNMHDR);
+ CString s; s.Format(_T("OnGraphItemClicked %d"), pGraphNmhdr->dwData);
+ SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)m_pGraph->GetIndicateBoxData(pGraphNmhdr->dwData);
+ if (pEquipment != nullptr) {
+ AfxMessageBox(pEquipment->getName().c_str());
+ }
+
+
+ *pResult = 0;
+}
+
+void CPageGraph1::OnTimer(UINT_PTR nIDEvent)
+{
+ if (1 == nIDEvent) {
+ KillTimer(1);
+ InitRxWindows();
+ }
+
+ CDialogEx::OnTimer(nIDEvent);
+}
diff --git a/SourceCode/Bond/Servo/CPageGraph1.h b/SourceCode/Bond/Servo/CPageGraph1.h
new file mode 100644
index 0000000..405af87
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPageGraph1.h
@@ -0,0 +1,52 @@
+锘�#pragma once
+#include "ServoGraph.h"
+
+
+enum DeviceStatus {
+ ONLINE, // 鍦ㄧ嚎
+ OFFLINE, // 绂荤嚎
+};
+
+
+// CPageGraph1 瀵硅瘽妗�
+
+class CPageGraph1 : public CDialogEx
+{
+ DECLARE_DYNAMIC(CPageGraph1)
+
+public:
+ CPageGraph1(CWnd* pParent = nullptr); // 鏍囧噯鏋勯�犲嚱鏁�
+ virtual ~CPageGraph1();
+
+
+public:
+ void InitRxWindows();
+ void UpdateDeviceStatus(int id, DeviceStatus status);
+ void UpdateRobotPosition(float percentage);
+ void RotateRobot(float angleInDegrees);
+
+private:
+ IObserver* m_pObserver;
+ CServoGraph* m_pGraph;
+ BOOL m_bIsRobotMoving;
+ COLORREF m_crBkgnd;
+ HBRUSH m_hbrBkgnd;
+
+// 瀵硅瘽妗嗘暟鎹�
+#ifdef AFX_DESIGN_TIME
+ enum { IDD = IDD_PAGE_GRAPH1 };
+#endif
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 鏀寔
+
+ DECLARE_MESSAGE_MAP()
+public:
+ virtual BOOL OnInitDialog();
+ afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
+ afx_msg void OnDestroy();
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+ afx_msg void OnGraphItemClicked(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg BOOL OnEraseBkgnd(CDC* pDC);
+ afx_msg void OnTimer(UINT_PTR nIDEvent);
+};
diff --git a/SourceCode/Bond/Servo/CPageGraph2.cpp b/SourceCode/Bond/Servo/CPageGraph2.cpp
new file mode 100644
index 0000000..00e7b4c
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPageGraph2.cpp
@@ -0,0 +1,274 @@
+锘�// CPageGraph2.cpp: 瀹炵幇鏂囦欢
+//
+
+#include "stdafx.h"
+#include "Servo.h"
+#include "CPageGraph2.h"
+#include "afxdialogex.h"
+
+
+// CPageGraph2 瀵硅瘽妗�
+
+IMPLEMENT_DYNAMIC(CPageGraph2, CDialogEx)
+
+CPageGraph2::CPageGraph2(CWnd* pParent /*=nullptr*/)
+ : CDialogEx(IDD_PAGE_GRAPH2, pParent)
+{
+ m_pEqsGraphWnd = nullptr;
+ m_crBkgnd = PAGE_GRPAH2_BACKGROUND_COLOR;
+ m_hbrBkgnd = nullptr;
+}
+
+CPageGraph2::~CPageGraph2()
+{
+}
+
+void CPageGraph2::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+}
+
+
+BEGIN_MESSAGE_MAP(CPageGraph2, CDialogEx)
+ ON_WM_CTLCOLOR()
+ ON_WM_DESTROY()
+ ON_WM_SIZE()
+ ON_WM_TIMER()
+END_MESSAGE_MAP()
+
+
+// CPageGraph2 娑堟伅澶勭悊绋嬪簭
+
+
+BOOL CPageGraph2::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+ SetTimer(1, 2000, nullptr);
+
+
+ // filter graph wnd
+ EqsGraphListener listener;
+ listener.onCheckConnectPin = [](PIN* pPin1, PIN* pPin2) -> bool {
+ ASSERT(pPin1);
+ ASSERT(pPin2);
+ ASSERT(pPin1->pData);
+ ASSERT(pPin2->pData);
+
+ //int nRet = ((IPin*)pPin1->pData)->checkConnectPin((IPin*)pPin2->pData);
+ //if (nRet >= 0) {
+ // return true;
+ //}
+
+ return false;
+ };
+ listener.onConnectPin = [](PIN* pPin1, PIN* pPin2) -> bool {
+ ASSERT(pPin1);
+ ASSERT(pPin2);
+ ASSERT(pPin1->pData);
+ ASSERT(pPin2->pData);
+
+ //int nRet = ((IPin*)pPin1->pData)->connectPin((IPin*)pPin2->pData);
+ //if (nRet >= 0) {
+ // return true;
+ //}
+
+ return false;
+ };
+ listener.onDisconnectPin = [](PIN* pPin) -> bool {
+ ASSERT(pPin);
+ ASSERT(pPin->pData);
+
+ //int nRet = ((IPin*)pPin->pData)->disconnect();
+ //if (nRet >= 0) {
+ // return true;
+ //}
+
+ return false;
+ };
+ listener.onDeleteEqItem = [&](EQITEM* pItem) -> bool {
+ ASSERT(pItem);
+ ASSERT(pItem->pData);
+ return true;
+ // return _filterManager.unload((CFilter*)pFilter->pData) >= 0;
+ };
+ listener.onEqItemPosChanged = [&](EQITEM* pItem, int x, int y) -> void {
+ ASSERT(pItem);
+ };
+ listener.onDblckEqItem = [&](EQITEM* pItem) -> bool {
+ ASSERT(pItem);
+ return true;
+ };
+ listener.onRclickEqItem = [&](EQITEM* pItem) -> bool {
+ ASSERT(pItem);
+
+ CMenu menu, menuCommand;
+ CMenu* pPopupMenu;
+ menu.LoadMenu(IDR_MENU_EQSGRAPH_ITEM);
+ pPopupMenu = menu.GetSubMenu(0);
+
+
+ // 鏄剧ず妯″紡
+ pPopupMenu->EnableMenuItem(ID_EQSGRAPHITEM_SMALL, MF_DISABLED | MF_GRAYED);
+ pPopupMenu->EnableMenuItem(ID_EQSGRAPHITEM_NORMAL, MF_DISABLED | MF_GRAYED);
+ pPopupMenu->EnableMenuItem(ID_EQSGRAPHITEM_LARGE, MF_DISABLED | MF_GRAYED);
+ if (pItem->nShowType == ITEM_SMALL) {
+ pPopupMenu->CheckMenuRadioItem(ID_EQSGRAPHITEM_SMALL, ID_EQSGRAPHITEM_LARGE, ID_EQSGRAPHITEM_SMALL, MF_CHECKED);
+ }
+ else if (pItem->nShowType == ITEM_LARGE) {
+ pPopupMenu->CheckMenuRadioItem(ID_EQSGRAPHITEM_SMALL, ID_EQSGRAPHITEM_LARGE, ID_EQSGRAPHITEM_LARGE, MF_CHECKED);
+ }
+ else {
+ pPopupMenu->CheckMenuRadioItem(ID_EQSGRAPHITEM_SMALL, ID_EQSGRAPHITEM_LARGE, ID_EQSGRAPHITEM_NORMAL, MF_CHECKED);
+ }
+
+
+
+ POINT pt;
+ GetCursorPos(&pt);
+ int nCmd = pPopupMenu->TrackPopupMenu(TPM_RETURNCMD | TPM_LEFTALIGN | TPM_TOPALIGN, pt.x, pt.y, this, NULL);
+ if (nCmd == ID_EQSGRAPHITEM_SMALL) {
+ m_pEqsGraphWnd->SetItemType(pItem, ITEM_SMALL);
+ }
+ else if (nCmd == ID_EQSGRAPHITEM_NORMAL) {
+ m_pEqsGraphWnd->SetItemType(pItem, ITEM_NORMAL);
+ }
+ else if (nCmd == ID_EQSGRAPHITEM_LARGE) {
+ m_pEqsGraphWnd->SetItemType(pItem, ITEM_LARGE);
+ }
+
+
+ // 娴嬭瘯
+ else if (nCmd == ID_EQSGRAPHITEM_TEST1) {
+ SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
+ pEquipment->outputGlass(0);
+ }
+ else if (nCmd == ID_EQSGRAPHITEM_TEST2) {
+ SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)pItem->pData;
+ pEquipment->outputGlass(1);
+ }
+
+
+ return true;
+ };
+
+ m_pEqsGraphWnd = CEqsGraphWnd::FromHandle(GetDlgItem(IDC_EQSGRAPHWND1)->m_hWnd);
+ m_pEqsGraphWnd->SetBkgndColor(m_crBkgnd);
+ m_pEqsGraphWnd->SetOnListener(listener);
+
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // 寮傚父: OCX 灞炴�ч〉搴旇繑鍥� FALSE
+}
+
+
+HBRUSH CPageGraph2::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
+{
+ HBRUSH hbr = CDialogEx::OnCtlColor(pDC, pWnd, nCtlColor);
+
+ if (nCtlColor == CTLCOLOR_STATIC) {
+ pDC->SetBkColor(m_crBkgnd);
+ pDC->SetTextColor(RGB(0, 0, 0));
+ }
+
+ if (m_hbrBkgnd == nullptr) {
+ m_hbrBkgnd = CreateSolidBrush(m_crBkgnd);
+ }
+
+ return m_hbrBkgnd;
+}
+
+
+void CPageGraph2::OnDestroy()
+{
+ CDialogEx::OnDestroy();
+ SaveEqsGraphData();
+
+ if (m_hbrBkgnd != nullptr) {
+ ::DeleteObject(m_hbrBkgnd);
+ }
+}
+
+
+void CPageGraph2::OnSize(UINT nType, int cx, int cy)
+{
+ CDialogEx::OnSize(nType, cx, cy);
+ if (GetDlgItem(IDC_EQSGRAPHWND1) == nullptr) return;
+
+ CRect rcClient;
+ GetClientRect(&rcClient);
+ GetDlgItem(IDC_EQSGRAPHWND1)->MoveWindow(0, 0, rcClient.Width(), rcClient.Height());
+}
+
+#define INPIN 1
+#define OUTPIN 2
+void CPageGraph2::AddEqToGraphWnd(SERVO::CEquipment* pEquipment)
+{
+ int x, y;
+ GetItemDataFormIni(pEquipment->getName().c_str(), x, y);
+
+ EQITEM* pItem = m_pEqsGraphWnd->AddItem(0, pEquipment->getName().c_str(), (DWORD_PTR)pEquipment);
+ m_pEqsGraphWnd->SetItemType(pItem, ITEM_SMALL);
+ if (x > 0 && y > 0) {
+ m_pEqsGraphWnd->SetItemPos(pItem, x, y);
+ }
+
+ std::vector<SERVO::CPin*>& inPins = pEquipment->getInputPins();
+ for (auto inPin : inPins) {
+ m_pEqsGraphWnd->AddPin(pItem, INPIN, inPin->getName().c_str(), (DWORD_PTR)inPin);
+ }
+
+ std::vector<SERVO::CPin*>& outPins = pEquipment->getOutputPins();
+ for (auto outPin : outPins) {
+ m_pEqsGraphWnd->AddPin(pItem, OUTPIN, outPin->getName().c_str(), (DWORD_PTR)outPin);
+ }
+}
+
+void CPageGraph2::OnTimer(UINT_PTR nIDEvent)
+{
+ if (1 == nIDEvent) {
+ KillTimer(1);
+ std::list<SERVO::CEquipment*>& eqs = theApp.m_model.m_master.getEquipmentList();
+ for (auto eq : eqs) {
+ AddEqToGraphWnd(eq);
+ }
+
+ for (auto eq : eqs) {
+ auto& pins = eq->getOutputPins();
+ for (auto pin : pins) {
+ SERVO::CPin* pPin2 = pin->getConnectedPin();
+ if (pPin2 != nullptr) {
+ m_pEqsGraphWnd->ConnectPin((DWORD_PTR)eq, (DWORD_PTR)pin, (DWORD_PTR)pPin2->getEquipment(), (DWORD_PTR)pPin2);
+ }
+ }
+ }
+ }
+
+ CDialogEx::OnTimer(nIDEvent);
+}
+
+void CPageGraph2::SaveEqsGraphData()
+{
+ char szFilepath[MAX_PATH];
+ CString strValue;
+ sprintf_s(szFilepath, MAX_PATH, "%s\\EqsGraph.ini", (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+ std::list<SERVO::CEquipment*>& eqs = theApp.m_model.m_master.getEquipmentList();
+ for (auto item : eqs) {
+ EQITEM* pEqItem = m_pEqsGraphWnd->GetItem((DWORD_PTR)item);
+
+ strValue.Format(_T("%d"), pEqItem->rect.left);
+ WritePrivateProfileString(item->getName().c_str(), _T("Left"),
+ (LPTSTR)(LPCTSTR)strValue, szFilepath);
+ strValue.Format(_T("%d"), pEqItem->rect.top);
+ WritePrivateProfileString(item->getName().c_str(), _T("Top"),
+ (LPTSTR)(LPCTSTR)strValue, szFilepath);
+ }
+}
+
+void CPageGraph2::GetItemDataFormIni(const char* pszItemName, int& left, int& top)
+{
+ char szFilepath[MAX_PATH];
+ CString strValue;
+ sprintf_s(szFilepath, MAX_PATH, "%s\\EqsGraph.ini", (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
+ left = GetPrivateProfileInt(pszItemName, _T("Left"), 0, szFilepath);
+ top = GetPrivateProfileInt(pszItemName, _T("Top"), 0, szFilepath);
+}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/CPageGraph2.h b/SourceCode/Bond/Servo/CPageGraph2.h
new file mode 100644
index 0000000..a90ca36
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPageGraph2.h
@@ -0,0 +1,42 @@
+锘�#pragma once
+#include "EqsGraphWnd.h"
+
+
+// CPageGraph2 瀵硅瘽妗�
+
+class CPageGraph2 : public CDialogEx
+{
+ DECLARE_DYNAMIC(CPageGraph2)
+
+public:
+ CPageGraph2(CWnd* pParent = nullptr); // 鏍囧噯鏋勯�犲嚱鏁�
+ virtual ~CPageGraph2();
+
+
+private:
+ void AddEqToGraphWnd(SERVO::CEquipment* pEquipment);
+ void SaveEqsGraphData();
+ void GetItemDataFormIni(const char* pszItemName, int& left, int& top);
+
+private:
+ CEqsGraphWnd* m_pEqsGraphWnd;
+ COLORREF m_crBkgnd;
+ HBRUSH m_hbrBkgnd;
+
+
+// 瀵硅瘽妗嗘暟鎹�
+#ifdef AFX_DESIGN_TIME
+ enum { IDD = IDD_PAGE_GRAPH2 };
+#endif
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 鏀寔
+
+ DECLARE_MESSAGE_MAP()
+public:
+ virtual BOOL OnInitDialog();
+ afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
+ afx_msg void OnDestroy();
+ afx_msg void OnSize(UINT nType, int cx, int cy);
+ afx_msg void OnTimer(UINT_PTR nIDEvent);
+};
diff --git a/SourceCode/Bond/Servo/CPanel.cpp b/SourceCode/Bond/Servo/CPanel.cpp
new file mode 100644
index 0000000..00b3b46
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPanel.cpp
@@ -0,0 +1,41 @@
+#include "stdafx.h"
+#include "CPanel.h"
+
+
+namespace SERVO {
+ CPanel::CPanel()
+ {
+
+ }
+
+ CPanel::~CPanel()
+ {
+
+ }
+
+ std::string& CPanel::getClassName()
+ {
+ static std::string strName = "CPanel";
+ return strName;
+ }
+
+ std::string CPanel::toString()
+ {
+ std::string strText;
+ strText += "CPanel[";
+ strText += ("ID:" + m_strID + ";");
+ strText += "]";
+
+ return strText;
+ }
+
+ void CPanel::setID(const char* pszID)
+ {
+ m_strID = pszID;
+ }
+
+ std::string& CPanel::getID()
+ {
+ return m_strID;
+ }
+}
diff --git a/SourceCode/Bond/Servo/CPanel.h b/SourceCode/Bond/Servo/CPanel.h
new file mode 100644
index 0000000..bc9c51a
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPanel.h
@@ -0,0 +1,23 @@
+#pragma once
+#include "Context.h"
+#include <string>
+
+
+namespace SERVO {
+ class CPanel : public CContext
+ {
+ public:
+ CPanel();
+ virtual ~CPanel();
+
+ public:
+ virtual std::string& getClassName();
+ virtual std::string toString();
+ void setID(const char* pszID);
+ std::string& getID();
+
+ private:
+ std::string m_strID;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CPanelAttributes.cpp b/SourceCode/Bond/Servo/CPanelAttributes.cpp
index 1c33774..f278435 100644
--- a/SourceCode/Bond/Servo/CPanelAttributes.cpp
+++ b/SourceCode/Bond/Servo/CPanelAttributes.cpp
@@ -161,7 +161,7 @@
y += 8;
- GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 13, rcClient.Height() - 3 - y);
+ GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 8, rcClient.Height() - 3 - y);
}
#define ATTRIBUTES_PANEL_MIN_WIDTH 88
diff --git a/SourceCode/Bond/Servo/CPanelEquipment.cpp b/SourceCode/Bond/Servo/CPanelEquipment.cpp
index 533e77f..dcab95c 100644
--- a/SourceCode/Bond/Servo/CPanelEquipment.cpp
+++ b/SourceCode/Bond/Servo/CPanelEquipment.cpp
@@ -29,6 +29,7 @@
void CPanelEquipment::DoDataExchange(CDataExchange* pDX)
{
CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_MFCPROPERTYGRID1, m_gridCtrl);
}
@@ -56,6 +57,32 @@
if (::IsWindow(m_hWnd)) {
SetDlgItemText(IDC_LABEL_TITLE, m_pEquipment->getName().c_str());
+ }
+}
+
+void CPanelEquipment::loadDataFromEquipment(SERVO::CEquipment* pEquipment)
+{
+ m_pEquipment = pEquipment;
+ ASSERT(m_pEquipment);
+
+
+ // 鍏堟竻绌烘墍鏈�
+ m_gridCtrl.RemoveAll();
+
+
+ // 鍔犺浇鏁版嵁
+ SetDlgItemText(IDC_LABEL_TITLE, pEquipment->getName().c_str());
+ SERVO::CAttributeVector attrubutes;
+ pEquipment->getAttributeVector(attrubutes);
+ unsigned int nSize = attrubutes.size();
+ for (unsigned int i = 0; i < nSize; i++) {
+ SERVO::CAttribute* pAttribute = attrubutes.getAttribute(i);
+ CMFCPropertyGridProperty* pProperty = new CMFCPropertyGridProperty(
+ pAttribute->getName().c_str(),
+ pAttribute->getValue().c_str(),
+ pAttribute->getDescription().c_str());
+ pProperty->AllowEdit(FALSE);
+ m_gridCtrl.AddProperty(pProperty);
}
}
@@ -145,6 +172,8 @@
pItem->MoveWindow(5, y, x2 - 5, rcItem.Height());
y += rcItem.Height();
y += 8;
+
+ GetDlgItem(IDC_MFCPROPERTYGRID1)->MoveWindow(5, y, rcClient.Width() - 8, rcClient.Height() - 3 - y);
}
#define EQUIPMENT_PANEL_MIN_WIDTH 88
diff --git a/SourceCode/Bond/Servo/CPanelEquipment.h b/SourceCode/Bond/Servo/CPanelEquipment.h
index 460e858..9aa3580 100644
--- a/SourceCode/Bond/Servo/CPanelEquipment.h
+++ b/SourceCode/Bond/Servo/CPanelEquipment.h
@@ -14,11 +14,13 @@
virtual ~CPanelEquipment();
int getPanelWidth();
void SetEquipment(SERVO::CEquipment* pEquipment);
+ void loadDataFromEquipment(SERVO::CEquipment* pEquipment);
private:
COLORREF m_crBkgnd;
HBRUSH m_hbrBkgnd;
int m_nPanelWidth;
+ CMFCPropertyGridCtrl m_gridCtrl;
CBlButton m_btnClose;
SERVO::CEquipment* m_pEquipment;
diff --git a/SourceCode/Bond/Servo/CPanelMaster.cpp b/SourceCode/Bond/Servo/CPanelMaster.cpp
index d30a62a..82c5361 100644
--- a/SourceCode/Bond/Servo/CPanelMaster.cpp
+++ b/SourceCode/Bond/Servo/CPanelMaster.cpp
@@ -118,7 +118,7 @@
pItem->GetWindowRect(&rcItem);
pItem->MoveWindow(12, (rcClient.Height() - rcItem.Height()) / 2, rcClient.Width() - 24, rcItem.Height());
- m_treeCtrl.MoveWindow(5, 5, rcClient.Width() - 13, rcClient.Height() - 10);
+ m_treeCtrl.MoveWindow(5, 5, rcClient.Width() - 8, rcClient.Height() - 10);
}
@@ -211,3 +211,22 @@
return nLevel;
}
+
+SERVO::CEquipment* CPanelMaster::GetActiveEquipment()
+{
+ HTREEITEM hItem = m_treeCtrl.GetSelectedItem();
+ if (hItem == nullptr) return nullptr;
+
+ int nLevel = GetTreeItemLevel(hItem);
+ if (nLevel == 2) {
+ return (SERVO::CEquipment*)m_treeCtrl.GetItemData(hItem);
+ }
+ else if (nLevel == 3) {
+ SERVO::CStep* pStep = (SERVO::CStep*)m_treeCtrl.GetItemData(hItem);
+ if (pStep != nullptr) {
+ return pStep->getEquipment();
+ }
+ }
+
+ return nullptr;
+}
diff --git a/SourceCode/Bond/Servo/CPanelMaster.h b/SourceCode/Bond/Servo/CPanelMaster.h
index bea8068..15bd2db 100644
--- a/SourceCode/Bond/Servo/CPanelMaster.h
+++ b/SourceCode/Bond/Servo/CPanelMaster.h
@@ -14,7 +14,7 @@
int getPanelWidth();
void loadEquipmentList();
void loadSteps(SERVO::CEquipment* pEquipment, HTREEITEM hItemEq);
-
+ SERVO::CEquipment* GetActiveEquipment();
private:
int GetTreeItemLevel(HTREEITEM hItem);
diff --git a/SourceCode/Bond/Servo/CPin.cpp b/SourceCode/Bond/Servo/CPin.cpp
new file mode 100644
index 0000000..4a57efb
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPin.cpp
@@ -0,0 +1,129 @@
+#include "stdafx.h"
+#include "CPin.h"
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ CPin::CPin()
+ {
+ m_pEquipment = nullptr;
+ m_pConnectedPin = nullptr;
+ }
+
+ CPin::CPin(CEquipment* pEquipment, PinType type, char* pszName)
+ {
+ m_type = type;
+ m_strName = pszName;
+ m_pEquipment = pEquipment;
+ m_pConnectedPin = nullptr;
+ }
+
+ CPin::~CPin()
+ {
+
+ }
+
+ std::string& CPin::getName()
+ {
+ return m_strName;
+ }
+
+ int CPin::getType()
+ {
+ return m_type;
+ }
+
+ BOOL CPin::isConnected()
+ {
+ return m_pConnectedPin != NULL;
+ }
+
+ CPin* CPin::getConnectedPin()
+ {
+ return m_pConnectedPin;
+ }
+
+ CEquipment* CPin::getEquipment()
+ {
+ return m_pEquipment;
+ }
+
+ // 接受连接
+ // pPin -- 指定要连接的pin
+ // 返回 >= 0连接成功
+ int CPin::accpetConnect(CPin* pPin)
+ {
+ assert(pPin);
+
+
+ // 是否已经连接
+ if (m_pConnectedPin != NULL) {
+ return -1;
+ }
+
+ // 必须是一个输入一个输出(一个公一个母)
+ if (m_type == pPin->getType()) {
+ return -2;
+ }
+ m_pConnectedPin = pPin;
+
+
+ return 0;
+ }
+
+ int CPin::connectPin(CPin* pPin)
+ {
+ assert(pPin);
+
+
+ // 是否已经连接
+ if (m_pConnectedPin != NULL) {
+ return -1;
+ }
+
+
+ // 必须是一个输入一个输出(一个公一个母)
+ if (m_type == pPin->getType()) {
+ return -2;
+ }
+
+
+ // 对方接受连接?
+ int nRet = pPin->accpetConnect(this);
+ if (nRet < 0) {
+ return nRet;
+ }
+ m_pConnectedPin = pPin;
+
+
+ return 0;
+ }
+
+ int CPin::disconnect()
+ {
+ if (m_pConnectedPin == NULL) {
+ return -1;
+ }
+
+ assert(m_pConnectedPin->m_pConnectedPin == this);
+ m_pConnectedPin->m_pConnectedPin = NULL;
+ m_pConnectedPin = NULL;
+
+ return 0;
+ }
+
+ int CPin::sendIntent(CIntent* pIntent)
+ {
+ if (m_pConnectedPin != NULL) {
+ return m_pConnectedPin->recvIntent(pIntent);
+ }
+
+ return FLOW_REJECT;
+ }
+
+ int CPin::recvIntent(CIntent* pIntent)
+ {
+ assert(m_pEquipment);
+ return m_pEquipment->recvIntent(this, pIntent);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CPin.h b/SourceCode/Bond/Servo/CPin.h
new file mode 100644
index 0000000..788c2f9
--- /dev/null
+++ b/SourceCode/Bond/Servo/CPin.h
@@ -0,0 +1,42 @@
+#pragma once
+#include "CSample.h"
+#include "Intent.h"
+
+
+namespace SERVO {
+ // PIN类型
+ enum PinType {
+ OUTPUT = 0,
+ INPUT = 1,
+ };
+
+ class CEquipment;
+ class CPin
+ {
+ public:
+ CPin();
+ CPin(CEquipment* pEquipment, PinType type, char* pszName);
+ virtual ~CPin();
+
+ public:
+ virtual std::string& getName();
+ int getType();
+ virtual int disconnect();
+ virtual int accpetConnect(CPin* pPin);
+ virtual int connectPin(CPin* pPin);
+ virtual BOOL isConnected();
+ virtual CPin* getConnectedPin();
+ virtual CEquipment* getEquipment();
+
+ public:
+ int recvIntent(CIntent* pIntent);
+ int sendIntent(CIntent* pIntent);
+
+ private:
+ std::string m_strName;
+ PinType m_type;
+ CEquipment* m_pEquipment;
+ CPin* m_pConnectedPin;
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CReadStep.cpp b/SourceCode/Bond/Servo/CReadStep.cpp
index 0a2474f..6c948de 100644
--- a/SourceCode/Bond/Servo/CReadStep.cpp
+++ b/SourceCode/Bond/Servo/CReadStep.cpp
@@ -129,10 +129,12 @@
void CReadStep::getAttributeVector(CAttributeVector& attrubutes)
{
CStep::getAttributeVector(attrubutes);
+ std::string strTemp;
+
attrubutes.addAttribute(new CAttribute("Current Step",
std::to_string(m_nCurStep).c_str(), ""));
attrubutes.addAttribute(new CAttribute("Signal Dev",
- std::to_string(m_nWriteSignalDev).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nWriteSignalDev, strTemp)).c_str(), ""));
}
void CReadStep::init()
diff --git a/SourceCode/Bond/Servo/CSample.cpp b/SourceCode/Bond/Servo/CSample.cpp
new file mode 100644
index 0000000..7f83c48
--- /dev/null
+++ b/SourceCode/Bond/Servo/CSample.cpp
@@ -0,0 +1,15 @@
+#include "stdafx.h"
+#include "CSample.h"
+
+
+namespace SERVO {
+ CSample::CSample()
+ {
+
+ }
+
+ CSample::~CSample()
+ {
+
+ }
+}
diff --git a/SourceCode/Bond/Servo/CSample.h b/SourceCode/Bond/Servo/CSample.h
new file mode 100644
index 0000000..6981192
--- /dev/null
+++ b/SourceCode/Bond/Servo/CSample.h
@@ -0,0 +1,12 @@
+#pragma once
+
+
+namespace SERVO {
+ class CSample
+ {
+ public:
+ CSample();
+ virtual ~CSample();
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CStep.h b/SourceCode/Bond/Servo/CStep.h
index 04aa2c1..95ce06b 100644
--- a/SourceCode/Bond/Servo/CStep.h
+++ b/SourceCode/Bond/Servo/CStep.h
@@ -1,6 +1,7 @@
#pragma once
#include "CCLinkIEControl.h"
#include "CAttributeVector.h"
+#include "ToolUnits.h"
namespace SERVO {
diff --git a/SourceCode/Bond/Servo/CVacuumBake.cpp b/SourceCode/Bond/Servo/CVacuumBake.cpp
new file mode 100644
index 0000000..3a8a984
--- /dev/null
+++ b/SourceCode/Bond/Servo/CVacuumBake.cpp
@@ -0,0 +1,60 @@
+#include "stdafx.h"
+#include "CVacuumBake.h"
+
+namespace SERVO {
+ CVacuumBake::CVacuumBake() : CEquipment()
+ {
+
+ }
+
+ CVacuumBake::~CVacuumBake()
+ {
+
+ }
+
+ const char* CVacuumBake::getClassName()
+ {
+ static char* pszName = "CVacuumBake";
+ return pszName;
+ }
+
+ void CVacuumBake::init()
+ {
+ CEquipment::init();
+ }
+
+ void CVacuumBake::term()
+ {
+ CEquipment::term();
+ }
+
+ // 必须要实现的虚函数,在此初始化Pin列表
+ void CVacuumBake::initPins()
+ {
+ // 加入Pin初始化代码
+ LOGI("<CVacuumBake>initPins");
+ addPin(SERVO::PinType::INPUT, _T("In1"));
+ addPin(SERVO::PinType::INPUT, _T("In2"));
+ addPin(SERVO::PinType::OUTPUT, _T("Out"));
+ }
+
+ void CVacuumBake::onTimer(UINT nTimerid)
+ {
+ CEquipment::onTimer(nTimerid);
+ }
+
+ void CVacuumBake::serialize(CArchive& ar)
+ {
+ CEquipment::serialize(ar);
+ }
+
+ void CVacuumBake::getAttributeVector(CAttributeVector& attrubutes)
+ {
+ __super::getAttributeVector(attrubutes);
+ }
+
+ int CVacuumBake::recvIntent(CPin* pPin, CIntent* pIntent)
+ {
+ return __super::recvIntent(pPin, pIntent);
+ }
+}
diff --git a/SourceCode/Bond/Servo/CVacuumBake.h b/SourceCode/Bond/Servo/CVacuumBake.h
new file mode 100644
index 0000000..6bd084e
--- /dev/null
+++ b/SourceCode/Bond/Servo/CVacuumBake.h
@@ -0,0 +1,24 @@
+#pragma once
+#include "CEquipment.h"
+
+
+namespace SERVO {
+ class CVacuumBake :
+ public CEquipment
+ {
+ public:
+ CVacuumBake();
+ virtual ~CVacuumBake();
+
+ public:
+ virtual const char* getClassName();
+ virtual void init();
+ virtual void term();
+ virtual void initPins();
+ virtual void onTimer(UINT nTimerid);
+ virtual void serialize(CArchive& ar);
+ virtual void getAttributeVector(CAttributeVector& attrubutes);
+ virtual int recvIntent(CPin* pPin, CIntent* pIntent);
+ };
+}
+
diff --git a/SourceCode/Bond/Servo/CWriteStep.cpp b/SourceCode/Bond/Servo/CWriteStep.cpp
index 15f6a2a..34dc627 100644
--- a/SourceCode/Bond/Servo/CWriteStep.cpp
+++ b/SourceCode/Bond/Servo/CWriteStep.cpp
@@ -139,11 +139,12 @@
void CWriteStep::getAttributeVector(CAttributeVector& attrubutes)
{
CStep::getAttributeVector(attrubutes);
+ std::string temp;
attrubutes.addAttribute(new CAttribute("Current Step",
std::to_string(m_nCurStep).c_str(), ""));
attrubutes.addAttribute(new CAttribute("Signal Dev",
- std::to_string(m_nWriteSignalDev).c_str(), ""));
+ ("W" + CToolUnits::toHexString(m_nWriteSignalDev, temp)).c_str(), ""));
}
void CWriteStep::init()
diff --git a/SourceCode/Bond/Servo/ColorTransfer.cpp b/SourceCode/Bond/Servo/ColorTransfer.cpp
new file mode 100644
index 0000000..161cc6d
--- /dev/null
+++ b/SourceCode/Bond/Servo/ColorTransfer.cpp
@@ -0,0 +1,123 @@
+#include "stdafx.h"
+#include "ColorTransfer.h"
+
+
+CColorTransfer::CColorTransfer()
+{
+}
+
+
+CColorTransfer::~CColorTransfer()
+{
+}
+
+COLORREF CColorTransfer::ApproximateColor(COLORREF crScr, double diff)
+{
+ double h, s, l;
+ RGB2HSL(crScr, h, s, l);
+ l -= diff;
+
+ return HSL2RGB(h, s, l);
+}
+
+void CColorTransfer::RGB2HSL(COLORREF color, double &H, double &S, double &L)
+{
+ double R, G, B, Max, Min, del_R, del_G, del_B, del_Max;
+ R = GetRValue(color) / 255.0; //Where RGB values = 0 ÷ 255
+ G = GetGValue(color) / 255.0;
+ B = GetBValue(color) / 255.0;
+
+ Min = min(R, min(G, B)); //Min. value of RGB
+ Max = max(R, max(G, B)); //Max. value of RGB
+ del_Max = Max - Min; //Delta RGB value
+
+ L = (Max + Min) / 2.0;
+
+ if (del_Max == 0) {
+ // This is a gray, no chroma...
+ // H = 2.0/3.0; //Windows下S值为0时,H值始终为160(2/3*240)
+ H = 0; //HSL results = 0 ÷ 1
+ S = 0;
+ }
+ else {
+ //Chromatic data...
+ if (L < 0.5) {
+ S = del_Max / (Max + Min);
+ }
+ else {
+ S = del_Max / (2 - Max - Min);
+ }
+
+ del_R = (((Max - R) / 6.0) + (del_Max / 2.0)) / del_Max;
+ del_G = (((Max - G) / 6.0) + (del_Max / 2.0)) / del_Max;
+ del_B = (((Max - B) / 6.0) + (del_Max / 2.0)) / del_Max;
+
+ if (R == Max) {
+ H = del_B - del_G;
+ }
+ else if (G == Max) {
+ H = (1.0 / 3.0) + del_R - del_B;
+ }
+ else if (B == Max) {
+ H = (2.0 / 3.0) + del_G - del_R;
+ }
+
+ if (H < 0) {
+ H += 1;
+ }
+ if (H > 1) {
+ H -= 1;
+ }
+ }
+}
+
+COLORREF CColorTransfer::HSL2RGB(double H, double S, double L)
+{
+ double R, G, B;
+ double var_1, var_2;
+ if (S == 0) {
+ // HSL values = 0 ÷ 1
+ R = L * 255.0; //RGB results = 0 ÷ 255
+ G = L * 255.0;
+ B = L * 255.0;
+ }
+ else {
+ if (L < 0.5) {
+ var_2 = L * (1 + S);
+ }
+ else {
+ var_2 = (L + S) - (S * L);
+ }
+ var_1 = 2.0 * L - var_2;
+
+ R = 255.0 * Hue2RGB(var_1, var_2, H + (1.0 / 3.0));
+ G = 255.0 * Hue2RGB(var_1, var_2, H);
+ B = 255.0 * Hue2RGB(var_1, var_2, H - (1.0 / 3.0));
+ }
+ return RGB(R, G, B);
+}
+
+double CColorTransfer::Hue2RGB(double v1, double v2, double vH)
+{
+ if (vH < 0) {
+ vH += 1;
+ }
+
+ if (vH > 1) {
+ vH -= 1;
+ }
+
+ if (6.0 * vH < 1) {
+ return v1 + (v2 - v1) * 6.0 * vH;
+ }
+
+ if (2.0 * vH < 1) {
+ return v2;
+ }
+
+ if (3.0 * vH < 2) {
+ return v1 + (v2 - v1) * ((2.0 / 3.0) - vH) * 6.0;
+ }
+
+ return (v1);
+}
diff --git a/SourceCode/Bond/Servo/ColorTransfer.h b/SourceCode/Bond/Servo/ColorTransfer.h
new file mode 100644
index 0000000..9525675
--- /dev/null
+++ b/SourceCode/Bond/Servo/ColorTransfer.h
@@ -0,0 +1,16 @@
+#pragma once
+class CColorTransfer
+{
+public:
+ CColorTransfer();
+ ~CColorTransfer();
+
+public:
+ static void RGB2HSL(COLORREF color, double &H, double &S, double &L);
+ static COLORREF HSL2RGB(double H, double S, double L);
+ static COLORREF ApproximateColor(COLORREF crScr, double diff);
+
+private:
+ static double Hue2RGB(double v1, double v2, double vH);
+};
+
diff --git a/SourceCode/Bond/Servo/Common.h b/SourceCode/Bond/Servo/Common.h
index 99f56e0..3860990 100644
--- a/SourceCode/Bond/Servo/Common.h
+++ b/SourceCode/Bond/Servo/Common.h
@@ -25,6 +25,12 @@
#define PANEL_MASTER_BACKGROUND_COLOR RGB(255, 255, 255)
#define PANEL_ATTRIBUTES_BACKGROUND_COLOR RGB(255, 255, 255)
#define PANEL_EQUIPMENT_BACKGROUND_COLOR RGB(255, 255, 255)
+#define PAGE_GRPAH1_BACKGROUND_COLOR RGB(255, 255, 255)
+#define PAGE_GRPAH2_BACKGROUND_COLOR RGB(255, 255, 255)
+#define EQ_BOX_OFFLINE RGB(222, 222, 222)
+#define EQ_BOX_ONLINE RGB(0, 176, 80)
+#define EQ_BOX_FRAME1 RGB(22, 22, 22)
+#define EQ_BOX_FRAME2 RGB(255, 127, 39)
/* LOG BTN */
@@ -47,6 +53,14 @@
#define EQ_ID_EFEM 1
#define EQ_ID_Bonder1 2
#define EQ_ID_Bonder2 3
+#define EQ_ID_LOADPORT1 4
+#define EQ_ID_LOADPORT2 5
+#define EQ_ID_LOADPORT3 6
+#define EQ_ID_LOADPORT4 7
+#define EQ_ID_FLIPER 8
+#define EQ_ID_VACUUMBAKE 9
+#define EQ_ID_ALIGNER 10
+#define EQ_ID_BAKE_COOLING 11
/* step name */
@@ -60,8 +74,14 @@
#define STEP_ALARM_BLOCK5 _T("EQAlarm5")
#define STEP_PROCESS _T("EQProcess")
#define STEP_CIM_MODE_CHANGE _T("EQCimModeChange")
+#define STEP_EQ_MODE_CHANGE _T("EQModeChange")
+#define STEP_CIM_MESSAGE_CMD _T("EQCimMessageCmd")
+#define STEP_CIM_MESSAGE_CLEAR _T("EQCimMessageClear")
+#define STEP_DATETIME_SET_CMD _T("EQDateTimeSetCmd")
+#define STEP_EQ_VCR_ENABLE _T("EQVCREnable")
+/* base alarm */
#define BASE_ALARM_EFEM 10000
#define BASE_ALARM_BONDER1 20000
#define BASE_ALARM_BONDER2 30000
@@ -75,3 +95,12 @@
/* 自定义消息 */
#define ID_MSG_PANEL_RESIZE WM_USER + 1998
+
+
+/* 流程控制相关代码 */
+#define FLOW_REJECT 0x0
+#define FLOW_ACCEPT 0x1
+#define FLOW_TEST 0x1000
+#define FLOW_SIGNAL 0x1001
+#define FLOW_DATA 0x1002
+#define FLOW_MOVE_MATERIAL 0x1003
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/Context.cpp b/SourceCode/Bond/Servo/Context.cpp
index 7fb9d06..96aa4b1 100644
--- a/SourceCode/Bond/Servo/Context.cpp
+++ b/SourceCode/Bond/Servo/Context.cpp
@@ -4,9 +4,141 @@
CContext::CContext()
{
+ m_nRef = 0;
+ m_nRetCode = 0;
+ m_hEvent = ::CreateEvent(NULL, TRUE, FALSE, NULL);
+ InitializeCriticalSection(&m_criticalSection);
}
CContext::~CContext()
{
+ if (m_hEvent != NULL) {
+ CloseHandle(m_hEvent);
+ m_hEvent = NULL;
+ }
+ DeleteCriticalSection(&m_criticalSection);
}
+
+int CContext::addRef()
+{
+ Lock();
+ m_nRef++;
+ Unlock();
+
+ return m_nRef;
+}
+
+int CContext::release()
+{
+ Lock();
+ m_nRef--;
+ BOOL bDelete = m_nRef == 0;
+ Unlock();
+
+ int nRef = m_nRef;;
+ if (bDelete) delete this;
+ return nRef;
+}
+
+void CContext::setRetCode(int code)
+{
+ m_nRetCode = code;
+}
+
+int CContext::getRetCode()
+{
+ return m_nRetCode;
+}
+
+void CContext::setRetMsg(const char* pszMsg)
+{
+ m_strRetMsg = pszMsg;
+}
+
+std::string& CContext::getRetMsg()
+{
+ return m_strRetMsg;
+}
+
+HANDLE CContext::getEventHandle()
+{
+ return m_hEvent;
+}
+
+void CContext::setEvent()
+{
+ if (m_hEvent != NULL) {
+ SetEvent(m_hEvent);
+ }
+}
+
+void CContext::resetEvent()
+{
+ if (m_hEvent != NULL) {
+ ResetEvent(m_hEvent);
+ }
+}
+
+void CContext::ReadString(CArchive& ar, std::string& string)
+{
+ CString strTemp;
+ ar >> strTemp;
+ string = (LPTSTR)(LPCTSTR)strTemp;
+}
+
+void CContext::WriteString(CArchive& ar, std::string& string)
+{
+ CString strTemp = string.c_str();
+ ar << strTemp;
+}
+
+void CContext::createDir(CString strDir)
+{
+ int lastIndex = 0;
+ int index = strDir.Find(_T("\\"), lastIndex);
+ while (index > 0) {
+ CString strTempDir = strDir.Left(index);
+ CreateDirectory(strTempDir, NULL);
+
+ lastIndex = index + 1;
+ index = strDir.Find(_T("\\"), lastIndex);
+ }
+ CreateDirectory(strDir, NULL);
+}
+
+BOOL CContext::IsBoxId(CString& strId)
+{
+ //'W20'开头,倒数第五位为'Z'的字符串
+ if (strId.GetLength() < 8) {
+ return FALSE;
+ }
+
+ if (strId.Left(3).Compare(_T("W20")) != 0) {
+ return FALSE;
+ }
+
+ if (strId.Right(5).GetAt(0) != (char)'Z') {
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+BOOL CContext::IsLotId(CString& strId)
+{
+ //'N20'开头,倒数第五位为'Z'的字符串
+ if (strId.GetLength() < 8) {
+ return FALSE;
+ }
+
+ if (strId.Left(3).Compare(_T("N20")) != 0) {
+ return FALSE;
+ }
+
+ if (strId.Right(5).GetAt(0) != (char)'Z') {
+ return FALSE;
+ }
+
+ return TRUE;
+}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/Context.h b/SourceCode/Bond/Servo/Context.h
index c23adcb..b4e38cc 100644
--- a/SourceCode/Bond/Servo/Context.h
+++ b/SourceCode/Bond/Servo/Context.h
@@ -1,8 +1,43 @@
#pragma once
-class CContext
+#include "Common.h"
+
+class CContext : public IRxObject
{
public:
CContext();
- ~CContext();
+ virtual ~CContext();
+
+public:
+ int addRef();
+ int release();
+
+public:
+ virtual std::string& getClassName() = 0;
+ virtual std::string toString() = 0;
+ void setRetCode(int code);
+ int getRetCode();
+ void setRetMsg(const char* pszMsg);
+ std::string& getRetMsg();
+ HANDLE getEventHandle();
+ void setEvent();
+ void resetEvent();
+ static void createDir(CString strDir);
+
+protected:
+ inline void Lock() { EnterCriticalSection(&m_criticalSection); }
+ inline void Unlock() { LeaveCriticalSection(&m_criticalSection); }
+ void ReadString(CArchive& ar, std::string& string);
+ void WriteString(CArchive& ar, std::string& string);
+ static BOOL IsBoxId(CString& strId);
+ static BOOL IsLotId(CString& strId);
+
+private:
+ int m_nRef;
+ CRITICAL_SECTION m_criticalSection;
+
+protected:
+ int m_nRetCode;
+ std::string m_strRetMsg;
+ HANDLE m_hEvent;
};
diff --git a/SourceCode/Bond/Servo/EqsGraphWnd.cpp b/SourceCode/Bond/Servo/EqsGraphWnd.cpp
new file mode 100644
index 0000000..8b8d441
--- /dev/null
+++ b/SourceCode/Bond/Servo/EqsGraphWnd.cpp
@@ -0,0 +1,2400 @@
+#include "stdafx.h"
+#include "EqsGraphWnd.h"
+#include "ColorTransfer.h"
+#include "MapPosWnd.h"
+
+
+#define INPIN 1
+#define OUTPIN 2
+
+#define ITEM_CX_SMALL 150
+#define ITEM_CY_SMALL 90
+#define ITEM_CX_NORMAL 250
+#define ITEM_CY_NORMAL 150
+#define ITEM_CX_LARGE 400
+#define ITEM_CY_LARGE 240
+
+#define HT_NOWHERE 0x1
+#define HT_ITEM 0x2
+#define HT_PIN 0x4
+#define HT_LINE 0x8
+
+#define PINWIDTH 8
+#define PINHEIGHT 12
+
+#define TIMER_FLASH 1
+#define TIMER_ANIMATION_RECT 2
+
+#define MAPPOSSIZE 150
+#define MAPPOSWND_PADDING_RIGHT 12
+#define MAPPOSWND_ID 1001
+
+CEqsGraphWnd::CEqsGraphWnd()
+{
+ m_bUseGdiPlus = TRUE;
+ m_hWnd = NULL;
+ m_crFrame = GetSysColor(COLOR_WINDOWFRAME);
+ m_crBkgnd = RGB(255, 255, 255);
+ m_listener.onConnectPin = nullptr;
+ m_listener.onCheckConnectPin = nullptr;
+ m_listener.onDisconnectPin = nullptr;
+ m_listener.onDeleteEqItem = nullptr;
+ m_listener.onEqItemPosChanged = nullptr;
+ m_listener.onDblckEqItem = nullptr;
+ m_listener.onRclickEqItem = nullptr;
+ m_crItemBackground[0] = RGB(218, 218, 218);
+ m_crItemBackground[1] = RGB(193, 208, 227);
+ m_crItemFrame[0] = RGB(128, 128, 128);
+ m_crItemFrame[1] = RGB(147, 172, 206);
+ m_crItemNameText[0] = RGB(0, 0, 0);
+ m_crItemNameText[1] = RGB(0, 0, 0);
+ m_crItemIdText[0] = CColorTransfer::ApproximateColor(m_crItemNameText[0], -0.3f);
+ m_crItemIdText[1] = m_crItemIdText[0];
+ m_nCurSel = -1;
+ m_bMultiSelect = FALSE;
+ m_nItemRound = 0;
+ m_pCurItem = NULL;
+ m_pCurPin = NULL;
+ m_pSelLineOutPin = NULL;
+ m_crPinBkgnd[0] = RGB(218, 218, 218);
+ m_crPinBkgnd[1] = RGB(193, 0, 0);
+ m_crPinBkgnd[2] = RGB(193, 0, 0);
+ m_nStageCx = 4000;
+ m_nStageCy = 3000;
+ m_nOffsetX = 0;
+ m_nOffsetY = 0;
+ m_pFlashItem = NULL;
+ m_nFlashCount = 0;
+ m_hWndMapPos = NULL;
+ m_bEnableScroll = FALSE;
+ m_nMagneticLinHoz = 0;
+ m_nMagneticLinVer = 0;
+ m_hFontTitle = nullptr;
+
+}
+
+CEqsGraphWnd::~CEqsGraphWnd()
+{
+ ReleaseAllItems();
+}
+
+BOOL CEqsGraphWnd::RegisterWndClass()
+{
+ WNDCLASS wc;
+ wc.lpszClassName = EQSGRAPHWND_CLASS;
+ wc.hInstance = AfxGetInstanceHandle();
+ wc.lpfnWndProc = WindowProc;
+ wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
+ wc.hIcon = 0;
+ wc.lpszMenuName = NULL;
+ wc.hbrBackground = NULL;
+ wc.style = CS_GLOBALCLASS | CS_DBLCLKS;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+
+ // 注册窗口类
+ return (::RegisterClass(&wc) != 0);
+}
+
+CEqsGraphWnd* CEqsGraphWnd::FromHandle(HWND hWnd)
+{
+ CEqsGraphWnd* pEqsGraphWnd = (CEqsGraphWnd*)::GetProp(hWnd, EQSGRAPHWND_TAG);
+ return pEqsGraphWnd;
+}
+
+CEqsGraphWnd* CEqsGraphWnd::Hook(HWND hWnd)
+{
+ CEqsGraphWnd* pEqsGraphWnd = (CEqsGraphWnd*)GetProp(hWnd, EQSGRAPHWND_TAG);
+ if (pEqsGraphWnd == NULL) {
+ pEqsGraphWnd = new CEqsGraphWnd();
+ pEqsGraphWnd->m_hWnd = hWnd;
+
+ SetProp(hWnd, EQSGRAPHWND_TAG, (HANDLE)pEqsGraphWnd);
+ }
+
+
+ return pEqsGraphWnd;
+}
+
+void CEqsGraphWnd::InitFont()
+{
+ HDC hDC = GetDC(NULL);
+ HFONT hFont = (HFONT)::GetStockObject(DEFAULT_GUI_FONT);
+
+ {
+ LOGFONT lf = { 0 };
+ ::GetObject(hFont, sizeof(LOGFONT), &lf);
+ m_hFontName = CreateFontIndirect(&lf);
+ }
+
+ {
+ LOGFONT lf = { 0 };
+ ::GetObject(hFont, sizeof(LOGFONT), &lf);
+
+ int nSize = int(-lf.lfHeight * 72.0 / GetDeviceCaps(hDC, LOGPIXELSY) + 0.5);
+ lf.lfHeight = MulDiv(0 - (nSize - 2), GetDeviceCaps(hDC, LOGPIXELSX), 72);
+ m_hFontId = CreateFontIndirect(&lf);
+ }
+
+ ::ReleaseDC(NULL, hDC);
+}
+
+void CEqsGraphWnd::SetItemRound(int nRound)
+{
+ m_nItemRound = nRound;
+}
+
+void CEqsGraphWnd::SetDefaultItemBackgroundColor(COLORREF crNormal, COLORREF crSel)
+{
+ m_crItemBackground[0] = crNormal;
+ m_crItemBackground[1] = crSel;
+}
+
+void CEqsGraphWnd::SetDefaultItemFrameColor(COLORREF crNormal, COLORREF crSel)
+{
+ m_crItemFrame[0] = crNormal;
+ m_crItemFrame[1] = crSel;
+}
+
+void CEqsGraphWnd::SetDefaultItemTextColor(COLORREF crNormal, COLORREF crSel)
+{
+ m_crItemNameText[0] = crNormal;
+ m_crItemNameText[1] = crSel;
+
+ m_crItemIdText[0] = CColorTransfer::ApproximateColor(m_crItemNameText[0], -0.3f);
+ m_crItemIdText[1] = CColorTransfer::ApproximateColor(m_crItemNameText[1], -0.3f);
+}
+
+void CEqsGraphWnd::EnableScroll(BOOL bEnable)
+{
+ m_bEnableScroll = bEnable;
+}
+
+void CEqsGraphWnd::EnableMultiSelect()
+{
+ m_bMultiSelect = TRUE;
+}
+
+void CEqsGraphWnd::Init()
+{
+ InitFont();
+ CalculateScollbar();
+
+ long style = GetWindowLong(m_hWnd, GWL_STYLE);
+ SetWindowLong(m_hWnd, GWL_STYLE, style | WS_CLIPCHILDREN);
+
+ // MapPosWnd
+ if (m_hWndMapPos == NULL) {
+ m_hWndMapPos = CreateWindowEx(0, MAPPOSWND_CLASS,
+ NULL, WS_CHILD | WS_VISIBLE,
+ 0, 0, 400, 400,
+ m_hWnd, (HMENU)MAPPOSWND_ID, NULL, NULL);
+
+ long styleex = GetWindowLong(m_hWndMapPos, GWL_EXSTYLE);
+ SetWindowLong(m_hWndMapPos, GWL_EXSTYLE, styleex | WS_EX_CLIENTEDGE);
+
+ CMapPosWnd *pMapPosWnd = CMapPosWnd::FromHandle(m_hWndMapPos);
+ pMapPosWnd->SetWndMaxSize(MAPPOSSIZE);
+ pMapPosWnd->SetStageSize(m_nStageCx, m_nStageCy, TRUE);
+ }
+}
+
+void CEqsGraphWnd::CalculateMapPos()
+{
+ CRect rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::OffsetRect(&rcClient, m_nOffsetX, m_nOffsetY);
+ CMapPosWnd *pMapPosWnd = CMapPosWnd::FromHandle(m_hWndMapPos);
+ pMapPosWnd->SetViewPort(&rcClient, TRUE);
+}
+
+void CEqsGraphWnd::CalculateScollbar()
+{
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+
+ // vert scroll
+ if(m_bEnableScroll) {
+ SCROLLINFO scrinffo;
+ scrinffo.cbSize = sizeof(SCROLLINFO);
+ scrinffo.fMask = SIF_ALL;
+ scrinffo.nMax = m_nStageCy;
+ scrinffo.nMin = 0;
+ scrinffo.nPos = m_nOffsetY;
+ scrinffo.nTrackPos = 0;
+ scrinffo.nPage = rcClient.bottom - rcClient.top;
+ SetScrollInfo(m_hWnd, SB_VERT, &scrinffo, TRUE);
+ }
+
+ // horz scroll
+ if (m_bEnableScroll) {
+ SCROLLINFO scrinffo;
+ scrinffo.cbSize = sizeof(SCROLLINFO);
+ scrinffo.fMask = SIF_ALL;
+ scrinffo.nMax = m_nStageCx;
+ scrinffo.nMin = 0;
+ scrinffo.nPos = m_nOffsetX;
+ scrinffo.nTrackPos = 0;
+ scrinffo.nPage = rcClient.right - rcClient.left;
+ SetScrollInfo(m_hWnd, SB_HORZ, &scrinffo, TRUE);
+ }
+}
+
+/*
+ * 计算磁力线位置
+ */
+void CEqsGraphWnd::CalculateMagneticLine(EQITEM* pItem, LPRECT lprcItemRect, int &hoz, int &ver)
+{
+ hoz = 0;
+ ver = 0;
+#define MAGNETIC_DIS 10
+
+ // 检测是否接近或对齐
+ for (int i = 0; i < m_arItem.GetSize(); i++) {
+ EQITEM *pTemp = (EQITEM*)m_arItem.GetAt(i);
+ if (pTemp != pItem) {
+ if (abs(lprcItemRect->left - pTemp->rect.left) < MAGNETIC_DIS) {
+ ver = pTemp->rect.left;
+ break;
+ }
+ else if (abs(lprcItemRect->right - pTemp->rect.right) < MAGNETIC_DIS) {
+ ver = pTemp->rect.right - (lprcItemRect->right- lprcItemRect->left);
+ break;
+ }
+ }
+ }
+
+ for (int i = 0; i < m_arItem.GetSize(); i++) {
+ EQITEM* pTemp = (EQITEM*)m_arItem.GetAt(i);
+ if (pTemp != pItem) {
+ if (abs(lprcItemRect->top - pTemp->rect.top) < MAGNETIC_DIS) {
+ hoz = pTemp->rect.top;
+ break;
+ }
+ else if (abs(lprcItemRect->bottom - pTemp->rect.bottom) < MAGNETIC_DIS) {
+ hoz = pTemp->rect.bottom - (lprcItemRect->bottom - lprcItemRect->top);
+ break;
+ }
+ }
+ }
+}
+
+
+void CEqsGraphWnd::Release()
+{
+ ::DeleteObject(m_hFontName);
+ ::DeleteObject(m_hFontId);
+ if (m_hFontTitle != nullptr) {
+ ::DeleteObject(m_hFontTitle);
+ }
+
+ // delete
+ delete this;
+}
+
+/*
+ * 取得In Pin的区域
+ * pItem -- EQITEM
+ * lpRect -- 得到的Rect
+ * 返回是否成功
+ */
+BOOL CEqsGraphWnd::GetItemRect(EQITEM* pItem, LPRECT lpRect)
+{
+ ASSERT(pItem);
+ if (pItem == m_pAnimationItem) {
+ lpRect->left = (int)(m_rcAnimation.left - m_nOffsetX);
+ lpRect->top = (int)(m_rcAnimation.top - m_nOffsetY);
+ lpRect->right = (int)(m_rcAnimation.right - m_nOffsetX);
+ lpRect->bottom = (int)(m_rcAnimation.bottom - m_nOffsetY);
+ }
+ else {
+ lpRect->left = (int)(pItem->rect.left - m_nOffsetX);
+ lpRect->top = (int)(pItem->rect.top - m_nOffsetY);
+ lpRect->right = (int)(pItem->rect.right - m_nOffsetX);
+ lpRect->bottom = (int)(pItem->rect.bottom - m_nOffsetY);
+ }
+
+ return TRUE;
+}
+
+BOOL CEqsGraphWnd::GetItemWarperRect(EQITEM* pItem, LPRECT lpRect)
+{
+ CopyRect(lpRect, &pItem->rect);
+ lpRect->left -= PINWIDTH;
+ lpRect->right += PINWIDTH;
+
+ return TRUE;
+}
+
+/*
+ * 取得In Pin的区域
+ * pItem -- EQITEM
+ * nPinIndex -- in pin索引
+ * lpRect -- 得到的Rect
+ * 返回是否成功
+ */
+BOOL CEqsGraphWnd::GetInPinRect(EQITEM* pItem, int nPinIndex, LPRECT lpRect)
+{
+ CPtrArray * pPins = (CPtrArray *)pItem->pInPins;
+ if (nPinIndex >= pPins->GetSize()) {
+ return FALSE;
+ }
+
+ int nBottomMargin = pPins->GetCount() >= 4 ? 8 : 0;
+ int nSpace = ((pItem->rect.bottom - nBottomMargin - pItem->rect.top) - (int)pPins->GetSize() * PINHEIGHT) / (pPins->GetSize() + 1);
+ lpRect->right = pItem->rect.left+1 - m_nOffsetX;
+ lpRect->left = lpRect->right - PINWIDTH;
+ lpRect->bottom = pItem->rect.top + (nSpace + PINHEIGHT) * (nPinIndex+1) - m_nOffsetY;
+ lpRect->top = lpRect->bottom - PINHEIGHT;
+
+ return TRUE;
+}
+
+/*
+ * 取得Out Pin的区域
+ * pItem -- EQITEM
+ * nPinIndex -- in pin索引
+ * lpRect -- 得到的Rect
+ * 返回是否成功
+ */
+BOOL CEqsGraphWnd::GetOutPinRect(EQITEM* pItem, int nPinIndex, LPRECT lpRect)
+{
+ CPtrArray * pPins = (CPtrArray *)pItem->pOutPins;
+ if (nPinIndex >= pPins->GetSize()) {
+ return FALSE;
+ }
+
+ int nSpace = ((pItem->rect.bottom - pItem->rect.top) - (int)pPins->GetSize() * PINHEIGHT) / (pPins->GetSize() + 1);
+ lpRect->left = pItem->rect.right-1 - m_nOffsetX;
+ lpRect->right = lpRect->left + PINWIDTH;
+ lpRect->bottom = pItem->rect.top + (nSpace + PINHEIGHT) * (nPinIndex + 1) - m_nOffsetY;
+ lpRect->top = lpRect->bottom - PINHEIGHT;
+
+ return TRUE;
+}
+
+/*
+ * 取得Pin的Point
+ * pItem -- EQITEM
+ * nPinIndex -- in pin索引
+ * lpRect -- 得到的Rect
+ * 返回是否成功
+ */
+BOOL CEqsGraphWnd::GetPinPoint(PIN *pPin, LPPOINT lpPoint)
+{
+ ASSERT(pPin);
+ ASSERT(pPin->pItem);
+ CPtrArray * pPins;
+ RECT rcPin;
+
+ // in pin?
+ pPins = (CPtrArray *)pPin->pItem->pInPins;
+ for(int i=0; i<pPins->GetCount(); i++) {
+ if (pPins->GetAt(i) == pPin) {
+ if (GetInPinRect(pPin->pItem, i, &rcPin)) {
+ lpPoint->x = rcPin.left + (rcPin.right - rcPin.left) / 2;
+ lpPoint->y = rcPin.top + (rcPin.bottom - rcPin.top) / 2;
+ return TRUE;
+ }
+ }
+ }
+
+ // out pin?
+ pPins = (CPtrArray *)pPin->pItem->pOutPins;
+ for (int i = 0; i<pPins->GetCount(); i++) {
+ if (pPins->GetAt(i) == pPin) {
+ if (GetOutPinRect(pPin->pItem, i, &rcPin)) {
+ lpPoint->x = rcPin.left + (rcPin.right - rcPin.left) / 2;
+ lpPoint->y = rcPin.top + (rcPin.bottom - rcPin.top) / 2;
+ return TRUE;
+ }
+ }
+ }
+
+ return FALSE;
+}
+
+void CEqsGraphWnd::ReleaseItem(EQITEM* pItem)
+{
+ ASSERT(pItem);
+
+ CPtrArray *pArray = (CPtrArray *)pItem->pInPins;
+ for (int j = 0; j < pArray->GetSize(); j++) {
+ PIN *pPin = (PIN *)pArray->GetAt(j);
+ if (pPin->pConnectedPin != NULL) {
+ pPin->pConnectedPin->pConnectedPin = NULL;
+ }
+ delete pPin;
+ }
+ delete pArray;
+
+ pArray = (CPtrArray *)pItem->pOutPins;
+ for (int j = 0; j < pArray->GetSize(); j++) {
+ PIN *pPin = (PIN *)pArray->GetAt(j);
+ if (pPin->pConnectedPin != NULL) {
+ pPin->pConnectedPin->pConnectedPin = NULL;
+ }
+ delete pPin;
+ }
+ delete pArray;
+
+ delete pItem;
+}
+
+void CEqsGraphWnd::ReleaseAllItems()
+{
+ for (int i = 0; i < m_arItem.GetCount(); i++) {
+ ReleaseItem((EQITEM*)m_arItem.GetAt(i));
+ }
+ m_arItem.RemoveAll();
+}
+
+int CEqsGraphWnd::GetPinState(PIN *pPin)
+{
+ if (pPin == m_pCurPin) {
+ return 1;
+ }
+
+ return 0;
+}
+
+/*
+ * 清空PIN连接线缓存点,以便重新计算和绘制
+ */
+void CEqsGraphWnd::ClearConnectedLinePoint(EQITEM*& pItem)
+{
+ ASSERT(pItem);
+
+ CPtrArray *pPins;
+ PIN *pPin;
+
+ pPins = (CPtrArray *)pItem->pInPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ pPin = (PIN *)pPins->GetAt(j);
+ if (pPin->pConnectedPin != NULL) {
+ pPin->pConnectedPin->nLinePtCount = 0;
+ }
+ }
+
+ pPins = (CPtrArray *)pItem->pOutPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ pPin = (PIN *)pPins->GetAt(j);
+ pPin->nLinePtCount = 0;
+ }
+}
+
+void CEqsGraphWnd::SetOnListener(EqsGraphListener& listener)
+{
+ m_listener.onConnectPin = listener.onConnectPin;
+ m_listener.onCheckConnectPin = listener.onCheckConnectPin;
+ m_listener.onDisconnectPin = listener.onDisconnectPin;
+ m_listener.onDeleteEqItem = listener.onDeleteEqItem;
+ m_listener.onEqItemPosChanged = listener.onEqItemPosChanged;
+ m_listener.onDblckEqItem = listener.onDblckEqItem;
+ m_listener.onRclickEqItem = listener.onRclickEqItem;
+}
+
+BOOL CEqsGraphWnd::SetCurSel(int nSel)
+{
+ if (!(nSel == -1 || nSel < m_arItem.GetCount())) {
+ return FALSE;
+ }
+
+
+ m_nCurSel = nSel;
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+
+ return TRUE;
+}
+
+BOOL CEqsGraphWnd::SetCurSel(CString strItemName)
+{
+ int nIndex = -1;
+ for (int i = 0; i < m_arItem.GetCount(); i++) {
+ EQITEM* pItem = (EQITEM*)m_arItem.GetAt(i);
+ if (strItemName.Compare(pItem->text) == 0) {
+ nIndex = i;
+ break;
+ }
+ }
+
+ if (nIndex == -1) {
+ return FALSE;
+ }
+
+ m_nCurSel = nIndex;
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+
+ return TRUE;
+}
+
+BOOL CEqsGraphWnd::SetCurSel(DWORD_PTR pData)
+{
+ int nIndex = -1;
+ for (int i = 0; i < m_arItem.GetCount(); i++) {
+ EQITEM* pItem = (EQITEM*)m_arItem.GetAt(i);
+ if (pItem->pData == pData) {
+ nIndex = i;
+ break;
+ }
+ }
+
+ if (nIndex == -1) {
+ return FALSE;
+ }
+
+ m_nCurSel = nIndex;
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+
+ return TRUE;
+}
+
+/*
+ * nType: ITEM_SMALL, ITEM_NORMAL or ITEM_LARGE
+ */
+EQITEM* CEqsGraphWnd::AddItem(int id, CString strText, DWORD_PTR dwData, int nType/* = ITEM_NORMAL*/)
+{
+ // 需要计算一个新位置,不然全部重叠在一起
+ int x, y;
+ x = (m_arItem.GetCount() % 4) * 218;
+ y = (m_arItem.GetCount() / 4) * 168;
+
+
+ EQITEM* pItem = new EQITEM;
+ memset(pItem, 0, sizeof(EQITEM));
+ pItem->id = id;
+ pItem->nShowType = nType;
+ pItem->rect.left = x + 20 + m_nOffsetX;
+ pItem->rect.top = y + 50 + m_nOffsetY;
+ if (pItem->nShowType == ITEM_SMALL) {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_SMALL;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_SMALL;
+ }
+ else if(pItem->nShowType == ITEM_LARGE){
+ pItem->rect.right = pItem->rect.left + ITEM_CX_LARGE;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_LARGE;
+ }
+ else {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_NORMAL;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_NORMAL;
+ }
+
+ pItem->pData = dwData;
+ pItem->pInPins = (DWORD_PTR)new CPtrArray();
+ pItem->pOutPins = (DWORD_PTR)new CPtrArray();
+
+ int len = min(63, strText.GetLength());
+ memcpy(pItem->text, (LPTSTR)(LPCTSTR)strText, len);
+ pItem->text[len] = '\0';
+ m_arItem.Add(pItem);
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+
+ return pItem;
+}
+
+void CEqsGraphWnd::RemoveItem(EQITEM* pItem)
+{
+ BOOL bChanged = FALSE;
+ if (m_listener.onDeleteEqItem != NULL) {
+ if (m_listener.onDeleteEqItem(m_pCurItem)) {
+ bChanged = DeleteItem(m_pCurItem) >= 0;
+ }
+ }
+
+
+ if (bChanged) {
+ if (pItem == m_pCurItem) {
+ m_pCurItem = NULL;
+ }
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+}
+
+void CEqsGraphWnd::SetItemText(EQITEM* pItem, CString strText)
+{
+ int len = min(63, strText.GetLength());
+ memcpy(pItem->text, (LPTSTR)(LPCTSTR)strText, len);
+ pItem->text[len] = '\0';
+
+ ::InvalidateRect(m_hWnd, &pItem->rect, TRUE);
+}
+
+void CEqsGraphWnd::SetItemType(EQITEM* pItem, int nType)
+{
+ pItem->nShowType = nType;
+ if (pItem->nShowType == ITEM_SMALL) {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_SMALL;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_SMALL;
+ }
+ else if (pItem->nShowType == ITEM_LARGE) {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_LARGE;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_LARGE;
+ }
+ else {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_NORMAL;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_NORMAL;
+ }
+
+ ::InvalidateRect(m_hWnd, &pItem->rect, TRUE);
+}
+
+void CEqsGraphWnd::SetItemPos(EQITEM* pItem, int x, int y)
+{
+ ASSERT(pItem);
+ pItem->rect.left = x;
+ pItem->rect.top = y;
+ if (pItem->nShowType == ITEM_SMALL) {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_SMALL;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_SMALL;
+ }
+ else if (pItem->nShowType == ITEM_LARGE) {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_LARGE;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_LARGE;
+ }
+ else {
+ pItem->rect.right = pItem->rect.left + ITEM_CX_NORMAL;
+ pItem->rect.bottom = pItem->rect.top + ITEM_CY_NORMAL;
+ }
+
+ ::InvalidateRect(m_hWnd, &pItem->rect, TRUE);
+}
+
+PIN * CEqsGraphWnd::AddPin(EQITEM* pItem, int nType, CString strName, DWORD_PTR dwData)
+{
+ ASSERT(pItem);
+ ASSERT(nType == INPIN || nType == OUTPIN);
+ ASSERT(pItem->pInPins);
+ ASSERT(pItem->pOutPins);
+
+
+
+ PIN *pPin = new PIN;
+ memset(pPin, 0, sizeof(PIN));
+ pPin->pItem = pItem;
+ pPin->nIndex = nType == INPIN ? ((CPtrArray *)pItem->pInPins)->GetSize() : ((CPtrArray *)pItem->pOutPins)->GetSize();
+ pPin->nType = nType;
+ pPin->pData = dwData;
+
+ int len = MIN(sizeof(pPin->text), strName.GetLength());
+ memcpy(pPin->text, (LPTSTR)(LPCTSTR)strName, len);
+ pPin->text[len] = '\0';
+
+ CPtrArray *pArray = NULL;
+ if (nType == INPIN) {
+ pArray = (CPtrArray *)pItem->pInPins;
+ }
+ else {
+ pArray = (CPtrArray *)pItem->pOutPins;
+ }
+
+ ASSERT(pItem->pOutPins);
+ pArray->Add(pPin);
+
+ return pPin;
+}
+
+EQITEM* CEqsGraphWnd::GetItem(DWORD_PTR dwData)
+{
+ for (int i = 0; i < m_arItem.GetCount(); i++) {
+ EQITEM* pItem = (EQITEM*)m_arItem.GetAt(i);
+ if (pItem->pData == dwData) {
+ return pItem;
+ }
+ }
+
+ return NULL;
+}
+
+PIN * CEqsGraphWnd::GetPin(DWORD_PTR dwItemData, DWORD_PTR dwPinData)
+{
+ EQITEM* pItem = GetItem(dwItemData);
+ if (pItem != NULL) {
+ CPtrArray *pArray = (CPtrArray *)pItem->pInPins;
+ for (int i = 0; i < pArray->GetCount(); i++) {
+ PIN *pPin = (PIN *)pArray->GetAt(i);
+ if (pPin->pData == dwPinData) {
+ return pPin;
+ }
+ }
+
+ pArray = (CPtrArray *)pItem->pOutPins;
+ for (int i = 0; i < pArray->GetCount(); i++) {
+ PIN *pPin = (PIN *)pArray->GetAt(i);
+ if (pPin->pData == dwPinData) {
+ return pPin;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+int CEqsGraphWnd::ConnectPin(DWORD_PTR dwItem1Data, DWORD_PTR dwPin1Data, DWORD_PTR dwItem2Data, DWORD_PTR dwPin2Data)
+{
+ PIN *pPin1, *pPin2;
+
+ pPin1 = GetPin(dwItem1Data, dwPin1Data);
+ if (pPin1 == NULL) {
+ return -1;
+ }
+
+ pPin2 = GetPin(dwItem2Data, dwPin2Data);
+ if (pPin2 == NULL) {
+ return -2;
+ }
+
+ pPin1->pConnectedPin = pPin2;
+ pPin2->pConnectedPin = pPin1;
+
+ return 0;
+}
+
+// 删除Item, 如果pin有连接,注意先断开
+int CEqsGraphWnd::DeleteItem(EQITEM* pItem)
+{
+ for (int i = 0; i < m_arItem.GetSize(); i++) {
+ if (pItem == (EQITEM*)m_arItem.GetAt(i)) {
+ m_arItem.RemoveAt(i);
+ ReleaseItem(pItem);
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+void CEqsGraphWnd::DeleteAllItems()
+{
+ ReleaseAllItems();
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+}
+
+void CEqsGraphWnd::SetCurrentItem(EQITEM* pItem)
+{
+ if (m_pCurItem != NULL) {
+ m_pCurItem->bHighlight = FALSE;
+ }
+
+ m_pCurItem = pItem;
+ if (m_pCurItem != NULL) {
+ m_pCurItem->bHighlight = TRUE;
+ }
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+}
+
+/*
+ * 设置子项的选中状态
+ */
+void CEqsGraphWnd::SetItemSelectState(int nIndex, BOOL bSelect)
+{
+ if (nIndex >= m_arItem.GetCount()) {
+ return;
+ }
+
+ EQITEM *pItem = (EQITEM*)m_arItem.GetAt(nIndex);
+ pItem->bHighlight = bSelect;
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+}
+
+void CEqsGraphWnd::Notify(int nCode, int dwData, int dwData1/* = 0*/, int dwData2/* = 0*/)
+{
+ HWND hParent;
+ hParent = GetParent(m_hWnd);
+ if (hParent != NULL) {
+ EQSGRAPHWND_NMHDR nmhdr;
+ nmhdr.nmhdr.hwndFrom = m_hWnd;
+ nmhdr.nmhdr.idFrom = GetWindowLong(m_hWnd, GWL_ID);
+ nmhdr.nmhdr.code = nCode;
+ nmhdr.dwData = dwData;
+ nmhdr.dwData1 = dwData1;
+ nmhdr.dwData2 = dwData2;
+ SendMessage(hParent, WM_NOTIFY, (WPARAM)nmhdr.nmhdr.idFrom, (LPARAM)&nmhdr);
+ }
+}
+
+/*
+ * 检测坐标点所在的项
+ * 返回项类型, 如HT_ITEM, HT_PIN, HT_LINE
+ * pItem - 所在的EQITEM
+ * pPin --所在的pin, 如果在连线上,表示所属pin, out pin;
+ */
+int CEqsGraphWnd::HighTest(POINT pt, OUT EQITEM*& pItem, OUT PIN *& pPin)
+{
+ // 检测是否在某个子项
+ int nRet = HT_NOWHERE;
+ pItem = NULL;
+ pPin = NULL;
+ RECT rcItem;
+ for (int i = m_arItem.GetSize() - 1; i >= 0 ; i--) {
+ EQITEM *pTempItem = (EQITEM*)m_arItem.GetAt(i);
+ GetItemRect(pTempItem, &rcItem);
+ if (::PtInRect(&rcItem, pt)) {
+ // 在Item
+ pItem = pTempItem;
+ nRet = HT_ITEM;
+ break;
+ }
+ else {
+ RECT rcPin;
+ CPtrArray * pPins = (CPtrArray *)pTempItem->pInPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ if (GetInPinRect(pTempItem, j, &rcPin) && ::PtInRect(&rcPin, pt)) {
+ // 在in pin上
+ pPin = (PIN *)pPins->GetAt(j);
+ pItem = pTempItem;
+ nRet = HT_PIN;
+ break;
+ }
+ }
+
+ if (nRet == HT_NOWHERE) {
+ pPins = (CPtrArray *)pTempItem->pOutPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ if (GetOutPinRect(pTempItem, j, &rcPin) && ::PtInRect(&rcPin, pt)) {
+ // 在out pin
+ pPin = (PIN *)pPins->GetAt(j);
+ pItem = pTempItem;
+ nRet = HT_PIN;
+ break;
+ }
+ else {
+ // 是否在pin连接线上,即判断点是否在线上
+ // 点到直线的距离公式(先通过p1,p2用两点式求出直线的表达式,再套距离公式);abs()为取绝对值函数,sqrt()为开根号函数
+ PIN *pTempPin = (PIN *)pPins->GetAt(j);
+ if (pTempPin->pConnectedPin != NULL && pTempPin->nLinePtCount > 1) {
+ for (int i = 0; i < pTempPin->nLinePtCount - 1; i++) {
+ double distance = PointToSegDist(pt.x + m_nOffsetX, pt.y + m_nOffsetY,
+ pTempPin->ptConnectedLine[i].x, pTempPin->ptConnectedLine[i].y,
+ pTempPin->ptConnectedLine[i+1].x, pTempPin->ptConnectedLine[i+1].y);
+ if (distance < 5.0) {
+ nRet = HT_LINE;
+ pPin = pTempPin;
+ break;
+ }
+ }
+
+ if (nRet == HT_LINE) {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if (nRet != HT_NOWHERE) {
+ break;
+ }
+ }
+ }
+
+
+ return nRet;
+}
+
+/*
+ * 绘制虚线框,代表正在拖动的item
+ */
+void CEqsGraphWnd::DrawDropItemRectangle(LPRECT lpRect1, LPRECT lpRect2)
+{
+ HDC hDC = GetDC(m_hWnd);
+ HBRUSH hBrush = CreateSolidBrush(RGB(255, 255, 255));
+ HPEN hPen = CreatePen(PS_DASH, 1, RGB(0, 0, 0));
+ int oldRop = SetROP2(hDC, R2_NOTXORPEN);
+ HBRUSH hOldBrush = (HBRUSH)::SelectObject(hDC, hBrush);
+ HBRUSH hOldPen = (HBRUSH)::SelectObject(hDC, hPen);
+
+ if (lpRect1 != NULL) {
+ ::Rectangle(hDC, lpRect1->left, lpRect1->top, lpRect1->right, lpRect1->bottom);
+ }
+
+ if (lpRect2 != NULL) {
+ ::Rectangle(hDC, lpRect2->left, lpRect2->top, lpRect2->right, lpRect2->bottom);
+ }
+
+ ::SetROP2(hDC, oldRop);
+ ::SelectObject(hDC, hOldBrush);
+ ::SelectObject(hDC, hPen);
+ ::DeleteObject(hBrush);
+ ::DeleteObject(hOldPen);
+ ::ReleaseDC(m_hWnd, hDC);
+}
+
+/*
+ * 绘制磁吸线
+ */
+void CEqsGraphWnd::DrawMagneticLine(LPRECT lprcClient, int nHozLine1, int nHozLine2, int nVerLine1, int nVerLine2)
+{
+ HDC hDC = GetDC(m_hWnd);
+ HPEN hPen = CreatePen(PS_DASH, 1, RGB(64, 64, 64));
+ int oldRop = SetROP2(hDC, R2_NOTXORPEN);
+ HBRUSH hOldPen = (HBRUSH)::SelectObject(hDC, hPen);
+
+ if (nHozLine1) {
+ ::MoveToEx(hDC, 1, nHozLine1, NULL);
+ ::LineTo(hDC, lprcClient->right-1, nHozLine1);
+ }
+ if (nHozLine2) {
+ ::MoveToEx(hDC, 1, nHozLine2, NULL);
+ ::LineTo(hDC, lprcClient->right - 1, nHozLine2);
+ }
+
+ if (nVerLine1) {
+ ::MoveToEx(hDC, nVerLine1, 1, NULL);
+ ::LineTo(hDC, nVerLine1, lprcClient->bottom - 1);
+ }
+ if (nVerLine2) {
+ ::MoveToEx(hDC, nVerLine2, 1, NULL);
+ ::LineTo(hDC, nVerLine2, lprcClient->bottom - 1);
+ }
+
+ ::SetROP2(hDC, oldRop);
+ ::SelectObject(hDC, hPen);
+ ::DeleteObject(hOldPen);
+ ::ReleaseDC(m_hWnd, hDC);
+}
+
+/*
+ * 缓制Pin连接线
+ * pBrush -- 画刷
+ * pPen - 画笔
+ * lpPt1, lpPt2 -- Pin脚的位置
+ * lpRect1, lpRect2 -- 两个Item的Rect
+ */
+void CEqsGraphWnd::DrawPinConnectedLine(Gdiplus::Graphics *pGraphics, Gdiplus::Brush *pBrush, Gdiplus::Pen *pPen, LPPOINT lpPt1, LPPOINT lpPt2,
+ LPRECT lpRect1, LPRECT lpRect2, PIN *pOwnerPin)
+{
+ // 如果没有缓存线条的POINT,则先计算并缓存
+ ASSERT(pOwnerPin);
+
+ int nPinCount = ((CPtrArray*)pOwnerPin->pItem->pOutPins)->GetSize();
+ int nArrowLen = 8;
+ int nStartMinX = 8;
+ int nMargin = 12;
+ int x1, x2, y1;
+
+ if (pOwnerPin->nLinePtCount == 0) { // 第一个点的最小折线长
+ ::OffsetRect(lpRect1, +m_nOffsetX, +m_nOffsetY);
+ ::OffsetRect(lpRect2, +m_nOffsetX, +m_nOffsetY);
+ lpPt1->x += m_nOffsetX; // 消除偏移
+ lpPt1->y += m_nOffsetY;
+ lpPt2->x += m_nOffsetX;
+ lpPt2->y += m_nOffsetY;
+ int nMinX = 10 + nMargin * nPinCount + nArrowLen;
+ int xEnd = lpPt2->x - 5;
+ x1 = lpPt1->x + 10 + pOwnerPin->nIndex * nMargin;
+ if (lpPt2->x - lpPt1->x > nMinX) {
+ pOwnerPin->ptConnectedLine[0].x = lpPt1->x;
+ pOwnerPin->ptConnectedLine[0].y = lpPt1->y;
+ pOwnerPin->ptConnectedLine[1].x = x1;
+ pOwnerPin->ptConnectedLine[1].y = lpPt1->y;
+ pOwnerPin->ptConnectedLine[2].x = x1;
+ pOwnerPin->ptConnectedLine[2].y = lpPt2->y;
+ pOwnerPin->ptConnectedLine[3].x = xEnd;
+ pOwnerPin->ptConnectedLine[3].y = lpPt2->y;
+ pOwnerPin->nLinePtCount = 4;
+ }
+ else if (lpRect1 != NULL && lpRect2 != NULL) {
+ if (lpRect2->top - lpRect1->bottom > 20 || lpRect1->top - lpRect2->bottom > 20) {
+ if (lpRect2->top - lpRect1->bottom > 20) {
+ y1 = lpRect1->bottom + 10 + pOwnerPin->nIndex * nMargin;
+ x2 = min(lpPt2->x - nArrowLen, x1) - (nPinCount - pOwnerPin->nIndex) * nMargin;
+ }
+ else {
+ y1 = lpRect1->top - 10 - pOwnerPin->nIndex * nMargin;
+ x2 = min(lpPt2->x - nArrowLen, x1) - (nPinCount - pOwnerPin->nIndex) * nMargin;
+ }
+ pOwnerPin->ptConnectedLine[0].x = lpPt1->x;
+ pOwnerPin->ptConnectedLine[0].y = lpPt1->y;
+ pOwnerPin->ptConnectedLine[1].x = x1;
+ pOwnerPin->ptConnectedLine[1].y = lpPt1->y;
+ pOwnerPin->ptConnectedLine[2].x = x1;
+ pOwnerPin->ptConnectedLine[2].y = y1;
+ pOwnerPin->ptConnectedLine[3].x = x2;
+ pOwnerPin->ptConnectedLine[3].y = y1;
+ pOwnerPin->ptConnectedLine[4].x = x2;
+ pOwnerPin->ptConnectedLine[4].y = lpPt2->y;
+ pOwnerPin->ptConnectedLine[5].x = xEnd;
+ pOwnerPin->ptConnectedLine[5].y = lpPt2->y;
+ pOwnerPin->nLinePtCount = 6;
+ }
+ else {
+ x2 = min(lpRect1->left, lpRect2->left) - 30;
+ y1 = max(lpRect1->bottom, lpRect2->bottom) + 30;
+ pOwnerPin->ptConnectedLine[0].x = lpPt1->x;
+ pOwnerPin->ptConnectedLine[0].y = lpPt1->y;
+ pOwnerPin->ptConnectedLine[1].x = x1;
+ pOwnerPin->ptConnectedLine[1].y = lpPt1->y;
+ pOwnerPin->ptConnectedLine[2].x = x1;
+ pOwnerPin->ptConnectedLine[2].y = y1;
+ pOwnerPin->ptConnectedLine[3].x = x2;
+ pOwnerPin->ptConnectedLine[3].y = y1;
+ pOwnerPin->ptConnectedLine[4].x = x2;
+ pOwnerPin->ptConnectedLine[4].y = lpPt2->y;
+ pOwnerPin->ptConnectedLine[5].x = xEnd;
+ pOwnerPin->ptConnectedLine[5].y = lpPt2->y;
+ pOwnerPin->nLinePtCount = 6;
+ }
+ }
+ }
+
+ if (pOwnerPin->nLinePtCount >= 2) {
+ for (int i = 0; i < pOwnerPin->nLinePtCount - 1; i++) {
+ pGraphics->DrawLine(pPen, pOwnerPin->ptConnectedLine[i].x - m_nOffsetX, pOwnerPin->ptConnectedLine[i].y - m_nOffsetY,
+ pOwnerPin->ptConnectedLine[i + 1].x - m_nOffsetX, pOwnerPin->ptConnectedLine[i + 1].y - m_nOffsetY);
+ }
+
+ DrawArrow(pGraphics, pBrush, pPen, pOwnerPin->ptConnectedLine[pOwnerPin->nLinePtCount-1].x - m_nOffsetX,
+ pOwnerPin->ptConnectedLine[pOwnerPin->nLinePtCount-1].y - m_nOffsetY, nArrowLen);
+ }
+}
+
+void CEqsGraphWnd::DrawArrow(Gdiplus::Graphics *pGraphics, Gdiplus::Brush* pBrush, Gdiplus::Pen *pPen,
+ int x, int y, int nArrowLen)
+{
+ Gdiplus::Point pt[4];
+ pt[0].X = x;
+ pt[0].Y = y;
+ pt[1].X = x - nArrowLen;
+ pt[1].Y = y - 3;
+ pt[2].X = pt[1].X;
+ pt[2].Y = y + 3;
+ pt[3].X = x;
+ pt[3].Y = y;
+ pGraphics->FillPolygon(pBrush, pt, 4);
+ pGraphics->DrawPolygon(pPen, pt, 4);
+}
+
+void CEqsGraphWnd::DrawPinWillConnectLine(COLORREF color, LPPOINT lpPt1, LPPOINT lpPt2)
+{
+ HDC hDC = GetDC(m_hWnd);
+
+ HPEN hPen = CreatePen(PS_SOLID, 2, color);
+ int oldRop = SetROP2(hDC, R2_NOTXORPEN);
+ HBRUSH hOldPen = (HBRUSH)::SelectObject(hDC, hPen);
+
+ if (lpPt1 != NULL && lpPt2 != NULL) {
+ ::MoveToEx(hDC, lpPt1->x, lpPt1->y, NULL);
+ ::LineTo(hDC, lpPt2->x, lpPt2->y);
+ }
+
+ ::SetROP2(hDC, oldRop);
+ ::SelectObject(hDC, hPen);
+ ::DeleteObject(hOldPen);
+ ::ReleaseDC(m_hWnd, hDC);
+}
+
+/*
+ * WindowProc,窗口过程
+ */
+LRESULT CALLBACK CEqsGraphWnd::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ CEqsGraphWnd* pEqsGraphWnd = (CEqsGraphWnd*)GetProp(hWnd, EQSGRAPHWND_TAG);
+ if (pEqsGraphWnd == NULL && uMsg != WM_NCCREATE)
+ {
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
+ }
+
+
+ // 处理窗口消息
+ ASSERT(hWnd);
+ switch (uMsg)
+ {
+ case WM_NCCREATE:
+ return CEqsGraphWnd::OnNcCreate(hWnd, wParam, lParam);
+
+ case WM_DESTROY:
+ return pEqsGraphWnd->OnDestroy(wParam, lParam);
+
+ case WM_NCPAINT:
+ return pEqsGraphWnd->OnNcPaint(wParam, lParam);
+
+ case WM_PAINT:
+ return pEqsGraphWnd->OnPaint(wParam, lParam);
+
+ case WM_TIMER:
+ return pEqsGraphWnd->OnTimer(wParam, lParam);
+
+ case WM_MOUSEMOVE:
+ return pEqsGraphWnd->OnMouseMove(wParam, lParam);
+
+ case WM_LBUTTONDOWN:
+ return pEqsGraphWnd->OnLButtonDown(wParam, lParam);
+
+ case WM_RBUTTONDOWN:
+ return pEqsGraphWnd->OnRButtonDown(wParam, lParam);
+
+ case WM_LBUTTONDBLCLK:
+ return pEqsGraphWnd->OnLButtonDblclk(wParam, lParam);
+
+ case WM_MOUSEWHEEL:
+ return pEqsGraphWnd->OnMouseWheel(wParam, lParam);
+
+ case WM_MOUSEHWHEEL:
+ return pEqsGraphWnd->OnMouseHWheel(wParam, lParam);
+
+ case WM_KEYDOWN:
+ return pEqsGraphWnd->OnKeyDown(wParam, lParam);
+
+ case WM_SIZE:
+ return pEqsGraphWnd->OnSize(wParam, lParam);
+
+ case WM_VSCROLL:
+ return pEqsGraphWnd->OnVScroll(wParam, lParam);
+
+ case WM_HSCROLL:
+ return pEqsGraphWnd->OnHScroll(wParam, lParam);
+
+ case WM_NOTIFY:
+ return pEqsGraphWnd->OnNitify(wParam, lParam);
+
+ case WM_GETDLGCODE:
+ return DLGC_WANTALLKEYS;
+
+ default:
+ break;
+ }
+
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
+}
+
+/*
+ * WM_NCCREATE
+ * 窗口创建
+ */
+LRESULT CEqsGraphWnd::OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
+{
+ CEqsGraphWnd* pEqsGraphWnd = (CEqsGraphWnd*)GetProp(hWnd,EQSGRAPHWND_TAG);
+ ASSERT(pEqsGraphWnd == NULL);
+
+ Hook(hWnd)->Init();
+ return ::DefWindowProc(hWnd, WM_NCCREATE, wParam, lParam);
+}
+
+/*
+ * WM_DESTROY
+ * 窗口销毁
+ */
+LRESULT CEqsGraphWnd::OnDestroy(WPARAM wParam, LPARAM lParam)
+{
+ Release();
+ return ::DefWindowProc(m_hWnd, WM_DESTROY, wParam, lParam);
+}
+
+
+/*
+ * WM_TIMER
+ */
+LRESULT CEqsGraphWnd::OnTimer(WPARAM wParam, LPARAM lParam)
+{
+ if (wParam == TIMER_FLASH) {
+ if (m_pFlashItem != NULL && m_nFlashCount > 0) {
+ m_nFlashCount--;
+ m_pFlashItem->nFlashFlag = (m_nFlashCount % 2);
+
+ RECT rcItem;
+ GetItemWarperRect(m_pFlashItem, &rcItem);
+ InvalidateRect(m_hWnd, &rcItem, TRUE);
+ }
+ else {
+ m_pFlashItem = NULL;
+ m_nFlashCount = 0;
+ }
+ }
+ else if (TIMER_ANIMATION_RECT == wParam) {
+ if (m_pAnimationItem != NULL) {
+ if (m_nAninationStep > 0) {
+ m_nAninationStep--;
+
+ m_rcAnimation.left += m_rcAninationStep.left;
+ m_rcAnimation.right += m_rcAninationStep.right;
+ m_rcAnimation.top += m_rcAninationStep.top;
+ m_rcAnimation.bottom += m_rcAninationStep.bottom;
+
+ RECT rcItem;
+ GetItemWarperRect(m_pAnimationItem, &rcItem);
+ InvalidateRect(m_hWnd, &rcItem, TRUE);
+ }
+ else {
+ KillTimer(m_hWnd, TIMER_ANIMATION_RECT);
+ RECT rcItem;
+ GetItemWarperRect(m_pAnimationItem, &rcItem);
+ InvalidateRect(m_hWnd, &rcItem, TRUE);
+ m_pAnimationItem = NULL;
+ }
+ }
+ else {
+ KillTimer(m_hWnd, TIMER_ANIMATION_RECT);
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+ }
+
+ return ::DefWindowProc(m_hWnd, WM_TIMER, wParam, lParam);
+}
+
+/*
+ * WM_MOUSEMOVE
+ * 鼠标滚动
+ */
+LRESULT CEqsGraphWnd::OnMouseMove(WPARAM wParam, LPARAM lParam)
+{
+ return ::DefWindowProc(m_hWnd, WM_MOUSEMOVE, wParam, lParam);
+}
+
+/*
+ * WM_LBUTTONDOWN
+ * 鼠标左键按下
+ */
+LRESULT CEqsGraphWnd::OnLButtonDown(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt, ptNew;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ RECT rcClient, rcItem, rcNewItem, rcLast;
+ GetClientRect(m_hWnd, &rcClient);
+ rcLast = {0, 0, 0, 0};
+ int nMaxOffsetX = m_nStageCx - (rcClient.right - rcClient.left);
+ int nMaxOffsetY = m_nStageCy - (rcClient.bottom - rcClient.top);
+ int nLastHozLine = 0;
+ int nLastVerLine = 0;
+
+
+ // 检测点击坐标是否在某一子项上,如是,则高亮显示
+ EQITEM* pLastItem = m_pCurItem;
+ PIN *pLastPin = m_pCurPin;
+ PIN *pLastSelLineOutPin = m_pSelLineOutPin;
+ BOOL bChanged = FALSE;
+ EQITEM* pHitItem = NULL;
+ PIN *pHitPin = NULL;
+ PIN *pPin2 = NULL;
+ int nRet = HighTest(pt, pHitItem, pHitPin);
+ if (pHitItem != m_pCurItem || nRet != HT_ITEM) {
+ if (m_pCurItem != NULL) {
+ m_pCurItem->bHighlight = FALSE;
+ }
+ m_pCurItem = NULL;
+ }
+
+ if (pHitPin != m_pCurPin || nRet != HT_PIN) {
+ if (m_pCurPin != NULL) {
+ m_pCurPin->bHighlight = FALSE;
+ }
+ m_pCurPin = NULL;
+ }
+
+ if (pHitPin != m_pSelLineOutPin || nRet != HT_LINE) {
+ m_pSelLineOutPin = NULL;
+ }
+
+ if (nRet == HT_ITEM) {
+ m_pCurItem = pHitItem;
+ m_pCurItem->bHighlight = TRUE;
+ }
+ else if (nRet == HT_PIN) {
+ m_pCurPin = pHitPin;
+ m_pCurPin->bHighlight = TRUE;
+ }
+ else if (nRet == HT_LINE) {
+ m_pSelLineOutPin = pHitPin;
+ }
+
+
+ bChanged = pLastItem != m_pCurItem || pLastPin != m_pCurPin || pLastSelLineOutPin != m_pSelLineOutPin;
+
+
+ // 刷新
+ SetFocus(m_hWnd);
+ if (bChanged) {
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+
+
+ // 捕捉鼠标消息,检测是否拖动
+ if (nRet == HT_ITEM && m_pCurItem != NULL) {
+ GetItemRect(m_pCurItem, &rcItem);
+
+ if (::GetCapture() == NULL) {
+ SetCapture(m_hWnd);
+ ASSERT(m_hWnd == GetCapture());
+ AfxLockTempMaps();
+ for (;;)
+ {
+ MSG msg;
+ VERIFY(::GetMessage(&msg, NULL, 0, 0));
+
+ if (GetCapture() != m_hWnd) break;
+
+ switch (msg.message)
+ {
+ case WM_MOUSEMOVE:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ rcNewItem.left = rcItem.left + (ptNew.x - pt.x);
+ rcNewItem.right = rcItem.right + (ptNew.x - pt.x);
+ rcNewItem.top = rcItem.top + (ptNew.y - pt.y);
+ rcNewItem.bottom = rcItem.bottom + (ptNew.y - pt.y);
+ CalculateMagneticLine(m_pCurItem, &rcNewItem, m_nMagneticLinHoz, m_nMagneticLinVer);
+ DrawDropItemRectangle(&rcNewItem, &rcLast);
+ DrawMagneticLine(&rcClient, m_nMagneticLinHoz, nLastHozLine, m_nMagneticLinVer, nLastVerLine);
+ nLastHozLine = m_nMagneticLinHoz;
+ nLastVerLine = m_nMagneticLinVer;
+ CopyRect(&rcLast, &rcNewItem);
+ break;
+
+ case WM_LBUTTONUP:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ m_pCurItem->rect.left = m_nMagneticLinVer > 0 ? m_nMagneticLinVer : (rcItem.left + (ptNew.x - pt.x) + m_nOffsetX);
+ m_pCurItem->rect.right = m_pCurItem->rect.left + (rcItem.right - rcItem.left);
+ m_pCurItem->rect.top = m_nMagneticLinHoz > 0 ? m_nMagneticLinHoz : (rcItem.top + (ptNew.y - pt.y) + m_nOffsetY);
+ m_pCurItem->rect.bottom = m_pCurItem->rect.top + (rcItem.bottom - rcItem.top);
+ if (m_pCurItem->rect.left != rcItem.left || m_pCurItem->rect.top != rcItem.top) {
+ if (m_listener.onEqItemPosChanged != nullptr) {
+ m_listener.onEqItemPosChanged(m_pCurItem, m_pCurItem->rect.left, m_pCurItem->rect.top);
+ }
+ }
+ DrawDropItemRectangle(NULL, &rcLast);
+ ReleaseCapture();
+
+ ClearConnectedLinePoint(m_pCurItem);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ goto ExitLoop;
+
+ case WM_KEYDOWN:
+ if (msg.wParam != VK_ESCAPE)
+ break;
+
+ default:
+ DispatchMessage(&msg);
+ break;
+ }
+ }
+
+ ReleaseCapture();
+ ExitLoop:
+ m_nMagneticLinHoz = 0;
+ m_nMagneticLinVer = 0;
+ AfxUnlockTempMaps(FALSE);
+ }
+ }
+
+
+ // 捕捉鼠标消息,检测是否连接引脚
+ else if (nRet == HT_PIN && m_pCurPin != NULL) {
+ if (::GetCapture() == NULL) {
+ BOOL bLast = FALSE;
+ bool bCanConnect;
+ POINT ptPin, ptLast;
+ COLORREF lineColor;
+ GetPinPoint(m_pCurPin, &ptPin);
+ ptLast.x = ptPin.x;
+ ptLast.y = ptPin.y;
+
+ SetCapture(m_hWnd);
+ ASSERT(m_hWnd == GetCapture());
+ AfxLockTempMaps();
+ for (;;)
+ {
+ MSG msg;
+ VERIFY(::GetMessage(&msg, NULL, 0, 0));
+
+ if (GetCapture() != m_hWnd) break;
+
+ switch (msg.message)
+ {
+ case WM_MOUSEMOVE:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+
+ // 擦除上一次
+ if (bLast) {
+ DrawPinWillConnectLine(lineColor, &ptPin, &ptLast);
+ }
+
+ // 检测是否可以连接
+ bCanConnect = false;
+ nRet = HighTest(ptNew, pHitItem, pHitPin);
+ if (nRet == HT_PIN) {
+ if (m_listener.onCheckConnectPin != nullptr) {
+ bCanConnect = m_listener.onCheckConnectPin(m_pCurPin, pHitPin);
+ }
+ }
+ if (bCanConnect) {
+ lineColor = RGB(0, 255, 0);
+ DrawPinWillConnectLine(lineColor, &ptPin, &ptNew);
+ }
+ else {
+ lineColor = RGB(0, 0, 0);
+ DrawPinWillConnectLine(lineColor, &ptPin, &ptNew);
+ }
+
+ ptLast.x = ptNew.x;
+ ptLast.y = ptNew.y;
+ bLast = TRUE;
+ break;
+
+ case WM_LBUTTONUP:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+
+ // 擦除上一次
+ if (bLast) {
+ DrawPinWillConnectLine(lineColor, &ptPin, &ptLast);
+ }
+
+ // 检测是否可以连接
+ bCanConnect = false;
+ nRet = HighTest(ptNew, pHitItem, pHitPin);
+ if (nRet == HT_PIN) {
+ if (m_listener.onConnectPin != nullptr) {
+ bCanConnect = m_listener.onConnectPin(m_pCurPin, pHitPin);
+ }
+ }
+ if (bCanConnect) {
+ m_pCurPin->pConnectedPin = pHitPin;
+ pHitPin->pConnectedPin = m_pCurPin;
+ }
+ bLast = FALSE;
+
+ ReleaseCapture();
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ goto ExitLoop2;
+
+ case WM_KEYDOWN:
+ if (msg.wParam != VK_ESCAPE)
+ break;
+
+ default:
+ DispatchMessage(&msg);
+ break;
+ }
+ }
+
+ ReleaseCapture();
+ ExitLoop2:
+ AfxUnlockTempMaps(FALSE);
+ }
+ }
+
+
+ // 检测鼠标消息,检测是否移动画布
+ else if (nRet == HT_NOWHERE) {
+ if (::GetCapture() == NULL) {
+ int nLastOffsetX = m_nOffsetX;
+ int nLastOffsetY = m_nOffsetY;
+
+ POINT ptStart;
+ ptStart.x = pt.x;
+ ptStart.y = pt.y;
+
+ SetCursor(LoadCursor(NULL, IDC_SIZEALL));
+ SetCapture(m_hWnd);
+ ASSERT(m_hWnd == GetCapture());
+ AfxLockTempMaps();
+ for (;;) {
+ MSG msg;
+ VERIFY(::GetMessage(&msg, NULL, 0, 0));
+
+ if (GetCapture() != m_hWnd) break;
+
+ switch (msg.message)
+ {
+ case WM_MOUSEMOVE:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ m_nOffsetX = min(nMaxOffsetX, max(0, nLastOffsetX - (ptNew.x - ptStart.x)));
+ m_nOffsetY = min(nMaxOffsetY, max(0, nLastOffsetY - (ptNew.y - ptStart.y)));
+ CalculateScollbar();
+ CalculateMapPos();
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ break;
+
+ case WM_LBUTTONUP:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+
+ ReleaseCapture();
+ CalculateScollbar();
+ CalculateMapPos();
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ goto ExitLoop3;
+
+ case WM_KEYDOWN:
+ if (msg.wParam != VK_ESCAPE)
+ break;
+
+ default:
+ DispatchMessage(&msg);
+ break;
+ }
+ }
+
+ ReleaseCapture();
+ ExitLoop3:
+ AfxUnlockTempMaps(FALSE);
+ }
+ }
+
+
+ return ::DefWindowProc(m_hWnd, WM_LBUTTONDOWN, wParam, lParam);
+}
+
+/*
+ * WM_LBUTTONDBLCLK
+ * 鼠标左键双击
+ */
+LRESULT CEqsGraphWnd::OnLButtonDblclk(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ RECT rcClient, rcLast;
+ GetClientRect(m_hWnd, &rcClient);
+ rcLast = { 0, 0, 0, 0 };
+
+ // 检测点击坐标是否在某一子项上,如是,则高亮显示
+ EQITEM* pLastItem = m_pCurItem;
+ BOOL bChanged = FALSE;
+ EQITEM* pHitItem = NULL;
+ PIN *pHitPin = NULL;
+ int nRet = HighTest(pt, pHitItem, pHitPin);
+ if ( nRet == HT_ITEM) {
+ m_pCurItem = pHitItem;
+ m_pCurItem->bHighlight = FALSE;
+ if (m_listener.onDblckEqItem != nullptr) {
+ m_listener.onDblckEqItem(pHitItem);
+ }
+ }
+
+
+ return ::DefWindowProc(m_hWnd, WM_LBUTTONDBLCLK, wParam, lParam);
+}
+
+/*
+ * WM_MOUSEWHEEL
+ * 鼠标滚动
+ */
+LRESULT CEqsGraphWnd::OnMouseWheel(WPARAM wParam, LPARAM lParam)
+{
+ short zDelta;
+ UINT nFlags;
+ CPoint pt;
+
+ nFlags = LOWORD(wParam);
+ zDelta = (short)HIWORD(wParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
+
+
+ CRect rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ m_nOffsetY -= zDelta;
+ m_nOffsetY = max(0, min(m_nOffsetY, m_nStageCy - rcClient.Height()));
+ CalculateScollbar();
+ CalculateMapPos();
+
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ return ::DefWindowProc(m_hWnd, WM_MOUSEWHEEL, wParam, lParam);
+}
+
+/*
+* WM_MOUSEHWHEEL
+* 鼠标滚动
+*/
+LRESULT CEqsGraphWnd::OnMouseHWheel(WPARAM wParam, LPARAM lParam)
+{
+ short zDelta;
+ UINT nFlags;
+ CPoint pt;
+
+ nFlags = LOWORD(wParam);
+ zDelta = (short)HIWORD(wParam);
+ pt.x = (short)LOWORD(lParam);
+ pt.y = (short)HIWORD(lParam);
+
+
+ CRect rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ m_nOffsetX += zDelta;
+ m_nOffsetX = max(0, min(m_nOffsetX, m_nStageCx - rcClient.Width()));
+ CalculateScollbar();
+ CalculateMapPos();
+
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ return ::DefWindowProc(m_hWnd, WM_MOUSEHWHEEL, wParam, lParam);
+}
+
+/*
+ * WM_RBUTTONDOWN
+ * 鼠标左键按下
+ */
+LRESULT CEqsGraphWnd::OnRButtonDown(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt, ptNew;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ RECT rcClient, rcItem, rcLast;
+ GetClientRect(m_hWnd, &rcClient);
+ rcLast = { 0, 0, 0, 0 };
+
+ // 检测点击坐标是否在某一子项上,如是,则高亮显示
+ EQITEM* pLastItem = m_pCurItem;
+ PIN *pLastPin = m_pCurPin;
+ PIN *pLastSelLineOutPin = m_pSelLineOutPin;
+ BOOL bChanged = FALSE;
+ EQITEM* pHitItem = NULL;
+ PIN *pHitPin = NULL;
+ PIN *pPin2 = NULL;
+ int nRet = HighTest(pt, pHitItem, pHitPin);
+ if (pHitItem != m_pCurItem || nRet != HT_ITEM) {
+ if (m_pCurItem != NULL) {
+ m_pCurItem->bHighlight = FALSE;
+ }
+ m_pCurItem = NULL;
+ }
+
+ if (pHitPin != m_pCurPin || nRet != HT_PIN) {
+ if (m_pCurPin != NULL) {
+ m_pCurPin->bHighlight = FALSE;
+ }
+ m_pCurPin = NULL;
+ }
+
+ if (pHitPin != m_pSelLineOutPin || nRet != HT_LINE) {
+ m_pSelLineOutPin = NULL;
+ }
+
+ if (nRet == HT_ITEM) {
+ m_pCurItem = pHitItem;
+ m_pCurItem->bHighlight = TRUE;
+ }
+ else if (nRet == HT_PIN) {
+ m_pCurPin = pHitPin;
+ m_pCurPin->bHighlight = TRUE;
+ }
+ else if (nRet == HT_LINE) {
+ m_pSelLineOutPin = pHitPin;
+ }
+
+
+ bChanged = pLastItem != m_pCurItem || pLastPin != m_pCurPin || pLastSelLineOutPin != m_pSelLineOutPin;
+
+
+ // 刷新
+ SetFocus(m_hWnd);
+ if (bChanged) {
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+
+
+ // 捕捉鼠标消息,检测是否拖动
+ if (nRet == HT_ITEM && m_pCurItem != NULL) {
+ CopyRect(&rcItem, &m_pCurItem->rect);
+
+ if (::GetCapture() == NULL) {
+ SetCapture(m_hWnd);
+ ASSERT(m_hWnd == GetCapture());
+ AfxLockTempMaps();
+ for (;;)
+ {
+ MSG msg;
+ VERIFY(::GetMessage(&msg, NULL, 0, 0));
+
+ if (GetCapture() != m_hWnd) break;
+
+ switch (msg.message)
+ {
+ case WM_MOUSEMOVE:
+ break;
+
+ case WM_RBUTTONUP:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ nRet = HighTest(ptNew, pHitItem, pHitPin);
+ ReleaseCapture();
+ if (m_listener.onRclickEqItem != NULL) {
+ m_listener.onRclickEqItem(pHitItem);
+ }
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ goto ExitLoop;
+
+ case WM_KEYDOWN:
+ if (msg.wParam != VK_ESCAPE)
+ break;
+
+ default:
+ DispatchMessage(&msg);
+ break;
+ }
+ }
+
+ ReleaseCapture();
+ ExitLoop:
+ AfxUnlockTempMaps(FALSE);
+ }
+ }
+
+
+ return ::DefWindowProc(m_hWnd, WM_LBUTTONDOWN, wParam, lParam);
+}
+
+/*
+ * WM_KEYDOWN
+ * 键盘消息,按下按键
+ */
+LRESULT CEqsGraphWnd::OnKeyDown(WPARAM wParam, LPARAM lParam)
+{
+ BOOL bChanged = FALSE;
+ if (wParam == VK_DELETE) {
+ // 如果当前选择为线,则断开连接
+ if (m_pSelLineOutPin != NULL) {
+ if (m_listener.onDisconnectPin != nullptr) {
+ if (m_listener.onDisconnectPin(m_pSelLineOutPin)) {
+ m_pSelLineOutPin->pConnectedPin->pConnectedPin = NULL;
+ m_pSelLineOutPin->pConnectedPin = NULL;
+ m_pSelLineOutPin = NULL;
+ bChanged = TRUE;
+ }
+ }
+ }
+ else if (m_pCurItem != NULL) {
+ if (m_listener.onDeleteEqItem != NULL) {
+ if (m_listener.onDeleteEqItem(m_pCurItem)) {
+ bChanged = DeleteItem(m_pCurItem) >= 0;
+ }
+ }
+ }
+ }
+
+
+ if (bChanged) {
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+
+ return ::DefWindowProc(m_hWnd, WM_KEYDOWN, wParam, lParam);
+}
+
+/*
+ * WM_NCPAINT
+ */
+LRESULT CEqsGraphWnd::OnNcPaint(WPARAM wParam, LPARAM lParam)
+{
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_NCPAINT, wParam, lParam);
+
+
+ long styleEx = GetWindowLong(m_hWnd, GWL_EXSTYLE);
+ if ((styleEx & WS_EX_CLIENTEDGE) == WS_EX_CLIENTEDGE) {
+
+ RECT rect, rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::ClientToScreen(m_hWnd, (LPPOINT)&rcClient.left);
+ ::ClientToScreen(m_hWnd, (LPPOINT)&rcClient.right);
+ GetWindowRect(m_hWnd, &rect);
+ rcClient.right = rect.right - 1;
+ rcClient.bottom = rect.bottom - 1;
+ ::OffsetRect(&rcClient, -rect.left, -rect.top);
+
+ rect.right -= rect.left;
+ rect.bottom -= rect.top;
+ rect.left = 0;
+ rect.top = 0;
+
+ HRGN hRgnWnd = CreateRectRgnIndirect(&rect);
+ HRGN hRgnClient = CreateRectRgnIndirect(&rcClient);
+
+ HBRUSH hBrushBK, hBrushFrame;
+ HDC hDC = ::GetWindowDC(m_hWnd);
+ ::SelectClipRgn(hDC, hRgnWnd);
+ ::ExtSelectClipRgn(hDC, hRgnClient, RGN_DIFF);
+
+ hBrushBK = CreateSolidBrush(m_crBkgnd);
+ ::FillRect(hDC, &rect, hBrushBK);
+ DeleteObject(hBrushBK);
+
+ hBrushFrame = CreateSolidBrush(m_crFrame);
+ ::FrameRect(hDC, &rect, hBrushFrame);
+
+ ::DeleteObject(hRgnWnd);
+ ::DeleteObject(hRgnClient);
+ DeleteObject(hBrushFrame);
+ ::ReleaseDC(m_hWnd, hDC);
+ }
+
+ return lRet;
+}
+
+/*
+ * WM_PAINT
+ */
+LRESULT CEqsGraphWnd::OnPaint(WPARAM wParam, LPARAM lParam)
+{
+ HDC hDC, hMemDC;
+ HBITMAP hBitmap;
+ RECT rcClient;
+ CString strText;
+ HBRUSH hBrushBK;
+
+
+ // BeginPaint
+ PAINTSTRUCT ps;
+ hDC = BeginPaint(m_hWnd, &ps);
+ GetClientRect(m_hWnd, &rcClient);
+
+ hMemDC = ::CreateCompatibleDC(hDC);
+ hBitmap = ::CreateCompatibleBitmap(hDC, rcClient.right - rcClient.left,
+ rcClient.bottom - rcClient.top);
+ ::SelectObject(hMemDC, hBitmap);
+
+
+ // 背景颜色
+ hBrushBK = CreateSolidBrush(m_crBkgnd);
+ ::FillRect(hMemDC, &rcClient, hBrushBK);
+ DeleteObject(hBrushBK);
+
+
+ // 标题
+ if (m_hFontTitle == nullptr) {
+ LOGFONT lf;
+ HFONT hFontDefault = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
+ ::GetObject(hFontDefault, sizeof(LOGFONT), &lf);
+ lf.lfHeight -= 6;
+ lf.lfWeight = FW_SEMIBOLD;
+ m_hFontTitle = CreateFontIndirect(&lf);
+ }
+
+ {
+ char szTitle[256];
+ GetWindowText(m_hWnd, szTitle, 256);
+ RECT rcTitle;
+ rcTitle.left = rcClient.left + 5;
+ rcTitle.top = rcClient.top + 12;
+ rcTitle.bottom = rcClient.bottom - 5;
+ rcTitle.right = rcClient.right - 5;
+ ::SelectObject(hMemDC, m_hFontTitle);
+ ::DrawText(hMemDC, szTitle, (int)strlen(szTitle), &rcTitle, DT_LEFT | DT_TOP);
+ }
+
+
+ // 绘制子项
+ HBRUSH hbrItemBackground[2];
+ HBRUSH hbrItemFrame[2];
+ HBRUSH hbrPinBackground[3];
+ hbrItemBackground[0] = CreateSolidBrush(m_crItemBackground[0]);
+ hbrItemBackground[1] = CreateSolidBrush(m_crItemBackground[1]);
+ hbrItemFrame[0] = CreateSolidBrush(m_crItemFrame[0]);
+ hbrItemFrame[1] = CreateSolidBrush(m_crItemFrame[1]);
+ for (int i = 0; i < 3; i++) {
+ hbrPinBackground[i] = CreateSolidBrush(m_crPinBkgnd[i]);
+ }
+
+
+ // gdi+
+ Gdiplus::Graphics graphics(hMemDC);
+ Gdiplus::Pen pen1(Gdiplus::Color(255, 64, 64, 64), 2);
+ Gdiplus::Pen pen2(Gdiplus::Color(255, 255, 127, 39), 2);
+ Gdiplus::SolidBrush brush1(Gdiplus::Color(255, 64, 64, 64));
+ if (m_bUseGdiPlus) {
+ graphics.SetSmoothingMode(Gdiplus::SmoothingModeHighQuality);
+ }
+
+
+ SetBkMode(hMemDC, TRANSPARENT);
+ {
+ RECT rcItem;
+ int nPinState;
+ int nItemCount = (int)m_arItem.GetCount();
+ for (int i = 0; i < nItemCount; i++) {
+ EQITEM* pItem = (EQITEM*)m_arItem.GetAt(i);
+ if (pItem->nFlashFlag == 1) {
+ continue;
+ }
+ GetItemRect(pItem, &rcItem);
+
+
+ // 子项背景和边框
+ if (m_nItemRound == 0) {
+ ::FillRect(hMemDC, &rcItem, pItem->bHighlight ? hbrItemBackground[1] : hbrItemBackground[0]);
+ ::FrameRect(hMemDC, &rcItem, pItem->bHighlight ? hbrItemFrame[1] : hbrItemFrame[0]);
+ }
+ else {
+ HRGN hRgn = CreateRoundRectRgn(rcItem.left, rcItem.top, rcItem.right, rcItem.bottom, m_nItemRound, m_nItemRound);
+ ::FillRgn(hMemDC, hRgn, pItem->bHighlight ? hbrItemBackground[1] : hbrItemBackground[0]);
+ ::FrameRgn(hMemDC, hRgn, pItem->bHighlight ? hbrItemFrame[1] : hbrItemFrame[0], 1, 1);
+ ::DeleteObject(hRgn);
+ }
+
+
+ // name和id
+ HFONT hFontOld = (HFONT)::SelectObject(hMemDC, m_hFontName);
+ ::SetTextColor(hMemDC, pItem->bHighlight ? m_crItemNameText[1] : m_crItemNameText[0]);
+ ::DrawText(hMemDC, pItem->text, (int)strlen(pItem->text), &rcItem, DT_CENTER | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
+
+ if (pItem->nShowType != ITEM_SMALL) {
+ RECT rcId = rcItem;
+ rcId.left += 5;
+ rcId.bottom -= 5;
+ CString strId;
+ strId.Format(_T("ID:%d"), pItem->id);
+ ::SelectObject(hMemDC, m_hFontId);
+ ::SetTextColor(hMemDC, pItem->bHighlight ? m_crItemIdText[1] : m_crItemIdText[0]);
+ ::DrawText(hMemDC, strId, (int)strId.GetLength(), &rcId, DT_LEFT | DT_BOTTOM | DT_SINGLELINE | DT_END_ELLIPSIS);
+ }
+
+
+ // 动画效果不绘pin
+ if (m_pAnimationItem == pItem) {
+ continue;
+ }
+
+
+ // 绘制pin
+ RECT rcPin, rcPin2, rcPinText;
+ CPtrArray *pPins;
+ rcPinText.left = rcItem.left + 8;
+ rcPinText.right = rcItem.right - 8;
+
+
+ // in pins
+ PIN *pPin = NULL;
+ pPins = (CPtrArray *)pItem->pInPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ if (GetInPinRect(pItem, j, &rcPin)) {
+ pPin = (PIN *)pPins->GetAt(j);
+ ::FrameRect(hMemDC, &rcPin, pItem->bHighlight ? hbrItemFrame[1] : hbrItemFrame[0]);
+
+ rcPin2.left = rcPin.left + 1;
+ rcPin2.right = rcPin.right;
+ rcPin2.top = rcPin.top + 1;
+ rcPin2.bottom = rcPin.bottom - 1;
+ nPinState = GetPinState(pPin);
+ ::FillRect(hMemDC, &rcPin2, nPinState == 0 ? (pItem->bHighlight ? hbrItemBackground[1] : hbrItemBackground[0]) : hbrPinBackground[nPinState]);
+
+ if (pItem->nShowType != ITEM_SMALL) {
+ rcPinText.top = rcPin.top - 12;
+ rcPinText.bottom = rcPin.bottom + 12;
+ ::SetTextColor(hMemDC, pItem->bHighlight ? m_crItemIdText[1] : m_crItemIdText[0]);
+ ::DrawText(hMemDC, pPin->text, (int)strlen(pPin->text), &rcPinText, DT_LEFT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
+ }
+ }
+ }
+
+
+ // out pins
+ pPins = (CPtrArray *)pItem->pOutPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ pPin = (PIN *)pPins->GetAt(j);
+ if (GetOutPinRect(pItem, j, &rcPin)) {
+ ::FrameRect(hMemDC, &rcPin, pItem->bHighlight ? hbrItemFrame[1] : hbrItemFrame[0]);
+
+ rcPin2.left = rcPin.left;
+ rcPin2.right = rcPin.right - 1;
+ rcPin2.top = rcPin.top + 1;
+ rcPin2.bottom = rcPin.bottom - 1;
+ nPinState = GetPinState(pPin);
+ ::FillRect(hMemDC, &rcPin2, nPinState == 0 ? (pItem->bHighlight ? hbrItemBackground[1] : hbrItemBackground[0]) : hbrPinBackground[nPinState]);
+
+ if (pItem->nShowType != ITEM_SMALL) {
+ rcPinText.top = rcPin.top - 12;
+ rcPinText.bottom = rcPin.bottom + 12;
+ ::SetTextColor(hMemDC, pItem->bHighlight ? m_crItemIdText[1] : m_crItemIdText[0]);
+ ::DrawText(hMemDC, pPin->text, (int)strlen(pPin->text), &rcPinText, DT_RIGHT | DT_VCENTER | DT_SINGLELINE | DT_END_ELLIPSIS);
+ }
+ }
+ }
+
+ ::DeleteObject(hbrItemFrame);
+ ::SelectObject(hMemDC, hFontOld);
+ }
+
+
+ // 绘制连接线,保存线条在最后绘制
+ for (int i = 0; i < nItemCount; i++) {
+ EQITEM *pItem = (EQITEM*)m_arItem.GetAt(i);
+ if (pItem->nFlashFlag == 1) {
+ continue;
+ }
+
+ PIN *pPin = NULL;
+ CPtrArray *pPins;
+
+ // out pins边线
+ RECT rcItem1, rcItem2;
+ pPins = (CPtrArray *)pItem->pOutPins;
+ for (int j = 0; j < pPins->GetSize(); j++) {
+ pPin = (PIN *)pPins->GetAt(j);
+ if (pPin->pConnectedPin != NULL) {
+ POINT pt1, pt2;
+ if (GetPinPoint(pPin, &pt1) && GetPinPoint(pPin->pConnectedPin, &pt2)) {
+ GetItemRect(pItem, &rcItem1);
+ GetItemRect(pPin->pConnectedPin->pItem, &rcItem2);
+ DrawPinConnectedLine(&graphics, &brush1, pPin == m_pSelLineOutPin ? &pen2 : &pen1,
+ &pt1, &pt2, &rcItem1, &rcItem2, pPin);
+ }
+ }
+ }
+ }
+
+
+ for (int i = 0; i < 3; i++) {
+ ::DeleteObject(hbrPinBackground[i]);
+ }
+ ::DeleteObject(hbrItemBackground[0]);
+ ::DeleteObject(hbrItemBackground[1]);
+ ::DeleteObject(hbrItemFrame[0]);
+ ::DeleteObject(hbrItemFrame[1]);
+ }
+
+
+
+
+ // EndPaint
+ ::BitBlt(hDC, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top,
+ hMemDC, 0, 0, SRCCOPY);
+ EndPaint(m_hWnd, &ps);
+ ::DeleteObject(hBitmap);
+ ::DeleteDC(hMemDC);
+
+
+ return 1;
+}
+
+/*
+ * WM_SIZE
+ */
+LRESULT CEqsGraphWnd::OnSize(WPARAM wParam, LPARAM lParam)
+{
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_SIZE, wParam, lParam);
+
+ CalculateScollbar();
+
+ if (m_hWndMapPos != NULL) {
+ CalculateMapPos();
+
+ CRect rcItem, rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ GetWindowRect(m_hWndMapPos,& rcItem);
+
+ ::MoveWindow(m_hWndMapPos, rcClient.right- rcItem.Width() - MAPPOSWND_PADDING_RIGHT,
+ MAPPOSWND_PADDING_RIGHT, rcItem.Width(), rcItem.Height(), TRUE);
+ }
+
+ return lRet;
+}
+
+/*
+ * WM_VSCROLL
+ */
+LRESULT CEqsGraphWnd::OnVScroll(WPARAM wParam, LPARAM lParam)
+{
+ int nSBCode = LOWORD(wParam);
+ int nPos = HIWORD(wParam);
+
+ SCROLLINFO info = { 0 };
+ info.cbSize = sizeof(SCROLLINFO);
+ info.fMask = SIF_ALL;
+ GetScrollInfo(m_hWnd, SB_VERT, &info);
+
+ int nMaxPos = info.nMax - info.nPage;
+ int inc = 10;
+
+ switch (nSBCode)
+ {
+ case SB_BOTTOM:
+ if (info.nPos < nMaxPos) {
+ // ScrollWindow(m_hWnd, 0, -1 * inc*(iMaxPos - info.nPos), NULL, NULL);
+ info.nPos = nMaxPos;
+ }
+ break;
+
+ case SB_TOP:
+ if (info.nPos > info.nMin) {
+ // ScrollWindow(m_hWnd, 0, inc*(info.nPos - info.nMin), NULL, NULL);
+ info.nPos = info.nMin;
+ }
+ break;
+
+ case SB_LINEUP:
+ if (info.nPos > info.nMin) {
+ //ScrollWindow(m_hWnd, 0, inc, NULL, NULL);
+ info.nPos -= 1;
+ }
+ break;
+
+ case SB_LINEDOWN:
+ if (info.nPos < nMaxPos) {
+ // ScrollWindow(m_hWnd, 0, -1 * inc, NULL, NULL);
+ info.nPos += 1;
+ }
+ break;
+
+ case SB_PAGEUP:
+ if (info.nPos - 100 >= info.nMin) {
+ //ScrollWindow(m_hWnd, 0, 100 * inc, NULL, NULL);
+ info.nPos -= 100;
+ }
+ else {
+ if (info.nPos <= 0) {
+ // ScrollWindow(m_hWnd, 0, 0, NULL, NULL);
+ }
+ else {
+ // ScrollWindow(m_hWnd, 0, info.nPos, NULL, NULL);
+ }
+ info.nPos = info.nMin;
+ }
+ break;
+
+ case SB_PAGEDOWN:
+ if (info.nPos + 100 <= nMaxPos) {
+ // ScrollWindow(m_hWnd, 0, -100*inc, NULL, NULL);
+ info.nPos += 100;
+ }
+ else {
+ // ScrollWindow(m_hWnd, 0, (info.nPos - iMaxPos) * inc, NULL, NULL);
+ info.nPos = nMaxPos;
+ }
+ break;
+
+ case SB_ENDSCROLL:
+ break;
+
+ case SB_THUMBPOSITION:
+ break;
+
+ case SB_THUMBTRACK:
+ // ScrollWindow(m_hWnd, 0, inc * (info.nPos - nPos), NULL, NULL);
+ info.nPos = nPos;
+ break;
+ default:
+ break;
+ }
+
+ m_nOffsetY = info.nPos;
+ SetScrollInfo(m_hWnd, SB_VERT, &info, TRUE);
+ CalculateMapPos();
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_VSCROLL, wParam, lParam);
+ return lRet;
+}
+
+/*
+ * WM_HSCROLL
+ */
+LRESULT CEqsGraphWnd::OnHScroll(WPARAM wParam, LPARAM lParam)
+{
+ int nSBCode = LOWORD(wParam);
+ int nPos = HIWORD(wParam);
+
+ SCROLLINFO info = { 0 };
+ info.cbSize = sizeof(SCROLLINFO);
+ info.fMask = SIF_ALL;
+ GetScrollInfo(m_hWnd, SB_HORZ, &info);
+
+ int nMaxPos = info.nMax - info.nPage;
+ int inc = 10;
+
+ switch (nSBCode)
+ {
+ case SB_RIGHT:
+ if (info.nPos < nMaxPos) {
+ // ScrollWindow(m_hWnd, 0, -1 * inc*(iMaxPos - info.nPos), NULL, NULL);
+ info.nPos = nMaxPos;
+ }
+ break;
+
+ case SB_LEFT:
+ if (info.nPos > info.nMin) {
+ // ScrollWindow(m_hWnd, 0, inc*(info.nPos - info.nMin), NULL, NULL);
+ info.nPos = info.nMin;
+ }
+ break;
+
+ case SB_LINELEFT:
+ if (info.nPos > info.nMin) {
+ //ScrollWindow(m_hWnd, 0, inc, NULL, NULL);
+ info.nPos -= 1;
+ }
+ break;
+
+ case SB_LINERIGHT:
+ if (info.nPos < nMaxPos) {
+ // ScrollWindow(m_hWnd, 0, -1 * inc, NULL, NULL);
+ info.nPos += 1;
+ }
+ break;
+
+ case SB_PAGELEFT:
+ if (info.nPos - 100 >= info.nMin) {
+ //ScrollWindow(m_hWnd, 0, 100 * inc, NULL, NULL);
+ info.nPos -= 100;
+ }
+ else {
+ if (info.nPos <= 0) {
+ // ScrollWindow(m_hWnd, 0, 0, NULL, NULL);
+ }
+ else {
+ // ScrollWindow(m_hWnd, 0, info.nPos, NULL, NULL);
+ }
+ info.nPos = info.nMin;
+ }
+ break;
+
+ case SB_PAGERIGHT:
+ if (info.nPos + 100 <= nMaxPos) {
+ // ScrollWindow(m_hWnd, 0, -100*inc, NULL, NULL);
+ info.nPos += 100;
+ }
+ else {
+ // ScrollWindow(m_hWnd, 0, (info.nPos - iMaxPos) * inc, NULL, NULL);
+ info.nPos = nMaxPos;
+ }
+ break;
+
+ case SB_ENDSCROLL:
+ break;
+
+ case SB_THUMBPOSITION:
+ break;
+
+ case SB_THUMBTRACK:
+ // ScrollWindow(m_hWnd, 0, inc * (info.nPos - nPos), NULL, NULL);
+ info.nPos = nPos;
+ break;
+ default:
+ break;
+ }
+
+ m_nOffsetX = info.nPos;
+ SetScrollInfo(m_hWnd, SB_HORZ, &info, TRUE);
+ CalculateMapPos();
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_HSCROLL, wParam, lParam);
+ return lRet;
+}
+
+/*
+ * WM_NOTIFY
+ */
+LRESULT CEqsGraphWnd::OnNitify(WPARAM wParam, LPARAM lParam)
+{
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_NOTIFY, wParam, lParam);
+
+ NMHDR *pNmhdr = (NMHDR *)lParam;
+ if (pNmhdr->idFrom == MAPPOSWND_ID) {
+ MAPPOSWND_NMHDR *pNmhdr2 = (MAPPOSWND_NMHDR *)lParam;
+ m_nOffsetX = pNmhdr2->dwData;
+ m_nOffsetY = pNmhdr2->dwData1;
+ CalculateScollbar();
+ CalculateMapPos();
+
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+
+ return lRet;
+}
+
+
+/*
+ * 设置背景颜色
+ * color -- 背景色
+ */
+void CEqsGraphWnd::SetBkgndColor(COLORREF color)
+{
+ m_crBkgnd = color;
+}
+
+/*
+ * 边框颜色
+ * color -- 边框色
+ */
+void CEqsGraphWnd::SetFrameColor(COLORREF color)
+{
+ m_crFrame = color;
+}
+
+void CEqsGraphWnd::FlashItem(EQITEM *pItem)
+{
+ if (m_pFlashItem != NULL) {
+ KillTimer(m_hWnd, TIMER_FLASH);
+ }
+
+ m_nFlashCount = 5;
+ m_pFlashItem = pItem;
+ SetTimer(m_hWnd, TIMER_FLASH, 100, NULL);
+}
+
+void CEqsGraphWnd::AnimationItem(EQITEM* pItem)
+{
+ if (m_pAnimationItem != NULL) {
+ KillTimer(m_hWnd, TIMER_ANIMATION_RECT);
+ }
+
+
+ m_pAnimationItem = NULL;
+ KillTimer(m_hWnd, TIMER_ANIMATION_RECT);
+
+ UINT uElpase = 50;
+ m_nAninationDuration = 200;
+ m_nAninationStep = m_nAninationDuration / uElpase;
+ m_pAnimationItem = pItem;
+ m_rcAnimation.left = pItem->rect.left + (pItem->rect.right - pItem->rect.left) / 2.0f;
+ m_rcAnimation.right = m_rcAnimation.left;
+ m_rcAnimation.top = pItem->rect.top + (pItem->rect.bottom - pItem->rect.top) / 2.0f;
+ m_rcAnimation.bottom = m_rcAnimation.top;
+ m_rcAninationStep.left = (pItem->rect.left - m_rcAnimation.left) / (float)m_nAninationStep;
+ m_rcAninationStep.right = (pItem->rect.right - m_rcAnimation.right) / (float)m_nAninationStep;
+ m_rcAninationStep.top = (pItem->rect.top - m_rcAnimation.top) / (float)m_nAninationStep;
+ m_rcAninationStep.bottom = (pItem->rect.bottom - m_rcAnimation.bottom) / (float)m_nAninationStep;
+
+ SetTimer(m_hWnd, TIMER_ANIMATION_RECT, uElpase, NULL);
+}
+
+double CEqsGraphWnd::PointToSegDist(double x, double y, double x1, double y1, double x2, double y2)
+{
+ double cross = (x2 - x1) * (x - x1) + (y2 - y1) * (y - y1);
+ if (cross <= 0) return sqrt((x - x1) * (x - x1) + (y - y1) * (y - y1));
+
+ double d2 = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
+ if (cross >= d2) return sqrt((x - x2) * (x - x2) + (y - y2) * (y - y2));
+
+ double r = cross / d2;
+ double px = x1 + (x2 - x1) * r;
+ double py = y1 + (y2 - y1) * r;
+ return sqrt((x - px) * (x - px) + (py - y) * (py - y));
+}
+
diff --git a/SourceCode/Bond/Servo/EqsGraphWnd.h b/SourceCode/Bond/Servo/EqsGraphWnd.h
new file mode 100644
index 0000000..1c4ff41
--- /dev/null
+++ b/SourceCode/Bond/Servo/EqsGraphWnd.h
@@ -0,0 +1,235 @@
+#pragma once
+#include <functional>
+
+
+#ifndef EQSGRAPHWND_TAG
+
+#ifdef _WIN32
+
+#define EQSGRAPHWND_CLASSA "EqsGraphWnd"
+#define EQSGRAPHWND_CLASSW L"EqsGraphWnd"
+
+#ifdef UNICODE
+#define EQSGRAPHWND_CLASS EQSGRAPHWND_CLASSW
+#else
+#define EQSGRAPHWND_CLASS EQSGRAPHWND_CLASSA
+#endif
+
+#else
+#define EQSGRAPHWND_CLASS "EqsGraphWnd"
+#endif
+
+
+#define EQSGRAPHWND_TAG _T("EQSGRAPHWND_TAG")
+
+#define EQSGRAPHWND_FIRST (0U-2890U)
+#define EQSGRAPHWND_LAST (0U-2850U)
+#define EQSGRAPHWND_ (EQSGRAPHWND_FIRST - 1)
+
+
+#ifndef MIN
+#define MIN(X,Y) (((X)>(Y))?(Y):(X))
+#endif
+
+#ifndef MAX
+#define MAX(X,Y) (((X)>(Y))?(X):(Y))
+#endif
+
+typedef struct tagEQSGRAPHWND_NMHDR
+{
+ NMHDR nmhdr;
+ DWORD dwData;
+ DWORD dwData1;
+ DWORD dwData2;
+} EQSGRAPHWND_NMHDR;
+
+typedef struct tagEQITEM
+{
+ unsigned int id;
+ RECT rect;
+ char text[64];
+ BOOL bHighlight;
+ int nShowType;
+ DWORD_PTR pData;
+ DWORD_PTR pInPins;
+ DWORD_PTR pOutPins;
+ int nFlashFlag;
+} EQITEM;
+
+typedef struct tagPIN
+{
+ int nIndex;
+ int nType;
+ char text[64];
+ BOOL bHighlight;
+ EQITEM* pItem;
+ tagPIN *pConnectedPin;
+ POINT ptConnectedLine[6];
+ int nLinePtCount;
+ DWORD_PTR pData;
+} PIN;
+
+#define ITEM_NORMAL 0
+#define ITEM_SMALL 1
+#define ITEM_LARGE 2
+
+#endif
+
+typedef std::function<bool(PIN *pPin1, PIN *pPin2)> ONCONNECTPIN;
+typedef std::function<bool(PIN *pPin)> ONDISCONNECTPIN;
+typedef std::function<bool(EQITEM* pItem)> ONDELETEEQITEM;
+typedef std::function<void(EQITEM* pItem, int x, int y)> ONEQITEMPOSCHANGED;
+
+typedef struct _EqsGraphListener
+{
+ ONCONNECTPIN onConnectPin;
+ ONCONNECTPIN onCheckConnectPin;
+ ONDISCONNECTPIN onDisconnectPin;
+ ONDELETEEQITEM onDeleteEqItem;
+ ONEQITEMPOSCHANGED onEqItemPosChanged;
+ ONDELETEEQITEM onDblckEqItem;
+ ONDELETEEQITEM onRclickEqItem;
+} EqsGraphListener;
+
+class CEqsGraphWnd
+{
+ typedef struct tagRECTF
+ {
+ float left;
+ float top;
+ float right;
+ float bottom;
+ } RECTF;
+
+public:
+ CEqsGraphWnd();
+ ~CEqsGraphWnd();
+
+public:
+ static BOOL RegisterWndClass();
+ static CEqsGraphWnd* FromHandle(HWND hWnd);
+ void SetFrameColor(COLORREF color);
+ void SetBkgndColor(COLORREF color);
+
+public:
+ void EnableScroll(BOOL bEnable);
+ void EnableMultiSelect();
+ void SetItemRound(int nRound);
+ void SetDefaultItemBackgroundColor(COLORREF crNormal, COLORREF crSel);
+ void SetDefaultItemFrameColor(COLORREF crNormal, COLORREF crSel);
+ void SetDefaultItemTextColor(COLORREF crNormal, COLORREF crSel);
+ void SetOnListener(EqsGraphListener& listener);
+ BOOL SetCurSel(int nSel);
+ BOOL SetCurSel(CString strItemName);
+ BOOL SetCurSel(DWORD_PTR pData);
+ EQITEM * AddItem(int id, CString strText, DWORD_PTR dwData, int nType = ITEM_NORMAL);
+ void RemoveItem(EQITEM* pItem);
+ PIN * AddPin(EQITEM* pItem, int nType, CString strName, DWORD_PTR dwData);
+ int DeleteItem(EQITEM* pItem);
+ void DeleteAllItems();
+ void SetItemSelectState(int nIndex, BOOL bSelect);
+ void SetCurrentItem(EQITEM* pItem);
+ BOOL GetItemRect(EQITEM* pItem, LPRECT lpRect);
+ BOOL GetItemWarperRect(EQITEM* pItem, LPRECT lpRect);
+ BOOL GetInPinRect(EQITEM* pItem, int nPinIndex, LPRECT lpRect);
+ BOOL GetOutPinRect(EQITEM* pItem, int nPinIndex, LPRECT lpRect);
+ BOOL GetPinPoint(PIN *pPin, LPPOINT lpPoint);
+ EQITEM* GetItem(DWORD_PTR dwData);
+ PIN * GetPin(DWORD_PTR dwItemData, DWORD_PTR dwPinData);
+ int ConnectPin(DWORD_PTR dwItem1Data, DWORD_PTR dwPin1Data, DWORD_PTR dwItem2Data, DWORD_PTR dwPin2Data);
+ void SetItemText(EQITEM* pItem, CString strText);
+ void SetItemType(EQITEM* pItem, int type);
+ void SetItemPos(EQITEM* pItem, int x, int y);
+ void FlashItem(EQITEM* pItem);
+ void AnimationItem(EQITEM*pItem);
+
+private:
+ void Init();
+ void InitFont();
+ void Notify(int nCode, int dwData, int dwData1 = 0, int dwData2 = 0);
+ void Release();
+ void ReleaseItem(EQITEM* pItem);
+ void ReleaseAllItems();
+ void CalculateScollbar();
+ void CalculateMapPos();
+ void CalculateMagneticLine(EQITEM* pItem, LPRECT lprcItemRect, int &hoz, int &ver);
+ int HighTest(POINT pt, OUT EQITEM*& pItem, OUT PIN *& pPin);
+ int GetPinState(PIN *pPin);
+ void ClearConnectedLinePoint(EQITEM*& pItem);
+ void DrawMagneticLine(LPRECT lprcClient, int nHozLine1, int nHozLine2, int nVerLine1, int nVerLine2);
+ void DrawArrow(Gdiplus::Graphics *pGraphics, Gdiplus::Brush* pBrush, Gdiplus::Pen *pPen,
+ int x, int y, int nArrowLen);
+ void DrawDropItemRectangle(LPRECT lpRect1, LPRECT lpRect2);
+ void DrawPinConnectedLine(Gdiplus::Graphics *pGraphics, Gdiplus::Brush *pBrush, Gdiplus::Pen *pPen, LPPOINT lpPt1, LPPOINT lpPt2,
+ LPRECT lpRect1, LPRECT lpRect2, PIN *pOwnerPin);
+ void DrawPinWillConnectLine(COLORREF color, LPPOINT lpPt1, LPPOINT lpPt2);
+ double PointToSegDist(double x, double y, double x1, double y1, double x2, double y2);
+ static CEqsGraphWnd* Hook(HWND hWnd);
+ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ static LRESULT OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
+ LRESULT OnDestroy(WPARAM wParam, LPARAM lParam);
+ LRESULT OnTimer(WPARAM wParam, LPARAM lParam);
+ LRESULT OnNcPaint(WPARAM wParam, LPARAM lParam);
+ LRESULT OnPaint(WPARAM wParam, LPARAM lParam);
+ LRESULT OnMouseMove(WPARAM wParam, LPARAM lParam);
+ LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam);
+ LRESULT OnRButtonDown(WPARAM wParam, LPARAM lParam);
+ LRESULT OnLButtonDblclk(WPARAM wParam, LPARAM lParam);
+ LRESULT OnMouseWheel(WPARAM wParam, LPARAM lParam);
+ LRESULT OnMouseHWheel(WPARAM wParam, LPARAM lParam);
+ LRESULT OnKeyDown(WPARAM wParam, LPARAM lParam);
+ LRESULT OnSize(WPARAM wParam, LPARAM lParam);
+ LRESULT OnVScroll(WPARAM wParam, LPARAM lParam);
+ LRESULT OnHScroll(WPARAM wParam, LPARAM lParam);
+ LRESULT OnNitify(WPARAM wParam, LPARAM lParam);
+
+private:
+ EQITEM* m_pCurItem;
+ int m_nFlashCount;
+ EQITEM* m_pFlashItem;
+ EQITEM* m_pAnimationItem;
+ PIN * m_pCurPin;
+ PIN * m_pSelLineOutPin; // 选中的连线的两个pin中的out pin
+
+private:
+ HWND m_hWnd;
+ COLORREF m_crBkgnd;
+ COLORREF m_crFrame;
+ HFONT m_hFontTitle;
+
+private:
+ BOOL m_bUseGdiPlus; // 使用GDI+绘图?
+ COLORREF m_crItemBackground[2]; // item的颜色,normal, active
+ COLORREF m_crItemFrame[2]; // item的边框,normal, active
+ COLORREF m_crItemNameText[2];
+ COLORREF m_crItemIdText[2];
+ COLORREF m_crPinBkgnd[3]; // pin的颜色,normal, active, enable connect
+ int m_nCurSel;
+ EqsGraphListener m_listener;
+ CPtrArray m_arItem;
+ BOOL m_bMultiSelect;
+ int m_nItemRound;
+
+private:
+ int m_nStageCx; // 画布大小
+ int m_nStageCy;
+ int m_nOffsetX;
+ int m_nOffsetY;
+
+ // 动画
+ RECTF m_rcAnimation;
+ RECTF m_rcAninationStep;
+ int m_nAninationStep;
+ int m_nAninationDuration; // ms
+
+ // 字体
+ HFONT m_hFontName;
+ HFONT m_hFontId;
+
+private:
+ HWND m_hWndMapPos;
+ BOOL m_bEnableScroll;
+ int m_nMagneticLinHoz;
+ int m_nMagneticLinVer;
+};
+
diff --git a/SourceCode/Bond/Servo/HmTab.cpp b/SourceCode/Bond/Servo/HmTab.cpp
new file mode 100644
index 0000000..29e13c9
--- /dev/null
+++ b/SourceCode/Bond/Servo/HmTab.cpp
@@ -0,0 +1,529 @@
+// HmTab.cpp: implementation of the CHmTab class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#include "stdafx.h"
+#include "HmTab.h"
+
+#ifdef _DEBUG
+#undef THIS_FILE
+static char THIS_FILE[]=__FILE__;
+#define new DEBUG_NEW
+#endif
+
+//////////////////////////////////////////////////////////////////////
+// Construction/Destruction
+//////////////////////////////////////////////////////////////////////
+
+CHmTab::CHmTab()
+{
+ m_hWnd = NULL;
+ m_crBkgnd = RGB(250, 250, 255);
+ m_nPaddingLeft = 28;
+ m_nPaddingBottom = 12;
+ m_nItemMarginLeft = 8;
+ m_crText[0] = RGB(88, 88, 88);
+ m_crText[1] = RGB(18, 18, 18);
+ m_pPressItem = nullptr;
+ m_pHighItem = nullptr;
+
+ LOGBRUSH lb;
+ lb.lbColor = RGB(225, 127, 39);
+ lb.lbHatch = 0;
+ lb.lbStyle = BS_SOLID;
+ DWORD iStyle = PS_GEOMETRIC | PS_SOLID | PS_ENDCAP_SQUARE | PS_JOIN_MITER;
+ m_hPenUnder[0] = ExtCreatePen(iStyle, 3, &lb, 0, NULL);
+ lb.lbColor = RGB(225, 127, 39);
+ m_hPenUnder[1] = ExtCreatePen(iStyle, 2, &lb, 0, NULL);
+ lb.lbColor = RGB(223, 226, 230);
+ m_hPenUnderWnd = ExtCreatePen(iStyle, 1, &lb, 0, NULL);
+ m_nCurSel = 0;
+}
+
+CHmTab::~CHmTab()
+{
+ if (m_hPenUnder[0] != nullptr) {
+ ::DeleteObject(m_hPenUnder[0]);
+ }
+ if (m_hPenUnder[1] != nullptr) {
+ ::DeleteObject(m_hPenUnder[1]);
+ }
+
+ if (m_hPenUnderWnd != nullptr) {
+ ::DeleteObject(m_hPenUnderWnd);
+ }
+}
+
+BOOL CHmTab::RegisterWndClass()
+{
+ WNDCLASS wc;
+ wc.lpszClassName = BYHMTAB_CLASS;
+ wc.hInstance = AfxGetInstanceHandle();
+ wc.lpfnWndProc = WindowProc;
+ wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
+ wc.hIcon = 0;
+ wc.lpszMenuName = NULL;
+ wc.hbrBackground = NULL;
+ wc.style = CS_GLOBALCLASS|CS_DBLCLKS;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+
+ // 注册自定义类
+ return (::RegisterClass(&wc) != 0);
+}
+
+CHmTab* CHmTab::Hook(HWND hWnd)
+{
+ CHmTab* pHmTab = (CHmTab*)GetProp(hWnd, BYSTAG_HMTAB);
+ if(pHmTab == NULL)
+ {
+ pHmTab = new CHmTab;
+ pHmTab->m_hWnd = hWnd;
+
+ SetProp(hWnd, BYSTAG_HMTAB, (HANDLE)pHmTab);
+ }
+
+ return pHmTab;
+}
+
+void CHmTab::Release()
+{
+ // delete
+ delete this;
+}
+
+void CHmTab::SetPaddingLeft(int value)
+{
+ m_nPaddingLeft = value;
+}
+
+void CHmTab::SetItemMarginLeft(int value)
+{
+ m_nItemMarginLeft = value;
+}
+
+void CHmTab::SetTextColor(COLORREF color1, COLORREF color2)
+{
+ m_crText[0] = color1;
+ m_crText[1] = color2;
+ InvalidateRect(m_hWnd, NULL, TRUE);
+}
+
+int CHmTab::AddItem(const char* pszText,BOOL bUpdate/* = TRUE*/)
+{
+ HMTABITEM item;
+ memset(&item, 0, sizeof(HMTABITEM));
+ strcpy_s(item.szText, MHITEM_TEXT_MAX, pszText);
+ m_items.push_back(item);
+
+ if (bUpdate) {
+ InvalidateRect(m_hWnd, NULL, TRUE);
+ }
+
+ return 0;
+}
+
+int CHmTab::DeleteItem(const char* pszText, BOOL bUpdate/* = TRUE*/)
+{
+ for (auto iter = m_items.begin(); iter != m_items.end(); iter++) {
+ if (strcmp((*iter).szText, pszText) == 0) {
+ m_items.erase(iter);
+ break;
+ }
+ }
+
+ if (bUpdate) {
+ InvalidateRect(m_hWnd, NULL, TRUE);
+ }
+
+ return 0;
+}
+
+void CHmTab::Notify(int nCode, DWORD_PTR dwData, DWORD_PTR dwData1/* = 0*/, DWORD_PTR dwData2/* = 0*/)
+{
+ HWND hParent;
+ hParent = GetParent(m_hWnd);
+ if (hParent != NULL) {
+ BYHMTAB_NMHDR iii_nmhdr;
+ iii_nmhdr.nmhdr.hwndFrom = m_hWnd;
+ iii_nmhdr.nmhdr.idFrom = GetWindowLong(m_hWnd, GWL_ID);
+ iii_nmhdr.nmhdr.code = nCode;
+ iii_nmhdr.dwData = dwData;
+ iii_nmhdr.dwData1 = dwData1;
+ iii_nmhdr.dwData2 = dwData2;
+ SendMessage(hParent, WM_NOTIFY, (WPARAM)iii_nmhdr.nmhdr.idFrom, (LPARAM)&iii_nmhdr);
+ }
+}
+
+////////////////////////////////
+// 拦截窗口消息函数
+LRESULT CALLBACK CHmTab::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ CHmTab* pHmTab = (CHmTab *)GetProp(hWnd, BYSTAG_HMTAB);
+ if(pHmTab == NULL && uMsg != WM_NCCREATE)
+ {
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
+ }
+
+
+ // 如果Hook则响应消息
+ ASSERT(hWnd);
+ switch(uMsg)
+ {
+ case WM_NCCREATE:
+ return OnNcCreate(hWnd, wParam, lParam);
+
+ case WM_DESTROY:
+ return pHmTab->OnDestroy(wParam, lParam);
+
+ case WM_PAINT:
+ return pHmTab->OnPaint(wParam, lParam);
+
+ case WM_TIMER:
+ return pHmTab->OnTimer(wParam, lParam);
+
+ case WM_MOUSEMOVE:
+ return pHmTab->OnMouseMove(wParam, lParam);
+
+ case WM_LBUTTONDOWN:
+ return pHmTab->OnLButtonDown(wParam, lParam);
+
+ case WM_SETCURSOR:
+ return pHmTab->OnSetCursor(wParam, lParam);
+
+ case WM_SIZE:
+ return pHmTab->OnSize(wParam, lParam);
+
+ case WM_GETDLGCODE:
+ return DLGC_WANTALLKEYS;
+
+ default:
+ break;
+ }
+
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
+}
+
+///////////////////////////////
+// WM_NCCREATE
+// 窗口创建前的初始化工作
+LRESULT CHmTab::OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
+{
+ CHmTab* pHmTab = (CHmTab *)GetProp(hWnd, BYSTAG_HMTAB);
+ ASSERT(pHmTab == NULL);
+
+ Hook(hWnd);
+ return ::DefWindowProc(hWnd, WM_NCCREATE, wParam, lParam);
+}
+
+///////////////////////////////
+// WM_DESTROY
+LRESULT CHmTab::OnDestroy(WPARAM wParam, LPARAM lParam)
+{
+ Release();
+ return ::DefWindowProc(m_hWnd, WM_DESTROY, wParam, lParam);
+}
+
+///////////////////////////////
+// WM_TIMER
+LRESULT CHmTab::OnTimer(WPARAM wParam, LPARAM lParam)
+{
+ if (wParam == 1) {
+ POINT pt;
+ GetCursorPos(&pt);
+ ::ScreenToClient(m_hWnd, &pt);
+
+ HMTABITEM* pLastHighItem = m_pHighItem;
+ HighTest(pt, m_pHighItem, nullptr);
+ if (m_pHighItem != pLastHighItem) {
+ ::InvalidateRect(m_hWnd, NULL, TRUE);
+ }
+
+ if (m_pHighItem == nullptr) {
+ ::KillTimer(m_hWnd, 1);
+ }
+ }
+
+ return ::DefWindowProc(m_hWnd, WM_TIMER, wParam, lParam);
+}
+
+///////////////////////////////
+// WM_MOUSEMOVE
+LRESULT CHmTab::OnMouseMove(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ HMTABITEM* pLastHighItem = m_pHighItem;
+ int nHitCode = HighTest(pt, m_pHighItem, nullptr);
+ if (m_pHighItem != pLastHighItem) {
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+ if (m_pHighItem != NULL) {
+ ::KillTimer(m_hWnd, 1);
+ ::SetTimer(m_hWnd, 1, 100, NULL);
+ }
+
+ ::SetProp(m_hWnd, HMTAB_HITCODETEST, (HANDLE)(__int64)nHitCode);
+ return ::DefWindowProc(m_hWnd, WM_MOUSEMOVE, wParam, lParam);
+}
+
+/*
+ * WM_LBUTTONDOWN
+ * 鼠标左键按下
+ */
+LRESULT CHmTab::OnLButtonDown(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt, ptNew;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ BOOL bButtonUp = FALSE;
+ int nClickIndex = -1;
+ HighTest(pt, m_pPressItem, &nClickIndex);
+ if (m_pPressItem != NULL) {
+ m_pHighItem = NULL;
+ ::InvalidateRect(m_hWnd, NULL, TRUE);
+ }
+
+
+ // 捕捉鼠标消息,检测是否拖动
+ HMTABITEM* pPressItem = NULL;
+ if (m_pPressItem != NULL) {
+ ::KillTimer(m_hWnd, 1);
+ if (::GetCapture() == NULL) {
+ SetCapture(m_hWnd);
+ ASSERT(m_hWnd == GetCapture());
+ AfxLockTempMaps();
+ for (;;)
+ {
+ MSG msg;
+ VERIFY(::GetMessage(&msg, NULL, 0, 0));
+
+ if (GetCapture() != m_hWnd) break;
+
+ switch (msg.message)
+ {
+ case WM_MOUSEMOVE:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ HighTest(ptNew, pPressItem, &nClickIndex);
+ if (pPressItem != m_pPressItem) {
+ m_pPressItem = nullptr;
+ ::InvalidateRect(m_hWnd, NULL, TRUE);
+ }
+ break;
+
+ case WM_LBUTTONUP:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ HighTest(ptNew, pPressItem, &nClickIndex);
+ if (m_pPressItem != nullptr && pPressItem == m_pPressItem) {
+ m_nCurSel = nClickIndex;
+ bButtonUp = TRUE;
+ }
+ goto ExitLoop;
+
+ case WM_KEYDOWN:
+ if (msg.wParam == VK_ESCAPE) {
+ goto ExitLoop;
+ }
+ break;
+
+ default:
+ DispatchMessage(&msg);
+ break;
+ }
+ }
+
+ ExitLoop:
+ m_pPressItem = NULL;
+ ReleaseCapture();
+ ::InvalidateRect(m_hWnd, NULL, TRUE);
+
+ if (bButtonUp) {
+ Notify((int)BYHMTAB_SEL_CHANGED, m_nCurSel);
+ }
+
+ AfxUnlockTempMaps(FALSE);
+ }
+ }
+
+
+ return ::DefWindowProc(m_hWnd, WM_LBUTTONDOWN, wParam, lParam);
+}
+
+///////////////////////////////
+// WM_SETCURSOR
+LRESULT CHmTab::OnSetCursor(WPARAM wParam, LPARAM lParam)
+{
+ int nHitCode = (int)(__int64)GetProp(m_hWnd, HMTAB_HITCODETEST);
+ switch (nHitCode)
+ {
+ case HMTAB_HT_NOWHERE:
+ case HMTAB_HT_ITEM:
+ SetCursor(::LoadCursor(NULL, IDC_ARROW));
+ return TRUE;
+
+ case HMTAB_HT_HIGT_ITEM:
+ SetCursor(::LoadCursor(NULL, IDC_HAND));
+ return TRUE;
+
+ default:
+ break;
+ }
+
+ return ::DefWindowProc(m_hWnd, WM_SETCURSOR, wParam, lParam);
+}
+
+/*
+ * WM_SIZE
+ */
+LRESULT CHmTab::OnSize(WPARAM wParam, LPARAM lParam)
+{
+ ::InvalidateRect(m_hWnd, NULL, TRUE);
+ return ::DefWindowProc(m_hWnd, WM_SIZE, wParam, lParam);
+}
+
+///////////////////////////////
+// WM_PAINT
+LRESULT CHmTab::OnPaint(WPARAM wParam, LPARAM lParam)
+{
+ HDC hDC, hMemDC;
+ HBITMAP hBitmap;
+ RECT rcClient;
+ CString strText;
+ HFONT hFont1, hFont2;
+ HBRUSH hBrushBK;
+
+
+ // BeginPaint
+ PAINTSTRUCT ps;
+ hDC = BeginPaint(m_hWnd, &ps);
+ GetClientRect(m_hWnd, &rcClient);
+
+ hMemDC = ::CreateCompatibleDC(hDC);
+ hBitmap = ::CreateCompatibleBitmap(hDC, rcClient.right - rcClient.left,
+ rcClient.bottom - rcClient.top);
+ ::SelectObject(hMemDC, hBitmap);
+ ::SetBkMode(hMemDC, TRANSPARENT);
+
+
+ HFONT hFontDefault = (HFONT)GetStockObject(DEFAULT_GUI_FONT);
+ CFont* pFont = CFont::FromHandle(hFontDefault);
+ LOGFONT lf;
+ pFont->GetLogFont(&lf);
+ hFont1 = ::CreateFontIndirect(&lf);
+ lf.lfHeight -= 5;
+ hFont2 = ::CreateFontIndirect(&lf);
+
+
+ // 背景颜色
+ hBrushBK = CreateSolidBrush(m_crBkgnd);
+ ::FillRect(hMemDC, &rcClient, hBrushBK);
+ DeleteObject(hBrushBK);
+
+
+ SelectObject(hMemDC, m_hPenUnderWnd);
+ ::MoveToEx(hMemDC, rcClient.left, rcClient.bottom - 2, NULL);
+ ::LineTo(hMemDC, rcClient.right, rcClient.bottom - 2);
+
+
+
+ // 绘制子项
+ SIZE sizeItem;
+ RECT rcItem, rcText;
+ rcItem.top = rcClient.top;
+ rcItem.bottom = rcClient.bottom-1;
+ rcItem.left = m_nPaddingLeft;
+ int index = 0;
+ for (int i = 0; i < m_items.size(); i++) {
+ auto& item = m_items.at(i);
+ ::SelectObject(hMemDC, i == m_nCurSel ? hFont2 : hFont1);
+ ::SetTextColor(hMemDC, i == m_nCurSel ? m_crText[1] : m_crText[0]);
+ ::GetTextExtentPoint32(hMemDC, item.szText, (int)strlen(item.szText), &sizeItem);
+ rcItem.left += m_nItemMarginLeft;
+ rcItem.right = rcItem.left + (int)sizeItem.cx;
+
+ ::CopyRect(&rcText, &rcItem);
+ rcText.bottom -= m_nPaddingBottom;
+ ::DrawText(hMemDC, item.szText, (int)strlen(item.szText), &rcText,
+ DT_LEFT | DT_BOTTOM | DT_SINGLELINE | DT_END_ELLIPSIS);
+ ::CopyRect(&item.rect, &rcItem);
+
+
+ // 下划线?
+ if (i == m_nCurSel || &item == m_pHighItem) {
+ HPEN hOldPen = (HPEN)::SelectObject(hMemDC, i == m_nCurSel ? m_hPenUnder[0] : m_hPenUnder[1]);
+ ::MoveToEx(hMemDC, item.rect.left, item.rect.bottom - 3, NULL);
+ ::LineTo(hMemDC, item.rect.right, item.rect.bottom - 3);
+ ::SelectObject(hMemDC, hOldPen);
+ }
+
+
+ index++;
+ rcItem.left = rcItem.right;
+ }
+ ::DeleteObject(hFont1);
+ ::DeleteObject(hFont2);
+
+
+ // EndPaint
+ ::BitBlt(hDC, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top,
+ hMemDC, 0, 0, SRCCOPY);
+ EndPaint(m_hWnd, &ps);
+ ::DeleteObject(hBitmap);
+ ::DeleteDC(hMemDC);
+
+
+ return 1;
+}
+
+void CHmTab::SetBkgndColor(COLORREF cr)
+{
+ m_crBkgnd = cr;
+}
+
+/*
+ * 检测坐标点所在的项
+ * 返回, TYGTLITEM
+ */
+int CHmTab::HighTest(POINT pt, OUT HMTABITEM*& pItem, int* pnIndex)
+{
+ // 检测是否在某个子项
+ int nRet = HMTAB_HT_NOWHERE;
+ pItem = NULL;
+ for (int i = 0; i < m_items.size(); i++) {
+ auto& item = m_items.at(i);
+ if (::PtInRect(&item.rect, pt)) {
+ pItem = &item;
+ nRet = pItem == m_pHighItem ? HMTAB_HT_HIGT_ITEM : HMTAB_HT_ITEM;
+ if (pnIndex != nullptr) *pnIndex = i;
+ break;
+ }
+ }
+
+
+ return nRet;
+}
+
+int CHmTab::GetCurSel()
+{
+ return m_nCurSel;
+}
+
+void CHmTab::SetCurSel(int index)
+{
+ if (0 <= index && index <= m_items.size()) {
+ m_nCurSel = index;
+ InvalidateRect(m_hWnd, NULL, TRUE);
+ }
+}
+
+int CHmTab::GetItemCount()
+{
+ return (int)m_items.size();
+}
diff --git a/SourceCode/Bond/Servo/HmTab.h b/SourceCode/Bond/Servo/HmTab.h
new file mode 100644
index 0000000..600b5b1
--- /dev/null
+++ b/SourceCode/Bond/Servo/HmTab.h
@@ -0,0 +1,130 @@
+// HmTab.h: interface for the CHmTab class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(AFX_HMTAB_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_)
+#define AFX_HMTAB_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_
+
+
+#pragma comment(lib, "Msimg32.lib") // TransparentBlt
+#include <vector>
+
+
+
+//====== HmTab =====================================================
+
+#ifndef NOHMTAB
+
+#ifdef _WIN32
+
+#define BYHMTAB_CLASSA "BYHmTab"
+#define BYHMTAB_CLASSW L"BYHmTab"
+
+#ifdef UNICODE
+#define BYHMTAB_CLASS BYHMTAB_CLASSW
+#else
+#define BYHMTAB_CLASS BYHMTAB_CLASSA
+#endif
+
+#else
+#define BYHMTAB_CLASS "BYHmTab"
+#endif
+
+
+#define BYSTAG_HMTAB _T("ISHMTAB")
+
+
+//====== WM_NOTIFY codes (NMHDR.code values) ==================================
+#define BYHMTAB_FIRST (0U-1190U) //
+#define BYHMTAB_LAST (0U-1150U)
+#define BYHMTAB_SEL_CHANGED (BYHMTAB_FIRST - 1)
+
+
+
+
+typedef struct tagBYHMTAB_NMHDR
+{
+ NMHDR nmhdr;
+ DWORD_PTR dwData;
+ DWORD_PTR dwData1;
+ DWORD_PTR dwData2;
+} BYHMTAB_NMHDR;
+
+#define MHITEM_TEXT_MAX 64
+
+typedef struct tagHMTABITEM
+{
+ int id;
+ char szText[MHITEM_TEXT_MAX];
+ RECT rect;
+} HMTABITEM;
+
+#define HMTAB_HITCODETEST _T("HitCode")
+#define HMTAB_HT_NOWHERE 0x1
+#define HMTAB_HT_ITEM 0x2
+#define HMTAB_HT_HIGT_ITEM 0x4
+
+
+#endif
+
+
+
+
+#if _MSC_VER > 1000
+#pragma once
+#endif // _MSC_VER > 1000
+
+
+class CHmTab
+{
+public:
+ CHmTab();
+ virtual ~CHmTab();
+
+public:
+ static BOOL RegisterWndClass();
+ static CHmTab* Hook(HWND hWnd);
+ void Notify(int nCode, DWORD_PTR dwData, DWORD_PTR dwData1 = 0, DWORD_PTR dwData2 = 0);
+ void Release();
+ void SetBkgndColor(COLORREF cr);
+ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ static LRESULT OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
+ LRESULT OnDestroy(WPARAM wParam, LPARAM lParam);
+ LRESULT OnTimer(WPARAM wParam, LPARAM lParam);
+ LRESULT OnPaint(WPARAM wParam, LPARAM lParam);
+ LRESULT OnSetCursor(WPARAM wParam, LPARAM lParam);
+ LRESULT OnSize(WPARAM wParam, LPARAM lParam);
+ LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam);
+ LRESULT OnMouseMove(WPARAM wParam, LPARAM lParam);
+
+
+public:
+ void SetPaddingLeft(int value);
+ void SetItemMarginLeft(int value);
+ void SetTextColor(COLORREF color1, COLORREF color2);
+ int AddItem(const char* pszText, BOOL bUpdate = TRUE);
+ int DeleteItem(const char* pszText, BOOL bUpdate = TRUE);
+ int HighTest(POINT pt, OUT HMTABITEM*& pItem, int* pnIndex);
+ int GetCurSel();
+ void SetCurSel(int index);
+ int GetItemCount();
+
+
+private:
+ HWND m_hWnd;
+ COLORREF m_crBkgnd;
+
+private:
+ int m_nCurSel;
+ std::vector< HMTABITEM > m_items;
+ HMTABITEM* m_pHighItem;
+ HMTABITEM* m_pPressItem;
+ int m_nPaddingLeft;
+ int m_nPaddingBottom;
+ int m_nItemMarginLeft;
+ COLORREF m_crText[2];
+ HPEN m_hPenUnder[2];
+ HPEN m_hPenUnderWnd;
+};
+
+#endif // !defined(AFX_HMTAB_H__FBB8916A_DE77_4EA3_9C21_E51E6B06194C__INCLUDED_)
diff --git a/SourceCode/Bond/Servo/Intent.cpp b/SourceCode/Bond/Servo/Intent.cpp
new file mode 100644
index 0000000..66603b6
--- /dev/null
+++ b/SourceCode/Bond/Servo/Intent.cpp
@@ -0,0 +1,51 @@
+#include "stdafx.h"
+#include "Intent.h"
+
+
+CIntent::CIntent()
+{
+ m_nCode = 0;
+ m_pContext = nullptr;
+}
+
+CIntent::CIntent(int nCode, const char* pszMsg, CContext* pContext)
+{
+ m_nCode = nCode;
+ m_strMsg = pszMsg;
+ m_pContext = pContext;
+}
+
+CIntent::~CIntent()
+{
+}
+
+void CIntent::setCode(int nCode)
+{
+ m_nCode = nCode;
+}
+
+int CIntent::getCode()
+{
+ return m_nCode;
+}
+
+void CIntent::setMsg(const char* pszMsg)
+{
+ m_strMsg = pszMsg;
+}
+
+const char* CIntent::getMsg()
+{
+ return m_strMsg.c_str();
+}
+
+void CIntent::setContext(CContext* pContext)
+{
+ pContext->addRef();
+ m_pContext = pContext;
+}
+
+CContext* CIntent::getContext()
+{
+ return m_pContext;
+}
diff --git a/SourceCode/Bond/Servo/Intent.h b/SourceCode/Bond/Servo/Intent.h
new file mode 100644
index 0000000..081466f
--- /dev/null
+++ b/SourceCode/Bond/Servo/Intent.h
@@ -0,0 +1,25 @@
+#pragma once
+#include <string>
+#include "Context.h"
+
+class CIntent
+{
+public:
+ CIntent();
+ CIntent(int nCode, const char* pszMsg, CContext* pContext);
+ ~CIntent();
+
+public:
+ void setCode(int nCode);
+ int getCode();
+ void setMsg(const char* pszMsg);
+ const char* getMsg();
+ void setContext(CContext* pContext);
+ CContext* getContext();
+
+private:
+ int m_nCode;
+ std::string m_strMsg;
+ CContext* m_pContext;
+};
+
diff --git a/SourceCode/Bond/Servo/MapPosWnd.cpp b/SourceCode/Bond/Servo/MapPosWnd.cpp
new file mode 100644
index 0000000..35ce5c0
--- /dev/null
+++ b/SourceCode/Bond/Servo/MapPosWnd.cpp
@@ -0,0 +1,536 @@
+#include "stdafx.h"
+#include "MapPosWnd.h"
+#include "ColorTransfer.h"
+
+#define HT_NOWHERE 0x1
+#define HT_INDICATOR 0x2
+
+CMapPosWnd::CMapPosWnd()
+{
+ m_hWnd = NULL;
+ m_crFrame = RGB(0, 0, 0);
+ m_crBkgnd = RGB(255, 255, 255);
+ m_crViewPort = RGB(185, 122, 87);
+
+ m_nWndMaxSize = 200;
+ m_nStageCx = 4000;
+ m_nStageCy = 3000;
+ m_rcViewPort = {200, 200, 800, 800};
+}
+
+CMapPosWnd::~CMapPosWnd()
+{
+
+}
+
+BOOL CMapPosWnd::RegisterWndClass()
+{
+ WNDCLASS wc;
+ wc.lpszClassName = MAPPOSWND_CLASS;
+ wc.hInstance = AfxGetInstanceHandle();
+ wc.lpfnWndProc = WindowProc;
+ wc.hCursor = ::LoadCursor(NULL, IDC_ARROW);
+ wc.hIcon = 0;
+ wc.lpszMenuName = NULL;
+ wc.hbrBackground = NULL;
+ wc.style = CS_GLOBALCLASS | CS_DBLCLKS;
+ wc.cbClsExtra = 0;
+ wc.cbWndExtra = 0;
+
+ // 注册窗口类
+ return (::RegisterClass(&wc) != 0);
+}
+
+CMapPosWnd * CMapPosWnd::FromHandle(HWND hWnd)
+{
+ CMapPosWnd *pMapPosWnd = (CMapPosWnd *)::GetProp(hWnd, MAPPOSWND_TAG);
+ return pMapPosWnd;
+}
+
+CMapPosWnd* CMapPosWnd::Hook(HWND hWnd)
+{
+ CMapPosWnd* pMapPosWnd = (CMapPosWnd*)GetProp(hWnd, MAPPOSWND_TAG);
+ if (pMapPosWnd == NULL) {
+ pMapPosWnd = new CMapPosWnd();
+ pMapPosWnd->m_hWnd = hWnd;
+
+ SetProp(hWnd, MAPPOSWND_TAG, (HANDLE)pMapPosWnd);
+ }
+
+
+ return pMapPosWnd;
+}
+
+void CMapPosWnd::SetWndMaxSize(int nMaxSize)
+{
+ m_nWndMaxSize = nMaxSize;
+}
+
+void CMapPosWnd::SetStageSize(int cx, int cy, BOOL bInvalidata)
+{
+ m_nStageCx = cx;
+ m_nStageCy = cy;
+
+ float scale = max(m_nStageCx / (float)m_nWndMaxSize, m_nStageCy / (float)m_nWndMaxSize);
+ int w = (int)(m_nStageCx / scale) +1;
+ int h = (int)(m_nStageCy / scale) + 1;
+ ::SetWindowPos(m_hWnd, NULL, 0, 0, w, h, SWP_NOMOVE);
+
+ if (bInvalidata) {
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+}
+
+void CMapPosWnd::SetViewPort(LPRECT lpRect, BOOL bInvalidata)
+{
+ ::CopyRect(&m_rcViewPort, lpRect);
+ if (bInvalidata) {
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+}
+
+void CMapPosWnd::GetViewPortRect(LPRECT lprcClient, LPRECT lprcDest)
+{
+ RECT rcClient;
+ if (lprcClient == NULL) {
+ GetClientRect(m_hWnd, &rcClient);
+ lprcClient = &rcClient;
+ }
+
+
+ float scale = max(m_nStageCx / (float)(lprcClient->right - lprcClient->left), m_nStageCy / (float)(lprcClient->bottom - lprcClient->top));
+ lprcDest->left = long(m_rcViewPort.left / scale);
+ lprcDest->top = long(m_rcViewPort.top / scale);
+ lprcDest->right = long(m_rcViewPort.right / scale);
+ lprcDest->bottom = long(m_rcViewPort.bottom / scale);
+}
+
+void CMapPosWnd::Init()
+{
+}
+
+void CMapPosWnd::Release()
+{
+
+ // delete
+ delete this;
+}
+
+void CMapPosWnd::Notify(int nCode, int dwData, int dwData1/* = 0*/, int dwData2/* = 0*/)
+{
+ HWND hParent;
+ hParent = GetParent(m_hWnd);
+ if (hParent != NULL) {
+ MAPPOSWND_NMHDR nmhdr;
+ nmhdr.nmhdr.hwndFrom = m_hWnd;
+ nmhdr.nmhdr.idFrom = GetWindowLong(m_hWnd, GWL_ID);
+ nmhdr.nmhdr.code = nCode;
+ nmhdr.dwData = dwData;
+ nmhdr.dwData1 = dwData1;
+ nmhdr.dwData2 = dwData2;
+ SendMessage(hParent, WM_NOTIFY, (WPARAM)nmhdr.nmhdr.idFrom, (LPARAM)&nmhdr);
+ }
+}
+
+/*
+ * 检测坐标点所在的项
+ * 返回项类型, 如HT_INDICATOR
+ */
+int CMapPosWnd::HighTest(POINT pt)
+{
+ // 检测是否在某个子项
+ int nRet = HT_NOWHERE;
+
+ RECT rcClient, rcViewPort;
+ GetClientRect(m_hWnd, &rcClient);
+ GetViewPortRect(&rcClient, &rcViewPort);
+ if (::PtInRect(&rcViewPort, pt)) {
+ nRet = HT_INDICATOR;
+ }
+
+ return nRet;
+}
+
+/*
+ * WindowProc,窗口过程
+ */
+LRESULT CALLBACK CMapPosWnd::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ CMapPosWnd* pMapPosWnd = (CMapPosWnd *)GetProp(hWnd, MAPPOSWND_TAG);
+ if (pMapPosWnd == NULL && uMsg != WM_NCCREATE)
+ {
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
+ }
+
+
+ // 处理窗口消息
+ ASSERT(hWnd);
+ switch (uMsg)
+ {
+ case WM_NCCREATE:
+ return CMapPosWnd::OnNcCreate(hWnd, wParam, lParam);
+
+ case WM_DESTROY:
+ return pMapPosWnd->OnDestroy(wParam, lParam);
+
+ case WM_NCPAINT:
+ return pMapPosWnd->OnNcPaint(wParam, lParam);
+
+ case WM_PAINT:
+ return pMapPosWnd->OnPaint(wParam, lParam);
+
+ case WM_TIMER:
+ return pMapPosWnd->OnTimer(wParam, lParam);
+
+ case WM_MOUSEMOVE:
+ return pMapPosWnd->OnMouseMove(wParam, lParam);
+
+ case WM_LBUTTONDOWN:
+ return pMapPosWnd->OnLButtonDown(wParam, lParam);
+
+ case WM_LBUTTONDBLCLK:
+ return pMapPosWnd->OnLButtonDblclk(wParam, lParam);
+
+ case WM_MOUSEWHEEL:
+ return pMapPosWnd->OnMouseWheel(wParam, lParam);
+
+ case WM_KEYDOWN:
+ return pMapPosWnd->OnKeyDown(wParam, lParam);
+
+ case WM_SIZE:
+ return pMapPosWnd->OnSize(wParam, lParam);
+
+ case WM_GETDLGCODE:
+ return DLGC_WANTALLKEYS;
+
+ default:
+ break;
+ }
+
+ return ::DefWindowProc(hWnd, uMsg, wParam, lParam);
+}
+
+/*
+ * WM_NCCREATE
+ * 窗口创建
+ */
+LRESULT CMapPosWnd::OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
+{
+ CMapPosWnd* pMapPosWnd = (CMapPosWnd *)GetProp(hWnd, MAPPOSWND_TAG);
+ ASSERT(pMapPosWnd == NULL);
+
+ Hook(hWnd)->Init();
+ return ::DefWindowProc(hWnd, WM_NCCREATE, wParam, lParam);
+}
+
+/*
+ * WM_DESTROY
+ * 窗口销毁
+ */
+LRESULT CMapPosWnd::OnDestroy(WPARAM wParam, LPARAM lParam)
+{
+ Release();
+ return ::DefWindowProc(m_hWnd, WM_DESTROY, wParam, lParam);
+}
+
+
+/*
+ * WM_TIMER
+ */
+LRESULT CMapPosWnd::OnTimer(WPARAM wParam, LPARAM lParam)
+{
+
+ return ::DefWindowProc(m_hWnd, WM_TIMER, wParam, lParam);
+}
+
+/*
+ * WM_MOUSEMOVE
+ * 鼠标滚动
+ */
+LRESULT CMapPosWnd::OnMouseMove(WPARAM wParam, LPARAM lParam)
+{
+ return ::DefWindowProc(m_hWnd, WM_MOUSEMOVE, wParam, lParam);
+}
+
+/*
+ * WM_LBUTTONDOWN
+ * 鼠标左键按下
+ */
+LRESULT CMapPosWnd::OnLButtonDown(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt, ptNew, ptPox;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ RECT rcClient, rcLastViewPort;
+ GetClientRect(m_hWnd, &rcClient);
+ float scale = max(m_nStageCx / (float)(rcClient.right - rcClient.left), m_nStageCy / (float)(rcClient.bottom - rcClient.top));
+ CopyRect(&rcLastViewPort, &m_rcViewPort);
+
+
+ // 检测点击坐标是否在某一子项上,如是,则高亮显示
+ int nRet = HighTest(pt);
+ SetFocus(m_hWnd);
+
+
+ // 捕捉鼠标消息,检测是否拖动
+ if (nRet == HT_INDICATOR) {
+
+ if (::GetCapture() == NULL) {
+ SetCapture(m_hWnd);
+ ASSERT(m_hWnd == GetCapture());
+ AfxLockTempMaps();
+ for (;;) {
+ MSG msg;
+ VERIFY(::GetMessage(&msg, NULL, 0, 0));
+
+ if (GetCapture() != m_hWnd) break;
+
+ switch (msg.message)
+ {
+ case WM_MOUSEMOVE:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ ptPox.x = long(rcLastViewPort.left + (ptNew.x - pt.x) * scale);
+ ptPox.x = max(0, min(ptPox.x, m_nStageCx - (rcLastViewPort.right - rcLastViewPort.left)));
+ ptPox.y = long(rcLastViewPort.top + (ptNew.y - pt.y) * scale);
+ ptPox.y = max(0, min(ptPox.y, m_nStageCy - (rcLastViewPort.bottom - rcLastViewPort.top)));
+ Notify(MAPPOSWND_POSCHANGED, ptPox.x, ptPox.y);
+ break;
+
+ case WM_LBUTTONUP:
+ ptNew = msg.pt;
+ ::ScreenToClient(m_hWnd, &ptNew);
+ ptPox.x = long(rcLastViewPort.left + (ptNew.x - pt.x) * scale);
+ ptPox.x = max(0, min(ptPox.x, m_nStageCx - (rcLastViewPort.right - rcLastViewPort.left)));
+ ptPox.y = long(rcLastViewPort.top + (ptNew.y - pt.y) * scale);
+ ptPox.y = max(0, min(ptPox.y, m_nStageCy - (rcLastViewPort.bottom - rcLastViewPort.top)));
+ Notify(MAPPOSWND_POSCHANGED, ptPox.x, ptPox.y);
+
+ ReleaseCapture();
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ goto ExitLoop;
+
+ case WM_KEYDOWN:
+ if (msg.wParam != VK_ESCAPE)
+ break;
+
+ default:
+ DispatchMessage(&msg);
+ break;
+ }
+ }
+
+ ReleaseCapture();
+ ExitLoop:
+ AfxUnlockTempMaps(FALSE);
+ }
+ }
+
+
+ return ::DefWindowProc(m_hWnd, WM_LBUTTONDOWN, wParam, lParam);
+}
+
+/*
+ * WM_LBUTTONDBLCLK
+ * 鼠标左键双击
+ */
+LRESULT CMapPosWnd::OnLButtonDblclk(WPARAM wParam, LPARAM lParam)
+{
+ POINT pt, ptDest;
+ pt.x = LOWORD(lParam);
+ pt.y = HIWORD(lParam);
+
+ RECT rcClient, rcLast;
+ GetClientRect(m_hWnd, &rcClient);
+ rcLast = { 0, 0, 0, 0 };
+
+ // 检测点击坐标是否在空白处
+ // 小窗坐标转换为对应坐标
+ int nRet = HighTest(pt);
+ if (nRet == HT_NOWHERE || nRet == HT_INDICATOR) {
+ float scale = max(m_nStageCx / (float)(rcClient.right - rcClient.left), m_nStageCy / (float)(rcClient.bottom - rcClient.top));
+ ptDest.x = (int)(scale * pt.x) - (m_rcViewPort.right - m_rcViewPort.left) / 2;
+ ptDest.x = max(0, min(ptDest.x, m_nStageCx - (m_rcViewPort.right - m_rcViewPort.left)));
+ ptDest.y = (int)(scale * pt.y) - (m_rcViewPort.bottom - m_rcViewPort.top) / 2;
+ ptDest.y = max(0, min(ptDest.y, m_nStageCy - (m_rcViewPort.bottom - m_rcViewPort.top)));
+ Notify(MAPPOSWND_POSCHANGED, ptDest.x, ptDest.y);
+ }
+
+
+ return ::DefWindowProc(m_hWnd, WM_LBUTTONDBLCLK, wParam, lParam);
+}
+
+/*
+ * WM_MOUSEWHEEL
+ * 鼠标滚动
+ */
+LRESULT CMapPosWnd::OnMouseWheel(WPARAM wParam, LPARAM lParam)
+{
+ return ::DefWindowProc(m_hWnd, WM_MOUSEWHEEL, wParam, lParam);
+}
+
+/*
+ * WM_KEYDOWN
+ * 键盘消息,按下按键
+ */
+LRESULT CMapPosWnd::OnKeyDown(WPARAM wParam, LPARAM lParam)
+{
+ BOOL bChanged = FALSE;
+ if (wParam == VK_DELETE) {
+
+ }
+
+
+ if (bChanged) {
+ RECT rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::InvalidateRect(m_hWnd, &rcClient, TRUE);
+ }
+
+ return ::DefWindowProc(m_hWnd, WM_KEYDOWN, wParam, lParam);
+}
+
+/*
+ * WM_NCPAINT
+ */
+LRESULT CMapPosWnd::OnNcPaint(WPARAM wParam, LPARAM lParam)
+{
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_NCPAINT, wParam, lParam);
+
+
+ long styleEx = GetWindowLong(m_hWnd, GWL_EXSTYLE);
+ if ((styleEx & WS_EX_CLIENTEDGE) == WS_EX_CLIENTEDGE) {
+
+ RECT rect, rcClient;
+ GetClientRect(m_hWnd, &rcClient);
+ ::ClientToScreen(m_hWnd, (LPPOINT)&rcClient.left);
+ ::ClientToScreen(m_hWnd, (LPPOINT)&rcClient.right);
+ GetWindowRect(m_hWnd, &rect);
+ rcClient.right = rect.right - 1;
+ rcClient.bottom = rect.bottom - 1;
+ ::OffsetRect(&rcClient, -rect.left, -rect.top);
+
+ rect.right -= rect.left;
+ rect.bottom -= rect.top;
+ rect.left = 0;
+ rect.top = 0;
+
+ HRGN hRgnWnd = CreateRectRgnIndirect(&rect);
+ HRGN hRgnClient = CreateRectRgnIndirect(&rcClient);
+
+ HBRUSH hBrushBK, hBrushFrame;
+ HDC hDC = ::GetWindowDC(m_hWnd);
+ ::SelectClipRgn(hDC, hRgnWnd);
+ ::ExtSelectClipRgn(hDC, hRgnClient, RGN_DIFF);
+
+ hBrushBK = CreateSolidBrush(m_crBkgnd);
+ ::FillRect(hDC, &rect, hBrushBK);
+ DeleteObject(hBrushBK);
+
+ hBrushFrame = CreateSolidBrush(m_crFrame);
+ ::FrameRect(hDC, &rect, hBrushFrame);
+
+ ::DeleteObject(hRgnWnd);
+ ::DeleteObject(hRgnClient);
+ DeleteObject(hBrushFrame);
+ ::ReleaseDC(m_hWnd, hDC);
+ }
+
+ return lRet;
+}
+
+/*
+ * WM_PAINT
+ */
+LRESULT CMapPosWnd::OnPaint(WPARAM wParam, LPARAM lParam)
+{
+ HDC hDC, hMemDC;
+ HBITMAP hBitmap;
+ RECT rcClient;
+ CString strText;
+ HBRUSH hBrushBK;
+
+
+ // BeginPaint
+ PAINTSTRUCT ps;
+ hDC = BeginPaint(m_hWnd, &ps);
+ GetClientRect(m_hWnd, &rcClient);
+
+ hMemDC = ::CreateCompatibleDC(hDC);
+ hBitmap = ::CreateCompatibleBitmap(hDC, rcClient.right - rcClient.left,
+ rcClient.bottom - rcClient.top);
+ ::SelectObject(hMemDC, hBitmap);
+
+
+ // 背景颜色
+ hBrushBK = CreateSolidBrush(m_crBkgnd);
+ ::FillRect(hMemDC, &rcClient, hBrushBK);
+ DeleteObject(hBrushBK);
+
+
+ // 标题
+ {
+ char szTitle[256];
+ GetWindowText(m_hWnd, szTitle, 256);
+ RECT rcTitle;
+ rcTitle.left = rcClient.left + 2;
+ rcTitle.top = rcClient.top + 2;
+ rcTitle.bottom = rcClient.bottom - 2;
+ rcTitle.right = rcClient.right - 2;
+ ::DrawText(hMemDC, szTitle, (int)strlen(szTitle), &rcTitle, DT_LEFT | DT_TOP);
+ }
+
+
+ // View port
+ RECT rcViewPort;
+ GetViewPortRect(&rcClient, &rcViewPort);
+ HBRUSH hBrushFrame = CreateSolidBrush(m_crViewPort);
+ ::FrameRect(hMemDC, &rcViewPort, hBrushFrame);
+ ::DeleteObject(hBrushFrame);
+
+
+ // EndPaint
+ ::BitBlt(hDC, 0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top,
+ hMemDC, 0, 0, SRCCOPY);
+ EndPaint(m_hWnd, &ps);
+ ::DeleteObject(hBitmap);
+ ::DeleteDC(hMemDC);
+
+
+ return 1;
+}
+
+/*
+ * WM_SIZE
+ */
+LRESULT CMapPosWnd::OnSize(WPARAM wParam, LPARAM lParam)
+{
+ LRESULT lRet = ::DefWindowProc(m_hWnd, WM_SIZE, wParam, lParam);
+
+ return lRet;
+}
+
+/*
+ * 设置背景颜色
+ * color -- 背景色
+ */
+void CMapPosWnd::SetBkgndColor(COLORREF color)
+{
+ m_crBkgnd = color;
+}
+
+/*
+ * 边框颜色
+ * color -- 边框色
+ */
+void CMapPosWnd::SetFrameColor(COLORREF color)
+{
+ m_crFrame = color;
+}
+
+
diff --git a/SourceCode/Bond/Servo/MapPosWnd.h b/SourceCode/Bond/Servo/MapPosWnd.h
new file mode 100644
index 0000000..502512e
--- /dev/null
+++ b/SourceCode/Bond/Servo/MapPosWnd.h
@@ -0,0 +1,86 @@
+#pragma once
+#include <functional>
+
+
+#ifndef MAPPOSWND_TAG
+
+#ifdef _WIN32
+
+#define MAPPOSWND_CLASSA "MapPosWnd"
+#define MAPPOSWND_CLASSW L"MapPosWnd"
+
+#ifdef UNICODE
+#define MAPPOSWND_CLASS MAPPOSWND_CLASSW
+#else
+#define MAPPOSWND_CLASS MAPPOSWND_CLASSA
+#endif
+
+#else
+#define MAPPOSWND_CLASS "MapPosWnd"
+#endif
+
+
+#define MAPPOSWND_TAG _T("MAPPOSWND_TAG")
+
+#define MAPPOSWND_FIRST (0U-5850U)
+#define MAPPOSWND_LAST (0U-2810U)
+#define MAPPOSWND_POSCHANGED (MAPPOSWND_FIRST - 1)
+
+typedef struct tagMAPPOSWND_NMHDR
+{
+ NMHDR nmhdr;
+ DWORD dwData;
+ DWORD dwData1;
+ DWORD dwData2;
+} MAPPOSWND_NMHDR;
+
+#endif
+
+class CMapPosWnd
+{
+public:
+ CMapPosWnd();
+ ~CMapPosWnd();
+
+public:
+ static BOOL RegisterWndClass();
+ static CMapPosWnd * FromHandle(HWND hWnd);
+ void SetFrameColor(COLORREF color);
+ void SetBkgndColor(COLORREF color);
+ void SetWndMaxSize(int nMaxSize);
+ void SetStageSize(int cx, int cy, BOOL bInvalidata);
+ void SetViewPort(LPRECT lpRect, BOOL bInvalidata);
+ void GetViewPortRect(LPRECT lprcClient, LPRECT lprcDest);
+
+private:
+ void Init();
+ void Notify(int nCode, int dwData, int dwData1 = 0, int dwData2 = 0);
+ void Release();
+ int HighTest(POINT pt);
+ static CMapPosWnd* Hook(HWND hWnd);
+ static LRESULT CALLBACK WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ static LRESULT OnNcCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
+ LRESULT OnDestroy(WPARAM wParam, LPARAM lParam);
+ LRESULT OnTimer(WPARAM wParam, LPARAM lParam);
+ LRESULT OnNcPaint(WPARAM wParam, LPARAM lParam);
+ LRESULT OnPaint(WPARAM wParam, LPARAM lParam);
+ LRESULT OnMouseMove(WPARAM wParam, LPARAM lParam);
+ LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam);
+ LRESULT OnLButtonDblclk(WPARAM wParam, LPARAM lParam);
+ LRESULT OnMouseWheel(WPARAM wParam, LPARAM lParam);
+ LRESULT OnKeyDown(WPARAM wParam, LPARAM lParam);
+ LRESULT OnSize(WPARAM wParam, LPARAM lParam);
+
+private:
+ HWND m_hWnd;
+ COLORREF m_crBkgnd;
+ COLORREF m_crFrame;
+ COLORREF m_crViewPort;
+
+private:
+ int m_nWndMaxSize;
+ int m_nStageCx;
+ int m_nStageCy;
+ RECT m_rcViewPort;
+};
+
diff --git a/SourceCode/Bond/Servo/Servo.cpp b/SourceCode/Bond/Servo/Servo.cpp
index d88737c..1bace55 100644
--- a/SourceCode/Bond/Servo/Servo.cpp
+++ b/SourceCode/Bond/Servo/Servo.cpp
@@ -9,6 +9,9 @@
#include "AlarmManager.h"
#include "SECSRuntimeManager.h"
#include "VerticalLine.h"
+#include "EqsGraphWnd.h"
+#include "MapPosWnd.h"
+#include "HmTab.h"
// 声明全局变量,用于管理 GDI+ 初始化
@@ -95,6 +98,9 @@
// 注册控件
CServoGraph::RegisterWndClass();
CVerticalLine::RegisterWndClass();
+ CEqsGraphWnd::RegisterWndClass();
+ CMapPosWnd::RegisterWndClass();
+ CHmTab::RegisterWndClass();
// 初始化Rx库
diff --git a/SourceCode/Bond/Servo/Servo.rc b/SourceCode/Bond/Servo/Servo.rc
index 91f527d..cf09ebc 100644
--- a/SourceCode/Bond/Servo/Servo.rc
+++ b/SourceCode/Bond/Servo/Servo.rc
Binary files differ
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj b/SourceCode/Bond/Servo/Servo.vcxproj
index f603941..8b33129 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj
+++ b/SourceCode/Bond/Servo/Servo.vcxproj
@@ -199,21 +199,38 @@
<ClInclude Include="AlarmManager.h" />
<ClInclude Include="ApredTreeCtrl2.h" />
<ClInclude Include="BlButton.h" />
+ <ClInclude Include="CAligner.h" />
<ClInclude Include="CAttribute.h" />
<ClInclude Include="CAttributeVector.h" />
+ <ClInclude Include="CBakeCooling.h" />
<ClInclude Include="CBonder.h" />
<ClInclude Include="CCLinkPerformance\CCLinkIEControl.h" />
<ClInclude Include="CCLinkPerformance\PerformanceMelsec.h" />
<ClInclude Include="CEqAlarmStep.h" />
+ <ClInclude Include="CEqCimMessageClearStep.h" />
+ <ClInclude Include="CEqCimMessageCmdStep.h" />
<ClInclude Include="CEqCimModeChangeStep.h" />
+ <ClInclude Include="CEqDateTimeSetCmdStep.h" />
+ <ClInclude Include="CEqModeChangeStep.h" />
<ClInclude Include="CEqModeStep.h" />
<ClInclude Include="CEqProcessStep.h" />
<ClInclude Include="CEqStatusStep.h" />
+ <ClInclude Include="CEqVCREnableStep.h" />
+ <ClInclude Include="CFliper.h" />
+ <ClInclude Include="CLoadPort.h" />
+ <ClInclude Include="CMeasurement.h" />
+ <ClInclude Include="ColorTransfer.h" />
+ <ClInclude Include="CPageGraph1.h" />
+ <ClInclude Include="CPageGraph2.h" />
+ <ClInclude Include="CPanel.h" />
<ClInclude Include="CPanelAttributes.h" />
<ClInclude Include="CPanelEquipment.h" />
<ClInclude Include="CPanelMaster.h" />
+ <ClInclude Include="CPin.h" />
<ClInclude Include="CReadStep.h" />
+ <ClInclude Include="CSample.h" />
<ClInclude Include="CStep.h" />
+ <ClInclude Include="CVacuumBake.h" />
<ClInclude Include="CWriteStep.h" />
<ClInclude Include="DevicePropertyDlg.h" />
<ClInclude Include="CEFEM.h" />
@@ -222,12 +239,16 @@
<ClInclude Include="Common.h" />
<ClInclude Include="Configuration.h" />
<ClInclude Include="Context.h" />
+ <ClInclude Include="EqsGraphWnd.h" />
+ <ClInclude Include="HmTab.h" />
<ClInclude Include="HsmsAction.h" />
<ClInclude Include="HsmsPassive.h" />
+ <ClInclude Include="Intent.h" />
<ClInclude Include="ListCtrlEx.h" />
<ClInclude Include="Log.h" />
<ClInclude Include="LogDlg.h" />
<ClInclude Include="LogEdit.h" />
+ <ClInclude Include="MapPosWnd.h" />
<ClInclude Include="Model.h" />
<ClInclude Include="Resource.h" />
<ClInclude Include="SECSRuntimeManager.h" />
@@ -246,21 +267,38 @@
<ClCompile Include="AlarmManager.cpp" />
<ClCompile Include="ApredTreeCtrl2.cpp" />
<ClCompile Include="BlButton.cpp" />
+ <ClCompile Include="CAligner.cpp" />
<ClCompile Include="CAttribute.cpp" />
<ClCompile Include="CAttributeVector.cpp" />
+ <ClCompile Include="CBakeCooling.cpp" />
<ClCompile Include="CBonder.cpp" />
<ClCompile Include="CCLinkPerformance\CCLinkIEControl.cpp" />
<ClCompile Include="CCLinkPerformance\PerformanceMelsec.cpp" />
<ClCompile Include="CEqAlarmStep.cpp" />
+ <ClCompile Include="CEqCimMessageClearStep.cpp" />
+ <ClCompile Include="CEqCimMessageCmdStep.cpp" />
<ClCompile Include="CEqCimModeChangeStep.cpp" />
+ <ClCompile Include="CEqDateTimeSetCmdStep.cpp" />
+ <ClCompile Include="CEqModeChangeStep.cpp" />
<ClCompile Include="CEqModeStep.cpp" />
<ClCompile Include="CEqProcessStep.cpp" />
<ClCompile Include="CEqStatusStep.cpp" />
+ <ClCompile Include="CEqVCREnableStep.cpp" />
+ <ClCompile Include="CFliper.cpp" />
+ <ClCompile Include="CLoadPort.cpp" />
+ <ClCompile Include="CMeasurement.cpp" />
+ <ClCompile Include="ColorTransfer.cpp" />
+ <ClCompile Include="CPageGraph1.cpp" />
+ <ClCompile Include="CPageGraph2.cpp" />
+ <ClCompile Include="CPanel.cpp" />
<ClCompile Include="CPanelAttributes.cpp" />
<ClCompile Include="CPanelEquipment.cpp" />
<ClCompile Include="CPanelMaster.cpp" />
+ <ClCompile Include="CPin.cpp" />
<ClCompile Include="CReadStep.cpp" />
+ <ClCompile Include="CSample.cpp" />
<ClCompile Include="CStep.cpp" />
+ <ClCompile Include="CVacuumBake.cpp" />
<ClCompile Include="CWriteStep.cpp" />
<ClCompile Include="DevicePropertyDlg.cpp" />
<ClCompile Include="CEFEM.cpp" />
@@ -268,12 +306,16 @@
<ClCompile Include="CMaster.cpp" />
<ClCompile Include="Configuration.cpp" />
<ClCompile Include="Context.cpp" />
+ <ClCompile Include="EqsGraphWnd.cpp" />
+ <ClCompile Include="HmTab.cpp" />
<ClCompile Include="HsmsAction.cpp" />
<ClCompile Include="HsmsPassive.cpp" />
+ <ClCompile Include="Intent.cpp" />
<ClCompile Include="ListCtrlEx.cpp" />
<ClCompile Include="Log.cpp" />
<ClCompile Include="LogDlg.cpp" />
<ClCompile Include="LogEdit.cpp" />
+ <ClCompile Include="MapPosWnd.cpp" />
<ClCompile Include="Model.cpp" />
<ClCompile Include="SECSRuntimeManager.cpp" />
<ClCompile Include="SecsTestDlg.cpp" />
diff --git a/SourceCode/Bond/Servo/Servo.vcxproj.filters b/SourceCode/Bond/Servo/Servo.vcxproj.filters
index 477da7b..ae66fd9 100644
--- a/SourceCode/Bond/Servo/Servo.vcxproj.filters
+++ b/SourceCode/Bond/Servo/Servo.vcxproj.filters
@@ -53,6 +53,27 @@
<ClCompile Include="CEqCimModeChangeStep.cpp" />
<ClCompile Include="CPanelEquipment.cpp" />
<ClCompile Include="ListCtrlEx.cpp" />
+ <ClCompile Include="CEqModeChangeStep.cpp" />
+ <ClCompile Include="CEqCimMessageCmdStep.cpp" />
+ <ClCompile Include="CEqCimMessageClearStep.cpp" />
+ <ClCompile Include="CEqDateTimeSetCmdStep.cpp" />
+ <ClCompile Include="CEqVCREnableStep.cpp" />
+ <ClCompile Include="CPin.cpp" />
+ <ClCompile Include="CSample.cpp" />
+ <ClCompile Include="CLoadPort.cpp" />
+ <ClCompile Include="CAligner.cpp" />
+ <ClCompile Include="CFliper.cpp" />
+ <ClCompile Include="CMeasurement.cpp" />
+ <ClCompile Include="CBakeCooling.cpp" />
+ <ClCompile Include="CVacuumBake.cpp" />
+ <ClCompile Include="Intent.cpp" />
+ <ClCompile Include="CPanel.cpp" />
+ <ClCompile Include="EqsGraphWnd.cpp" />
+ <ClCompile Include="ColorTransfer.cpp" />
+ <ClCompile Include="MapPosWnd.cpp" />
+ <ClCompile Include="HmTab.cpp" />
+ <ClCompile Include="CPageGraph1.cpp" />
+ <ClCompile Include="CPageGraph2.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AlarmManager.h" />
@@ -104,6 +125,27 @@
<ClInclude Include="CEqCimModeChangeStep.h" />
<ClInclude Include="CPanelEquipment.h" />
<ClInclude Include="ListCtrlEx.h" />
+ <ClInclude Include="CEqModeChangeStep.h" />
+ <ClInclude Include="CEqCimMessageCmdStep.h" />
+ <ClInclude Include="CEqCimMessageClearStep.h" />
+ <ClInclude Include="CEqDateTimeSetCmdStep.h" />
+ <ClInclude Include="CEqVCREnableStep.h" />
+ <ClInclude Include="CPin.h" />
+ <ClInclude Include="CSample.h" />
+ <ClInclude Include="CLoadPort.h" />
+ <ClInclude Include="CAligner.h" />
+ <ClInclude Include="CFliper.h" />
+ <ClInclude Include="CMeasurement.h" />
+ <ClInclude Include="CBakeCooling.h" />
+ <ClInclude Include="CVacuumBake.h" />
+ <ClInclude Include="Intent.h" />
+ <ClInclude Include="CPanel.h" />
+ <ClInclude Include="EqsGraphWnd.h" />
+ <ClInclude Include="ColorTransfer.h" />
+ <ClInclude Include="MapPosWnd.h" />
+ <ClInclude Include="HmTab.h" />
+ <ClInclude Include="CPageGraph1.h" />
+ <ClInclude Include="CPageGraph2.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Servo.rc" />
diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index b29713e..cfc6034 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -13,28 +13,12 @@
#include <chrono>
#include <thread>
#include <cmath>
+#include "HmTab.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
-
-// Image
-#define IMAGE_ROBOT 2
-
-#define INDICATE_BONDER1 1
-#define INDICATE_BONDER2 2
-#define INDICATE_FLIPER 3
-#define INDICATE_ALIGNER 4
-#define INDICATE_LPORT4 5
-#define INDICATE_LPORT3 6
-#define INDICATE_LPORT2 7
-#define INDICATE_LPORT1 8
-#define INDICATE_ROBOT_ARM1 9
-#define INDICATE_ROBOT_ARM2 10
-#define INDICATE_VACUUM_BAKE 11
-#define INDICATE_BAKE_COOLING 12
-#define INDICATE_MEASUREMENT 13
/* 创建终端的定时器 */
@@ -86,7 +70,6 @@
m_hbrBkgnd = nullptr;
m_bShowLogWnd = FALSE;
m_bShowAlarmWnd = FALSE;
- m_bIsRobotMoving = FALSE;
m_pLogDlg = nullptr;
m_pAlarmDlg = nullptr;
m_pTerminalDisplayDlg = nullptr;
@@ -94,6 +77,8 @@
m_pPanelMaster = nullptr;
m_pPanelEquipment = nullptr;
m_pPanelAttributes = nullptr;
+ m_pPageGraph1 = nullptr;
+ m_pPageGraph2 = nullptr;
}
void CServoDlg::DoDataExchange(CDataExchange* pDX)
@@ -128,14 +113,17 @@
ON_UPDATE_COMMAND_UI(ID_MENU_WND_LOG, &CServoDlg::OnUpdateMenuWndLog)
ON_COMMAND(ID_MENU_WND_ALARM, &CServoDlg::OnMenuWndAlarm)
ON_UPDATE_COMMAND_UI(ID_MENU_WND_ALARM, &CServoDlg::OnUpdateMenuWndAlarm)
+ ON_COMMAND(ID_MENU_TEST_MESSAGE_SET, &CServoDlg::OnMenuTestMessageSet)
+ ON_UPDATE_COMMAND_UI(ID_MENU_TEST_MESSAGE_SET, &CServoDlg::OnUpdateMenuTestMessageSet)
+ ON_COMMAND(ID_MENU_TEST_MESSAGE_CLEAR, &CServoDlg::OnMenuTestMessageClear)
+ ON_UPDATE_COMMAND_UI(ID_MENU_TEST_MESSAGE_CLEAR, &CServoDlg::OnUpdateMenuTestMessageClear)
ON_COMMAND(ID_MENU_HELP_ABOUT, &CServoDlg::OnMenuHelpAbout)
ON_WM_INITMENUPOPUP()
ON_WM_TIMER()
- ON_WM_ERASEBKGND()
ON_BN_CLICKED(IDC_BUTTON_ALARM, &CServoDlg::OnBnClickedButtonAlarm)
ON_BN_CLICKED(IDC_BUTTON_ALARM, &CServoDlg::OnBnClickedButtonAlarm)
- ON_NOTIFY(BYSERVOGRAPH_ITEM_CLICKED, IDC_SERVO_GRAPH1, &CServoDlg::OnGraphItemClicked)
ON_MESSAGE(ID_MSG_PANEL_RESIZE, OnPanelResize)
+ ON_NOTIFY(BYHMTAB_SEL_CHANGED, IDC_TAB1, &CServoDlg::OnTabSelChanged)
END_MESSAGE_MAP()
@@ -158,28 +146,13 @@
ShowTerminalText(pszText);
}
}
- else if (RX_CODE_EQ_ALIVE == code) {
- // 通知设备状态
- SERVO::CEquipment* pEquipment = nullptr;
- if (pAny->getPtrValue("ptr", (void*&)pEquipment)) {
- if (pEquipment != nullptr) {
- int nID = pEquipment->getID();
- BOOL bAlive = pEquipment->isAlive();
- if (EQ_ID_EFEM == nID) {
- DeviceStatus status = bAlive ? DeviceStatus::ONLINE : DeviceStatus::OFFLINE;
- UpdateDeviceStatus(INDICATE_ROBOT_ARM1, status);
- UpdateDeviceStatus(INDICATE_ROBOT_ARM2, status);
- }
- }
- }
- }
else if (RX_CODE_SELECT_EQUIPMENT == code) {
SERVO::CEquipment* pEquipment = nullptr;
if (pAny->getPtrValue("ptr", (void*&)pEquipment)) {
ASSERT(pEquipment);
ASSERT(m_pPanelEquipment);
ASSERT(m_pPanelAttributes);
- m_pPanelEquipment->SetEquipment(pEquipment);
+ m_pPanelEquipment->loadDataFromEquipment(pEquipment);
m_pPanelAttributes->ShowWindow(SW_HIDE);
if (!m_pPanelEquipment->IsWindowVisible()) {
m_pPanelEquipment->ShowWindow(SW_SHOW);
@@ -252,89 +225,20 @@
- // 图示
- m_pGraph = CServoGraph::Hook(GetDlgItem(IDC_SERVO_GRAPH1)->GetSafeHwnd());
- CString strPath;
- strPath.Format(_T("%s\\res\\Servo001.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
- m_pGraph->AddImage(1, (LPTSTR)(LPCTSTR)strPath, 0, 0);
+ // Tab
+ m_pPageGraph1 = new CPageGraph1();
+ m_pPageGraph1->Create(IDD_PAGE_GRAPH1, this);
+ m_pPageGraph2 = new CPageGraph2();
+ m_pPageGraph2->Create(IDD_PAGE_GRAPH2, this);
- strPath.Format(_T("%s\\res\\Robot001.bmp"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir);
- m_pGraph->AddImage(IMAGE_ROBOT, (LPTSTR)(LPCTSTR)strPath, 170, 270);
-
- // 添加指示器
- // Bonder
- m_pGraph->AddIndicateBox(INDICATE_BONDER1, 220, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_BONDER1, "10", "Bonder 1");
- m_pGraph->AddIndicateBox(INDICATE_BONDER2, 220, 516, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_BONDER2, "11", "Bonder 2");
-
-
- // 翻转
- m_pGraph->AddIndicateBox(INDICATE_FLIPER, 338, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_FLIPER, "8", "Fliper");
-
-
- // 对位
- m_pGraph->AddIndicateBox(INDICATE_ALIGNER, 428, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_ALIGNER, "7", "Aligner");
-
-
- // Load port 4
- m_pGraph->AddIndicateBox(INDICATE_LPORT4, 518, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_LPORT4, "4", "LPort4");
-
-
- // Load port 3
- m_pGraph->AddIndicateBox(INDICATE_LPORT3, 606, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_LPORT3, "3", "LPort3");
-
-
- // Load port 2
- m_pGraph->AddIndicateBox(INDICATE_LPORT2, 690, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_LPORT2, "2", "LPort2");
-
-
- // Load port 1
- m_pGraph->AddIndicateBox(INDICATE_LPORT1, 774, 172, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_LPORT1, "1", "LPort1");
-
-
- // Robot
- m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM1, 190, 294, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_ROBOT_ARM1, "5", "Robot");
- m_pGraph->AddIndicateBox(INDICATE_ROBOT_ARM2, 243, 294, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_ROBOT_ARM2, "6", "Robot");
-
-
-
-
- // Vacuum bake
- m_pGraph->AddIndicateBox(INDICATE_VACUUM_BAKE, 396, 516, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_VACUUM_BAKE, "9", "Vacuum bake");
-
-
- // Bake cooling
- m_pGraph->AddIndicateBox(INDICATE_BAKE_COOLING, 566, 516, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_BAKE_COOLING, "12", "Bake cooling");
-
-
- // Bake cooling
- m_pGraph->AddIndicateBox(INDICATE_MEASUREMENT, 736, 516, 48, RGB(22, 22, 22),
- RGB(255, 127, 39), RGB(0, 176, 80));
- m_pGraph->SetBoxText(INDICATE_MEASUREMENT, "13", "Measurement");
-
+ CHmTab* m_pTab = CHmTab::Hook(GetDlgItem(IDC_TAB1)->m_hWnd);
+ m_pTab->SetPaddingLeft(20);
+ m_pTab->SetItemMarginLeft(18);
+ m_pTab->AddItem("报表", FALSE);
+ m_pTab->AddItem("日志", TRUE);
+ m_pTab->SetCurSel(0);
+ m_pTab->SetBkgndColor(RGB(222, 222, 222));
+ ShowChildPage(0);
m_pPanelMaster = new CPanelMaster();
@@ -369,13 +273,6 @@
// 相当于延时调用master的初始化
theApp.m_model.m_master.init();
-
-
- // 绑定数据
- {
- SERVO::CEquipment* pEquipment = theApp.m_model.m_master.getEquipment(EQ_ID_EFEM);
- m_pGraph->SetIndicateBoxData(INDICATE_ROBOT_ARM1, pEquipment);
- }
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
@@ -552,6 +449,34 @@
pCmdUI->Enable(TRUE);
}
+void CServoDlg::OnMenuTestMessageSet()
+{
+ SERVO::CEquipment* pEquipment = m_pPanelMaster->GetActiveEquipment();
+ if (pEquipment != nullptr) {
+ SERVO::CEqCimMessageCmdStep* pStep = (SERVO::CEqCimMessageCmdStep*)pEquipment->getStepWithName(STEP_CIM_MESSAGE_CMD);
+ pStep->setCimMessage("HELLO 5007", 2, 3);
+ }
+}
+
+void CServoDlg::OnUpdateMenuTestMessageSet(CCmdUI* pCmdUI)
+{
+ pCmdUI->Enable(m_pPanelMaster->GetActiveEquipment() != nullptr);
+}
+
+void CServoDlg::OnMenuTestMessageClear()
+{
+ SERVO::CEquipment* pEquipment = m_pPanelMaster->GetActiveEquipment();
+ if (pEquipment != nullptr) {
+ SERVO::CEqCimMessageClearStep* pStep = (SERVO::CEqCimMessageClearStep*)pEquipment->getStepWithName(STEP_CIM_MESSAGE_CLEAR);
+ pStep->clearCimMessage(2, 3);
+ }
+}
+
+void CServoDlg::OnUpdateMenuTestMessageClear(CCmdUI* pCmdUI)
+{
+ pCmdUI->Enable(TRUE);
+}
+
void CServoDlg::OnMenuHelpAbout()
{
CAboutDlg dlgAbout;
@@ -627,6 +552,18 @@
m_pPanelAttributes = nullptr;
}
+ if (m_pPageGraph1 != nullptr) {
+ m_pPageGraph1->DestroyWindow();
+ delete m_pPageGraph1;
+ m_pPageGraph1 = nullptr;
+ }
+
+ if (m_pPageGraph2 != nullptr) {
+ m_pPageGraph2->DestroyWindow();
+ delete m_pPageGraph2;
+ m_pPageGraph2 = nullptr;
+ }
+
if (m_hbrBkgnd != nullptr) {
::DeleteObject(m_hbrBkgnd);
}
@@ -718,142 +655,13 @@
m_btnAlarm.Invalidate();
}
-void CServoDlg::UpdateRobotPosition(float percentage)
-{
- // 限制百分比范围在 [0, 1] 之间
- if (percentage < 0.0f) percentage = 0.0f;
- if (percentage > 1.0f) percentage = 1.0f;
-
- // 根据百分比计算目标 X 坐标
- int startX = m_pGraph->GetImage(IMAGE_ROBOT)->x;
- int endX = static_cast<int>(170 + percentage * (700 - 170));
-
- int arm1Offset = 20; // 从图片到ARM1的偏移
- int arm2Offset = 73; // 从图片到ARM2的偏移
-
- // 计算移动所需的时间
- int distance = abs(endX - startX);
- int duration = static_cast<int>((distance / 100.0) * 1000);
-
- auto startTime = std::chrono::steady_clock::now();
- auto endTime = startTime + std::chrono::milliseconds(duration);
-
- // 开始移动,设置标记
- m_bIsRobotMoving = TRUE;
-
- // 开始平滑移动
- while (std::chrono::steady_clock::now() < endTime) {
- auto currentTime = std::chrono::steady_clock::now();
- float progress = std::chrono::duration<float, std::milli>(currentTime - startTime).count() / duration;
- progress = min(progress, 1.0f);
-
- // 根据进度计算当前位置
- int currentX = static_cast<int>(startX + progress * (endX - startX));
- m_pGraph->UpdateImageCoordinates(IMAGE_ROBOT, currentX, 270);
- m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, currentX + arm1Offset, 294);
- m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, currentX + arm2Offset, 294);
-
- // 刷新界面
- Invalidate();
- UpdateWindow();
-
- // 控制帧率约为 60 FPS
- std::this_thread::sleep_for(std::chrono::milliseconds(16));
- }
-
- // 确保最后位置精确到目标位置
- m_pGraph->UpdateImageCoordinates(IMAGE_ROBOT, endX, 270);
- m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, endX + arm1Offset, 294);
- m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, endX + arm2Offset, 294);
-
- // 界面重绘
- Invalidate();
-
- // 动画结束,设置标记
- m_bIsRobotMoving = FALSE;
-}
-
-void CServoDlg::RotateRobot(float angleInDegrees)
-{
- // 将角度转换为弧度
- float angleInRadians = static_cast<float>(std::acos(-1)) / 180.0f * angleInDegrees;
-
- // 获取机器人图片的当前坐标和中心
- auto* pImage = m_pGraph->GetImage(IMAGE_ROBOT);
- if (!pImage) return;
-
- // 更新 Rotate 图片的角度,确保角度保持在 [0, 360) 范围内
- m_pGraph->UpdateImageAngle(IMAGE_ROBOT, static_cast<float>(fmod(pImage->angle + angleInDegrees + 360, 360)));
-
- int cx = pImage->x + pImage->bmWidth / 2; // 图片中心 X
- int cy = pImage->y + pImage->bmHeight / 2; // 图片中心 Y
-
- // 旋转指示框的坐标
- auto* pRobot1 = m_pGraph->GetIndicateBox(INDICATE_ROBOT_ARM1);
- auto* pRobot2 = m_pGraph->GetIndicateBox(INDICATE_ROBOT_ARM2);
-
- if (pRobot1 && pRobot2) {
- int newArmX1 = pImage->x + 20;
- int newArmY1 = 294;
-
- int newArmX2 = pImage->x + 73;
- int newArmY2 = 294;
-
- if (angleInDegrees != 0.0f) {
- // 计算指示框1的新坐标
- newArmX1 = static_cast<int>(cx + (pRobot1->x - cx) * cos(angleInRadians) - (pRobot1->y - cy) * sin(angleInRadians));
- newArmY1 = static_cast<int>(cy + (pRobot1->x - cx) * sin(angleInRadians) + (pRobot1->y - cy) * cos(angleInRadians));
-
- // 计算指示框2的新坐标
- newArmX2 = static_cast<int>(cx + (pRobot2->x - cx) * cos(angleInRadians) - (pRobot2->y - cy) * sin(angleInRadians));
- newArmY2 = static_cast<int>(cy + (pRobot2->x - cx) * sin(angleInRadians) + (pRobot2->y - cy) * cos(angleInRadians));
- }
-
- // 更新指示框的位置
- m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM1, newArmX1, newArmY1);
- m_pGraph->UpdateIndicateBoxCoordinates(INDICATE_ROBOT_ARM2, newArmX2, newArmY2);
- }
-
- // 强制重绘界面
- Invalidate();
-}
-
-void CServoDlg::UpdateDeviceStatus(int id, DeviceStatus status)
-{
- // 根据状态设置颜色
- COLORREF newBackgroundColor;
- COLORREF newFrameColor1;
- COLORREF newFrameColor2;
-
- switch (status) {
- case ONLINE:
- newBackgroundColor = RGB(0, 255, 0);
- newFrameColor1 = RGB(22, 22, 22);
- newFrameColor2 = RGB(255, 127, 39);
- break;
- case OFFLINE:
- newBackgroundColor = RGB(255, 0, 0);
- newFrameColor1 = RGB(22, 22, 22);
- newFrameColor2 = RGB(255, 127, 39);
- break;
- default:
- newBackgroundColor = RGB(255, 255, 255); // 默认白色背景
- newFrameColor1 = RGB(0, 0, 0); // 默认黑色框架1
- newFrameColor2 = RGB(0, 0, 0); // 默认黑色框架2
- break;
- }
-
- m_pGraph->UpdateIndicateBox1Colors(id, newBackgroundColor, newFrameColor1, newFrameColor2);
-
- // 刷新界面
- Invalidate();
- UpdateWindow();
-}
-
void CServoDlg::OnSize(UINT nType, int cx, int cy)
{
CDialogEx::OnSize(nType, cx, cy);
- if (GetDlgItem(IDC_SERVO_GRAPH1) == nullptr) return;
+ if (GetDlgItem(IDC_TAB1) == nullptr) return;
+ if (m_pPageGraph1 == nullptr) return;
+ if (m_pPageGraph2 == nullptr) return;
+
Resize();
Invalidate();
}
@@ -886,11 +694,16 @@
x += nPanelWidth;
}
- pItem = GetDlgItem(IDC_SERVO_GRAPH1);
- pItem->GetClientRect(&rcItem);
- pItem->MoveWindow(x, y, rcItem.Width(), rcItem.Height());
+
+ pItem = GetDlgItem(IDC_TAB1);
+ pItem->GetWindowRect(rcItem);
+ pItem->MoveWindow(x, y, rcClient.Width() - x, rcItem.Height());
y += rcItem.Height();
- y += 8;
+
+
+ m_pPageGraph1->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height());
+ m_pPageGraph2->MoveWindow(x, y, rcClient.Width() - x, rcClient.Height());
+
x = rcClient.right - 8;
pItem = GetDlgItem(IDC_BUTTON_LOG);
@@ -981,31 +794,6 @@
CDialogEx::OnTimer(nIDEvent);
}
-
-BOOL CServoDlg::OnEraseBkgnd(CDC* pDC)
-{
- // TODO: 在此添加消息处理程序代码和/或调用默认值
- if (m_bIsRobotMoving) {
- // 禁止刷新背景,避免闪烁
- return TRUE;
- }
-
- return CDialogEx::OnEraseBkgnd(pDC);
-}
-
-void CServoDlg::OnGraphItemClicked(NMHDR* pNMHDR, LRESULT* pResult)
-{
- BYSERVOGRAPH_NMHDR* pGraphNmhdr = reinterpret_cast<BYSERVOGRAPH_NMHDR*>(pNMHDR);
- CString s; s.Format(_T("OnGraphItemClicked %d"), pGraphNmhdr->dwData);
- SERVO::CEquipment* pEquipment = (SERVO::CEquipment*)m_pGraph->GetIndicateBoxData(pGraphNmhdr->dwData);
- if (pEquipment != nullptr) {
- AfxMessageBox(pEquipment->getName().c_str());
- }
-
-
- *pResult = 0;
-}
-
LRESULT CServoDlg::OnPanelResize(WPARAM wParam, LPARAM lParam)
{
int width = wParam;
@@ -1015,3 +803,21 @@
return 0;
}
+void CServoDlg::OnTabSelChanged(NMHDR* nmhdr, LRESULT* result)
+{
+ BYHMTAB_NMHDR* pNmhdrex = (BYHMTAB_NMHDR*)nmhdr;
+ ShowChildPage((int)pNmhdrex->dwData);
+
+ *result = 0;
+}
+
+void CServoDlg::ShowChildPage(int index)
+{
+ ASSERT(0 <= index && index < 3);
+ static CWnd* pPages[] = { m_pPageGraph1, m_pPageGraph2 };
+ for (int i = 0; i < 2; i++) {
+ pPages[i]->ShowWindow(i == index ? SW_SHOW : SW_HIDE);
+ }
+}
+
+
diff --git a/SourceCode/Bond/Servo/ServoDlg.h b/SourceCode/Bond/Servo/ServoDlg.h
index 685acf1..85d8e85 100644
--- a/SourceCode/Bond/Servo/ServoDlg.h
+++ b/SourceCode/Bond/Servo/ServoDlg.h
@@ -3,7 +3,6 @@
//
#pragma once
-#include "ServoGraph.h"
#include "BlButton.h"
#include "LogDlg.h"
#include "AlarmDlg.h"
@@ -11,12 +10,9 @@
#include "CPanelMaster.h"
#include "CPanelEquipment.h"
#include "CPanelAttributes.h"
+#include "CPageGraph1.h"
+#include "CPageGraph2.h"
-
-enum DeviceStatus {
- ONLINE, // 在线
- OFFLINE, // 离线
-};
// CServoDlg 对话框
class CServoDlg : public CDialogEx
@@ -34,9 +30,7 @@
void Resize();
void UpdateLogBtn();
void UpdateAlarmBtn();
- void UpdateRobotPosition(float percentage);
- void RotateRobot(float angleInDegrees);
- void UpdateDeviceStatus(int id, DeviceStatus status);
+ void ShowChildPage(int index);
private:
@@ -46,6 +40,8 @@
CLogDlg* m_pLogDlg;
CAlarmDlg* m_pAlarmDlg;
CTerminalDisplayDlg* m_pTerminalDisplayDlg;
+ CPageGraph1* m_pPageGraph1;
+ CPageGraph2* m_pPageGraph2;
// 对话框数据
@@ -57,13 +53,9 @@
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
-private:
- BOOL m_bIsRobotMoving;
-
// 实现
protected:
HICON m_hIcon;
- CServoGraph* m_pGraph;
COLORREF m_crBkgnd;
HBRUSH m_hbrBkgnd;
CBlButton m_btnLog;
@@ -101,10 +93,13 @@
afx_msg void OnUpdateMenuWndAlarm(CCmdUI* pCmdUI);
afx_msg void OnMenuFileExit();
afx_msg void OnUpdateMenuFileExit(CCmdUI* pCmdUI);
+ afx_msg void OnMenuTestMessageSet();
+ afx_msg void OnUpdateMenuTestMessageSet(CCmdUI* pCmdUI);
+ afx_msg void OnMenuTestMessageClear();
+ afx_msg void OnUpdateMenuTestMessageClear(CCmdUI* pCmdUI);
afx_msg void OnMenuHelpAbout();
afx_msg void OnTimer(UINT_PTR nIDEvent);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
afx_msg void OnBnClickedButtonAlarm();
- afx_msg void OnGraphItemClicked(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg LRESULT OnPanelResize(WPARAM wParam, LPARAM lParam);
+ afx_msg void OnTabSelChanged(NMHDR* nmhdr, LRESULT* result);
};
diff --git a/SourceCode/Bond/Servo/ToolUnits.cpp b/SourceCode/Bond/Servo/ToolUnits.cpp
index a3e1725..b32362a 100644
--- a/SourceCode/Bond/Servo/ToolUnits.cpp
+++ b/SourceCode/Bond/Servo/ToolUnits.cpp
@@ -2,6 +2,7 @@
#include "ToolUnits.h"
#include <chrono>
#include <memory>
+#include <sstream>
CToolUnits::CToolUnits()
@@ -306,4 +307,13 @@
bool CToolUnits::startsWith(const std::string& str, const std::string& prefix)
{
return str.size() >= prefix.size() && str.compare(0, prefix.size(), prefix) == 0;
+}
+
+std::string& CToolUnits::toHexString(int value, std::string& strOut)
+{
+ std::stringstream ss;
+ ss << std::hex << value;
+ strOut = ss.str();
+
+ return strOut;
}
\ No newline at end of file
diff --git a/SourceCode/Bond/Servo/ToolUnits.h b/SourceCode/Bond/Servo/ToolUnits.h
index d010744..fddb2e3 100644
--- a/SourceCode/Bond/Servo/ToolUnits.h
+++ b/SourceCode/Bond/Servo/ToolUnits.h
@@ -29,5 +29,6 @@
static std::string getRecipePath();
static std::string getCurrentTimeString();
static bool startsWith(const std::string& str, const std::string& prefix);
+ static std::string& toHexString(int value, std::string& strOut);
};
diff --git a/SourceCode/Bond/Servo/resource.h b/SourceCode/Bond/Servo/resource.h
index 7f2b3fb..3f54a12 100644
--- a/SourceCode/Bond/Servo/resource.h
+++ b/SourceCode/Bond/Servo/resource.h
Binary files differ
diff --git a/SourceCode/Bond/x64/Debug/AlarmList.csv b/SourceCode/Bond/x64/Debug/AlarmList.csv
new file mode 100644
index 0000000..08cd213
--- /dev/null
+++ b/SourceCode/Bond/x64/Debug/AlarmList.csv
@@ -0,0 +1,3 @@
+锘縉o,UNIT ID,UNIT NO,Alarm Level,Alarm Code,AlarmID,Alarm Text,Description
+1,EFEM(ROBOT)-EFEM,,0,2,100,Fatal communication error in the ACLS receive loop. Please reboot MCC., Fatal communication error in the ACLS receive loop. Please reboot MCC.
+2,Load Port 1-EFEM,,1,1,101,"Must check substrate location due to the failure of ACLS operation <%s> ; To protect glass, a dummy glass has been created"," Must check substrate location due to the failure of ACLS operation <%s> ; To protect glass, a dummy glass has been created"
\ No newline at end of file
--
Gitblit v1.9.3