shjung 2 lat temu
rodzic
commit
74d968b482

+ 1 - 1
src/main/java/com/its/vms/ui/MainUI.java

@@ -257,7 +257,7 @@ public class MainUI {
                 result = this.selObj.channelClose();
                 break;
             case 2:
-                result = (this.selObj.reset(null) == 0);
+                result = this.selObj.reset(null);
                 break;
             case 4:
                 result = true;

+ 181 - 167
src/main/java/com/its/vms/ui/SubUI.form

@@ -1,17 +1,17 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.its.vms.ui.SubUI">
-  <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+  <grid id="27dc6" binding="rootPanel" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
     <margin top="0" left="0" bottom="0" right="0"/>
     <constraints>
-      <xy x="20" y="20" width="838" height="502"/>
+      <xy x="20" y="20" width="924" height="502"/>
     </constraints>
     <properties/>
     <border type="none"/>
     <children>
-      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="10" left="4" bottom="0" right="4"/>
+      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+        <margin top="0" left="4" bottom="0" right="4"/>
         <constraints>
-          <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
         </constraints>
         <properties/>
         <border type="none"/>
@@ -24,7 +24,7 @@
             <properties/>
             <border type="none"/>
             <children>
-              <grid id="31344" layout-manager="GridLayoutManager" row-count="5" column-count="8" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+              <grid id="31344" layout-manager="GridLayoutManager" row-count="5" column-count="11" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
                 <margin top="0" left="0" bottom="0" right="0"/>
                 <constraints>
                   <grid row="0" column="0" row-span="5" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -34,7 +34,7 @@
                 <children>
                   <component id="a6a03" class="javax.swing.JTextField" binding="txtName">
                     <constraints>
-                      <grid row="1" column="3" row-span="1" col-span="5" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                      <grid row="1" column="4" row-span="1" col-span="3" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
                         <preferred-size width="200" height="-1"/>
                       </grid>
                     </constraints>
@@ -47,7 +47,7 @@
                   </component>
                   <component id="11da9" class="javax.swing.JLabel">
                     <constraints>
-                      <grid row="1" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                      <grid row="1" column="0" row-span="1" col-span="4" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
                       <font name="Malgun Gothic" size="12" style="0"/>
@@ -72,9 +72,9 @@
                       <text value="ㅣ도어"/>
                     </properties>
                   </component>
-                  <component id="81652" class="javax.swing.JTextField" binding="txtHeater">
+                  <component id="a2741" class="javax.swing.JTextField" binding="txtDoor">
                     <constraints>
-                      <grid row="4" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                      <grid row="3" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
                         <minimum-size width="100" height="-1"/>
                         <preferred-size width="100" height="-1"/>
                         <maximum-size width="100" height="-1"/>
@@ -84,12 +84,12 @@
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="가동/중지"/>
+                      <text value="열림/닫힘"/>
                     </properties>
                   </component>
-                  <component id="bb275" class="javax.swing.JTextField" binding="txtTemp">
+                  <component id="4b05a" class="javax.swing.JTextField" binding="txtState">
                     <constraints>
-                      <grid row="4" column="7" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                      <grid row="0" column="8" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
                         <minimum-size width="100" height="-1"/>
                         <preferred-size width="100" height="-1"/>
                         <maximum-size width="100" height="-1"/>
@@ -99,50 +99,60 @@
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="34"/>
+                      <text value="통신"/>
                     </properties>
                   </component>
-                  <component id="54bbc" class="javax.swing.JLabel">
+                  <component id="9e468" class="javax.swing.JTextField" binding="txtCtlrId">
                     <constraints>
-                      <grid row="3" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                      <grid row="0" column="5" row-span="1" col-span="2" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                        <preferred-size width="150" height="-1"/>
+                      </grid>
                     </constraints>
                     <properties>
+                      <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
-                      <text value="ㅣ팬"/>
+                      <horizontalAlignment value="0"/>
+                      <text value="제어기 ID"/>
                     </properties>
                   </component>
-                  <component id="140c3" class="javax.swing.JLabel">
+                  <component id="6d1e0" class="javax.swing.JTextField" binding="txtNmbr">
                     <constraints>
-                      <grid row="4" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                      <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
+                      <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
-                      <text value="ㅣ히터"/>
+                      <horizontalAlignment value="0"/>
+                      <text value="관리번호"/>
                     </properties>
                   </component>
-                  <component id="ba507" class="javax.swing.JLabel">
+                  <component id="a60a6" class="javax.swing.JLabel">
                     <constraints>
-                      <grid row="4" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                      <grid row="0" column="0" row-span="1" col-span="4" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
                       <font name="Malgun Gothic" size="12" style="0"/>
-                      <text value="ㅣ함체온도"/>
+                      <text value="ㅣVMS"/>
                     </properties>
                   </component>
-                  <component id="5de49" class="javax.swing.JTextField" binding="txtIpAddr">
+                  <component id="72a2d" class="javax.swing.JTextField" binding="txtFan">
                     <constraints>
-                      <grid row="2" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+                      <grid row="3" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                        <minimum-size width="100" height="-1"/>
+                        <preferred-size width="100" height="-1"/>
+                        <maximum-size width="100" height="-1"/>
+                      </grid>
                     </constraints>
                     <properties>
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="192.168.113.112"/>
+                      <text value="가동/중지"/>
                     </properties>
                   </component>
-                  <component id="a2741" class="javax.swing.JTextField" binding="txtDoor">
+                  <component id="3b1f0" class="javax.swing.JTextField" binding="txtPort">
                     <constraints>
-                      <grid row="3" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                      <grid row="2" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
                         <minimum-size width="100" height="-1"/>
                         <preferred-size width="100" height="-1"/>
                         <maximum-size width="100" height="-1"/>
@@ -152,12 +162,30 @@
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="열림/닫힘"/>
+                      <text value="3001"/>
                     </properties>
                   </component>
-                  <component id="72a2d" class="javax.swing.JTextField" binding="txtFan">
+                  <component id="ba507" class="javax.swing.JLabel">
+                    <constraints>
+                      <grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="ㅣ함체온도"/>
+                    </properties>
+                  </component>
+                  <component id="140c3" class="javax.swing.JLabel">
+                    <constraints>
+                      <grid row="4" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="ㅣ히터"/>
+                    </properties>
+                  </component>
+                  <component id="bb275" class="javax.swing.JTextField" binding="txtTemp">
                     <constraints>
-                      <grid row="3" column="7" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                      <grid row="4" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
                         <minimum-size width="100" height="-1"/>
                         <preferred-size width="100" height="-1"/>
                         <maximum-size width="100" height="-1"/>
@@ -167,12 +195,12 @@
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="가동/중지"/>
+                      <text value="34"/>
                     </properties>
                   </component>
-                  <component id="4b05a" class="javax.swing.JTextField" binding="txtState">
+                  <component id="81652" class="javax.swing.JTextField" binding="txtHeater">
                     <constraints>
-                      <grid row="0" column="6" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
+                      <grid row="4" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
                         <minimum-size width="100" height="-1"/>
                         <preferred-size width="100" height="-1"/>
                         <maximum-size width="100" height="-1"/>
@@ -182,176 +210,162 @@
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="통신"/>
+                      <text value="가동/중지"/>
                     </properties>
                   </component>
-                  <component id="9e468" class="javax.swing.JTextField" binding="txtCtlrId">
+                  <component id="5de49" class="javax.swing.JTextField" binding="txtIpAddr">
                     <constraints>
-                      <grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                        <preferred-size width="150" height="-1"/>
-                      </grid>
+                      <grid row="2" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
                       <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
                       <horizontalAlignment value="0"/>
-                      <text value="제어기 ID"/>
+                      <text value="192.168.113.112"/>
                     </properties>
                   </component>
-                  <component id="6d1e0" class="javax.swing.JTextField" binding="txtNmbr">
+                  <component id="8df61" class="javax.swing.JButton" binding="btnReqStatus">
                     <constraints>
-                      <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+                      <grid row="1" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
-                      <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
-                      <horizontalAlignment value="0"/>
-                      <text value="관리번호"/>
+                      <text value="상태정보요청"/>
                     </properties>
                   </component>
-                  <component id="a60a6" class="javax.swing.JLabel">
+                  <component id="1fbd2" class="javax.swing.JButton" binding="btnReqParam">
                     <constraints>
-                      <grid row="0" column="0" row-span="1" col-span="3" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                      <grid row="2" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
                       <font name="Malgun Gothic" size="12" style="0"/>
-                      <text value="ㅣVMS"/>
+                      <text value="파라미터 요청"/>
                     </properties>
                   </component>
-                  <component id="3b1f0" class="javax.swing.JTextField" binding="txtPort">
+                  <component id="b14ca" class="javax.swing.JButton" binding="btnScnDnld">
                     <constraints>
-                      <grid row="2" column="7" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false">
-                        <minimum-size width="100" height="-1"/>
-                        <preferred-size width="100" height="-1"/>
-                        <maximum-size width="100" height="-1"/>
-                      </grid>
+                      <grid row="3" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
-                      <editable value="false"/>
                       <font name="Malgun Gothic" size="12" style="0"/>
-                      <horizontalAlignment value="0"/>
-                      <text value="3001"/>
+                      <text value="시나리오 다운로드"/>
+                    </properties>
+                  </component>
+                  <component id="1d668" class="javax.swing.JButton" binding="btnTimeSync">
+                    <constraints>
+                      <grid row="4" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="시간 설정"/>
+                    </properties>
+                  </component>
+                  <component id="a85f9" class="javax.swing.JButton" binding="btnSignBoardOff">
+                    <constraints>
+                      <grid row="1" column="9" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="전광판 전원 OFF"/>
+                      <toolTipText value=""/>
                     </properties>
                   </component>
+                  <component id="7c99b" class="javax.swing.JButton" binding="btnSignBoardOn">
+                    <constraints>
+                      <grid row="1" column="10" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="전광판 전원 ON"/>
+                      <toolTipText value=""/>
+                    </properties>
+                  </component>
+                  <component id="660a8" class="javax.swing.JButton" binding="btnReqFan">
+                    <constraints>
+                      <grid row="4" column="9" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="Fan 제어"/>
+                      <toolTipText value=""/>
+                    </properties>
+                  </component>
+                  <component id="3d84f" class="javax.swing.JButton" binding="btnReqHeater">
+                    <constraints>
+                      <grid row="4" column="10" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="Heater 제어"/>
+                      <toolTipText value=""/>
+                    </properties>
+                  </component>
+                  <component id="58c64" class="javax.swing.JComboBox" binding="cboControl">
+                    <constraints>
+                      <grid row="3" column="9" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <model>
+                        <item value="0x00: 꺼짐"/>
+                        <item value="0x01: 켜짐"/>
+                        <item value="0x02: 자동"/>
+                      </model>
+                    </properties>
+                  </component>
+                  <component id="54bbc" class="javax.swing.JLabel">
+                    <constraints>
+                      <grid row="3" column="5" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="ㅣ팬"/>
+                    </properties>
+                  </component>
+                  <component id="89546" class="javax.swing.JLabel">
+                    <constraints>
+                      <grid row="2" column="9" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="ㅣ팬/히터 제어 구분"/>
+                    </properties>
+                  </component>
+                  <component id="ce753" class="javax.swing.JLabel">
+                    <constraints>
+                      <grid row="2" column="10" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <text value="ㅣ팬/히터 제어 값"/>
+                    </properties>
+                  </component>
+                  <grid id="37f8a" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+                    <margin top="0" left="0" bottom="0" right="0"/>
+                    <constraints>
+                      <grid row="3" column="10" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+                    </constraints>
+                    <properties/>
+                    <border type="none"/>
+                    <children>
+                      <component id="b2552" class="javax.swing.JSpinner" binding="spControl">
+                        <constraints>
+                          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
+                        </constraints>
+                        <properties/>
+                      </component>
+                    </children>
+                  </grid>
                 </children>
               </grid>
             </children>
           </grid>
-          <grid id="62443" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-            <margin top="0" left="0" bottom="0" right="0"/>
-            <constraints>
-              <grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="a85f9" class="javax.swing.JButton" binding="btnSingnBoardOff">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="전광판 전원 OFF"/>
-                  <toolTipText value=""/>
-                </properties>
-              </component>
-              <component id="7c99b" class="javax.swing.JButton" binding="btnSingnBoardOn">
-                <constraints>
-                  <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="전광판 전원 ON"/>
-                  <toolTipText value=""/>
-                </properties>
-              </component>
-              <component id="660a8" class="javax.swing.JButton" binding="btnFocusIn">
-                <constraints>
-                  <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="14" style="1"/>
-                  <text value="Focus (+)"/>
-                  <toolTipText value="FOCUS Near"/>
-                </properties>
-              </component>
-              <component id="3d84f" class="javax.swing.JButton" binding="btnFocusOut">
-                <constraints>
-                  <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="14" style="1"/>
-                  <text value="Focus (-)"/>
-                  <toolTipText value="FOCUS Far"/>
-                </properties>
-              </component>
-            </children>
-          </grid>
-          <grid id="e429a" layout-manager="GridLayoutManager" row-count="4" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-            <margin top="0" left="0" bottom="0" right="0"/>
-            <constraints>
-              <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
-            </constraints>
-            <properties/>
-            <border type="none"/>
-            <children>
-              <component id="8df61" class="javax.swing.JButton" binding="btnReqStatus">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="상태정보요청"/>
-                </properties>
-              </component>
-              <component id="1fbd2" class="javax.swing.JButton" binding="btnReqParam">
-                <constraints>
-                  <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="파라미터 요청"/>
-                </properties>
-              </component>
-              <component id="b14ca" class="javax.swing.JButton" binding="btnScnDnld">
-                <constraints>
-                  <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="시나리오 다운로드"/>
-                </properties>
-              </component>
-              <component id="1d668" class="javax.swing.JButton" binding="btnTimeSync">
-                <constraints>
-                  <grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <font name="Malgun Gothic" size="12" style="0"/>
-                  <text value="시간 설정"/>
-                </properties>
-              </component>
-            </children>
-          </grid>
         </children>
       </grid>
-      <grid id="c02d8" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-        <margin top="0" left="0" bottom="0" right="0"/>
-        <constraints>
-          <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false">
-            <minimum-size width="-1" height="5"/>
-            <preferred-size width="-1" height="5"/>
-            <maximum-size width="-1" height="5"/>
-          </grid>
-        </constraints>
-        <properties/>
-        <border type="none"/>
-        <children/>
-      </grid>
       <grid id="f1a93" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
         <margin top="0" left="4" bottom="0" right="4"/>
         <constraints>
-          <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
+          <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
             <minimum-size width="-1" height="200"/>
           </grid>
         </constraints>

+ 128 - 30
src/main/java/com/its/vms/ui/SubUI.java

@@ -3,8 +3,12 @@ package com.its.vms.ui;
 import com.intellij.uiDesigner.core.GridConstraints;
 import com.intellij.uiDesigner.core.GridLayoutManager;
 import com.intellij.uiDesigner.core.Spacer;
+import com.its.vms.domain.NET;
 import com.its.vms.dto.TbVmsCtlrDto;
 import com.its.vms.entity.TbVmsCtlrStts;
+import com.its.vms.xnettcp.vms.process.TcpServerSendData;
+import com.its.vms.xnettcp.vms.protocol.enums.eVmsOpCode;
+import com.its.vms.xnettcp.vms.protocol.impl.VmsReqStatusControl;
 import com.sun.management.OperatingSystemMXBean;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
@@ -32,10 +36,10 @@ public abstract class SubUI {
     private JPanel pnlCtlr;
     private JTextArea taLog;
     private JPanel pnlControl;
-    private JButton btnFocusIn;
-    private JButton btnFocusOut;
-    private JButton btnSingnBoardOn;
-    private JButton btnSingnBoardOff;
+    private JButton btnReqFan;
+    private JButton btnReqHeater;
+    private JButton btnSignBoardOn;
+    private JButton btnSignBoardOff;
     private JTextField txtName;
     private JTextField txtNmbr;
     private JTextField txtPort;
@@ -51,6 +55,8 @@ public abstract class SubUI {
     private JButton btnReqParam;
     private JButton btnScnDnld;
     private JButton btnTimeSync;
+    private JComboBox cboControl;
+    private JSpinner spControl;
 
     protected abstract void actionButtonClicked();
 
@@ -68,12 +74,104 @@ public abstract class SubUI {
         Font d2font = new Font("D2Coding", Font.PLAIN, 12);
         taLog.setFont(d2font);
 
+        SpinnerModel value = new SpinnerNumberModel(0, 0, 100, 1);
+        spControl.setModel(value);
+
         btnLogClear.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 taLog.setText(null);
             }
         });
+        btnReqStatus.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(1);   // 상태정보요청
+            }
+        });
+        btnReqParam.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(2);   // 파라미터정보요청
+            }
+        });
+        btnScnDnld.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(3);   // 시나리오 다운로드
+            }
+        });
+        btnTimeSync.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(4);   // 시간설정
+            }
+        });
+        btnSignBoardOff.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(5);   // 전광판 OFF
+            }
+        });
+        btnSignBoardOn.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(6);   // 전광판 ON
+            }
+        });
+        btnReqFan.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(7);   // FAN 제어
+            }
+        });
+        btnReqHeater.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                statusControl(8);   // HEATER 제어
+            }
+        });
+    }
+
+    public void statusControl(int controlType) {
+        if (this.selObj == null) {
+            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 선택되지 않았습니다. 목록을 더블클릭하여 제어기를 선택하세요.", "제어기 선택", JOptionPane.ERROR_MESSAGE);
+            return;
+        }
+        if (this.selObj.getNetState() == NET.CLOSED) {
+            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 현재 연결이 되어 있지 않습니다.", "제어기 연결 상태", JOptionPane.ERROR_MESSAGE);
+            return;
+        }
+
+        String message = "";
+        String title = "제어기 상태 제어";
+        switch (controlType) {
+            case 1: message = "제어기의 상태정보를 요청 하시겠습니까?";          break;
+            case 2: message = "제어기의 파라미터정보를 요청 하시겠습니까?";      break;
+            case 3: message = "제어기의 표출 시나리오를 다운로드 하시겠습니까?"; break;
+            case 4: message = "제어기의 시간 정보를 설정 하시겠습니까?";         break;
+            case 5: message = "제어기의 전광판 전원을 OFF 하시겠습니까?";        break;
+            case 6: message = "제어기의 전광판 전원을 ON 하시겠습니까?";         break;
+            case 7: message = "제어기의 FAN 을 제어 하시겠습니까?";              break;
+            case 8: message = "제어기의 HEATER 를 제어 하시겠습니까?";           break;
+            default: return;
+        }
+        if (JOptionPane.showConfirmDialog(getRootPanel(), message, title, JOptionPane.YES_NO_OPTION) != 0) {
+            return;
+        }
+
+        VmsReqStatusControl statusControl = new VmsReqStatusControl(this.selObj);
+        switch (controlType) {
+            case 1: this.selObj.addRequestData(new TcpServerSendData(eVmsOpCode.OP_VMS_STATUS_REQ, null));  return;
+            case 2: this.selObj.addRequestData(new TcpServerSendData(eVmsOpCode.OP_VMS_PARAMETER_REQ, null));  return;
+            case 3: this.selObj.downloadForm(false); return;
+            case 4: statusControl.controlSystemTime(); break;
+            case 5: statusControl.controlSignboardPower((byte)0x00); break;
+            case 6: statusControl.controlSignboardPower((byte)0x01); break;
+            case 7: statusControl.controlFan((byte)(cboControl.getSelectedIndex() & 0xff), (byte)((Integer)spControl.getValue() & 0xFF)); break;
+            case 8: statusControl.controlHeater((byte)(cboControl.getSelectedIndex() & 0xff), (byte)((Integer)spControl.getValue() & 0xFF)); break;
+        }
+        this.selObj.addRequestData(new TcpServerSendData(eVmsOpCode.OP_VMS_STATUS_CONTROL, statusControl));
     }
 
     public void logging(String txt) {
@@ -269,32 +367,32 @@ public abstract class SubUI {
         final JPanel panel2 = new JPanel();
         panel2.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1));
         pnlCtlr.add(panel2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnSingnBoardOff = new JButton();
-        Font btnZoomInFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnSingnBoardOff.getFont());
-        if (btnZoomInFont != null) btnSingnBoardOff.setFont(btnZoomInFont);
-        btnSingnBoardOff.setText("Zoom (+)");
-        btnSingnBoardOff.setToolTipText("ZOOM In");
-        panel2.add(btnSingnBoardOff, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnSingnBoardOn = new JButton();
-        Font btnZoomOutFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnSingnBoardOn.getFont());
-        if (btnZoomOutFont != null) btnSingnBoardOn.setFont(btnZoomOutFont);
-        btnSingnBoardOn.setText("Zoom (-)");
-        btnSingnBoardOn.setToolTipText("ZOOM Out");
-        panel2.add(btnSingnBoardOn, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnFocusIn = new JButton();
-        Font btnFocusInFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnFocusIn.getFont());
-        if (btnFocusInFont != null) btnFocusIn.setFont(btnFocusInFont);
-        btnFocusIn.setText("Focus (+)");
-        btnFocusIn.setToolTipText("FOCUS Near");
-        panel2.add(btnFocusIn, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnFocusOut = new JButton();
-        Font btnFocusOutFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnFocusOut.getFont());
-        if (btnFocusOutFont != null) btnFocusOut.setFont(btnFocusOutFont);
-        btnFocusOut.setText("Focus (-)");
-        btnFocusOut.setToolTipText("FOCUS Far");
-        panel2.add(btnFocusOut, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        spSpeed = new JSpinner();
-        panel2.add(spSpeed, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnSignBoardOff = new JButton();
+        Font btnZoomInFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnSignBoardOff.getFont());
+        if (btnZoomInFont != null) btnSignBoardOff.setFont(btnZoomInFont);
+        btnSignBoardOff.setText("Zoom (+)");
+        btnSignBoardOff.setToolTipText("ZOOM In");
+        panel2.add(btnSignBoardOff, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnSignBoardOn = new JButton();
+        Font btnZoomOutFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnSignBoardOn.getFont());
+        if (btnZoomOutFont != null) btnSignBoardOn.setFont(btnZoomOutFont);
+        btnSignBoardOn.setText("Zoom (-)");
+        btnSignBoardOn.setToolTipText("ZOOM Out");
+        panel2.add(btnSignBoardOn, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnReqFan = new JButton();
+        Font btnFocusInFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnReqFan.getFont());
+        if (btnFocusInFont != null) btnReqFan.setFont(btnFocusInFont);
+        btnReqFan.setText("Focus (+)");
+        btnReqFan.setToolTipText("FOCUS Near");
+        panel2.add(btnReqFan, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnReqHeater = new JButton();
+        Font btnFocusOutFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnReqHeater.getFont());
+        if (btnFocusOutFont != null) btnReqHeater.setFont(btnFocusOutFont);
+        btnReqHeater.setText("Focus (-)");
+        btnReqHeater.setToolTipText("FOCUS Far");
+        panel2.add(btnReqHeater, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        spControl = new JSpinner();
+        panel2.add(spControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
         final JPanel panel3 = new JPanel();
         panel3.setLayout(new GridLayoutManager(3, 3, new Insets(0, 0, 0, 0), -1, -1, true, true));
         pnlCtlr.add(panel3, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));