2017-08-21 62 views
0

我正在爲ESP8266(「ESPTerm」)實現終端仿真器,並通過xterm手冊頁以供參考,以及舊版VTxxx參考手冊。我已經實施了DECREQTPARM。但現在我問自己一個問題:這有什麼好處?顯然,一旦你能夠發送查詢並得到響應,你就已經知道正確的波特率,奇偶校驗和字節長度。這是否曾被用於任何事情,今天它有什麼用?DECREQTPARM在VT100中的用途是什麼?

值得查詢的唯一信息是{flags}的值,但僅用於某些擴展板。

以下是我發現的,供參考:

DECREQTPARM  Request Terminal Parameters 

     <ESC>[ {Ps} x 

     The host sends this sequence to request the VT100 to send a DECREPTPARM 
     sequence back. {Ps} can be either 0 or 1. If 0, the terminal will be 
     allowed to send unsolicited DECREPTPARMs. These reports will be 
     generated each time the terminal exits the SET-UP mode. If {Ps} is 1, 
     then the terminal will only generate DECREPTPARMs in response to a 
     request. 


DECREPTPARM  Report Terminal Parameters  VT100 to Host 

     <ESC>[ {sol} ; {par} ; {nbits} ; {xspd} ; {rspd} ; {cmul} ; {flags} x 

     This sequence is generated by the VT100 to notify the host of the 
     status of selected terminal parameters. The status sequence may be 
     sent when requested by the host (via DECREQTPARM) or at the terminal's 
     discretion. On power up or reset, the VT100 is inhibited from sending 
     unsolicited reports. 

     The meanings of the sequence paramters are: 

     Parameter  Value Meaning 
     ------------------------------------------------------------------ 
      {sol}   1  This message is a report. 
          2  This message is a report, and the terminal is 
           only reporting on request. 

      {par}   1  No parity set 
          4  Parity set and odd 
          5  Parity set and even 

     {nbits}   1  8 bits per character 
          2  7 bits per character 

     {xspd}   0  Speed set to 50 bps 
     -and-   8  Speed set to 75 bps 
     {rspd}   16  Speed set to 110 bps 
         24  Speed set to 134.5 bps 
     {xspd}=   32  Speed set to 150 bps 
      Transmit  40  Speed set to 200 bps 
      Speed   48  Speed set to 300 bps 
         56  Speed set to 600 bps 
     {rspd}=   64  Speed set to 1200 bps 
      Recieve  72  Speed set to 1800 bps 
      Speed   80  Speed set to 2000 bps 
         88  Speed set to 2400 bps 
         96  Speed set to 3600 bps 
         104  Speed set to 4800 bps 
         112  Speed set to 9600 bps 
         120  Speed set tp 19200 bps 

     {cmul}   1  The bit rate multiplier is 16 

     {flags}  0-15  This value communicates the four switch values 
           in block 5 of SET-UP B, which are only visible 
           to the user when an STP option is installed. 

回答

0

短:除了顯而易見的,沒有多大用處

長:

DEC的工程師並沒有設計VT100與預知你可以運行stty並獲得信息,並與autobauding modems(在此引用爲「在20世紀80年代初」,whic h意味着該功能在之前可以在市場上買到),那麼你肯定可能不知道你的真實線速度。你也不會知道你的DEC計算機所看到的串行連接的其他細節。

一些DEC的後期系統(如VMS)有一種方法來顯示一些信息,例如show term

+0

不知道自動匹配,這很有趣!謝謝 – MightyPork

相關問題