shjung 2 年之前
父節點
當前提交
3b1bdd0e3f

+ 1 - 0
conf/cctv-comm-server.pid

@@ -0,0 +1 @@
+4496

+ 14 - 1
pom.xml

@@ -33,11 +33,17 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <!--main 함수가 있는 class 경로-->
         <start-class>com.its.cctv.CctvCommServerApplication</start-class>
-        <webapp.lib>C:\DEV\ITS\01.WINDOWS\22.07.PyeongTaek\JAVA\repository</webapp.lib>
+        <webapp.lib>C:\java\repository</webapp.lib>
         <maven.test.skip>true</maven.test.skip>
     </properties>
 
     <dependencies>
+        <dependency>
+            <groupId>org.fusesource.jansi</groupId>
+            <artifactId>jansi</artifactId>
+            <version>1.8</version>
+        </dependency>
+
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
@@ -90,6 +96,13 @@
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
+            <exclusions>
+                <!-- Exclude the Tomcat dependency -->
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-tomcat</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.mybatis.spring.boot</groupId>

+ 8 - 4
src/main/java/com/its/cctv/entity/TbCctvCtlr.java

@@ -104,6 +104,10 @@ public class TbCctvCtlr {
 		this.paramRequest = true;
 	}
 
+	public short getAddress() {
+		return (short)this.CCTV_CTLR_LOCAL_NO;
+	}
+
 	public synchronized void channelOpen(Channel channel) {
 		this.netState = NET.LOGIN_REQ;
 		this.channel = channel;
@@ -133,11 +137,11 @@ public class TbCctvCtlr {
 	 */
 	public void initReqPacket() {
 		if (this.reqState == null) {
-			this.reqState = new CctvReqState((short)this.CCTV_CTLR_LOCAL_NO);
+			this.reqState = new CctvReqState(getAddress());
 			this.reqState.makeCRC();
 		}
 		if (this.reqParam == null) {
-			this.reqParam = new CctvReqParam((short)this.CCTV_CTLR_LOCAL_NO);
+			this.reqParam = new CctvReqParam(getAddress());
 			this.reqParam.makeCRC();
 		}
 	}
@@ -183,7 +187,7 @@ public class TbCctvCtlr {
 			log.error("Hardware Reset Request: channel not connected: [{}]", this);
 			return false;
 		}
-		CctvReqResetHw req = new CctvReqResetHw((byte)this.CCTV_CTLR_LOCAL_NO);
+		CctvReqResetHw req = new CctvReqResetHw(getAddress());
 		req.makeCRC();
 		ByteBuffer sendBuffer = req.getByteBuffer();
 		if (!sendData(sendBuffer, 0, "cctv_ResetHw")) {
@@ -199,7 +203,7 @@ public class TbCctvCtlr {
 			log.error("Software Reset Request: channel not connected: [{}]", this);
 			return false;
 		}
-		CctvReqResetHw req = new CctvReqResetHw((byte)this.CCTV_CTLR_LOCAL_NO);
+		CctvReqResetHw req = new CctvReqResetHw(getAddress());
 		req.makeCRC();
 		ByteBuffer sendBuffer = req.getByteBuffer();
 		if (!sendData(sendBuffer, 0, "cctv_ResetHw")) {

+ 6 - 6
src/main/java/com/its/cctv/ui/MainUI.form

@@ -107,13 +107,13 @@
             <properties/>
             <border type="none"/>
             <children>
-              <component id="660a8" class="javax.swing.JButton" binding="btnImage">
+              <component id="660a8" class="javax.swing.JButton" binding="btnControl">
                 <constraints>
                   <grid row="0" column="7" 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="정지영상"/>
+                  <text value="제어"/>
                 </properties>
               </component>
               <hspacer id="60c19">
@@ -121,22 +121,22 @@
                   <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
                 </constraints>
               </hspacer>
-              <component id="3d84f" class="javax.swing.JButton" binding="btnInitialize">
+              <component id="3d84f" class="javax.swing.JButton" binding="btnResetSw">
                 <constraints>
                   <grid row="0" column="6" 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="초기화"/>
+                  <text value="리셋(SW)"/>
                 </properties>
               </component>
-              <component id="7c99b" class="javax.swing.JButton" binding="btnReset">
+              <component id="7c99b" class="javax.swing.JButton" binding="btnResetHw">
                 <constraints>
                   <grid row="0" column="5" 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="리셋"/>
+                  <text value="리셋(HW)"/>
                 </properties>
               </component>
               <component id="a85f9" class="javax.swing.JButton" binding="btnDisconnect">

+ 58 - 52
src/main/java/com/its/cctv/ui/MainUI.java

@@ -4,7 +4,6 @@ import com.intellij.uiDesigner.core.GridConstraints;
 import com.intellij.uiDesigner.core.GridLayoutManager;
 import com.intellij.uiDesigner.core.Spacer;
 import com.its.app.utils.SysUtils;
-import com.its.cctv.domain.NET;
 import com.its.cctv.entity.TbCctvCtlr;
 import com.its.cctv.global.AppRepository;
 import com.sun.management.OperatingSystemMXBean;
@@ -66,9 +65,9 @@ public class MainUI {
     private JLabel lblCpuRate;
     private JLabel lblMemoryUsage;
     private JPanel pnlControl;
-    private JButton btnImage;
-    private JButton btnInitialize;
-    private JButton btnReset;
+    private JButton btnControl;
+    private JButton btnResetSw;
+    private JButton btnResetHw;
     private JButton btnDisconnect;
     private JTextField txtName;
     private JTextField txtId;
@@ -112,7 +111,6 @@ public class MainUI {
         } catch (IOException e) {
         }
 
-        //taLog.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14));
         Font d2font = new Font("D2Coding", Font.PLAIN, 14);
         if (d2font != null) {
             taLog.setFont(d2font);
@@ -185,9 +183,9 @@ public class MainUI {
                 // double click
                 if (me.getClickCount() == 2) {
                     if (!updateControllerInfo()) {
-                        if (subUIController.isVisible()) {
-                            subUIController.setVisible(false);
-                        }
+//                        if (subUIController.isVisible()) {
+//                            subUIController.setVisible(false);
+//                        }
                     }
                 }
             }
@@ -198,19 +196,19 @@ public class MainUI {
                 controlController(1);
             }
         });
-        btnReset.addActionListener(new ActionListener() {
+        btnResetHw.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 controlController(2);
             }
         });
-        btnInitialize.addActionListener(new ActionListener() {
+        btnResetSw.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 controlController(3);
             }
         });
-        btnImage.addActionListener(new ActionListener() {
+        btnControl.addActionListener(new ActionListener() {
             @Override
             public void actionPerformed(ActionEvent e) {
                 controlController(4);
@@ -224,53 +222,60 @@ public class MainUI {
      * @param type
      */
     public void controlController(int type) {
-        if (selObj == null) {
+        if (this.selObj == null) {
             JOptionPane.showMessageDialog(getRootPanel(), "제어기가 선택되지 않았습니다. 목록을 더블클릭하여 제어기를 선택하세요.", "제어기 선택", JOptionPane.ERROR_MESSAGE);
             return;
         }
-        if (selObj.getNetState() == NET.CLOSED) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 현재 연결이 되어 있지 않습니다.", "제어기 연결 상태", JOptionPane.ERROR_MESSAGE);
-            return;
-        }
-        String message, title;
+//        if (this.selObj.getNetState() == NET.CLOSED) {
+//            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 현재 연결이 되어 있지 않습니다.", "제어기 연결 상태", JOptionPane.ERROR_MESSAGE);
+//            return;
+//        }
+
+        boolean isDirectCmd = true;
+        String message = "", title = "";
         switch (type) {
             case 1:
                 message = "제어기와의 연결을 종료 하시겠습니까?";
                 title = "제어기 연결 종료";
                 break;
             case 2:
-                message = "제어기를 리셋 하시겠습니까?";
-                title = "제어기 리셋";
+                message = "제어기를 리셋(HW) 하시겠습니까?";
+                title = "제어기 리셋(HW)";
                 break;
             case 3:
-                message = "제어기를 초기화 하시겠습니까?";
-                title = "제어기 초기화";
+                message = "제어기를 리셋(SW) 하시겠습니까?";
+                title = "제어기 리셋(SW)";
                 break;
             case 4:
-                message = "제어기의 정지영상 정보를 요청하시겠습니까?";
-                title = "제어기 정지영상 요청";
+                isDirectCmd = false;
                 break;
             default:
                 return;
         }
-        if (JOptionPane.showConfirmDialog(getRootPanel(), message, title, JOptionPane.YES_NO_OPTION) != 0) {
-            return;
+        if (isDirectCmd) {
+            if (JOptionPane.showConfirmDialog(getRootPanel(), message, title, JOptionPane.YES_NO_OPTION) != 0) {
+                return;
+            }
         }
 
         boolean result = false;
         switch (type) {
             case 1:
-                result = selObj.channelClose();
+                result = this.selObj.channelClose();
                 break;
             case 2:
-                result = selObj.resetHw();
+                result = this.selObj.resetHw();
                 break;
             case 3:
-                //result = selObj.initialize();
+                result = this.selObj.resetSw();
+                break;
+            case 4:
+                result = true;
+                if (!this.subUIController.isVisible()) {
+                    this.subUIController.setVisible(true);
+                }
+                this.subUIController.setState(JFrame.NORMAL);
                 break;
-//            case 4:
-//                result = selObj.stopImage((byte) 0x01);
-//                break;
             default:
                 return;
         }
@@ -286,22 +291,23 @@ public class MainUI {
 
         int row = tblCtlrList.getSelectedRow();
         if (row < 0) {
+            JOptionPane.showMessageDialog(getRootPanel(), "목록에서 CCTV 를 선택해주세요.", "CCTV 제어", JOptionPane.ERROR_MESSAGE);
             return false;
         }
 
         txtId.setText("");
         txtName.setText("");
         CtlrSttsTableModel tableModel = (CtlrSttsTableModel) tblCtlrList.getModel();
-        selObj = tableModel.getControllerInfo(row);
-        if (selObj != null) {
+        this.selObj = tableModel.getControllerInfo(row);
+        if (this.selObj != null) {
             txtId.setText(selObj.getCCTV_CTLR_ID());
             txtName.setText(selObj.getCCTV_NM());
 
             subUIController.updateInfo(selObj);
-            if (!subUIController.isVisible()) {
-                subUIController.setVisible(true);
-            }
-            subUIController.setState(JFrame.NORMAL);
+            //if (!subUIController.isVisible()) {
+            //    subUIController.setVisible(true);
+            //}
+            //subUIController.setState(JFrame.NORMAL);
             return true;
         }
         return false;
@@ -473,23 +479,23 @@ public class MainUI {
         pnlControl = new JPanel();
         pnlControl.setLayout(new GridLayoutManager(1, 8, new Insets(0, 0, 0, 2), 1, 1));
         pnlCtlr.add(pnlControl, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
-        btnImage = new JButton();
-        Font btnImageFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnImage.getFont());
-        if (btnImageFont != null) btnImage.setFont(btnImageFont);
-        btnImage.setText("정지영상");
-        pnlControl.add(btnImage, new GridConstraints(0, 7, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnControl = new JButton();
+        Font btnControlFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnControl.getFont());
+        if (btnControlFont != null) btnControl.setFont(btnControlFont);
+        btnControl.setText("제어");
+        pnlControl.add(btnControl, new GridConstraints(0, 7, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
         final Spacer spacer2 = new Spacer();
         pnlControl.add(spacer2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
-        btnInitialize = new JButton();
-        Font btnInitializeFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnInitialize.getFont());
-        if (btnInitializeFont != null) btnInitialize.setFont(btnInitializeFont);
-        btnInitialize.setText("초기화");
-        pnlControl.add(btnInitialize, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        btnReset = new JButton();
-        Font btnResetFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnReset.getFont());
-        if (btnResetFont != null) btnReset.setFont(btnResetFont);
-        btnReset.setText("리셋");
-        pnlControl.add(btnReset, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnResetSw = new JButton();
+        Font btnResetSwFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnResetSw.getFont());
+        if (btnResetSwFont != null) btnResetSw.setFont(btnResetSwFont);
+        btnResetSw.setText("리셋(SW)");
+        pnlControl.add(btnResetSw, new GridConstraints(0, 6, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnResetHw = new JButton();
+        Font btnResetHwFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnResetHw.getFont());
+        if (btnResetHwFont != null) btnResetHw.setFont(btnResetHwFont);
+        btnResetHw.setText("리셋(HW)");
+        pnlControl.add(btnResetHw, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
         btnDisconnect = new JButton();
         Font btnDisconnectFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnDisconnect.getFont());
         if (btnDisconnectFont != null) btnDisconnect.setFont(btnDisconnectFont);

+ 132 - 50
src/main/java/com/its/cctv/ui/SubUI.form

@@ -3,12 +3,12 @@
   <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">
     <margin top="0" left="0" bottom="0" right="0"/>
     <constraints>
-      <xy x="20" y="20" width="788" height="376"/>
+      <xy x="20" y="20" width="788" height="392"/>
     </constraints>
     <properties/>
     <border type="none"/>
     <children>
-      <grid id="d0095" binding="pnlCtlr" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+      <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"/>
         <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"/>
@@ -19,7 +19,7 @@
           <grid id="17544" binding="pnlControl" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="1" vgap="1">
             <margin top="0" left="0" bottom="0" right="2"/>
             <constraints>
-              <grid row="0" 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"/>
             </constraints>
             <properties/>
             <border type="none"/>
@@ -34,11 +34,7 @@
                 <children>
                   <component id="6d1e0" class="javax.swing.JTextField" binding="txtNmbr">
                     <constraints>
-                      <grid row="0" column="3" 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"/>
-                      </grid>
+                      <grid row="0" column="3" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
                     </constraints>
                     <properties>
                       <editable value="false"/>
@@ -96,7 +92,7 @@
                       <text value="ㅣ도어"/>
                     </properties>
                   </component>
-                  <component id="81652" class="javax.swing.JTextField">
+                  <component id="81652" class="javax.swing.JTextField" binding="txtHeater">
                     <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">
                         <minimum-size width="100" height="-1"/>
@@ -111,7 +107,7 @@
                       <text value="가동/중지"/>
                     </properties>
                   </component>
-                  <component id="bb275" class="javax.swing.JTextField">
+                  <component id="bb275" class="javax.swing.JTextField" binding="txtTemp">
                     <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">
                         <minimum-size width="100" height="-1"/>
@@ -153,13 +149,9 @@
                       <text value="ㅣ함체온도"/>
                     </properties>
                   </component>
-                  <component id="5de49" class="javax.swing.JTextField">
+                  <component id="5de49" class="javax.swing.JTextField" binding="txtIpAddr">
                     <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">
-                        <minimum-size width="120" height="-1"/>
-                        <preferred-size width="120" height="-1"/>
-                        <maximum-size width="120" height="-1"/>
-                      </grid>
+                      <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"/>
                     </constraints>
                     <properties>
                       <editable value="false"/>
@@ -168,7 +160,7 @@
                       <text value="192.168.113.112"/>
                     </properties>
                   </component>
-                  <component id="3b1f0" class="javax.swing.JTextField">
+                  <component id="3b1f0" class="javax.swing.JTextField" binding="txtPort">
                     <constraints>
                       <grid row="2" column="5" 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"/>
@@ -183,7 +175,7 @@
                       <text value="3001"/>
                     </properties>
                   </component>
-                  <component id="a2741" class="javax.swing.JTextField">
+                  <component id="a2741" class="javax.swing.JTextField" binding="txtDoor">
                     <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">
                         <minimum-size width="100" height="-1"/>
@@ -198,7 +190,7 @@
                       <text value="열림/닫힘"/>
                     </properties>
                   </component>
-                  <component id="72a2d" class="javax.swing.JTextField">
+                  <component id="72a2d" class="javax.swing.JTextField" binding="txtFan">
                     <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">
                         <minimum-size width="100" height="-1"/>
@@ -213,65 +205,90 @@
                       <text value="가동/중지"/>
                     </properties>
                   </component>
+                  <component id="4b05a" class="javax.swing.JTextField" binding="txtState">
+                    <constraints>
+                      <grid row="0" column="5" 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"/>
+                      </grid>
+                    </constraints>
+                    <properties>
+                      <editable value="false"/>
+                      <font name="Malgun Gothic" size="12" style="0"/>
+                      <horizontalAlignment value="0"/>
+                      <text value="통신"/>
+                    </properties>
+                  </component>
                 </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">
+          <grid id="62443" layout-manager="GridLayoutManager" row-count="5" 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="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
+              <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="btnZoomIn">
                 <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"/>
+                  <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="14" style="1"/>
                   <text value="Zoom (+)"/>
+                  <toolTipText value="ZOOM In"/>
                 </properties>
               </component>
               <component id="7c99b" class="javax.swing.JButton" binding="btnZoomOut">
                 <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"/>
+                  <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="Zoom (-)"/>
+                  <toolTipText value="ZOOM Out"/>
                 </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"/>
+                  <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 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"/>
+                  <grid row="4" 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>
+              <component id="8bdb5" class="javax.swing.JSpinner" binding="spSpeed">
+                <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>
           <grid id="e429a" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="true" same-size-vertically="true" hgap="-1" vgap="-1">
             <margin top="0" left="0" bottom="0" right="0"/>
             <constraints>
-              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
+              <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="6057a" class="javax.swing.JButton" binding="button2" default-binding="true">
+              <component id="6057a" class="javax.swing.JButton" binding="btnPanLeft">
                 <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">
                     <minimum-size width="50" height="50"/>
@@ -282,10 +299,11 @@
                 <properties>
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
-                  <text value=""/>
+                  <text value="◀"/>
+                  <toolTipText value="PAN Left"/>
                 </properties>
               </component>
-              <component id="90c8c" class="javax.swing.JButton" binding="button3" default-binding="true">
+              <component id="90c8c" class="javax.swing.JButton" binding="btnPanTiltLeftDown">
                 <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">
                     <minimum-size width="50" height="50"/>
@@ -297,9 +315,10 @@
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
                   <text value=""/>
+                  <toolTipText value="PAN TILT Left Down"/>
                 </properties>
               </component>
-              <component id="83d68" class="javax.swing.JButton" binding="button5" default-binding="true">
+              <component id="83d68" class="javax.swing.JButton" binding="btnStop">
                 <constraints>
                   <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -310,10 +329,11 @@
                 <properties>
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
-                  <text value="▣"/>
+                  <text value="■"/>
+                  <toolTipText value="STOP"/>
                 </properties>
               </component>
-              <component id="d5b58" class="javax.swing.JButton" binding="button6" default-binding="true">
+              <component id="d5b58" class="javax.swing.JButton" binding="btnTiltDown">
                 <constraints>
                   <grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -324,10 +344,11 @@
                 <properties>
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
-                  <text value=""/>
+                  <text value="▼"/>
+                  <toolTipText value="TILT Down"/>
                 </properties>
               </component>
-              <component id="9f7a9" class="javax.swing.JButton" binding="button8" default-binding="true">
+              <component id="9f7a9" class="javax.swing.JButton" binding="btnPanRight">
                 <constraints>
                   <grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -338,10 +359,11 @@
                 <properties>
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
-                  <text value=""/>
+                  <text value="▶"/>
+                  <toolTipText value="PAN Right"/>
                 </properties>
               </component>
-              <component id="ec78f" class="javax.swing.JButton" binding="button9" default-binding="true">
+              <component id="ec78f" class="javax.swing.JButton" binding="btnPanTiltRightDown">
                 <constraints>
                   <grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -353,9 +375,10 @@
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
                   <text value=""/>
+                  <toolTipText value="PAN TILT Left Down"/>
                 </properties>
               </component>
-              <component id="90b80" class="javax.swing.JButton" binding="button1" default-binding="true">
+              <component id="90b80" class="javax.swing.JButton" binding="btnPanTiltLeftUp">
                 <constraints>
                   <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -367,9 +390,10 @@
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
                   <text value=""/>
+                  <toolTipText value="PAN TILT Left Up"/>
                 </properties>
               </component>
-              <component id="2920a" class="javax.swing.JButton" binding="button4" default-binding="true">
+              <component id="2920a" class="javax.swing.JButton" binding="btnTiltUp">
                 <constraints>
                   <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -380,10 +404,11 @@
                 <properties>
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
-                  <text value=""/>
+                  <text value="▲"/>
+                  <toolTipText value="TILT Up"/>
                 </properties>
               </component>
-              <component id="e2bad" class="javax.swing.JButton" binding="button7" default-binding="true">
+              <component id="e2bad" class="javax.swing.JButton" binding="btnPanTiltRightUp">
                 <constraints>
                   <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false">
                     <minimum-size width="50" height="50"/>
@@ -395,6 +420,7 @@
                   <font name="Malgun Gothic" size="16" style="0"/>
                   <horizontalTextPosition value="2"/>
                   <text value=""/>
+                  <toolTipText value="PAN TILT Right Up"/>
                 </properties>
               </component>
             </children>
@@ -405,27 +431,83 @@
         <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="10"/>
-            <preferred-size width="-1" height="10"/>
-            <maximum-size width="-1" height="10"/>
+            <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="a186" 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"/>
+      <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="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false">
-            <minimum-size width="-1" height="10"/>
-            <preferred-size width="-1" height="10"/>
-            <maximum-size width="-1" height="10"/>
+          <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">
+            <minimum-size width="-1" height="200"/>
           </grid>
         </constraints>
         <properties/>
         <border type="none"/>
-        <children/>
+        <children>
+          <grid id="28ac8" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+            <margin top="2" left="0" bottom="0" right="2"/>
+            <constraints>
+              <grid row="0" column="0" 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="3346d" class="javax.swing.JLabel">
+                <constraints>
+                  <grid row="0" 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"/>
+                  <horizontalAlignment value="2"/>
+                  <icon value="static/image/logging.png"/>
+                  <text value="제어 로그"/>
+                </properties>
+              </component>
+              <component id="8bdd0" class="javax.swing.JButton" binding="btnLogClear">
+                <constraints>
+                  <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
+                </constraints>
+                <properties>
+                  <font name="Malgun Gothic" size="12" style="0"/>
+                  <horizontalTextPosition value="0"/>
+                  <text value="지우기"/>
+                </properties>
+              </component>
+              <hspacer id="b4fd9">
+                <constraints>
+                  <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
+                </constraints>
+              </hspacer>
+            </children>
+          </grid>
+          <scrollpane id="149c1">
+            <constraints>
+              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
+            </constraints>
+            <properties/>
+            <border type="none"/>
+            <children>
+              <component id="f75b0" class="javax.swing.JTextArea" binding="taLog">
+                <constraints/>
+                <properties>
+                  <background color="-16777216"/>
+                  <caretColor color="-1"/>
+                  <editable value="false"/>
+                  <font name="D2Coding" size="14" style="0"/>
+                  <foreground color="-1"/>
+                  <margin top="4" left="4" bottom="4" right="4"/>
+                  <text value="제어로그"/>
+                </properties>
+              </component>
+            </children>
+          </scrollpane>
+        </children>
       </grid>
     </children>
   </grid>

+ 465 - 180
src/main/java/com/its/cctv/ui/SubUI.java

@@ -2,9 +2,12 @@ package com.its.cctv.ui;
 
 import com.intellij.uiDesigner.core.GridConstraints;
 import com.intellij.uiDesigner.core.GridLayoutManager;
-import com.its.cctv.domain.NET;
+import com.intellij.uiDesigner.core.Spacer;
+import com.its.app.utils.ByteUtils;
 import com.its.cctv.entity.TbCctvCtlr;
+import com.its.cctv.entity.TbCctvCtlrStts;
 import com.its.cctv.service.CctvCtlrService;
+import com.its.cctv.xnettcp.cctv.protocol.CctvReqPtzCtrl;
 import com.sun.management.OperatingSystemMXBean;
 import lombok.Getter;
 import lombok.extern.slf4j.Slf4j;
@@ -13,9 +16,16 @@ import javax.swing.*;
 import javax.swing.plaf.FontUIResource;
 import javax.swing.text.StyleContext;
 import java.awt.*;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.awt.event.MouseAdapter;
+import java.awt.event.MouseEvent;
 import java.io.File;
 import java.io.IOException;
 import java.lang.management.ManagementFactory;
+import java.nio.ByteBuffer;
+import java.text.SimpleDateFormat;
+import java.util.Date;
 import java.util.Locale;
 
 @Slf4j
@@ -39,15 +49,24 @@ public abstract class SubUI {
     private JButton btnZoomIn;
     private JTextField txtName;
     private JTextField txtNmbr;
-    private JButton button1;
-    private JButton button2;
-    private JButton button3;
-    private JButton button4;
-    private JButton button5;
-    private JButton button6;
-    private JButton button7;
-    private JButton button8;
-    private JButton button9;
+    private JButton btnPanTiltLeftUp;
+    private JButton btnPanLeft;
+    private JButton btnPanTiltLeftDown;
+    private JButton btnTiltUp;
+    private JButton btnStop;
+    private JButton btnTiltDown;
+    private JButton btnPanTiltRightUp;
+    private JButton btnPanRight;
+    private JButton btnPanTiltRightDown;
+    private JTextField txtPort;
+    private JTextField txtIpAddr;
+    private JTextField txtDoor;
+    private JTextField txtFan;
+    private JTextField txtHeater;
+    private JTextField txtTemp;
+    private JTextField txtState;
+    private JButton btnLogClear;
+    private JSpinner spSpeed;
 
     protected abstract void actionButtonClicked();
 
@@ -63,83 +82,297 @@ public abstract class SubUI {
         } catch (IOException e) {
         }
 
-        //taLog.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14));
-        Font d2font = new Font("D2Coding", Font.PLAIN, 14);
+        Font d2font = new Font("D2Coding", Font.PLAIN, 12);
         if (d2font != null) {
-            //taLog.setFont(d2font);
+            taLog.setFont(d2font);
         }
         //taLog.setText(null);
 
+        SpinnerModel value = new SpinnerNumberModel(30, 0, 63, 1);
+        spSpeed.setModel(value);
+
+        btnZoomIn.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(0, 0, 1, 0, 0, 0, sped, 0, "Zoom In");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnZoomOut.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(0, 0, 2, 0, 0, 0, sped, 0, "Zoom Out");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnFocusIn.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(0, 0, 0, 1, 0, 0, 0, sped, "Focus Near");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnFocusOut.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(0, 0, 0, 2, 0, 0, 0, sped, "Focus Far");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+
+        btnStop.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                controlStop();
+            }
+        });
+        btnPanLeft.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(1, 0, 0, 0, sped, 0, 0, 0, "Pan Left");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnPanRight.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(2, 0, 0, 0, sped, 0, 0, 0, "Pan Right");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnTiltUp.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(0, 1, 0, 0, 0, sped, 0, 0, "Tilt Up");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnTiltDown.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(0, 2, 0, 0, 0, sped, 0, 0, "Tilt Down");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnPanTiltLeftUp.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(1, 1, 0, 0, sped, sped, 0, 0, "Pan Tilt Left Up");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnPanTiltRightUp.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(2, 1, 0, 0, sped, sped, 0, 0, "Pan Tilt Right Up");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnPanTiltLeftDown.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(1, 2, 0, 0, sped, sped, 0, 0, "Pan Tilt Left Down");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+        btnPanTiltRightDown.addMouseListener(new MouseAdapter() {
+            @Override
+            public void mousePressed(MouseEvent e) {
+                super.mousePressed(e);
+                int sped = (Integer) spSpeed.getValue();
+                controlPtz(2, 2, 0, 0, sped, sped, 0, 0, "Pan Tilt Right Down");
+            }
+
+            @Override
+            public void mouseReleased(MouseEvent e) {
+                super.mouseReleased(e);
+                controlStop();
+            }
+        });
+
+        btnLogClear.addActionListener(new ActionListener() {
+            @Override
+            public void actionPerformed(ActionEvent e) {
+                taLog.setText(null);
+            }
+        });
     }
 
-    public void updateInfo(TbCctvCtlr selObj) {
-        this.selObj = selObj;
-        txtNmbr.setText("");
-        txtName.setText("");
-        if (selObj != null) {
-            txtNmbr.setText(selObj.getCCTV_CTLR_ID());
-            txtName.setText(selObj.getCCTV_NM());
-        }
+    public void logging(String txt) {
+        Date now = new Date();
+        SimpleDateFormat sFormat = new SimpleDateFormat("[MM/dd HH:mm:ss] ");
+        String newLog = sFormat.format(now);
+        taLog.append("\n" + newLog + txt);
+        taLog.setCaretPosition(taLog.getDocument().getLength());
     }
 
-    /**
-     * 제어기 명령 처리
-     *
-     * @param type
-     */
-    public void controlController(int type) {
-        if (selObj == null) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 선택되지 않았습니다. 목록을 더블클릭하여 제어기를 선택하세요.", "제어기 선택", JOptionPane.ERROR_MESSAGE);
+    public void controlStop() {
+        if (this.selObj == null) {
+            logging("제어기가 선택되지 않았습니다.");
             return;
         }
-        if (selObj.getNetState() == NET.CLOSED) {
-            JOptionPane.showMessageDialog(getRootPanel(), "제어기가 현재 연결이 되어 있지 않습니다.", "제어기 연결 상태", JOptionPane.ERROR_MESSAGE);
-            return;
+
+        CctvReqPtzCtrl pkt = new CctvReqPtzCtrl(this.selObj.getAddress());
+        ByteBuffer sendBuffer = pkt.getByteBuffer();
+        if (this.selObj.sendData(sendBuffer, 0, "cctv_StateReq")) {
+            logging("STOP Command send success.");
+        } else {
+            logging("STOP Command send failed.");
         }
-        String message, title;
-        switch (type) {
-            case 1:
-                message = "제어기와의 연결을 종료 하시겠습니까?";
-                title = "제어기 연결 종료";
-                break;
-            case 2:
-                message = "제어기를 리셋 하시겠습니까?";
-                title = "제어기 리셋";
-                break;
-            case 3:
-                message = "제어기를 초기화 하시겠습니까?";
-                title = "제어기 초기화";
-                break;
-            case 4:
-                message = "제어기의 정지영상 정보를 요청하시겠습니까?";
-                title = "제어기 정지영상 요청";
-                break;
-            default:
-                return;
+    }
+
+    public String bytesToBinaryString(Byte b) {
+        StringBuilder builder = new StringBuilder();
+        for (int i = 0; i < 8; i++) {
+            builder.append(((0x80 >>> i) & b) == 0 ? '0' : '1');
         }
-        if (JOptionPane.showConfirmDialog(getRootPanel(), message, title, JOptionPane.YES_NO_OPTION) != 0) {
+
+        return builder.toString();
+    }
+
+    public void controlPtz(int pan, int tilt, int zoom, int focus, int panSped, int tiltSped, int zoomSped, int focusSped, String cmd) {
+        if (this.selObj == null) {
+            logging("제어기가 선택되지 않았습니다.");
             return;
         }
 
-        boolean result = false;
-        switch (type) {
-            case 1:
-                result = selObj.channelClose();
-                break;
-            case 2:
-                result = selObj.resetHw();
-                break;
-            case 3:
-                //result = selObj.initialize();
-                break;
-//            case 4:
-//                result = selObj.stopImage((byte) 0x01);
-//                break;
-            default:
-                return;
+        //   pan, 0: Stop, 1: Left, 2: Right, bit0 ~ bit1
+        //  tilt, 0: Stop, 1: Up,   2: Down,  bit2 ~ bit3
+        //  zoom, 0: Stop, 1: In,   2: Out,   bit4 ~ bit5
+        // focus, 0: Stop, 1: Near, 2: Far,   bit6 ~ bit7
+        CctvReqPtzCtrl pkt = new CctvReqPtzCtrl(this.selObj.getAddress());
+        byte ptz = pkt.setPtzValue((byte) pan, (byte) tilt, (byte) zoom, (byte) focus, (byte) panSped, (byte) tiltSped, (byte) zoomSped, (byte) focusSped);
+        logging("PTZ Control: " + ByteUtils.byteToBitString(ptz));
+        ByteBuffer sendBuffer = pkt.getByteBuffer();
+        if (this.selObj.sendData(sendBuffer, 0, "cctv_StateReq")) {
+            logging(cmd + " send success.");
+        } else {
+            logging(cmd + " send failed.");
         }
-        if (!result) {
-            JOptionPane.showMessageDialog(getRootPanel(), "명령 전송이 실패 하였습니다.", title, JOptionPane.ERROR_MESSAGE);
+    }
+
+    public void updateInfo(TbCctvCtlr selObj) {
+        this.selObj = selObj;
+        txtNmbr.setText("");
+        txtName.setText("");
+        txtState.setText("");
+        txtIpAddr.setText("");
+        txtPort.setText("");
+        txtDoor.setText("");
+        txtFan.setText("");
+        txtHeater.setText("");
+        txtTemp.setText("");
+        if (selObj != null) {
+            txtNmbr.setText(selObj.getCCTV_CTLR_ID());
+            txtName.setText(selObj.getCCTV_NM());
+            txtIpAddr.setText(selObj.getCCTV_CTLR_IP());
+            txtPort.setText(String.valueOf(selObj.getCCTV_CTLR_PORT()));
+            txtState.setText(CtlrSttsTableModel.netStateStr[selObj.getNetState()]);
+
+            TbCctvCtlrStts stts = selObj.getStts();
+            String door = "-";
+            String fan = "-";
+            String heater = "-";
+            String temper = "-";
+            if ("CMS0".equals(stts.getCMNC_STTS_CD())) {
+                if (stts.getCBOX_DOOR_STTS_CD().equals("CDS0")) {
+                    door = "닫힘";
+                } else if (stts.getCBOX_DOOR_STTS_CD().equals("CDS1")) {
+                    door = "열림";
+                }
+                if (stts.getFAN_STTS_CD().equals("PAS0")) {
+                    fan = "가동";
+                } else if (stts.getFAN_STTS_CD().equals("PAS1")) {
+                    fan = "중지";
+                }
+                if (stts.getHETR_STTS_CD().equals("HTS0")) {
+                    heater = "가동";
+                } else if (stts.getHETR_STTS_CD().equals("HTS1")) {
+                    heater = "중지";
+                }
+                temper = String.valueOf(stts.getCBOX_TMPR());
+            }
+            txtDoor.setText(door);
+            txtFan.setText(fan);
+            txtHeater.setText(heater);
+            txtTemp.setText(temper);
         }
     }
 
@@ -161,11 +394,11 @@ public abstract class SubUI {
         rootPanel = new JPanel();
         rootPanel.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
         pnlCtlr = new JPanel();
-        pnlCtlr.setLayout(new GridLayoutManager(1, 3, new Insets(10, 4, 0, 4), -1, -1));
+        pnlCtlr.setLayout(new GridLayoutManager(2, 3, new Insets(10, 4, 0, 4), -1, -1));
         rootPanel.add(pnlCtlr, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
         pnlControl = new JPanel();
         pnlControl.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 2), 1, 1));
-        pnlCtlr.add(pnlControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
+        pnlCtlr.add(pnlControl, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
         final JPanel panel1 = new JPanel();
         panel1.setLayout(new GridLayoutManager(5, 8, new Insets(0, 0, 0, 0), -1, -1));
         pnlControl.add(panel1, new GridConstraints(0, 0, 5, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
@@ -175,7 +408,7 @@ public abstract class SubUI {
         if (txtNmbrFont != null) txtNmbr.setFont(txtNmbrFont);
         txtNmbr.setHorizontalAlignment(0);
         txtNmbr.setText("관리번호");
-        panel1.add(txtNmbr, new GridConstraints(0, 3, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        panel1.add(txtNmbr, new GridConstraints(0, 3, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
         txtName = new JTextField();
         txtName.setEditable(false);
         Font txtNameFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtName.getFont());
@@ -203,20 +436,20 @@ public abstract class SubUI {
         if (label4Font != null) label4.setFont(label4Font);
         label4.setText("ㅣ도어");
         panel1.add(label4, new GridConstraints(3, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JTextField textField1 = new JTextField();
-        textField1.setEditable(false);
-        Font textField1Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, textField1.getFont());
-        if (textField1Font != null) textField1.setFont(textField1Font);
-        textField1.setHorizontalAlignment(0);
-        textField1.setText("가동/중지");
-        panel1.add(textField1, new GridConstraints(4, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
-        final JTextField textField2 = new JTextField();
-        textField2.setEditable(false);
-        Font textField2Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, textField2.getFont());
-        if (textField2Font != null) textField2.setFont(textField2Font);
-        textField2.setHorizontalAlignment(0);
-        textField2.setText("34");
-        panel1.add(textField2, new GridConstraints(4, 7, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtHeater = new JTextField();
+        txtHeater.setEditable(false);
+        Font txtHeaterFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtHeater.getFont());
+        if (txtHeaterFont != null) txtHeater.setFont(txtHeaterFont);
+        txtHeater.setHorizontalAlignment(0);
+        txtHeater.setText("가동/중지");
+        panel1.add(txtHeater, new GridConstraints(4, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtTemp = new JTextField();
+        txtTemp.setEditable(false);
+        Font txtTempFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtTemp.getFont());
+        if (txtTempFont != null) txtTemp.setFont(txtTempFont);
+        txtTemp.setHorizontalAlignment(0);
+        txtTemp.setText("34");
+        panel1.add(txtTemp, new GridConstraints(4, 7, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
         final JLabel label5 = new JLabel();
         Font label5Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label5.getFont());
         if (label5Font != null) label5.setFont(label5Font);
@@ -232,120 +465,172 @@ public abstract class SubUI {
         if (label7Font != null) label7.setFont(label7Font);
         label7.setText("ㅣ함체온도");
         panel1.add(label7, new GridConstraints(4, 6, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        final JTextField textField3 = new JTextField();
-        textField3.setEditable(false);
-        Font textField3Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, textField3.getFont());
-        if (textField3Font != null) textField3.setFont(textField3Font);
-        textField3.setHorizontalAlignment(0);
-        textField3.setText("192.168.113.112");
-        panel1.add(textField3, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(120, -1), new Dimension(120, -1), new Dimension(120, -1), 0, false));
-        final JTextField textField4 = new JTextField();
-        textField4.setEditable(false);
-        Font textField4Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, textField4.getFont());
-        if (textField4Font != null) textField4.setFont(textField4Font);
-        textField4.setHorizontalAlignment(0);
-        textField4.setText("3001");
-        panel1.add(textField4, new GridConstraints(2, 5, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
-        final JTextField textField5 = new JTextField();
-        textField5.setEditable(false);
-        Font textField5Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, textField5.getFont());
-        if (textField5Font != null) textField5.setFont(textField5Font);
-        textField5.setHorizontalAlignment(0);
-        textField5.setText("열림/닫힘");
-        panel1.add(textField5, new GridConstraints(3, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
-        final JTextField textField6 = new JTextField();
-        textField6.setEditable(false);
-        Font textField6Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, textField6.getFont());
-        if (textField6Font != null) textField6.setFont(textField6Font);
-        textField6.setHorizontalAlignment(0);
-        textField6.setText("가동/중지");
-        panel1.add(textField6, new GridConstraints(3, 7, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtIpAddr = new JTextField();
+        txtIpAddr.setEditable(false);
+        Font txtIpAddrFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtIpAddr.getFont());
+        if (txtIpAddrFont != null) txtIpAddr.setFont(txtIpAddrFont);
+        txtIpAddr.setHorizontalAlignment(0);
+        txtIpAddr.setText("192.168.113.112");
+        panel1.add(txtIpAddr, new GridConstraints(2, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        txtPort = new JTextField();
+        txtPort.setEditable(false);
+        Font txtPortFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtPort.getFont());
+        if (txtPortFont != null) txtPort.setFont(txtPortFont);
+        txtPort.setHorizontalAlignment(0);
+        txtPort.setText("3001");
+        panel1.add(txtPort, new GridConstraints(2, 5, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtDoor = new JTextField();
+        txtDoor.setEditable(false);
+        Font txtDoorFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtDoor.getFont());
+        if (txtDoorFont != null) txtDoor.setFont(txtDoorFont);
+        txtDoor.setHorizontalAlignment(0);
+        txtDoor.setText("열림/닫힘");
+        panel1.add(txtDoor, new GridConstraints(3, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtFan = new JTextField();
+        txtFan.setEditable(false);
+        Font txtFanFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtFan.getFont());
+        if (txtFanFont != null) txtFan.setFont(txtFanFont);
+        txtFan.setHorizontalAlignment(0);
+        txtFan.setText("가동/중지");
+        panel1.add(txtFan, new GridConstraints(3, 7, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
+        txtState = new JTextField();
+        txtState.setEditable(false);
+        Font txtStateFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, txtState.getFont());
+        if (txtStateFont != null) txtState.setFont(txtStateFont);
+        txtState.setHorizontalAlignment(0);
+        txtState.setText("통신");
+        panel1.add(txtState, new GridConstraints(0, 5, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(100, -1), new Dimension(100, -1), new Dimension(100, -1), 0, false));
         final JPanel panel2 = new JPanel();
-        panel2.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));
-        pnlCtlr.add(panel2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        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));
         btnZoomIn = new JButton();
         Font btnZoomInFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnZoomIn.getFont());
         if (btnZoomInFont != null) btnZoomIn.setFont(btnZoomInFont);
         btnZoomIn.setText("Zoom (+)");
-        panel2.add(btnZoomIn, new GridConstraints(0, 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));
+        btnZoomIn.setToolTipText("ZOOM In");
+        panel2.add(btnZoomIn, 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));
         btnZoomOut = new JButton();
         Font btnZoomOutFont = this.$$$getFont$$$("Malgun Gothic", Font.BOLD, 14, btnZoomOut.getFont());
         if (btnZoomOutFont != null) btnZoomOut.setFont(btnZoomOutFont);
         btnZoomOut.setText("Zoom (-)");
-        panel2.add(btnZoomOut, 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));
+        btnZoomOut.setToolTipText("ZOOM Out");
+        panel2.add(btnZoomOut, 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 (+)");
-        panel2.add(btnFocusIn, 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.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 (-)");
-        panel2.add(btnFocusOut, 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.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));
         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(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
-        button2 = new JButton();
-        Font button2Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button2.getFont());
-        if (button2Font != null) button2.setFont(button2Font);
-        button2.setHorizontalTextPosition(2);
-        button2.setText("\uF0E7");
-        panel3.add(button2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button3 = new JButton();
-        Font button3Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button3.getFont());
-        if (button3Font != null) button3.setFont(button3Font);
-        button3.setHorizontalTextPosition(2);
-        button3.setText("\uF0ED");
-        panel3.add(button3, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button5 = new JButton();
-        Font button5Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button5.getFont());
-        if (button5Font != null) button5.setFont(button5Font);
-        button5.setHorizontalTextPosition(2);
-        button5.setText("▣");
-        panel3.add(button5, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button6 = new JButton();
-        Font button6Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button6.getFont());
-        if (button6Font != null) button6.setFont(button6Font);
-        button6.setHorizontalTextPosition(2);
-        button6.setText("\uF0EA");
-        panel3.add(button6, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button8 = new JButton();
-        Font button8Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button8.getFont());
-        if (button8Font != null) button8.setFont(button8Font);
-        button8.setHorizontalTextPosition(2);
-        button8.setText("\uF0E8");
-        panel3.add(button8, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button9 = new JButton();
-        Font button9Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button9.getFont());
-        if (button9Font != null) button9.setFont(button9Font);
-        button9.setHorizontalTextPosition(2);
-        button9.setText("\uF0EE");
-        panel3.add(button9, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button1 = new JButton();
-        Font button1Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button1.getFont());
-        if (button1Font != null) button1.setFont(button1Font);
-        button1.setHorizontalTextPosition(2);
-        button1.setText("\uF0EB");
-        panel3.add(button1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button4 = new JButton();
-        Font button4Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button4.getFont());
-        if (button4Font != null) button4.setFont(button4Font);
-        button4.setHorizontalTextPosition(2);
-        button4.setText("\uF0E9");
-        panel3.add(button4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
-        button7 = new JButton();
-        Font button7Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, button7.getFont());
-        if (button7Font != null) button7.setFont(button7Font);
-        button7.setHorizontalTextPosition(2);
-        button7.setText("\uF0EC");
-        panel3.add(button7, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        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));
+        btnPanLeft = new JButton();
+        Font btnPanLeftFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnPanLeft.getFont());
+        if (btnPanLeftFont != null) btnPanLeft.setFont(btnPanLeftFont);
+        btnPanLeft.setHorizontalTextPosition(2);
+        btnPanLeft.setText("◀");
+        btnPanLeft.setToolTipText("PAN Left");
+        panel3.add(btnPanLeft, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnPanTiltLeftDown = new JButton();
+        Font btnPanTiltLeftDownFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnPanTiltLeftDown.getFont());
+        if (btnPanTiltLeftDownFont != null) btnPanTiltLeftDown.setFont(btnPanTiltLeftDownFont);
+        btnPanTiltLeftDown.setHorizontalTextPosition(2);
+        btnPanTiltLeftDown.setText("\uF0ED");
+        btnPanTiltLeftDown.setToolTipText("PAN TILT Left Down");
+        panel3.add(btnPanTiltLeftDown, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnStop = new JButton();
+        Font btnStopFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnStop.getFont());
+        if (btnStopFont != null) btnStop.setFont(btnStopFont);
+        btnStop.setHorizontalTextPosition(2);
+        btnStop.setText("■");
+        btnStop.setToolTipText("STOP");
+        panel3.add(btnStop, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnTiltDown = new JButton();
+        Font btnTiltDownFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnTiltDown.getFont());
+        if (btnTiltDownFont != null) btnTiltDown.setFont(btnTiltDownFont);
+        btnTiltDown.setHorizontalTextPosition(2);
+        btnTiltDown.setText("▼");
+        btnTiltDown.setToolTipText("TILT Down");
+        panel3.add(btnTiltDown, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnPanRight = new JButton();
+        Font btnPanRightFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnPanRight.getFont());
+        if (btnPanRightFont != null) btnPanRight.setFont(btnPanRightFont);
+        btnPanRight.setHorizontalTextPosition(2);
+        btnPanRight.setText("▶");
+        btnPanRight.setToolTipText("PAN Right");
+        panel3.add(btnPanRight, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnPanTiltRightDown = new JButton();
+        Font btnPanTiltRightDownFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnPanTiltRightDown.getFont());
+        if (btnPanTiltRightDownFont != null) btnPanTiltRightDown.setFont(btnPanTiltRightDownFont);
+        btnPanTiltRightDown.setHorizontalTextPosition(2);
+        btnPanTiltRightDown.setText("\uF0EE");
+        btnPanTiltRightDown.setToolTipText("PAN TILT Left Down");
+        panel3.add(btnPanTiltRightDown, new GridConstraints(2, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnPanTiltLeftUp = new JButton();
+        Font btnPanTiltLeftUpFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnPanTiltLeftUp.getFont());
+        if (btnPanTiltLeftUpFont != null) btnPanTiltLeftUp.setFont(btnPanTiltLeftUpFont);
+        btnPanTiltLeftUp.setHorizontalTextPosition(2);
+        btnPanTiltLeftUp.setText("\uF0EB");
+        btnPanTiltLeftUp.setToolTipText("PAN TILT Left Up");
+        panel3.add(btnPanTiltLeftUp, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnTiltUp = new JButton();
+        Font btnTiltUpFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnTiltUp.getFont());
+        if (btnTiltUpFont != null) btnTiltUp.setFont(btnTiltUpFont);
+        btnTiltUp.setHorizontalTextPosition(2);
+        btnTiltUp.setText("▲");
+        btnTiltUp.setToolTipText("TILT Up");
+        panel3.add(btnTiltUp, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
+        btnPanTiltRightUp = new JButton();
+        Font btnPanTiltRightUpFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 16, btnPanTiltRightUp.getFont());
+        if (btnPanTiltRightUpFont != null) btnPanTiltRightUp.setFont(btnPanTiltRightUpFont);
+        btnPanTiltRightUp.setHorizontalTextPosition(2);
+        btnPanTiltRightUp.setText("\uF0EC");
+        btnPanTiltRightUp.setToolTipText("PAN TILT Right Up");
+        panel3.add(btnPanTiltRightUp, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, new Dimension(50, 50), new Dimension(50, 50), new Dimension(50, 50), 0, false));
         final JPanel panel4 = new JPanel();
         panel4.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
-        rootPanel.add(panel4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 10), new Dimension(-1, 10), new Dimension(-1, 10), 0, false));
+        rootPanel.add(panel4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 5), new Dimension(-1, 5), new Dimension(-1, 5), 0, false));
         final JPanel panel5 = new JPanel();
-        panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
-        rootPanel.add(panel5, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, new Dimension(-1, 10), new Dimension(-1, 10), new Dimension(-1, 10), 0, false));
+        panel5.setLayout(new GridLayoutManager(2, 1, new Insets(0, 4, 0, 4), -1, -1));
+        rootPanel.add(panel5, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(-1, 200), null, null, 0, false));
+        final JPanel panel6 = new JPanel();
+        panel6.setLayout(new GridLayoutManager(1, 3, new Insets(2, 0, 0, 2), -1, -1));
+        panel5.add(panel6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
+        final JLabel label8 = new JLabel();
+        Font label8Font = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, label8.getFont());
+        if (label8Font != null) label8.setFont(label8Font);
+        label8.setHorizontalAlignment(2);
+        label8.setIcon(new ImageIcon(getClass().getResource("/static/image/logging.png")));
+        label8.setText("제어 로그");
+        panel6.add(label8, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        btnLogClear = new JButton();
+        Font btnLogClearFont = this.$$$getFont$$$("Malgun Gothic", Font.PLAIN, 12, btnLogClear.getFont());
+        if (btnLogClearFont != null) btnLogClear.setFont(btnLogClearFont);
+        btnLogClear.setHorizontalTextPosition(0);
+        btnLogClear.setText("지우기");
+        panel6.add(btnLogClear, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
+        final Spacer spacer1 = new Spacer();
+        panel6.add(spacer1, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
+        final JScrollPane scrollPane1 = new JScrollPane();
+        panel5.add(scrollPane1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
+        taLog = new JTextArea();
+        taLog.setBackground(new Color(-16777216));
+        taLog.setCaretColor(new Color(-1));
+        taLog.setEditable(false);
+        Font taLogFont = this.$$$getFont$$$("D2Coding", Font.PLAIN, 14, taLog.getFont());
+        if (taLogFont != null) taLog.setFont(taLogFont);
+        taLog.setForeground(new Color(-1));
+        taLog.setMargin(new Insets(4, 4, 4, 4));
+        taLog.setText("제어로그");
+        scrollPane1.setViewportView(taLog);
     }
 
     /**

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqCharDel.java

@@ -7,7 +7,7 @@ public class CctvReqCharDel extends CctvReqFramePacket {
 
     private final int packetSize = 3;
 
-    public CctvReqCharDel(short groupNo, short controllerNo) {
+    public CctvReqCharDel(short groupNo) {
         super(groupNo, CctvProtocol.cctv_CharVarDel);
         this.body = new byte[this.packetSize];
     }

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqCharFix.java

@@ -9,7 +9,7 @@ public class CctvReqCharFix extends CctvReqFramePacket {
 
     private final int packetSize = 8;
 
-    public CctvReqCharFix(short groupNo, short controllerNo) {
+    public CctvReqCharFix(short groupNo) {
         super(groupNo, CctvProtocol.cctv_CharFixSet);
         this.body = new byte[this.packetSize];
     }

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqCharVar.java

@@ -7,7 +7,7 @@ import java.nio.ByteBuffer;
  */
 public class CctvReqCharVar extends CctvReqFramePacket {
 
-    public CctvReqCharVar(short groupNo, short controllerNo) {
+    public CctvReqCharVar(short groupNo) {
         super(groupNo, CctvProtocol.cctv_CharVarSet);
     }
 

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqPresetMove.java

@@ -9,7 +9,7 @@ public class CctvReqPresetMove extends CctvReqFramePacket {
 
     private final int packetSize = 8;
 
-    public CctvReqPresetMove(short groupNo, short controllerNo) {
+    public CctvReqPresetMove(short groupNo) {
         super(groupNo, CctvProtocol.cctv_PresetMove);
         this.body = new byte[this.packetSize];
     }

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqPresetQry.java

@@ -5,7 +5,7 @@ package com.its.cctv.xnettcp.cctv.protocol;
  */
 public class CctvReqPresetQry extends CctvReqFramePacket {
 
-    public CctvReqPresetQry(short groupNo, short controllerNo) {
+    public CctvReqPresetQry(short groupNo) {
         super(groupNo, CctvProtocol.cctv_PresetMove);
         this.body = new byte[1];
     }

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqPresetSave.java

@@ -9,7 +9,7 @@ public class CctvReqPresetSave extends CctvReqFramePacket {
 
     private final int packetSize = 9;
 
-    public CctvReqPresetSave(short groupNo, short controllerNo) {
+    public CctvReqPresetSave(short groupNo) {
         super(groupNo, CctvProtocol.cctv_PresetMove);
         this.body = new byte[this.packetSize];
     }

+ 1 - 1
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqPresetSel.java

@@ -5,7 +5,7 @@ package com.its.cctv.xnettcp.cctv.protocol;
  */
 public class CctvReqPresetSel extends CctvReqFramePacket {
 
-    public CctvReqPresetSel(short groupNo, short controllerNo) {
+    public CctvReqPresetSel(short groupNo) {
         super(groupNo, CctvProtocol.cctv_PresetMove);
         this.body = new byte[1];
     }

+ 18 - 2
src/main/java/com/its/cctv/xnettcp/cctv/protocol/CctvReqPtzCtrl.java

@@ -5,7 +5,7 @@ package com.its.cctv.xnettcp.cctv.protocol;
  */
 public class CctvReqPtzCtrl extends CctvReqFramePacket {
 
-    public CctvReqPtzCtrl(short groupNo, short controllerNo) {
+    public CctvReqPtzCtrl(short groupNo) {
         super(groupNo, CctvProtocol.cctv_PtzCtrl);
         this.body = new byte[5];
     }
@@ -25,6 +25,9 @@ public class CctvReqPtzCtrl extends CctvReqFramePacket {
     }
 
     protected void setFocus(byte focus, byte sped) {
+        if (sped >= 0x40) {
+            sped = 0x3F;    // 63
+        }
         this.body[0] = focus;
         this.body[1] = 0x00;
         this.body[2] = 0x00;
@@ -74,16 +77,29 @@ public class CctvReqPtzCtrl extends CctvReqFramePacket {
         this.body[4] = 0x00;
     }
 
-    public void setPtzValue(byte pan, byte tilt, byte zoom, byte focus, byte panSped, byte tiltSped, byte zoomSped, byte focusSped) {
+    public byte setPtzValue(byte pan, byte tilt, byte zoom, byte focus, byte panSped, byte tiltSped, byte zoomSped, byte focusSped) {
         //   pan, 0: Stop, 1: Left, 2: Right, bit0 ~ bit1
         //  tilt, 0: Stop, 1: Up,   2: Down,  bit2 ~ bit3
         //  zoom, 0: Stop, 1: In,   2: Out,   bit4 ~ bit5
         // focus, 0: Stop, 1: Near, 2: Far,   bit6 ~ bit7
+        if (panSped >= 0x40) {
+            panSped = 0x3F;    // 63
+        }
+        if (tiltSped >= 0x40) {
+            tiltSped = 0x3F;    // 63
+        }
+        if (zoomSped >= 0x40) {
+            zoomSped = 0x3F;    // 63
+        }
+        if (focusSped >= 0x40) {
+            focusSped = 0x3F;    // 63
+        }
         byte ptz = (byte)((pan & 0xFF) << 6 | (tilt& 0xFF) << 4 | (zoom & 0xFF) << 2 | (focus & 0xFF));
         this.body[0] = ptz;
         this.body[1] = panSped;
         this.body[2] = tiltSped;
         this.body[3] = zoomSped;
         this.body[4] = focusSped;
+        return ptz;
     }
 }

+ 3 - 1
src/main/resources/application.yml

@@ -40,6 +40,8 @@ spring:
   profiles:
     active: dev
   main:
+    web-application-type: none
+    log-startup-info: true
     banner-mode: off
   mvc:
     view:
@@ -64,7 +66,7 @@ spring:
   datasource:
     hikari:
       driver-class-name: oracle.jdbc.OracleDriver
-      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1521:HANTE
+      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1522:HANTE19C
       username: ptatms
       password: ptatms
 

+ 2 - 2
src/main/resources/logback-spring.xml

@@ -31,10 +31,10 @@
     <property name="LOG_PATTERN_SCHEDULE"    value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] %msg%n"/>
     <property name="LOG_PATTERN_STATISTICS"  value="[%d{yyyy-MM-dd HH:mm:ss.SSS}] [%-5level] %msg%n"/>
 <!--    <property name="LOG_PATTERN_CONSOLE"     value="[%d{HH:mm:ss.SSS}] %highlight([%5level]) %highlight(${PID:-}): %cyan(%msg) %n"/>-->
-    <property name="LOG_PATTERN_CONSOLE"     value="[%d{HH:mm:ss.SSS}] [%5level] %msg%n"/>
+    <property name="LOG_PATTERN_CONSOLE"     value="[%d{HH:mm:ss.SSS}] [%5level] %msg %n"/>
 
     <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
-<!--        <withJansi>true</withJansi>-->
+        <withJansi>true</withJansi>
         <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
             <charset>${LOG_CHARSET}</charset>
             <pattern>${LOG_PATTERN_CONSOLE}</pattern>

+ 1 - 1
src/main/resources/mybatis/mybatis-config.xml

@@ -12,7 +12,7 @@
 		<setting name="defaultStatementTimeout" value="25000"/>
 		<setting name="mapUnderscoreToCamelCase" value="true"/>
 	</settings>
-    
+
 	<typeAliases>
 	</typeAliases>