JP2870200B2 - Data processing device - Google Patents

Data processing device

Info

Publication number
JP2870200B2
JP2870200B2 JP3021013A JP2101391A JP2870200B2 JP 2870200 B2 JP2870200 B2 JP 2870200B2 JP 3021013 A JP3021013 A JP 3021013A JP 2101391 A JP2101391 A JP 2101391A JP 2870200 B2 JP2870200 B2 JP 2870200B2
Authority
JP
Japan
Prior art keywords
data
driver
buffer
user program
keyboard
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP3021013A
Other languages
Japanese (ja)
Other versions
JPH04259021A (en
Inventor
誠 村田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yokogawa Electric Corp
Original Assignee
Yokogawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yokogawa Electric Corp filed Critical Yokogawa Electric Corp
Priority to JP3021013A priority Critical patent/JP2870200B2/en
Publication of JPH04259021A publication Critical patent/JPH04259021A/en
Application granted granted Critical
Publication of JP2870200B2 publication Critical patent/JP2870200B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Input From Keyboards Or The Like (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、リアルタイム・オペレ
ーション・システムを搭載するコンピュータ・システム
において、各種ドライバとこれらのドライバにより制御
される各種ユーザ・プログラムとの間でデータ授受に関
与するデータ処理装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data processing apparatus for transmitting and receiving data between various drivers and various user programs controlled by these drivers in a computer system equipped with a real-time operation system. It is about.

【0002】[0002]

【従来の技術】リアルタイム・オペレーション・システ
ム(例えばDOS68K等)を搭載するコンピュータ・
システムでは、ドライバと、このドライバが制御するユ
ーザ・プログラムとの間では、通常、次のようにしてデ
ータ授受が行われている。ドライバとして例えばキーボ
ード・ドライバを想定すると、キーボードでキー・イン
されたキーボード・データは、キーボード・ドライバ内
のバッファに一旦保持され、ユーザ・プログラムはイン
ターフェイスを介してこのバッファ内のデータを読み出
すようにしている。この他、ドライバとして通信データ
を処理する通信ドライバ、ディスクとのデータ転送に関
与するディスク・ドライバ等のI/Oドライバについて
も同様に、一旦、各ドライバ内のバッファにデータを保
持し、各ドライバに対応するユーザ・プログラムはこの
バッファを読み出してデータを得ている。
2. Description of the Related Art A computer equipped with a real-time operation system (for example, DOS68K, etc.)
In a system, data is normally exchanged between a driver and a user program controlled by the driver as follows. Assuming, for example, a keyboard driver as a driver, keyboard data keyed in by a keyboard is temporarily held in a buffer in the keyboard driver, and a user program reads data in this buffer via an interface. ing. In addition, a communication driver that processes communication data as a driver, and an I / O driver such as a disk driver that participates in data transfer with a disk, similarly hold data in a buffer in each driver once, and Has read the buffer to obtain the data.

【0003】[0003]

【発明が解決しようとする課題】上記のような従来のデ
ータ授受方式にあっては、次のような不具合があった。 (1) キーボード・ドライバ、通信ドライバ、ディスク・
ドライバ等の各種ドライバ内のバッファの容量の大きさ
はドライバの種類に関係なく既定値(一定値)である
が、各ドライバに対応する各ユーザ・プログラムにおい
て、ドライバ内バッファから読み出すデータの大きさは
その種類に応じてまちまちであり、例えば1024バイ
ト程度のデータを一時に読み出すユーザ・プログラムも
あれば、16バイト程度のデータのみ読み出すユーザ・
プログラムもある。このため、ユーザ・プログラムの必
要とするデータ大きさと対応するドライバ内のバッファ
大きさとは必ずしも一致せず、データ授受に複雑な手続
きを設定しなければならなかった。 (2) 各ユーザ・プログラムは、データが必要な際、対応
するドライバに対してデータ要求を発するが、ドライバ
内バッファにデータが存在しない場合、データがこのバ
ッファに転送されるまで待ち状態を維持する。このた
め、頻繁に行う他の処理、例えばCRT画面のリフレッ
シュ等の実行が遅くなり、システム全体のパフォーマン
スを落とす原因の一つとなっていた。
However, the conventional data transfer method as described above has the following disadvantages. (1) Keyboard driver, communication driver, disk driver
The size of the buffer capacity in each driver such as a driver is a predetermined value (constant value) regardless of the type of driver. However, in each user program corresponding to each driver, the size of data read from the buffer in the driver. Are different depending on the type. For example, some user programs read data of about 1024 bytes at a time, while others read only data of about 16 bytes.
There is also a program. Therefore, the data size required by the user program does not always correspond to the buffer size in the driver, and a complicated procedure must be set for data transfer. (2) Each user program issues a data request to the corresponding driver when data is needed, but if there is no data in the buffer in the driver, it keeps waiting until data is transferred to this buffer. I do. This slows down other frequently performed processes such as refreshing the CRT screen, which is one of the causes of a decrease in the performance of the entire system.

【0004】本発明は、このような問題を解決すること
を課題とし、ユーザ・プログラムが効率よくデータを受
け取ることができ、しかもシステム全体のパフォーマン
スを落とすことのないようにデータ授受を行うことを目
的とする。
An object of the present invention is to solve such a problem, and it is an object of the present invention to allow a user program to efficiently receive data and to exchange data so as not to lower the performance of the entire system. Aim.

【0005】[0005]

【課題を解決するための手段】以上の課題を解決した本
発明は、リアルタイム・オペレーション・システム上に
設定される各種ドライバとこれら各種ドライバにより制
御される各種ユーザ・プログラムとの間に、前記各種ユ
ーザ・プログラムに対応して設定され、前記ユーザ・プ
ログラムの種類に応じてその大きさが予め決められ前記
ドライバからのデータを保持するバッファ手段と、前記
バッファ手段中にデータが存在しない時に前記ドライバ
にデータ読み出し要求をかける要求発生手段と、前記バ
ッファ手段中にデータが存在しない時にセットされ一定
時間経過しても前記バッファ手段にデータが転送されな
い場合に前記データ読み出し要求をキャンセルするタイ
マ手段と、前記一定時間以内に前記バッファ手段にデー
タが転送された際に前記タイマ手段をキャンセルして前
記データを取り出す取出手段とを備えるデータ処理装置
である。
SUMMARY OF THE INVENTION The present invention, which has solved the above-mentioned problems, has a structure in which various drivers set on a real-time operation system and various user programs controlled by these various drivers are provided. Buffer means for setting data corresponding to a user program, the size of which is predetermined according to the type of the user program, and holding data from the driver; and the driver when data does not exist in the buffer means. Request generating means for issuing a data read request to the buffer means, and timer means for canceling the data read request when data is not transferred to the buffer means even when a certain period of time has elapsed when no data exists in the buffer means, When data is transferred to the buffer means within the fixed time A data processing device and a take-out means for taking out the cancellation to the data the timer means.

【0006】[0006]

【作用】本発明のデータ処理装置は、ユーザ・プログラ
ムに合わせたバッファ容量を有し、タイマ手段セット後
データ読み出し要求を発し、タイマ手段動作中にデータ
がバッファ手段に転送されてきた場合はこれを取り出
し、タイマ手段がタイム・アップしてもデータがバッフ
ァ手段に転送されない場合はデータ読み出し要求をキャ
ンセルしてタイムアウトとする。
The data processing apparatus according to the present invention has a buffer capacity corresponding to the user program, issues a data read request after setting the timer means, and when data is transferred to the buffer means while the timer means is operating. If no data is transferred to the buffer means even if the timer means times out, the data read request is canceled and a time-out is performed.

【0007】[0007]

【実施例】本発明を実施したデータ処理装置の例を図
1、図2を用いて説明する。図1は本発明のデータ処理
装置の概念図である。図1において、リアルタイム・オ
ペレーション・システムOS上にドライバとしてキーボ
ード・ドライバKBDを設定し、このキーボード・ドラ
イバKBDに対応してユーザ・プログラムUPを設定す
るものとする。本発明のデータ処理装置10は、ユーザ・
プログラムUP側に設定し、キーボード・ドライバKB
Dに対するインターフェイスは従来のものまま保持させ
る。本発明装置10は、ユーザ・プログラムUPに合わせ
て予めその大きさが設定されキーボード・ドライバKB
Dからデータを受け取るバッファ手段11、バッファ手段
11に保持したデータをユーザ・プログラムUP側に転送
する取出手段12、ユーザ・プログラムUPからタイムア
ウト値をセットされるタイマ手段13、ユーザ・プログラ
ムUPから指示を受けてキーボード・ドライバKBDに
対してデータ読み出し要求を発生する要求発生手段14を
備える。このような本発明装置10の動作概要は、次の通
りである。 ユーザ・プログラムUPは、キーボード
・データを得るためにデータ処理装置10を起動する。こ
の時、ある一定時間、キー入力がなければタイムアウト
とするために、タイマ手段13にタイムアウト値をセット
する。 タイムアウト値設定後、要求発生手段14はキ
ーボード・ドライバKBDにキー読み出し要求をかけ
る。 キーボード・ドライバKBDはキー入力があれ
ば、キーボード・データをバッファ手段11に送出する。
この時、キーボード・ドライバKBDはキー読み出し要
求がない時のキーボード・データも保持しているので、
バッファ手段11に送信するデータはキー入力1個分とは
限らない。 バッファ手段11は、キーボード・ドライ
バKBDからのデータを必要なだけバッファリングし、
取出手段12はユーザ・プログラムUPから要求された大
きさでデータを転送する。 タイマ手段13にてタイム
アウトが発生してもキーボード入力がない場合は、ユー
ザ・プログラムUPへタイムアウトを知らせると同時
に、キーボード・ドライバKBDに対してキー読み出し
要求のキャンセルを行う。
DESCRIPTION OF THE PREFERRED EMBODIMENTS An example of a data processing apparatus embodying the present invention will be described with reference to FIGS. FIG. 1 is a conceptual diagram of a data processing device of the present invention. In FIG. 1, a keyboard driver KBD is set as a driver on the real-time operation system OS, and a user program UP is set corresponding to the keyboard driver KBD. The data processing device 10 of the present invention
Set on the program UP side, keyboard driver KB
The interface to D is kept as it is. The device 10 of the present invention has a keyboard driver KB whose size is set in advance in accordance with the user program UP.
Buffer means 11 for receiving data from D, buffer means
Extraction means 12 for transferring the data held in 11 to the user program UP side, timer means 13 for setting a timeout value from the user program UP, and receiving data from the user program UP to the keyboard driver KBD. A request generating means 14 for generating a read request is provided. An outline of the operation of the device 10 of the present invention is as follows. The user program UP activates the data processing device 10 to obtain keyboard data. At this time, a timeout value is set in the timer means 13 in order to timeout when there is no key input for a certain period of time. After setting the timeout value, the request generating means 14 issues a key read request to the keyboard driver KBD. The keyboard driver KBD sends keyboard data to the buffer means 11 when there is a key input.
At this time, since the keyboard driver KBD also holds the keyboard data when there is no key read request,
The data to be transmitted to the buffer means 11 is not limited to one key input. The buffer means 11 buffers data from the keyboard driver KBD as necessary,
The extracting means 12 transfers data in a size requested from the user program UP. If there is no keyboard input even if a timeout occurs in the timer means 13, the timeout is notified to the user program UP, and at the same time, the key read request is canceled to the keyboard driver KBD.

【0008】次に、図2のフローチャートを用いて本発
明装置10の動作を詳しく説明する。ユーザ・プログラム
UPから本発明のデータ処理装置10をコールする。尚、
この時、バッファ手段11の大きさは当該ユーザ・プログ
ラUPに合わせて既に設定されている。この例におい
て、本発明装置は、実際には、キーボード・データ読み
込みライブラリとしてソフトウェア・プログラムとして
設定するのがよい。はじめに、バッファ手段11内にデー
タが存在するか否かをみる。データが存在すれば、取出
手段12はそのデータを取り出し、ユーザ・プログラムU
Pに送信する。データがなければ、ユーザ・プログラム
UPの指示により、タイマ手段13に所定のタイムアウト
値を設定し、要求発生手段14はキーボード・ドライバK
BDにキー読み出し要求をかける。この状態で、本発明
装置はイベント待ち状態となる。この時、キー入力イベ
ントまたはタイムアウト・イベントの待ち状態である。
いずれかのイベントが与えられると、非同期ルーチンを
開始し、イベント内容をチェックする。イベント内容が
タイマ手段13のタイムアウトを表わすタイムアウト・イ
ベントであれば、タイムアウト・フラグをセットし、タ
イムアウト・フラグのオンによりキーボード・ドライバ
KBDに対してキー読み出し要求をキャンセルする。イ
ベント内容がタイムアウト・イベントでなく、キーボー
ドKB操作によるキー入力イベントであれば、キーボー
ド・ドライバKBDからキーボード・データを得てバッ
ファ手段11に取り込み、タイムアウト・フラグ・オンで
なければタイマ手段11をキャンセルし、取出手段12はバ
ッファ手段11からデータを取り出してユーザ・プログラ
ムUPに送信する。尚、イベント待ち状態において、何
らかのイベントが発生すると、非同期ルーチンを開始
し、この非同期ルーチンの処理を終了すると、再度イベ
ント待ち状態となる。
Next, the operation of the apparatus 10 of the present invention will be described in detail with reference to the flowchart of FIG. The data processing device 10 of the present invention is called from the user program UP. still,
At this time, the size of the buffer means 11 has already been set in accordance with the user program UP. In this example, the apparatus of the present invention is actually preferably set as a software program as a keyboard data reading library. First, it is determined whether or not data exists in the buffer unit 11. If the data exists, the fetching means 12 fetches the data and outputs the data to the user program U.
Send to P. If there is no data, a predetermined timeout value is set in the timer means 13 according to the instruction of the user program UP, and the request generation means 14
A key read request is issued to the BD. In this state, the device of the present invention enters an event waiting state. At this time, it is in a waiting state for a key input event or a timeout event.
If any event is given, start an asynchronous routine and check the contents of the event. If the event content is a time-out event indicating a time-out of the timer means 13, a time-out flag is set, and the key-out request to the keyboard driver KBD is canceled by turning on the time-out flag. If the event content is not a timeout event but a key input event by keyboard KB operation, keyboard data is obtained from the keyboard driver KBD and loaded into the buffer means 11, and if the timeout flag is not on, the timer means 11 is canceled. Then, the extracting means 12 extracts the data from the buffer means 11 and transmits it to the user program UP. When an event occurs in the event waiting state, an asynchronous routine is started, and when the processing of the asynchronous routine ends, the state returns to the event waiting state.

【0009】以上のようにして、本発明装置は、ユーザ
・プログラムUPの種類に応じて予めバッファ手段11の
大きさを決めておき、また、ユーザ・プログラムUPか
らタイマ手段13のタイムアウト値を指示できる。また、
上述の例にあっては、ドライバとしてキーボード・ドラ
イバKBDの例を挙げて説明を行ったが、通信ドライ
バ、ディスク・ドライバ等の各種ドライバであっても本
発明のデータ処理装置を適用することができる。尚、複
数のユーザ・プログラム及び複数のドライバ・プログラ
ムを備えるコンピュータ・システムにあっては、本発明
のデータ処理装置は、各ユーザ・プログラム毎にバッフ
ァ手段11の大きさ及びタイムアウト値を変えて設定す
る。
As described above, according to the present invention, the size of the buffer means 11 is determined in advance in accordance with the type of the user program UP, and the timeout value of the timer means 13 is designated from the user program UP. it can. Also,
In the above-described example, the keyboard driver KBD has been described as an example of the driver, but the data processing device of the present invention can be applied to various drivers such as a communication driver and a disk driver. it can. In a computer system having a plurality of user programs and a plurality of driver programs, the data processing apparatus of the present invention sets the size and the timeout value of the buffer means 11 for each user program by changing the size and the timeout value. I do.

【0010】[0010]

【発明の効果】本発明のデータ処理装置によれば、リア
ルタイム・オペレーション・システムを備えるコンピュ
ータ・システムにおいて、ユーザ・プログラムの種類に
応じて任意の大きさのデータ取り出し及び任意時間のタ
イムアウト機能を実現したため、データ授受に必要であ
った複雑な手続きが不要となり、また、所定の時間にタ
イムアウトを発生するので他の処理に悪影響を及ぼすこ
ともない。このように、個々のユーザ・プログラムのニ
ーズに答えることができ、システム全体のパフォーマン
スを落とすことはない。
According to the data processing apparatus of the present invention, in a computer system having a real-time operation system, a function of fetching data of an arbitrary size and a timeout function of an arbitrary time according to the type of a user program is realized. This eliminates the need for a complicated procedure required for data transfer, and a timeout occurs at a predetermined time, so that other processes are not adversely affected. In this way, the needs of individual user programs can be answered, and the performance of the entire system is not reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明のデータ処理装置の概念図である。FIG. 1 is a conceptual diagram of a data processing device of the present invention.

【図2】本発明装置の動作を表わすフローチャートであ
る。
FIG. 2 is a flowchart showing the operation of the device of the present invention.

【符号の説明】[Explanation of symbols]

10 データ処理装置 11 バッファ手段 12 取出手段 13 タイマ手段 14 要求発生手段 UP ユーザ・プログラム KBD キーボード・ドライバ OS リアルタイム・オペレーション・システム KB キーボード 10 Data processing device 11 Buffer means 12 Extraction means 13 Timer means 14 Request generation means UP User program KBD Keyboard driver OS Real-time operation system KB Keyboard

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 リアルタイム・オペレーション・システ
ム上に設定される各種ドライバとこれら各種ドライバに
より制御される各種ユーザ・プログラムとの間に、前記
各種ユーザ・プログラムに対応して設定され、前記ユー
ザ・プログラムの種類に応じてその大きさが予め決めら
れ前記ドライバからのデータを保持するバッファ手段
と、前記バッファ手段中にデータが存在しない時に前記
ドライバにデータ読み出し要求をかける要求発生手段
と、前記バッファ手段中にデータが存在しない時にセッ
トされ一定時間経過しても前記バッファ手段にデータが
転送されない場合に前記データ読み出し要求をキャンセ
ルするタイマ手段と、前記一定時間以内に前記バッファ
手段にデータが転送された際に前記タイマ手段をキャン
セルして前記データを取り出す取出手段とを備えるデー
タ処理装置。
The user program is set between various drivers set on a real-time operation system and various user programs controlled by the various drivers, in correspondence with the various user programs. Buffer means for storing data from the driver, the size of which is determined in advance in accordance with the type of the request, request generation means for issuing a data read request to the driver when there is no data in the buffer means, and buffer means Timer means for canceling the data read request when data is not transferred to the buffer means even when a certain period of time elapses, and data is transferred to the buffer means within the certain time. The timer means to cancel the data A data processing device comprising:
JP3021013A 1991-02-14 1991-02-14 Data processing device Expired - Lifetime JP2870200B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3021013A JP2870200B2 (en) 1991-02-14 1991-02-14 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3021013A JP2870200B2 (en) 1991-02-14 1991-02-14 Data processing device

Publications (2)

Publication Number Publication Date
JPH04259021A JPH04259021A (en) 1992-09-14
JP2870200B2 true JP2870200B2 (en) 1999-03-10

Family

ID=12043173

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3021013A Expired - Lifetime JP2870200B2 (en) 1991-02-14 1991-02-14 Data processing device

Country Status (1)

Country Link
JP (1) JP2870200B2 (en)

Also Published As

Publication number Publication date
JPH04259021A (en) 1992-09-14

Similar Documents

Publication Publication Date Title
KR100701419B1 (en) Method and device for automatically transferring I / O blocks between host system and host adapter
JPS60134953A (en) Data transfer controller
JP2870200B2 (en) Data processing device
JP3162459B2 (en) Data processing device
JP2830239B2 (en) Input display control device
JPH02166548A (en) Common bus control system
JP2000155738A (en) Data processor
JP2786742B2 (en) Printer sending data control method
JPH02230345A (en) Inter-device communication/cache coincidence processing system
JPS5921051B2 (en) Communication control device
JPH03263154A (en) Data processing system
JP3199990B2 (en) Information processing device
JP2003186666A (en) Microcomputer and dma control circuit
JPH0467224A (en) Information processor
JPH0414378B2 (en)
JPH04205047A (en) Data processor
JPH0223455A (en) Interface device
JPH03233780A (en) Bus access system
JPH06139186A (en) Bus control system
JPS59212960A (en) Prefetch control system
JPH02184945A (en) Information processor
JPH0685154B2 (en) Intermediate buffer control method
JPH0521458B2 (en)
JP2002091520A (en) Programmable controller and memory module
JPH06290082A (en) Inter-cpu data transmission method