首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >DECREQTPARM在VT100中的目的是什么?

DECREQTPARM在VT100中的目的是什么?
EN

Stack Overflow用户
提问于 2017-08-21 19:30:43
回答 1查看 102关注 0票数 0

我正在为ESP8266 ("ESPTerm")实现一个终端仿真器,并查看xterm以供参考,以及旧的VTxxx参考手册。

我已经实现了DECREQTPARM。但现在我问自己一个问题:这有什么好处?

显然,一旦您能够发送查询并获得响应,您就已经知道了正确的波特率、奇偶校验和字节长度。这东西有什么用过吗?今天有用吗?

唯一值得查询的信息是{flags}值,但它仅用于某些扩展板。

以下是我的发现,供参考:

代码语言:javascript
复制
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.
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-08-21 20:59:00

简短:除了明显的,没有多大用处

较长时间:

DEC的工程师们在设计VT100时并没有预先知道你可以运行VT100并获取信息,而 modems (被称为“到20世纪80年代初”,这意味着该功能在之前已经在商业上提供了),当然,你不知道你真正的线路速度是多少。您也不知道DEC计算机所看到的串行连接的其他细节。

一些DEC后来的系统(如VMS)有一种方法来显示一些信息,例如show term

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45804330

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档