[Ttssh2-commit] [8051] シリアル接続のハードウェアフロー制御に DSR/DTR を追加した。

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 8月 31日 (土) 17:29:39 JST


Revision: 8051
          https://osdn.net/projects/ttssh2/scm/svn/commits/8051
Author:   yutakapon
Date:     2019-08-31 17:29:39 +0900 (Sat, 31 Aug 2019)
Log Message:
-----------
シリアル接続のハードウェアフロー制御に DSR/DTR を追加した。

branches/flowctrl_dsrdtrからリビジョン7825-7827をマージ:
シリアル接続のハードウェアフロー制御に DSR/DTR を追加した。
4つの選択項目が一度に表示されるように、シリアルポート設定ダイアログのコンボボックスの高さを調整した。
#39365
........
シリアル接続のハードウェアフロー制御の設定項目にコメントを追加した。
デフォルト値は以前と変わらない。
#39365

........
ドキュメントを更新した。
#39365

........

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/39365
    https://osdn.net/projects/ttssh2/tracker/detail/39365
    https://osdn.net/projects/ttssh2/tracker/detail/39365

Modified Paths:
--------------
    trunk/doc/en/html/about/history.html
    trunk/doc/en/html/macro/command/setflowctrl.html
    trunk/doc/en/html/menu/setup-serialport.html
    trunk/doc/ja/html/about/history.html
    trunk/doc/ja/html/macro/command/setflowctrl.html
    trunk/doc/ja/html/menu/setup-serialport.html
    trunk/installer/release/TERATERM.INI
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/commlib.c
    trunk/teraterm/teraterm/ttdde.c
    trunk/teraterm/ttpdlg/ttdlg.c
    trunk/teraterm/ttpdlg/ttpdlg.rc
    trunk/teraterm/ttpset/ttset.c

Property Changed:
----------------
    trunk/
    trunk/teraterm/

-------------- next part --------------
Index: trunk
===================================================================
--- trunk	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk	2019-08-31 08:29:39 UTC (rev 8051)

Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
## -1,4 +1,5 ##
 /branches/drag_and_drop:7130,7139,7141,7143-7147
+/branches/flowctrl_dsrdtr:7825-7827
 /branches/openssl_1_1_1_v2:7888
 /branches/portfwd_memleak:7732,7736-7737,7764
 /branches/ssh_ed25519:5495-5544
Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/doc/en/html/about/history.html	2019-08-31 08:29:39 UTC (rev 8051)
@@ -31,6 +31,30 @@
 
 <h2 id="teraterm">Tera Term</h2>
 
+<h3 id="teraterm_4.105">2019.xx.xx (Ver 4.105)</h3>
+<ul class="history">
+  <li>Changes
+    <ul>
+      <li>Added support for hardware flow control DSR/DTR with serial connection.
+        <ul>
+          <li>The hardware is renamed to RTS/CTS, and DSR/DTR is newly added on the Flow control of <a href="../menu/setup-serialport.html">Serial port ([Setup] menu)</a>.</li>
+          <li>MARCO: The fourth parameter is added in <a href="../macro/command/setflowctrl.html">setflowctrl</a> command.</li>
+        </ul></li>
+    </ul>
+  </li>
+  <li>Bug fixes
+    <ul>
+      <li></li>
+    </ul>
+  </li>
+
+  <li>Misc
+    <ul>
+      <li></li>
+    </ul>
+  </li>
+</ul>
+
 <h3 id="teraterm_4.104">2019.08.31 (Ver 4.104)</h3>
 <ul class="history">
   <li>Changes

Modified: trunk/doc/en/html/macro/command/setflowctrl.html
===================================================================
--- trunk/doc/en/html/macro/command/setflowctrl.html	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/doc/en/html/macro/command/setflowctrl.html	2019-08-31 08:29:39 UTC (rev 8051)
@@ -38,12 +38,16 @@
  </tr>
  <tr>
   <td>2</td>
-  <td>hardware</td>
+  <td>hardware(RTS/CTS)</td>
  </tr>
  <tr>
   <td>3</td>
   <td>none</td>
  </tr>
+ <tr>
+  <td>4</td>
+  <td>hardware(DSR/DTR) <em>(version 4.105 or later)</em></td>
+ </tr>
 </table>
 
 	</dd>

Modified: trunk/doc/en/html/menu/setup-serialport.html
===================================================================
--- trunk/doc/en/html/menu/setup-serialport.html	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/doc/en/html/menu/setup-serialport.html	2019-08-31 08:29:39 UTC (rev 8051)
@@ -29,7 +29,8 @@
 	  Flow control can be configured in the following:<br>
 	     none  ...  No flow control<br>
 	     Xon/Xoff  ...  Software flow<br>
-	     hardware  ... Hardware flow(RTS/CTS)<br>
+	     RTS/CTS  ... Hardware flow(RTS/CTS)<br>
+	     DSR/DTR  ... Hardware flow(DSR/DTR)<br>
 	</p>
 	<p>
 	  Note: If Data is 7 bit, the XMODEM, ZMODEM, B PLUS and Quick-VAN

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/doc/ja/html/about/history.html	2019-08-31 08:29:39 UTC (rev 8051)
@@ -31,6 +31,31 @@
 
 <h2 id="teraterm">Tera Term</h2>
 
+<h3 id="teraterm_4.105">2019.xx.xx (Ver 4.105)</h3>
+<ul class="history">
+  <li>\x95ύX
+    <ul>
+      <li>\x83V\x83\x8A\x83A\x83\x8B\x90ڑ\xB1\x82Ńn\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[\x90\xA7\x8C\xE4DSR/DTR\x82\xF0\x83T\x83|\x81[\x83g\x82\xB5\x82\xBD\x81B
+        <ul>
+          <li><a href="../menu/setup-serialport.html">Serial port ([Setup] \x83\x81\x83j\x83\x85\x81[)</a>\x82\xCCFlow control\x82\xC5hardware\x82\xF0RTS/CTS\x82ɕύX\x82\xB5\x81A\x90V\x82\xB5\x82\xADDSR/DTR\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+          <li><a href="../macro/command/setflowctrl.html">setflowctrl</a>\x83}\x83N\x83\x8D\x83R\x83}\x83\x93\x83h\x82\xC94\x94Ԗڂ̃p\x83\x89\x83\x81\x81[\x83^\x82\xF0\x92lj\xC1\x82\xB5\x82\xBD\x81B</li>
+        </ul></li>
+        
+    </ul>
+  </li>
+  <li>\x83o\x83O\x8FC\x90\xB3
+    <ul>
+      <li></li>
+    </ul>
+  </li>
+
+  <li>\x82\xBB\x82̑\xBC
+    <ul>
+      <li></li>
+    </ul>
+  </li>
+</ul>
+
 <h3 id="teraterm_4.104">2019.08.31 (Ver 4.104)</h3>
 <ul class="history">
   <li>\x95ύX

Modified: trunk/doc/ja/html/macro/command/setflowctrl.html
===================================================================
--- trunk/doc/ja/html/macro/command/setflowctrl.html	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/doc/ja/html/macro/command/setflowctrl.html	2019-08-31 08:29:39 UTC (rev 8051)
@@ -38,12 +38,16 @@
  </tr>
  <tr>
   <td>2</td>
-  <td>hardware</td>
+  <td>hardware(RTS/CTS)</td>
  </tr>
  <tr>
   <td>3</td>
   <td>none</td>
  </tr>
+ <tr>
+  <td>4</td>
+  <td>hardware(DSR/DTR) <em>(\x83o\x81[\x83W\x83\x87\x83\x93 4.105 \x88ȍ~)</em></td> 
+ </tr>
 </table>
 
 	</dd>

Modified: trunk/doc/ja/html/menu/setup-serialport.html
===================================================================
--- trunk/doc/ja/html/menu/setup-serialport.html	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/doc/ja/html/menu/setup-serialport.html	2019-08-31 08:29:39 UTC (rev 8051)
@@ -29,7 +29,8 @@
 	  Flow control\x82͈ȉ\xBA\x82\xAA\x90ݒ\xE8\x82ł\xAB\x82܂\xB7\x81B<br>
 	     none  ...  \x83t\x83\x8D\x81[\x90\xA7\x8C\xE4\x82Ȃ\xB5<br>
 	     Xon/Xoff  ...  \x83\\x83t\x83g\x83E\x83F\x83A\x83t\x83\x8D\x81[<br>
-	     hardware  ...  \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[(RTS/CTS)<br>
+	     RTS/CTS  ...  \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[(RTS/CTS)<br>
+	     DSR/DTR  ...  \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[(DSR/DTR)<br>
 	</p>
 	<p>
 	  \x92\x8D: Data \x82\xF0 7 \x82ɂ\xB7\x82\xE9\x82ƁAXMODEM, ZMODEM, B-PLUS, Quick-VAN

Modified: trunk/installer/release/TERATERM.INI
===================================================================
--- trunk/installer/release/TERATERM.INI	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/installer/release/TERATERM.INI	2019-08-31 08:29:39 UTC (rev 8051)
@@ -312,7 +312,8 @@
 DataBit=8
 ;	  Stop (1/1.5/2)
 StopBit=1
-;	  Flow control (x/hard/none)
+;	  Flow control (x/hard/none/rtscts/dsrdtr)
+;     "hard" is same as "rtscts"
 FlowCtrl=none
 ;	  Transmit delay per character (in msec)
 DelayPerChar=0

Index: trunk/teraterm
===================================================================
--- trunk/teraterm	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm	2019-08-31 08:29:39 UTC (rev 8051)

Property changes on: trunk/teraterm
___________________________________________________________________
Modified: svn:mergeinfo
## -1,2 +1,3 ##
 /branches/drag_and_drop/teraterm:7130,7139,7141,7143-7147
+/branches/flowctrl_dsrdtr/teraterm:7825-7827
 /branches/vs2015_warn/teraterm:6194-6285
\ No newline at end of property
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm/common/tttypes.h	2019-08-31 08:29:39 UTC (rev 8051)
@@ -816,9 +816,11 @@
 #define IdStopBit2  3
   /* Flow control ID */
 #define IdFlowX 1
-#define IdFlowHard 2
+#define IdFlowHard 2    // RTS/CTS(hardware flow)
 #define IdFlowNone 3
+#define IdFlowHardDsrDtr 4  // DSR/DTR(hardware flow)
 
+
 /* GetHostName dialog record */
 typedef struct {
 	PCHAR SetupFN; // setup file name

Modified: trunk/teraterm/teraterm/commlib.c
===================================================================
--- trunk/teraterm/teraterm/commlib.c	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm/teraterm/commlib.c	2019-08-31 08:29:39 UTC (rev 8051)
@@ -224,10 +224,14 @@
 			dcb.XonChar = XON;
 			dcb.XoffChar = XOFF;
 			break;
-		case IdFlowHard:
+		case IdFlowHard:  // RTS/CTS
 			dcb.fOutxCtsFlow = TRUE;
 			dcb.fRtsControl = RTS_CONTROL_HANDSHAKE;
 			break;
+		case IdFlowHardDsrDtr:  // DSR/DTR
+			dcb.fOutxDsrFlow = TRUE;
+			dcb.fDtrControl = DTR_CONTROL_HANDSHAKE;
+			break;
 	}
 
 	switch (ts->DataBit) {
@@ -1182,7 +1186,8 @@
 	}
 	if ((cv->PortType==IdTCPIP) ||
 	    (cv->PortType==IdSerial) &&
-	    (ts->Flow!=IdFlowHard)) {
+			(!(ts->Flow == IdFlowHard || ts->Flow == IdFlowHardDsrDtr)) 
+			) { 
 		if (Lock) {
 			b = XOFF;
 		}
@@ -1192,12 +1197,17 @@
 		CommBinaryOut(cv,&b,1);
 	}
 	else if ((cv->PortType==IdSerial) &&
-	         (ts->Flow==IdFlowHard)) {
+	         (ts->Flow == IdFlowHard || ts->Flow == IdFlowHardDsrDtr)) {
+		// \x83n\x81[\x83h\x83E\x83F\x83A\x83t\x83\x8D\x81[\x82̐ݒ\xE8\x82ɉ\x9E\x82\xB6\x82Ċg\x92\xA3\x8B@\x94\\x83R\x81[\x83h\x82\xF0\x90؂\xE8\x91ւ\xA6\x82\xE9\x81B
 		if (Lock) {
 			Func = CLRRTS;
+			if (ts->Flow == IdFlowHardDsrDtr)
+				Func = CLRDTR;
 		}
 		else {
 			Func = SETRTS;
+			if (ts->Flow == IdFlowHardDsrDtr)
+				Func = SETDTR;
 		}
 		EscapeCommFunction(cv->ComID,Func);
 	}

Modified: trunk/teraterm/teraterm/ttdde.c
===================================================================
--- trunk/teraterm/teraterm/ttdde.c	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm/teraterm/ttdde.c	2019-08-31 08:29:39 UTC (rev 8051)
@@ -884,9 +884,10 @@
 
 		val = atoi(ParamFileName);
 		switch(val) {
-			case 1:
-			case 2:
-			case 3:
+			case 1: // Xon/Xoff 
+			case 2: // RTS/CTS
+			case 3: // none
+			case 4: // DSR/DTR
 				ts.Flow = val;
 				break;
 		}

Modified: trunk/teraterm/ttpdlg/ttdlg.c
===================================================================
--- trunk/teraterm/ttpdlg/ttdlg.c	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm/ttpdlg/ttdlg.c	2019-08-31 08:29:39 UTC (rev 8051)
@@ -1098,7 +1098,7 @@
 static PCHAR DataList[] = {"7 bit","8 bit",NULL};
 static PCHAR ParityList[] = {"none", "odd", "even", "mark", "space", NULL};
 static PCHAR StopList[] = {"1 bit", "1.5 bit", "2 bit", NULL};
-static PCHAR FlowList[] = {"Xon/Xoff","hardware","none",NULL};
+static PCHAR FlowList[] = {"Xon/Xoff","RTS/CTS","none", "DSR/DTR", NULL};
 
 static INT_PTR CALLBACK SerialDlg(HWND Dialog, UINT Message, WPARAM wParam, LPARAM lParam)
 {

Modified: trunk/teraterm/ttpdlg/ttpdlg.rc
===================================================================
--- trunk/teraterm/ttpdlg/ttpdlg.rc	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm/ttpdlg/ttpdlg.rc	2019-08-31 08:29:39 UTC (rev 8051)
@@ -141,7 +141,7 @@
     CONTROL         "&Stop bits:",IDC_SERIALSTOP_LABEL,"Static",SS_LEFTNOWORDWRAP,15,69,54,8
     COMBOBOX        IDC_SERIALSTOP,75,67,48,40,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
     CONTROL         "&Flow control:",IDC_SERIALFLOW_LABEL,"Static",SS_LEFTNOWORDWRAP,15,84,54,8
-    COMBOBOX        IDC_SERIALFLOW,75,82,48,40,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+    COMBOBOX        IDC_SERIALFLOW,75,82,48,53,CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
     GROUPBOX        "Transmit delay",IDC_SERIALDELAY,19,104,152,32
     LTEXT           "msec/&char",IDC_SERIALDELAYCHAR_LABEL,53,118,42,10
     EDITTEXT        IDC_SERIALDELAYCHAR,29,116,20,12,ES_AUTOHSCROLL | ES_NUMBER

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2019-08-31 02:52:08 UTC (rev 8050)
+++ trunk/teraterm/ttpset/ttset.c	2019-08-31 08:29:39 UTC (rev 8051)
@@ -1070,6 +1070,10 @@
 		ts->Flow = IdFlowX;
 	else if (_stricmp(Temp, "hard") == 0)
 		ts->Flow = IdFlowHard;
+	else if (_stricmp(Temp, "rtscts") == 0)  // hard\x82\xC6rtscts\x82͓\xAF\x82\xB6\x88Ӗ\xA1
+		ts->Flow = IdFlowHard;
+	else if (_stricmp(Temp, "dsrdtr") == 0)
+		ts->Flow = IdFlowHardDsrDtr;
 	else
 		ts->Flow = IdFlowNone;
 
@@ -2638,6 +2642,9 @@
 	case IdFlowHard:
 		strncpy_s(Temp, sizeof(Temp), "hard", _TRUNCATE);
 		break;
+	case IdFlowHardDsrDtr:
+		strncpy_s(Temp, sizeof(Temp), "dsrdtr", _TRUNCATE);
+		break;
 	default:
 		strncpy_s(Temp, sizeof(Temp), "none", _TRUNCATE);
 	}


Ttssh2-commit メーリングリストの案内
Back to archive index