검색어 What is a "Unix-like" operating system에 대한 글을 관련성을 기준으로 정렬하여 표시합니다. 날짜순 정렬 모든 글 표시
검색어 What is a "Unix-like" operating system에 대한 글을 관련성을 기준으로 정렬하여 표시합니다. 날짜순 정렬 모든 글 표시

2016년 5월 5일 목요일

Script language

Script language

The script language (script げんご, English: scripting language) refers to kind of the simple programming language to make applications software.

I came to be called so the script (in English the meaning of "a script, the script") referring to the simple language description method.

Table of contents

Summary

I say the simple programming language whole to turn more than the meaning mentioned above, and to describe a relatively simple program. I do not add a model to a variable, and there is the definition to call a dynamic model charge account language a script language. But a close definition to the distinction do not exist. There are many things adopting an interpreter method, but the run-time use compiling is prosperous for a performance enhancement. On the other hand, it is a compiler method, but the languages that I can carry out by 1 command from a source code including the go run subcommand of the Go language increase, and, as for "this language, as for "this language, a compiler" and the one which I am particular about are nonsense an interpreter", but there is many I am particular about, turning probably because I am seen for the plain distinction.

Examples of the former (programming language to describe movement contents of the applications software like a script, and to control it) will include the JavaScript for the shell script for the shell of the UNIX, LISP for Emacs, the Web browser.

Examples of the latter (the programming language whole to relatively describe a simple program that turned, and was given meaning to) include perl and PHP. As for perl, a former meaning to describe the operation of the text processing tool was strong in the early days, but in late years [when?] Then it may be said that it developed as a programming language to build a dynamic website (bulletin boards) using CGI mainly at the point of the latter meaning.

In addition, I want to warn you although being very rare because I may call the programming language that I used to implement specific software with a script language. In this sense, one to call "a description language" is desirable. For example, it may be said that a description language of the UNIX is C language.

The following definition is possible, too. It is a language to use to enable it to add a certain function without building the whole a certain program again. For example, it is Emacs Lisp to have been prepared to add a new function to Emacs, and it is SSI and PHP that it was thought to add a function to an HTTP server. These work by an interpreter method in many cases, but there is the thing having mechanism to compile it like a case of Emacs, and to operate fast.

Because it was useful enough even the name called the script language arranged some basic functions sequentially, and to define the new function, I would be touched by the implication such as "a script description". However, I do not only describe movement easily. I possess the data structure description as the programming language, control structure description ability so that the movement that many script languages are complicated enough describes it.

History

The world's first interactive shell was developed for the remote control of the time sharing system in the 1960s. And the method that demand for scripting used the file which stored birth, a simple macrocommand and command line for to omit trouble to devote itself to many times was developed in a command line same an operator by the keyboard of the terminal. This finally led to the development of the shell script. In addition, a very basic implanted script function was developed to facilitate the operation of the batch mode which a human being did not exist among in development of the large, complicated application. In other words, I comprised a function to interpret the order line that a user wrote as some programs, and to carry out. The order line of this case was written by a very special language and virtually buried a program in a program.

As for the script which was low speed written as high-speed programming languages such as the C language in Bourne Shell and AWK, there was a difference in performance clearly historically. However, the performance difference shrank with a technological change, and JAVA and LISP, perl, an interpreter type language such as Python came to be used as a general programming language widely.

It is designed as a general-purpose script language and can speak the language such as Tcl and Lua in form to bury in application and can use it alone. The systems such as Visual Basic for Applications (VBA) are strongly tied to the automation system of the system becoming the base. It has a clear good point to bury a general-purpose script language without developing a new language every application. I omit trouble to develop the function that a developer interprets a language from the beginning and can omit trouble of the learning because the user can speak a known language.

Common Gateway Interface (CGI) makes it possible to control a Web server by a script language. A script language spoken for CGI use early includes perl, ASP, PHP.

Depending on software, I cope with plural different script languages. A recent Web browser includes the language that can expand browser oneself, and, as a standard implantation language for the browser control, there are ECMAScript (JavaScript) and CSS and HTML.

Kind of the script language

A job control language and shell

Kinds of the script language were produced by automation of the job control, and perform start and the control of the system program. It may be said that an ancestor of the shells includes Job Control Language (JCL, job control language) of IBM in this sense. Pro-handling of this kind of language (interpreter) most are called a command-line interpreter such as COMMAND.COM of shell and MS-DOS of the UNIX. There is other AppleScript to be able to write a script by a command such as English. In Mac OS X, I can build the whole application using Cocoa and AppleScript or a JavaScript [1].

GUI script

The special script languages for control of the computers were produced by an appearance of GUI. It is a language to exchange that the systems such as a window, a menu, the button were formed, and it simulates what a human hand performs. I automate that a user performs it, and these languages are standardized, and are called macrolanguages generally.

I can control any application to work on a GUI-based computer, but a macrolanguage theoretically exists in response to the specific application and operating system generally. However, there is the language to recognize a graphical object from the pixel placement on the screen among them, and to operate and is manipulability without, in that case, depending on the OS and application.

Language for exclusive use of the application

Most of large-scale application programs include an inherent script language, and a user of the application uses it as needed. Similarly, there is the script language that is inherent to most of TV game systems and is used for behavior of NPC and environmental programming. Such a language is designed only for one application. Outwardly there is the thing which is similar to a specific general-purpose language (with QuakeC, for example, similar to C language in Quake), but often has the special function that there is not for a general-purpose language. Emacs Lisp is a dialect of the LISP language fully equipped with a function, but possesses a lot of special functions that are convenient for the extension and modification of the function of Emacs. I can consider the script language for exclusive use of the application to be a language peculiar to domain specialized in specific application.

Web browser

A Web browser is application to display a web page. An exclusive language to control the operation has been developed. For example, there is XSLT to convert a JavaScript, VBScript (I work only in Internet Explorer) of Microsoft, XUL (I work only in Firefox) of the Mozilla project, XML contents into a new form, and to display it. Technique using XML and the combination of JavaScripts comes to be adopted widely to make the impression of the user better, and to draw a reaction and comes to be touched to the name called the Ajax.

Web server

On the server side in the HTTP link, even dynamic contents servers such as application server or CMS utilize various scripting technique. It is PHP, JSP, ASP that is used well in this domain, but, besides, Ruby on Rails gets popularity in a part.

Text processing language

The text processing is one of the uses of a certain script language for a long time. The script written for AWK, sed, the grep that were a tool of the UNIX has been used to automate the handling of about the configuration file and the log file text format. A regular expression is important in this field. By the script language for the text processing, I express structure for the processing using a regular expression formally.

Originally I was developed for the purpose of the thing more than the limits of the text processing tool, but perl grows up for a general-purpose language now.

General-purpose dynamic language

The languages such as perl were born as a script language, but grew up for a programming language to be usable in a wider use. By a language similar to perl, I am interpreted during practice, and there is memory management capability and may be called "a script language" because the dynamic language resembles it mutually each. However, there is really the language that is often spoken in the description of the application body. Generally, the author of those languages does not call it "a script language" by oneself.

Expansion / implantation type language

The language to be able to bury in an application program as a substitute of the script language for exclusive use of the application has been designed how many until now. An application programmer elaborates "the hook" for the script language for a program (I use the C language mainly) to let you control the application. Such a language is used in a use same as an expansion language for exclusive use of the application, but there is an advantage to be able to share the skill about the script with different application. The JavaScript was born as a script language in the Web browser, and the use almost still spread out as a language for the general-purpose implantation because it was standardized as ECMAScript. SpiderMonkey which Mozilla in particular implemented is buried in some environment including Yahoo! Widget Engine. As other examples burying implementation (processing system) of ECMAScript, there are Adobe Flash (ActionScript) and Adobe Acrobat (for the scripting of the PDF file) which are a product of Adobe Systems.

Tcl was born as an expansion language, but is often used as a general-purpose language in the same way as Python, perl, Ruby.

It is complicated and, by the application that a use was limited to, comprises an implanted programming language separately from the function that I can offer in normal user interface and provides a further control in a user. For example, 3D authoring tool Maya incorporates a script language MEL. In addition, Blender adopts Python in the use.

A case to add a function to frequently when carry it out when try it in various ways, (e.g., a game engine) uses an implanted language, too. I show power, and prototyping under development can play with a function of the application even if I do not know the core part of the program. Lua and Python are famous, but, for the script language of this use, there are other AngelScript or Squirrel.

Other script language

Footnote, source

[Help]
  1. ^ "JavaScript for Automation Release Note" (HTML). Apple Inc. September 4, 2014 reading.

Allied item

Outside link

This article is taken from the Japanese Wikipedia Script language

This article is distributed by cc-by-sa or GFDL license in accordance with the provisions of Wikipedia.

Wikipedia and Tranpedia does not guarantee the accuracy of this document. See our disclaimer for more information.

In addition, Tranpedia is simply not responsible for any show is only by translating the writings of foreign licenses that are compatible with CC-BY-SA license information.

2016년 6월 4일 토요일

DTSS

DTSS

Dartmouth Time-Sharing System
Development former company / developer Dartmouth College
Development status The historical OS
I can use it
Programming language
Dartmouth BASIC, ALGOL 60, FORTRAN, COBOL, APL, DXPL, DYNAMO, GMAP, LISP, MIX, PL/I, SNOBOL
Correspondence platform The GE-200 series
Established user interface Command-line interface
Website DTSS reborn site
I display a template

DTSS(Dartmouth Time-Sharing System, Dartmouth time sharing system) are large-scale time sharing systems implemented for the first time in the world by the success back. I am affected by a time sharing system built on PDP-1 in Bolt, Beranek and Newman. In 1962, John ケメニー and Thomas Kurtz (English version) of Dartmouth College applied to NSF for financial support of the new time sharing system development (as for having been really invested 1964); [1]. Implementation was started under ケメニー and conduct of Kurtz by the team [3] of the student for the purpose of offering the easy access to calculation facilities to all members of the university in 1963 [2]. A system applied it at 4:00 a.m. on May 1, 1964 and was started. In addition, this system wants to be managed until the end of 1999 [4]; [5]. DTSS was implemented on GE 235 computer at first and was the form that terminal processor GE Datanet 30 controlled 235. I was implemented again later on GE 635 [1], but used Datanet 30 for terminal control as ever. 635 DTSS realizes the time sharing with a little less than 300 terminals in the 1970s, and this is very large for those days.

DTSS gave priority to usability and, for the purpose (education of the student of every subject), was designed.

The world's first integrated development environment was implemented in DTSS. This was a command-based system, and the following commands were implemented.

  • I name NEW - - new program and start programing
  • I search the program that I made before OLD - - and take it out
  • I display a program as of LIST - -
  • I store a program as of SAVE - -
  • I execute a program as of RUN - -

Many users took these commands for a part of the Dartmouth BASIC language, but it was really a part of the time sharing system, and these commands were used when I used a program of ALGOL[6] and FORTRAN via DTSS terminal.

The line with the line number is added to a program at the top that a user input and rearranges it if I input the line number same line before. I am compiled immediately, and the other input line is carried out. The input only for line number is not stored, but is effective in deleting it if there is the same line that has been input with line number. What become such an input method is because a terminal used in DTSS was a teletypewriter terminal.

Other schools and research organizations of the East Coast were connected to DTSS from 1968 through the mid-1970s by the network of the dawn, too. For example, in Goddard University (English version), Philips academy, Naval Academy, I was connected using teletypewriter terminal ASR-33 and a modem. The exchanges of the E-mail-like message were possible, and the real-time chat function that became the forerunner of the talk command of the UNIX existed between users.

A project to play DTSS system on a simulator in 2000 is carried out, and DTSS becomes available on Microsoft Windows and Macintosh [7].

Footnote

Allied item

This article is taken from the Japanese Wikipedia DTSS

This article is distributed by cc-by-sa or GFDL license in accordance with the provisions of Wikipedia.

Wikipedia and Tranpedia does not guarantee the accuracy of this document. See our disclaimer for more information.

In addition, Tranpedia is simply not responsible for any show is only by translating the writings of foreign licenses that are compatible with CC-BY-SA license information.

2017년 2월 25일 토요일

Serial port

Serial port

A DE-9 male type connector (pin out) used with a serial port symbol as a serial port of the IBM PC-compatible.

The serial port is a serial communication physics interface to transmit and receive information by 1 bit in once (unlike parallel port) [1]. In most of the history of the personal computer, the data were transmitted to a modem, a terminal, the device of other various peripheral devices through a serial port.

All the interfaces such as ethernet, FireWire and the USB send data as a serial stream, but terms "serial port" are usually identified with the hardware which RS-232 standard for the purpose of the connection with the communication device similar to modem and it and high rank compatibility or a low rank are compatible with.

A converter between serial - USB is necessary to enable the compatibility with the RS-232 serial number device with the modern computer without a serial port. I still use a serial port in an industrial automation system, a scientific instrument, application such as the point-of-sale terminal system and for some industry and the consumer product. The server computer may use a serial port as a control console for the diagnoses. The network apparatus often uses a serial console for setting (such as a router and the switch). Because the serial port is simple and is cheap and a console function is standardized highly and spreads, I am still used in the field of the network apparatus. The serial port needs almost none of the software support from a host system.

Table of contents

Hardware

 
The PCI Express *1 card which is equipped with one serial port.

I converted a letter into an async serial number form and converted a letter into an async serial number form in the computer like IBM PC adversely, and it was more automatic, and there was the thing which used an integrated circuit called UART which took care of the structure in the timing of data. It was for the transmission of the data through the output pin and used a CPU by the very low-cost system in substitution for UART as having been seen in an early home computer by using a ビットバンギング technology. The minicomputer and the microcomputer before large scale integration (LSI) UART integrated circuits spread were equipped with the serial port which consisted of the plural small scale integrated circuits which implemented a shift register, logic gate, the counter for the serial port and all other logics.

The early home computer was the pin out that was incompatible with RS-232 and was often equipped with the serial port which was proprietary that was the battery level which was incompatible with RS-232. Such a serial port is not able to bear a generated battery level, and the mutual use with the RS-232 device may be impossible to lock a user to the product of the authorized supplier, and to enter it because there is various difference.

A more complicated serial communication standard was enabled at current high speed such as USB and FireWire to substitute by a low-priced processor in RS-232. By a low-priced processor, I come to be able to connect the device which less works by the serial connection that is low speed well such as mass storage, music and the video device.

Even if I turn on a pin header and can access it, at least one serial port is still put on the motherboard of many personal computers. RS-232 connector port is omitted to save space with Small form factor system and the laptop, but the circuit still exists. Because RS-232 became the standard and was very long, the circuit necessary to control a serial port became very cheap. Furthermore, RS-232 often exists as the single tip which I sometimes matched with the circuit for the parallel port.

DTE and DCE

The individual signals of the serial port must connect the output of one device to the input of another device at time to unidirectionally connect two devices. The devices are classified in "DTE" (Data Terminal Equipment, DTE) and two kinds of "data circuit-terminating equipment" (Data Circuit-terminating Equipment, DCE). The line which is the output to DTE device is input to a DCE device, and the line which is the input to DTE device is the output to a DCE device. Therefore, I can connect a DCE device to DTE device with a straight cable broadcasting cable. As custom, a computer and the terminal are DTE, and a modem and a peripheral device are DCE.

When it is necessary to connect two DTE devices (but or it is very rare two DCE devices), you must use the crossover null modem by the form of either adapter or cable.

Connector

 
The pair of the Mini DIN-8 female type connector used as an RS-422 serial port of Macintosh LC.

Originally 25 pin D type connectors were appointed in the RS-232 standard, but decided most of personal computer designers to implement only the subset of full standards. They sacrificed the compatibility with the standard in exchange for the use of the connector (DE-9 used in IBM PC-AT of the material in particular) which was cheap, and was more compact. Because I wanted to offer a serial interface card equipped with two ports, it was necessary for IBM to lower the size of the connector to fit single card back panel. If it is DE-9 connector, I fit a card equipped with the DB-25 connector which is another connector. This DB-25 connector was changed for a reason same as DE-9 connector by Centronics specifications of the material, too. The serial port was usually built in 9 pin connectors to save cost and space since IBM PC-AT was introduced. However, it is insufficient even if 9 pin D-subminiature connectors exist because 9 pin D-subminiature connectors were used for a video, joy-stick and other purposes to really make that connection depends on a serial port clear.

 
Hirose 3560-16S which is used as RS-232 of the Datong TWN-5213 CU tablet computer.

There is the thing equipped with the serial port using the faun connector in the electronic device downsized like a graph electronic calculator and a mobile amateur radio communications machine and a transmission and reception combined use radio apparatus, and the connector is in particular usually smaller than 2.5 or 3.5mm. Furthermore, in these electronic devices, there is the thing using 3 most basic line interfaces.

Most of models of Macintosh adopted the RS-422 standard that was a relative of RS-232 using Mini-DIN connector made in Germany except the earliest model willingly mainly. I put one set of two ports on Macintosh as a standard for the connection to a printer and a modem, but there was the thing which only a port of unified one was equipped with because space-saving in the PowerBook laptop.

I appoint 20 different signal connection in the standard. Because most devices use only the several signals, a smaller connector is often used. For example, 9 pin DE-9 connectors were used in a PC compatible with most IBM after the IBM PC AT and were standardized as TIA-574. A modular connector is used recently. 8P8C connector is the most common. I appoint pin allocation in the EIA/TIA 561 standard, but "Yost serial number device wiring standard" [2] that Dave Yost invented (and it spread in "Unix System Administration Handbook") is a standard with the new device made by a UNIX computer and cisco systems. Many devices use neither of EIA/TIA 561 standard and the Yost standard. The 10P10C connector is seen in the device, too. Digital Equipment Corporation (DEC) defined the DECconnect connection system peculiar to Modified Modular Jack (MMJ) connector-based DEC. This is 6 pin modular Jack who is out of a key from the central location. Like Yost standard, DECconnect uses symmetric pin placement to make it possible to directly connect two DTE. For other general connectors, there are usually general (and I was mounted by the part of a space slot board and other covers) DH10 header connectors by a motherboard and an add-in card converted into 9 standard pin DE-9 connectors via a cable.

Pin out

The following tables made the allocation of RS-232 signal and the pin used generally a list [3].

Signal The starting point DB-25 DE-9
(TIA-574)
MMJ 8P8C ("RJ45") 10P10C ("RJ50")
The name Abbreviated form DTE DCE EIA/TIA-561 Yost (DTE) Yost (DCE) Cyclades[4] Digi (ALTPIN option) [5] National Instruments [6] Cyclades[4] Digi[7]
Transmission data TxD 2 3 2 6 6 3 3 4 8 4 5
Reception data RxD 3 2 5 5 3 6 6 5 9 7 6
Data terminal lady DTR 20 4 1 3 7 2 2 8 7 3 9
The carrier detection DCD 8 1 N/A 2 2 7 7 1 10 8 10
Data set lady DSR 6 6 6 1 8 N/A 5 9 2
Called indication RI 22 9 N/A N/A N/A N/A N/A 2 10 1
Transmission request RTS 4 7 N/A 8 8 1 1 2 4 2 3
The transmission is possible CTS 5 8 N/A 7 1 8 5 7 3 6 8
Signal grounding G Common 7 5 Three or four 4 Four or five Four or five 4 6 6 5 7
Protection grounding PG Common 1 N/A N/A N/A N/A N/A N/A 3 N/A 1 4

The signal is named, for example, by a viewpoint of DTE such as the serial port where is compatible with IBM-PC. The grounding signal pays the value that is common to other connection. This is seen in two pins in the Yost standard, but is the same signal together. Another "protection grounding" in pin 1 is included in DB-25 connector. It is a general custom to connect pin 7 (signal grounding) to this, but is not essential.

RI is integrated with DSR in EIA/TIA 561 [8], and be careful about DCD being integrated with DSR in [9], the Yost standard.

 
The converters from USB to a serial port compatible with RS-232. As well as physical conversion, I need a driver of the host system software and an embedded processor to emulate a function of the serial port hardware compatible with IBM XT.

Hardware abstraction

I use a name slug to usually refer to serial ports of the computers in the operating system. I usually name serial port devices /dev/tty* (the abbreviated form that a general trademark of teletype is free in "TTY") in the Unix system operating system. Here, character string to distinguish a terminal device becomes available on a part of *. *The sentence structure of the character string depends on the operating system and the device. The 8250/16550 UART hardware serial port is named /dev/ttyS* in Linux, and the USB adapter becomes /dev/ttyUSB*. However, various types of virtual serial ports may not necessarily have the name to begin in tty.

In MS-DOS and the Windows environment of Microsoft, I refer to a serial port as COM port. COM1, COM2, it is などとしてである. The port of the number that is bigger than COM9 has to refer using \\.\COM10 sentence structure [10].

General application of the serial port

Most of specialized device and devices of the special order use RS-232 standard. Some more general devices connected to the serial port of the PC are included in the following lists. There is the thing which was not used like a modem and serial mouse while there is the thing which I can use easily in these devices.

It is already natural that the microcontroller of most kinds is attached to the serial port and can use these serial ports to communicate with a PC and other serial devices.

The control signal to a serial port was a switch, and there was the thing using the control line of the serial port in the application mentioned above easily because ON/OFF was possible to watch an outside device without exchanging serial data. As a general commercial application using this principle, there were some models of the uninterruptive power supply using the control line for "battery drop warning" and other status information signals "an illumination loss". There were not few things which used a cord key connected to a serial port to simulate use of real cord in the Morse code training software. トレーニングソフトがモールス符号を解読できるので、シリアルポートのステータスビットを非常に迅速かつ予測可能な時間で実際にサンプリングすることが可能であった。

設定

 
4ポートシリアル (RS-232) PCI Express ×1拡張カード。このカードのDC-37コネクタを4つの標準DE-9コネクタに分解したオクトパスケーブルが付属する。

速さ、文字ごとのデータビットの数、パリティ、そして文字ごとのストップビットの数を選び抜くため、非同期スタートストップ通信に使用されるシリアル接続には多くの設定が必要となる。UART集積回路を使用する現在のシリアルポートでは、設定は通常全てソフトウェア制御である。1980年代以前のハードウェアでは回路基盤にあるスイッチやジャンパの設定が必要なこともある。イーサネット、FireWire、そしてUSBといったシリアルバス規格でもたらされた簡素化の1つに、シリアルバス規格のパラメータの多くが固定された値となっていることが挙げられる。このためユーザは設定を変更できないか、変更の必要がない。速度は固定されるか自動的に取り決められるかのいずれかである。何度設定を間違って入力しても接続は切断されない。しかしながら、受信側では送信されたデータを全て無意味なものとみなす。

速度

シリアルポートは2値(バイナリ)信号を使用している。このためビット毎秒単位のデータ転送速度はボー単位の符号転送速度に等しい。一連の標準転送速度は電気機械式テレプリンタ用の転送速度の倍数に基づいている。シリアルポートの中には多くの転送速度から任意の速度を選択できるものがある。ポートの速度とデバイスの速度は一致させる必要がある。ビット転送速度を設定できても、実用的な接続となるわけではない。全てのビット転送速度が全てのシリアルポートで利用可能であるとは限らない。楽器コントロール用のMIDIのような特定用途のプロトコルの中には、テレプリンタ用転送速度の倍数以外のシリアルデータ転送速度を使用するものもある。シリアルポートシステムの中には自動的にビット転送速度を見つけるものもある。

速度には(ストップビットやパリティなどの)構造用のビットが含まれる。このため実効データ転送速度はビット伝送速度以下になる。例えば8-N-1キャラクタのフレームではビットの80%のみがデータとして使用可能である(データの8ビットごとに、さらに2つのフレーミングビットが送られる)。

サポートされるビット転送速度には通常、75、110、300、1200、2400、4800、9600、19200、38400、57600そして115200bit/sが含まれる[15]。周波数が1.843200MHzの水晶発振器は特にこの目的のために販売されている。この周波数は最も早いビット転送速度の16倍であり、シリアルポート回路は必要に応じて容易にこの周波数をより低い周波数に分割することができる。

データビット

各文字のデータビット数は5(Baudot Code用)、6(まれに用いられる)、7(純粋なASCII用)、8(このサイズがバイトのサイズとマッチするように、ほとんどの種類のデータ用)、または9(まれに用いられる)とすることができる。新しいシリアルポートの適用例では8データビットを使用するのがほぼ一般的である。5や7ビットは一般的にテレプリンタのような古い装置と共に用いる時のみ意味をなす。

ほとんどのシリアル通信設計では、各バイトのLSB(Least Significant Bit、最下位ビット)にあるデータビットを最初に送信するようになっている。この規格は「リトルエンディアン」としても言及される。「ビッグエンディアン」、すなわちMSB(Most Significant Bit、最上位ビット)を最初に送るシリアル通信も使用できるがほとんど使われていない。例としてビッグエンディアンはIBM 2741印刷端末で使用されていた(ビット順序についてより詳しい情報についてはビットナンバリングを参照すること)。ビットの順番は通常シリアルポートインタフェース内部では設定できない。ローカルのデフォルトとは異なるビット順序を必要とするシステムと通信するため、ローカルソフトウェアは送信直前や受信直後に、各バイトに含まれるビット順序を再設定できる。

パリティ

パリティは伝送における誤り検出手法である。パリティをシリアルポートで使用する場合、各データ文字と共に余分なデータビットが送信され、パリティビットを含む各文字の1であるビットの数が常に奇数か常に偶数となるよう調整される。間違った1であるビットの数を受信した場合、それを却下しなければならない。しかしながら、誤りの数が偶数であればパリティ検査を通過できる。

電気機械式のテレプリンタはラインノイズで損害を受けたメッセージを発見できるように、受信データがパリティエラーを含む場合に特殊文字を出力するよう調整された。単一のパリティビットでは各文字の誤り訂正を実装できないので、シリアルデータリンクをやり直す通信プロトコルはデータが有効であることを保障し、誤って受信されたデータの再送を要求するハイレベルなメカニズムを有している。

各文字のパリティビットは無し (None, N)、奇数 (Odd, O)、偶数 (Evevn, E)、マーク (Mark, M)、もしくはスペース (Space, S)に設定できる。無しはパリティビットが一切送られないことを意味する。マークパリティはパリティビットが常にマーク信号状態(論理的に1)に設定され、同様にスペースパリティは常にスペース信号状態のパリティビットが送られることを意味する。マークやスペースパリティは、いくつかの種類のアドレッシングや特殊信号用に9番目の(パリティ)ビットを使用するまれな適用例を除き、誤り検出情報を追加しないため一般的ではない。奇数パリティは偶数パリティよりも有用である。なぜなら奇数パリティは各文字に少なくとも1つの状態遷移が存在することを保証しているからであり、奇数パリティをより信頼できるものとしている。しかしながら通信プロトコルが誤り検出を行うため、最も一般的なパリティ設定は「無し」である。

ストップビット

各文字の終わりに送信されるストップビットにより、受信信号ハードウェアが文字の終わりを検出することができ、さらに文字ストリームと再同期できる。電気デバイスは通常1つのストップビットを用いる。低速な電気機械式テレプリンタを使用する場合、1と1/2個あるいは2個のストップビットが必要となる。

慣例表記

D/P/S (Data/Parity/Stop) 慣例表記はシリアル接続の構造を表す。マイクロコンピュータで使用されるのはほとんど8/N/1 (8N1) である。これは8データビット、パリティなし、1ストップビットを表す。この表記において、パリティビットはデータビットに含まれない。7/E/1 (7E1) は、スタートビットとストップビットの間にある計8個のビットのうちの7個のデータビットに、偶数パリティビットが追加されていることを意味する。7/E/1ストリームの受信者が8/N/1ストリームを期待している場合、受信可能なバイトの半分は高ビットがセットされていると解釈される。

フロー制御

シリアルポートはデータ通信を中断したり再開するためにインタフェースの信号を使用することがある。例えば、遅いプリンターはメカニズムが行を進めている間はデータを中断するよう指示するため、シリアルポートを用いたハンドシェイクが必要な場合があった。

ハードウェアハンドシェイク信号(ハードウェアフロー制御)は通常、RS-232 RTS/CTSまたはDTR/DSR信号回線を使用する。一般的に、例えばバッファがほぼいっぱいの場合、RTSとCTSはデータフローを制御するためにどちらか一方のエンドからオンオフされる。DTRとDSRは通常常時オンであり、RS-232規格やその後継規格で、反対側のエンドの装置が実際に存在し起動している各エンドから信号を送るために使用される。しかしながら、例えばDTRをフロー制御に使用するプリンターのように、メーカーは数年に渡り規格に準拠しないバリエーションを実装した多くのデバイスを確立してしまった。

フロー制御の別の方式では、データフローを制御するためにXON/XOFFのような特殊文字を使う。送信者がいつデータを送信するかを制御するために、受信者が送信者に対しXON/XOFF文字を送信する。つまりXON/XOFF文字はデータが送信される方向とは反対方向へ向かう。回線は「送信許可」状態で開始される。受信者のバッファが容量に達した場合、受信者は送信者にデータ送信を停止するよう命じるためにXOFF文字を送信する。その後受信者はバッファを空にした後、受信者は送信者に伝送を再開するよう命じるためにXON文字を送信する。XON/XOFF文字は非出力文字であり、プリンター、端末、そしてコンピュータシステムによりハンドシェイク信号として解釈される。

XON/XOFFフロー制御は、データ用に使用される通信路と同じ通信路を通じて制御情報が送信される、インバウンド信号方式の例である。XON文字とXOFF文字は送信されるデータ中に出現する可能性があり、さらに受信者はXON文字とXOFF文字をフロー制御として解釈してしまう可能性があるため、XON/XOFFハンドシェイクは困難となる。これを防ぐため、データストリームの一部として送信されるXON文字とXOFF文字をエスケープシーケンスでエンコードする必要があり、送受信ソフトウェアはこれらエスケープシーケンスの生成および解釈を行う必要がある。その反面、余分な信号線を必要としないためXON/XOFFフロー制御は3線インタフェースで処理が行える。

仮想シリアルポート

仮想シリアルポートは標準シリアルポートのエミュレーションである。このポートは(拡張カードのような)追加のハードウェアインストールをせずに、オペレーティングシステムのシリアルポートを追加できるソフトウェアにより作成される。たくさんの仮想シリアルポートをPCに作成できる。制限は、多くのシリアルポートを同時にエミュレートするために必要な、操作用メモリや演算能力といったリソースの量だけである。

仮想シリアルポートは、ボーレート、データビット、パリティビット、ストップビットなどを含む全てのハードウェアシリアルポート機能をエミュレートする。さらに全ての信号線 (DTR/DSR/CTS/RTS/DCD/RI) をエミュレートしピンアウトをカスタマイズすることで、データフローを制御することができる。仮想シリアルポートはBluetoothと共に用いることが一般的であり、Bluetooth搭載のGPSモジュールからデータを受信するための標準的な手段である。

仮想シリアルポートエミュレーションは、使用可能な物理シリアルポートが足りない場合や現在の要件を満たさない場合に役立つ。例えば仮想シリアルポートは、シリアルポートに接続された1つのGPSデバイスに基づく複数アプリケーション間でデータを共有できる。また、インターネットLAN経由でどんなシリアルデバイスとも、まるでコンピュータとローカルで接続されているかのように通信することもできる(Serial over LAN/Serial-over-Ethernet技術)。2つのコンピュータやアプリケーションはエミュレートされたシリアルポート接続を通じて通信することが可能である。仮想シリアルポートエミュレータはMac OS、Linux、Microsoft Windowsの様々なモバイルやデスクトップバージョンを含む多くのオペレーティングシステムで使用できる。

関連項目

脚注

  1. ^ Webopedia (2003年9月3日). "What is serial port? - A Word Definition From the Webopedia Computer Dictionary". Webopedia.com. 2009年8月7日閲覧。
  2. ^ Yost Serial Device Wiring Standard
  3. ^ Joakim Ogren. "Serial (PC 9)". 2015年3月25日閲覧。
  4. ^ a b Cyclom-Y Installation Manual, page 38, retrieved on 29 November 2008
  5. ^ "RJ-45 8-Pin to Modem (ALTPIN option)". Digiftp.digi.com. 2014年2月8日閲覧。
  6. ^ National Instruments Serial Quick Reference Guide, February 2007
  7. ^ "RJ-45 10-Pin Plug to DB-25 Modem Cable". Digiftp.digi.com. 2014年2月8日閲覧。
  8. ^ Hardware Book RS-232D
  9. ^ RS-232D EIA/TIA-561 RJ45 Pinout
  10. ^ "[SDK32 COM10 以上のシリアルポートを指定する方法]". Microsoft support. 2013年10月26日閲覧。
  11. ^ "Paul's 8051 Code Library, IDE Hard Drive Interface". Pjrc.com (2005年2月24日). 2014年2月8日閲覧。
  12. ^ "IDE Hard Disk experiments". Hem.passagen.se (2004年2月15日). 2014年2月8日閲覧。
  13. ^ "The Solution for Seagate 7200.11 HDDs - Hard Drive and Removable Media issues - MSFN Forum". Msfn.org. 2014年2月8日閲覧。
  14. ^ "Fixing a Seagate 7200.11 Hard Drive". Sites.google.com. 2014年2月8日閲覧。
  15. ^ "DCB Structure". MSDN. Microsoft. 2011年3月15日閲覧。

参考文献

  • Serial Port Complete: COM Ports, USB Virtual COM Ports, and Ports for Embedded Systems; 2nd Edition; Jan Axelson; Lakeview Research; 380 pages; 2007; ISBN 978-1-931-44806-2.

外部リンク

This article is taken from the Japanese Wikipedia Serial port

This article is distributed by cc-by-sa or GFDL license in accordance with the provisions of Wikipedia.

Wikipedia and Tranpedia does not guarantee the accuracy of this document. See our disclaimer for more information.

In addition, Tranpedia is simply not responsible for any show is only by translating the writings of foreign licenses that are compatible with CC-BY-SA license information.