JPH08286994A - Program controlling method in communication terminal equipment - Google Patents

Program controlling method in communication terminal equipment

Info

Publication number
JPH08286994A
JPH08286994A JP7109170A JP10917095A JPH08286994A JP H08286994 A JPH08286994 A JP H08286994A JP 7109170 A JP7109170 A JP 7109170A JP 10917095 A JP10917095 A JP 10917095A JP H08286994 A JPH08286994 A JP H08286994A
Authority
JP
Japan
Prior art keywords
event
polling
control
control program
program
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.)
Pending
Application number
JP7109170A
Other languages
Japanese (ja)
Inventor
Makoto Sugawara
信 菅原
Hiroshi Watanabe
浩 渡辺
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.)
Hitachi Telecom Technologies Ltd
Original Assignee
Hitachi Telecom Technologies Ltd
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 Hitachi Telecom Technologies Ltd filed Critical Hitachi Telecom Technologies Ltd
Priority to JP7109170A priority Critical patent/JPH08286994A/en
Publication of JPH08286994A publication Critical patent/JPH08286994A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

PURPOSE: To reduce developing man-hours by enhancing portability in the case where an event-driven type and a polling type control programs having been utilized for a long time in a communication terminal equipment are integrated into one body. CONSTITUTION: In the case where the hardware control of the communication terminal equipment is executed under the control of one operating system, the event-driven type control program 22 to start processing corresponding to an extrinsic factor by that extrinsic factor and the polling type control program 23 to monitor repeatedly a line state and detect a starting factor are provided, and the polling type control program 22 operates in the case where there is the idle time of a CPU during which the event-driven type control program 23 does not operate, and as for the event-driven type control program 23, when a factor from the outside is generated, the control program in course of operation is changed to the event-driven type control program corresponding to the factor from the outside, and the event-driven type control program 23 operates.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、通信端末装置を動作さ
せるプログラム制御方法に関し、特に単一のマイクロコ
ンピュータ・システムで構成されるハードウェア環境下
で、イベント駆動式とポーリング式の2種類のプログラ
ムを動作させる為のプログラム制御方法に関するもので
ある。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program control method for operating a communication terminal device, and in particular, in a hardware environment composed of a single microcomputer system, there are two types of event drive type and polling type. The present invention relates to a program control method for operating a program.

【0002】[0002]

【従来の技術】通信端末装置は、装置内において各機能
毎に1つのマイクロ・コンピュータと、その機能動作に
合わせた特定の制御方法をもつプログラムで管理され
る。
2. Description of the Related Art A communication terminal device is managed in the device by one microcomputer for each function and a program having a specific control method according to its function operation.

【0003】各機能毎に個別に動作するマイクロ・コン
ピュータをそれぞれ組み合わせ、お互いに通信を行うこ
とにより負荷分散して動作させ、1つの装置の機能を果
たしている。
Microcomputers that operate individually for each function are combined and communicated with each other to operate in a load-balanced manner to achieve the function of one device.

【0004】例えば、外部端末装置と通信回線の間のデ
ータ中継を行う通信端末装置の一例として、外部端末装
置との通信機能部とデータ中継の中心的判断を行う機能
部を1つのマイクロ・コンピュータ、イベント駆動式の
制御プログラムによって管理し、通信回線との通信機能
部を別のマイクロ・コンピュータ、及びポーリング式の
制御プログラムによって管理することにより構成される
装置がある。
For example, as an example of a communication terminal device for relaying data between an external terminal device and a communication line, a microcomputer having a communication function part for communicating with an external terminal device and a function part for centrally determining data relay is provided. There is an apparatus configured by managing by an event-driven control program, and managing a communication function unit with a communication line by another microcomputer and a polling-type control program.

【0005】上記両者のマイクロ・コンピュータは、通
信を行うためのインタフェース・エリアを設け、コマン
ド・レスポンスにおける特定の手順でデータの送受信を
行うことにより、装置の機能を実現する。
The above-mentioned two microcomputers provide an interface area for communication and perform the function of the apparatus by transmitting and receiving data in a specific procedure in the command response.

【0006】この通信端末装置の例では、2つのマイク
ロ・コンピュータに機能分割することにより外部端末装
置側と通信回線側から受け渡しされるデータを頻繁に送
受信処理する際、装置にかかる負荷を分散している。
In this example of the communication terminal device, by dividing the function into two microcomputers, the load applied to the device is dispersed when the data transmitted and received from the external terminal device side and the communication line side is frequently transmitted and received. ing.

【0007】[0007]

【発明が解決しようとする課題】近年、マイクロ・プロ
セッサの高速化、周辺LSIの高機能化により、装置に
かかる負荷をある程度ハードウェアに分散させることが
可能になっている。この場合、単一のマイクロ・コンピ
ュータ構成で装置の目的とする機能を実現できるハード
ウェアが考えられる。
In recent years, by increasing the speed of microprocessors and increasing the functionality of peripheral LSIs, it has become possible to distribute the load on the device to some extent in the hardware. In this case, hardware capable of realizing the intended function of the device with a single microcomputer configuration is conceivable.

【0008】この場合のソフトウェアは、各機能毎に複
数のマイクロ・コンピュータのもとで、それぞれ制御方
法の異なるプログラムから成るものを単一マイクロ・コ
ンピュータの構成に対応させる為、そのまま組み込むこ
とができず、一本化し動作させる必要性がある。
The software in this case can be incorporated as it is because a plurality of microcomputers for each function have different control methods and correspond to the configuration of a single microcomputer. Instead, it is necessary to integrate and operate it.

【0009】イベント駆動式とポーリング式の2種類の
制御プログラムを1種類の制御方法をもつプログラムに
統一しようとした場合も同様で、特定の制御方法に対応
させた制御プログラムとして作成し直さなければ、以前
より活用していたプログラムを容易に移植することがで
きず、多量な開発工数がかかる。
The same applies to the case where two types of control programs of the event driven type and the polling type are to be unified into a program having one type of control method, and it is necessary to recreate the control program corresponding to a specific control method. , It is not possible to easily port the programs that have been used for a long time, and it takes a lot of development man-hours.

【0010】そこで本発明は、以前より通信端末装置で
活用していたイベント駆動式とポーリング式の制御プロ
グラムを一本化する場合、移植性を高めることにより開
発工数を低減させることができるプログラム制御方法を
提供することを目的とする。
Therefore, according to the present invention, when the event-driven and polling-type control programs that have been used in the communication terminal device are unified, the program control can improve the portability to reduce the development man-hours. The purpose is to provide a method.

【0011】[0011]

【課題を解決するための手段】本発明は上記目的を達成
するため、請求項1の通信端末装置におけるプログラム
制御方法は、外部からの要因が発生することによって対
応した処理を起動させるイベント処理制御手段と、回線
の状況を逐次処理で繰り返し監視し、起動要因を検出す
るポーリング処理制御手段を有し、前記ポーリング処理
手段は、前記イベント処理制御手段が動作しない処理空
時間があるときに、逐次処理で繰り返し動作し回線の状
況に応じた処理を行い、前記イベント処理制御手段は、
外部からの要因が発生したときに、動作中のポーリング
処理制御手段から切換え動作し、1つのオペレーティン
グ・システム管理下で両手段を動作させるようにしたこ
とを特徴としている。
In order to achieve the above object, the present invention provides a program control method in a communication terminal device according to claim 1, wherein an event processing control for activating a corresponding process when an external factor occurs. Means and polling processing control means for repeatedly monitoring the status of the line by sequential processing and detecting an activation factor, and the polling processing means successively performs processing when there is processing idle time during which the event processing control means does not operate. The event processing control means performs the processing according to the status of the line by repeatedly operating in the processing,
When an external factor is generated, the polling process control means in operation is switched to operate both means under the control of one operating system.

【0012】請求項2の通信端末装置におけるプログラ
ム制御方法は、イベント処理制御手段が長時間動作し処
理の空時間が確保できないときに、一定時間周期毎にポ
ーリング処理制御手段を優先して動作させることを特徴
としている。
According to another aspect of the program control method in the communication terminal device of the present invention, when the event processing control means operates for a long period of time and the idle time of the processing cannot be secured, the polling processing control means is preferentially operated for every fixed time period. It is characterized by that.

【0013】請求項3の通信端末装置におけるプログラ
ム制御方法は、イベント処理制御手段とポーリング処理
制御手段で、メモリ空間の一部を両手段が参照・書き込
みできる共有メモリを通して、両手段間通信を行うこと
を特徴としている。
According to a third aspect of the present invention, there is provided a program control method for a communication terminal device, wherein the event processing control means and the polling processing control means perform communication between both means through a shared memory in which both means can refer to and write a part of the memory space. It is characterized by that.

【0014】[0014]

【作用】請求項1に記載の発明においては、単一のマイ
クロ・コンピュータ・システムで構成されているハード
ウェア制御をイベント処理制御手段とポーリング処理制
御手段の2手段を用いて行う場合、ポーリング処理制御
手段はイベント処理制御手段が動作しない処理の空時間
に、逐次処理で繰り返し動作し、外部からの要因が発生
したときに、要因発生前まで動作中のポーリング処理制
御手段から切り換えイベント処理制御手段を動作させ、
当該外部からの要因に対応した処理を行うようにして、
一つのオペレーティング・システムで動作管理を可能と
した。
According to the first aspect of the present invention, when the hardware control composed of a single microcomputer system is performed by using the event processing control means and the polling processing control means, the polling processing is performed. The control means repeatedly operates in a sequential process during the idle time of the processing in which the event processing control means does not operate, and when an external factor occurs, switches from the polling process control means that is operating before the factor occurs to the event process control means. To operate
By performing processing corresponding to the external factors,
Operation management is possible with one operating system.

【0015】従って、従来、別個のマイクロ・コンピュ
ータ、及び別オペレーティング・システムのもとで、そ
れぞれ動作していたイベント処理制御手段とポーリング
処理制御手段の各制御を特定の制御方法に対応するプロ
グラムに変更する必要がない。
Therefore, conventionally, each control of the event processing control means and the polling processing control means, which respectively operate under separate microcomputers and different operating systems, is converted into a program corresponding to a specific control method. No need to change.

【0016】請求項2に記載の発明においては、イベン
ト処理制御手段が長時間動作し続け、処理の空時間が確
保できない間、一定時間毎にポーリング処理制御手段が
動作する。
According to the second aspect of the invention, the event processing control means continues to operate for a long time, and the polling processing control means operates at regular intervals while the idle time of the processing cannot be secured.

【0017】従って、逐次処理で繰り返し起動要因を監
視するポーリング処理制御手段の動作はイベント処理制
御手段が動作中でも保証される。
Therefore, the operation of the polling processing control means for repeatedly monitoring the activation factor in the sequential processing is guaranteed even while the event processing control means is operating.

【0018】請求項3に記載の発明においては、イベン
トとポーリングの2種類の処理制御手段がメモリ空間の
一部を参照、書き込みできる共有メモリを通して、プロ
グラム間通信を行う。
According to the third aspect of the present invention, two types of processing control means for events and polling perform inter-program communication through a shared memory that can refer to and write a part of the memory space.

【0019】従って、イベントおよびポーリング処理制
御手段がそれぞれ機能分割して動作を行うのみではな
く、両手段で連携して動作することも可能となる。
Therefore, not only the event and polling processing control means can be divided into respective functions to operate, but also both means can operate in cooperation.

【0020】[0020]

【実施例】図1は、本発明の一実施例による通信端末装
置を示す構成図である。
1 is a block diagram showing a communication terminal device according to an embodiment of the present invention.

【0021】図1において、通信端末装置2は、伝送路
4を通じて接続される外部端末装置1と、通信回線5を
通じて接続されるファクシミリ3の間のデータ中継を行
うものである。通信端末装置2は、中央処理部7を有
し、この中央処理部7には外部端末インタフェース部
6、通信回線インタフェース部8が接続されている。
In FIG. 1, a communication terminal device 2 relays data between an external terminal device 1 connected through a transmission line 4 and a facsimile 3 connected through a communication line 5. The communication terminal device 2 has a central processing unit 7, and an external terminal interface unit 6 and a communication line interface unit 8 are connected to the central processing unit 7.

【0022】中央処理部7は、マイクロ・プロセッサを
主体に構成されており、記憶部9はリードオンリーメモ
リ(ROM)、及びランダムアクセスメモリ(RAM)
を含み、中央処理部7の動作手順を規定するプログラム
や中央処理部7によって処理されるべきデータを記憶す
る。
The central processing unit 7 is mainly composed of a microprocessor, and the storage unit 9 is a read only memory (ROM) and a random access memory (RAM).
And stores a program that defines the operation procedure of the central processing unit 7 and data to be processed by the central processing unit 7.

【0023】外部端末インタフェース部6は、中央処理
部7の指示による伝送路4へのデータ出力、及び外部端
末装置1から送られてきた情報を中央処理部7に供給す
る。
The external terminal interface unit 6 supplies the central processing unit 7 with data output to the transmission line 4 according to an instruction from the central processing unit 7 and information sent from the external terminal device 1.

【0024】通信回線インタフェース部8は、中央処理
部7の指示による通信回線5へのデータ出力、及びファ
クシミリ3から送られてきた情報を中央処理部7に供給
する。
The communication line interface unit 8 supplies data to the communication line 5 according to an instruction from the central processing unit 7 and the information sent from the facsimile 3 to the central processing unit 7.

【0025】図2は、中央処理部7で装置の動作制御を
行うためのプログラム構成図である。
FIG. 2 is a program block diagram for controlling the operation of the apparatus by the central processing unit 7.

【0026】プリエンプティブ優先度スケジューリング
を備えたオペレーティング・システム21は、その管理
下でイベント駆動式制御プログラム22とポーリング式
制御プログラム23が動作し、共有メモリ24を通じて
各制御プログラム間の通信を行っている。
The operating system 21 having the preemptive priority scheduling operates under control of the event-driven control program 22 and the polling-type control program 23, and communicates between the control programs through the shared memory 24. .

【0027】イベント処理制御手段としてのイベント駆
動式制御プログラム22は、伝送路4を通じて外部端末
装置1とデータの送受信を行うための端末回線物理制御
タスク25及び端末回線論理制御タスク26からなる外
部端末装置との通信機能部、装置動作管理タスク27か
ら成るデータ中継の中心的処理判断機能部、共有メモリ
24を通じ通信回線の通信機能部であるポーリング処理
制御手段としてのポーリング式制御プログラムとプログ
ラム間の通信を行い動作制御するFAX論理制御タスク
28からなる通信回線の制御機能部の3つの機能部で構
成される。
The event-driven control program 22 as the event processing control means is an external terminal composed of a terminal line physical control task 25 and a terminal line logic control task 26 for transmitting / receiving data to / from the external terminal device 1 through the transmission path 4. A communication function unit with a device, a central processing judgment function unit for data relay consisting of a device operation management task 27, a polling control program as a polling process control unit which is a communication function unit of a communication line through a shared memory 24, and between programs It is composed of three functional units of a communication line control functional unit including a FAX logic control task 28 for performing communication and controlling operations.

【0028】イベント駆動式制御プログラム22は、外
部端末インタフェース部6からの要因発生で端末回線物
理制御タスク25を動作することで起動されるか、又
は、FAX論理制御タスク28による一定時間毎の周期
起動で共有メモリ24にポーリング式制御プログラム2
3から特定のコマンド・レスポンスデータが有ることを
検出したときに起動され、以後、各制御タスクが必要に
応じ順次起動していくものである。
The event-driven control program 22 is activated by operating the terminal line physical control task 25 due to the occurrence of a factor from the external terminal interface unit 6, or the FAX logical control task 28 periodically cycles the program. Upon startup, the polling control program 2 is stored in the shared memory 24.
The control task is activated when it is detected from 3 that there is specific command / response data, and thereafter each control task is activated sequentially as necessary.

【0029】ポーリング式制御プログラム23は、プロ
グラム動作切換タスク29、FAX回線制御タスク3
0、手順制御タスク31、画像制御タスク32、NCU
制御タスク33で構成され、通信回線との通信機能を有
する。
The polling control program 23 includes a program operation switching task 29 and a FAX line control task 3.
0, procedure control task 31, image control task 32, NCU
It is composed of the control task 33 and has a communication function with a communication line.

【0030】ポーリング式制御プログラム23は、通信
回線インタフェース部8で非同期に要因発生する複数の
イベントをオペレーティング・システム21内で絶えず
取得、並びに各状態保持をしておき、各制御タスク29
〜33が逐次繰り返し動作する毎にオペレーティング・
システム21内で保持していた各イベント状態を参照
し、イベントが有ればそれらに対応した通信回線の制御
を行うものである。
The polling type control program 23 constantly acquires a plurality of events asynchronously generated in the communication line interface section 8 in the operating system 21 and holds each state, and each control task 29.
~ 33 each time the operating
Each event state held in the system 21 is referred to, and if there is an event, the communication line corresponding to them is controlled.

【0031】FAX回線制御タスク18は、オペレーテ
ィング・システム21内で保持していたイベントに対応
した処理を行うと共に、イベント駆動式制御プログラム
22にて共有メモリ24に特定のコマンド・レスポンス
データが有ることを検出し、それに対応した動作を行う
ことでプログラム間通信を行う。
The FAX line control task 18 performs processing corresponding to the event held in the operating system 21 and that the event driven control program 22 has specific command / response data in the shared memory 24. Is detected and the corresponding operation is performed to perform inter-program communication.

【0032】図3は、図2に示した各制御プログラムの
タスク優先度の一覧を表すものである。
FIG. 3 shows a list of task priorities of the respective control programs shown in FIG.

【0033】各制御プログラムの動作管理を行うオペレ
ーティング・システム21はプリエンプティブ優先度ベ
ースで各タスクをスケジューリングしており、実行可能
状態にあるタスクの中で優先度の高いタスクにCPU資
源を割り当てる。
The operating system 21 which manages the operation of each control program schedules each task on the basis of the preemptive priority, and allocates the CPU resource to the task having the highest priority among the tasks in the ready state.

【0034】ポーリング式制御プログラム23の内、F
AX回線制御タスク30、手順制御タスク31、画像制
御タスク32、NCU制御タスク33は、タスク優先度
が最も高く優先して動作することができる。
Of the polling type control program 23, F
The AX line control task 30, the procedure control task 31, the image control task 32, and the NCU control task 33 have the highest task priority and can operate with priority.

【0035】イベント駆動式制御プログラム22は、優
先動作させるポーリング式制御プログラム23の制御タ
スク30〜33に比べ、タスク優先度が低く中程度に位
置し、タスク優先度の高いポーリング式制御プログラム
23が動作しない場合に実行することができる。
The event-driven control program 22 is lower in task priority than the control tasks 30 to 33 of the polling-type control program 23 to be preferentially operated. Can be run if it does not work.

【0036】ポーリング式制御プログラム23の内、プ
ログラム動作切換タスク29は、他の制御タスクに比
べ、タスク優先度が最も低く、優先して動作させるポー
リング式制御プログラムの他の制御タスク30〜33、
イベント駆動式制御プログラム22が動作しない場合に
実行することができる。
Among the polling control programs 23, the program operation switching task 29 has the lowest task priority as compared with other control tasks, and the other control tasks 30 to 33 of the polling control program to be operated preferentially,
It can be executed when the event-driven control program 22 does not operate.

【0037】図4は、図2の各制御プログラムが図3の
タスク優先度に基づいてスケジューリング動作されると
きの処理手順を示すフローチャートである。
FIG. 4 is a flow chart showing a processing procedure when each control program of FIG. 2 is subjected to the scheduling operation based on the task priority of FIG.

【0038】1つのオペレーティング・システム21の
タスク優先度に基づいた管理下でイベント駆動式制御プ
ログラム22とポーリング式制御プログラム23の2種
類の制御方法の異なるプログラム動作例について説明す
る。
A description will be given of a program operation example in which two kinds of control methods, that is, the event-driven control program 22 and the polling-type control program 23, under the control based on the task priority of one operating system 21 are different.

【0039】ステップ101において、プログラム起動
の処理が行われる以後各制御タスクの動作が図3に示し
たタスク優先度に基づいて実行される。
In step 101, after the program starting process is performed, the operation of each control task is executed based on the task priority shown in FIG.

【0040】次のステップ102では、タスク優先度の
最も低いプログラム動作切換タスク29が実行されポー
リング式制御プログラム23が逐次動作する前に、タス
ク優先度が中程度であるイベント駆動式制御プログラム
22の中で起動要因の有る制御タスクを先に実行させ
る。
In the next step 102, before the program operation switching task 29 having the lowest task priority is executed and the polling-type control program 23 sequentially operates, the event-driven control program 22 having the medium task priority is executed. The control task with the activation factor is executed first.

【0041】即ち、イベント駆動式制御プログラム22
の中で起動要因の有るタスクが存在する場合は、起動要
因の有る制御タスクの中でタスク優先度の高いタスクを
選択し(ステップ103)、ステップ104〜107の
いずれかの制御タスクを実行させた後、ステップ102
に戻る。イベント駆動式制御プログラム22の内、起動
要因のある制御タスクがステップ102〜107の繰り
返しで全て動作し、ステップ102において起動要因が
無いと判定された場合、即ちCPUの空時間を確保でき
る場合は、ポーリング式制御プログラム23の動作に切
り換わる(ステップ108〜112)。
That is, the event-driven control program 22
If there is a task with an activation factor in the list, a task with a high task priority is selected from the control tasks with an activation factor (step 103), and the control task of any of steps 104 to 107 is executed. After step 102
Return to In the event-driven control program 22, when the control task having the activation factor operates all by repeating steps 102 to 107 and it is determined in step 102 that there is no activation factor, that is, when the CPU idle time can be secured. Then, the operation is switched to the operation of the polling control program 23 (steps 108 to 112).

【0042】ポーリング式制御プログラム23は、逐次
処理によりステップ108〜112に示す順で実行さ
れ、タスク優先度が最も高いステップ109〜112の
制御タスクが実行されると、イベント駆動式制御プログ
ラムの各制御タスクは実行できない。
The polling control program 23 is executed in the order shown in steps 108 to 112 by the sequential processing. When the control task of steps 109 to 112 having the highest task priority is executed, each of the event driven control programs is executed. Control task cannot be executed.

【0043】ステップ112の処理が実行された後、ス
テップ102に戻るとポーリング式制御プログラム23
が実行中にイベント駆動式制御プログラム22の起動要
因が発生していれば、ステップ102〜107に示すイ
ベント駆動式制御プログラム22の動作に切り換わり、
起動要因が発生していなければ、ステップ108〜11
2に示すポーリング式制御プログラム23が継続して動
作する。
After the processing of step 112 is executed, when the process returns to step 102, the polling type control program 23
If the activation factor of the event-driven control program 22 has occurred during execution, the operation is switched to the operation of the event-driven control program 22 shown in steps 102 to 107,
If no activation factor has occurred, steps 108 to 11
The polling control program 23 shown in 2 continues to operate.

【0044】図5は、各制御タスクがオペレーティング
・システム21の管理下でスケジューリングされる処理
例を示すフローチャートである。
FIG. 5 is a flowchart showing an example of processing in which each control task is scheduled under the control of the operating system 21.

【0045】イベント駆動式制御プログラム22が長時
間動作し、CPUの空時間の確保をできないときに、一
定時間毎にポーリング式制御プログラム23が優先して
動作する場合について説明する。
A case will be described in which the event-driven control program 22 operates for a long time, and when the CPU idle time cannot be secured, the polling-type control program 23 operates preferentially at regular intervals.

【0046】イベント駆動式制御プログラム22からポ
ーリング式制御プログラム23に動作が切り換わり、プ
ログラム動作切換タスク29が実行された後(ステップ
201)、FAX回線制御タスク30が実行されると、
100mSecの経過後再起動するためのタイマを設定
し、以後、ステップ203〜205のポーリング式制御
プログラム23が順次動作される。
When the operation is switched from the event driven control program 22 to the polling control program 23 and the program operation switching task 29 is executed (step 201), the FAX line control task 30 is executed.
A timer for restarting after 100 mSec has elapsed is set, and thereafter, the polling control program 23 in steps 203 to 205 is sequentially operated.

【0047】ステップ205の処理が実行された後、起
動要因の発生を基にしてイベント駆動式制御プログラム
22が長時間実行されている場合(ステップ206)、
ステップ202で設定していたタイマがタイムアウトす
ると、タスク優先度が中程度であるイベント駆動式制御
プログラム22の処理が中断され、タスク優先度が高い
FAX回線制御タスク30に切り換り、設定していたタ
イマのタイムアウトを認識する(ステップ207)。ス
テップ207では、再度100mSecのタイマ設定を
行い、以後、タスク優先度の最も高いポーリング式制御
プログラム23(ステップ208〜210)を動作させ
ることで、100mSec周期毎のポーリング式制御プ
ログラム23の優先動作を保証している。
After the processing of step 205 is executed, if the event-driven control program 22 is being executed for a long time based on the occurrence of the activation factor (step 206),
When the timer set in step 202 times out, the processing of the event-driven control program 22 having a medium task priority is interrupted, and the FAX line control task 30 having a high task priority is switched to and set. The timer timeout is recognized (step 207). In step 207, the timer setting of 100 mSec is performed again, and thereafter, the polling control program 23 having the highest task priority (steps 208 to 210) is operated, so that the priority control operation of the polling control program 23 in every 100 mSec cycle is performed. I guarantee.

【0048】ステップ210が実行された後、ステップ
206で処理中断していたイベント駆動式制御プログラ
ム22の各制御タスクを実行し、ポーリング式制御プロ
グラム23に切り換える(ステップ212)。ステップ
212が実行された後、ステップ213が動作するまで
にステップ207で設定したタイマがタイムアウトして
いない場合は、設定していた100mSecタイマを解
除し、タイマを再設定することで次の100mSec周
期のポーリング式制御プログラム23の優先動作を保証
している(ステップ213)。
After step 210 is executed, each control task of the event-driven control program 22 suspended in step 206 is executed, and the polling-type control program 23 is switched to (step 212). If the timer set in step 207 has not timed out before step 213 operates after step 212 is executed, the set 100 mSec timer is released, and the timer is reset to set the next 100 mSec cycle. The priority operation of the polling control program 23 is guaranteed (step 213).

【0049】図6は、共有メモリによるプログラム間通
信例の構成図である。
FIG. 6 is a block diagram of an example of inter-program communication using a shared memory.

【0050】イベント駆動式制御プログラム22とポー
リング式制御プログラム23がメモリ空間の一部を両者
のプログラムが参照、書き込みできる共有メモリ24と
して、プログラム間通信を行う場合について説明する。
A case will be described in which the event-driven control program 22 and the polling-type control program 23 use part of the memory space as a shared memory 24 which both programs can refer to and write to for inter-program communication.

【0051】共有メモリ24は、イベント駆動式制御プ
ログラム22がポーリング式制御プログラム23に対
し、特定のコマンド・レスポンスデータを発行するため
のイベント駆動式制御プログラムコマンド・レスポンス
エリア41と、ポーリング式制御プログラム23がイベ
ント駆動式制御プログラム22に対し、特定のコマンド
・レスポンスデータを発行するためのポーリング式制御
プログラムコマンド・レスポンスエリア42の二つの面
で構成されている。
The shared memory 24 includes an event-driven control program command / response area 41 for the event-driven control program 22 to issue specific command / response data to the polling-type control program 23, and a polling-type control program. 23 is composed of two faces of a polling type control program command / response area 42 for issuing specific command / response data to the event driven type control program 22.

【0052】イベント駆動式制御プログラム22がポー
リング式制御プログラム23に対し、特定のコマンド・
レスポンスデータを発行する場合、FAX論理制御タス
ク28でイベント駆動式制御プログラムコマンド・レス
ポンスエリア41に以前発行したコマンド・レスポンス
データが受け渡されていることを確認した後、発行する
べきコマンド・レスポンスデータを書き込む。以後、逐
次処理で起動したFAX回線制御タスク30が、イベン
ト駆動式制御プログラムコマンド・レスポンスエリア4
1を参照しコマンド・レスポンスデータの存在を確認し
た場合、それらのデータを取得し、相手側制御プログラ
ムにデータ取得したことを認識させるため、イベント駆
動式プログラムコマンド・レスポンスエリア41を全て
00Hクリアするといった手順でプログラム間通信が行
われる。
The event driven control program 22 sends a specific command to the polling control program 23.
When issuing response data, the FAX logic control task 28 confirms that the previously issued command / response data is delivered to the event-driven control program command / response area 41, and then the command / response data to be issued. Write. After that, the FAX line control task 30 activated by the sequential processing is executed by the event-driven control program command / response area 4
When the existence of command / response data is confirmed by referring to 1, the event-driven program command / response area 41 is cleared to 00H in order to acquire the data and let the control program on the other side recognize that the data has been acquired. Inter-program communication is performed according to the procedure described above.

【0053】ポーリング式制御プログラム23がイベン
ト駆動式制御プログラム22に対し、特定のコマンド・
レスポンスデータを発行する場合、FAX回線制御タス
ク30でポーリング式制御プログラムコマンド・レスポ
ンスエリア42に以前発行したコマンド・レスポンスデ
ータが受け渡されていることを確認した後、発行すべき
コマンド・レスポンスデータを書き込む。以後、一定時
間の周期起動で動作したFAX論理制御タスク28が、
ポーリング式制御プログラムコマンド・レスポンスエリ
ア42を参照しコマンド・レスポンスデータの存在を確
認した場合、それらのデータを取得し、相手側制御プロ
グラムにデータ取得したことを認識させるため、ポーリ
ング式プログラムコマンド・レスポンスエリア42を全
て00Hクリアするといった手順でプログラム間通信が
行われる。
The polling type control program 23 sends a specific command to the event driven type control program 22.
When issuing the response data, the fax line control task 30 confirms that the previously issued command / response data has been delivered to the polling type control program command / response area 42, and then determines the command / response data to be issued. Write. After that, the FAX logic control task 28, which operates with a periodic start for a certain time,
When the presence of command / response data is confirmed by referring to the polling type control program command / response area 42, the polling type program command / response is performed in order to acquire those data and make the counterpart control program recognize that the data has been acquired. Inter-program communication is performed in the procedure of clearing all 00H in the area 42.

【0054】[0054]

【発明の効果】以上のように本発明によれば、単一のマ
イクロ・コンピュータ・システムで構成されている通信
端末装置のハードウェア制御を一つのオペレーティング
・システム管理のもとで、イベント処理制御手段とポー
リング処理制御手段を用いて行う場合、イベント処理制
御手段が動作しない処理の空時間にポーリング処理制御
手段を逐次処理で繰り返し動作させ、外部からの要因が
発生したときに要因発生前まで動作中のポーリング処理
制御手段から切り換えて、イベント処理制御手段を動作
させ、当該外部要因に対応した処理を行うようにしたた
め、従来、別個のマイクロコンピュータ、及び別オペレ
ーティング・システムのもとで、それぞれ動作していた
イベント処理制御手段とポーリング処理制御手段をそれ
ぞれ特定の制御方法に対応するプログラムに変更する必
要がない。
As described above, according to the present invention, the hardware control of the communication terminal device composed of a single microcomputer system can be controlled by the event processing under the control of one operating system. When using the polling processing control means and the polling processing control means, the polling processing control means is repeatedly operated in a sequential process during the idle time of the processing in which the event processing control means does not operate, and when the external factor occurs, it operates until the factor occurs. Since the polling processing control means in the inside is switched to operate the event processing control means to perform the processing corresponding to the external factor, conventionally, each operates under a separate microcomputer and another operating system. The event processing control means and the polling processing control means that were There is no need to change the program that corresponds to the.

【0055】特にポーリング処理制御手段は一定時間毎
に動作することを保証し、イベント処理制御手段とポー
リング処理制御手段間でプログラム間通信を行うことに
より両手段が連携して動作することができる。
In particular, the polling processing control means guarantees that it operates at regular intervals, and by performing inter-program communication between the event processing control means and the polling processing control means, both means can operate in cooperation.

【0056】従って、以前より通信端末装置で活用して
いたイベント駆動式とポーリング式の制御プログラムを
一本化する場合、本プログラム制御方法により移植性が
高く開発工数を低減することができる。
Therefore, when unifying the event-driven and polling-type control programs, which have been used in the communication terminal device before, into one, the program control method has high portability and can reduce development man-hours.

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

【図1】本発明方法を実施した通信端末装置のシステム
構成図である。
FIG. 1 is a system configuration diagram of a communication terminal device that implements the method of the present invention.

【図2】本発明方法を実施した通信端末装置の動作制御
を行うためのプログラム構成図である。
FIG. 2 is a program configuration diagram for controlling the operation of a communication terminal device that implements the method of the present invention.

【図3】本発明を実施した通信端末装置の動作制御を行
う各制御プログラムのタスク優先度の一覧を示す説明図
である。
FIG. 3 is an explanatory diagram showing a list of task priorities of respective control programs for controlling the operation of the communication terminal device embodying the present invention.

【図4】本発明を実施した通信端末装置の動作制御を行
う各制御プログラムのプログラム切換え処理手順を示し
たフローチャートである。
FIG. 4 is a flowchart showing a program switching processing procedure of each control program for controlling the operation of the communication terminal device embodying the present invention.

【図5】本発明を実施した通信端末装置の動作制御を行
う各制御プログラムの動作で一定時間周期毎に動作する
ポーリング処理制御手段の処理手順を示したフローチャ
ートである。
FIG. 5 is a flowchart showing a processing procedure of polling processing control means that operates at regular time intervals by the operation of each control program that controls the operation of the communication terminal device embodying the present invention.

【図6】本発明を実施した通信端末装置の動作制御を行
う各制御プログラムのプログラム間通信に用いる共有メ
モリの構成図である。
FIG. 6 is a configuration diagram of a shared memory used for inter-program communication of each control program for controlling the operation of the communication terminal device embodying the present invention.

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

1 外部端末装置 2 通信端末装置 3 ファクシミリ 4 伝送路 5 通信回線 6 外部端末インタフェース部 7 中央処理部 8 通信回線インタフェース部 9 記憶部 21 オペレーティング・システム 22 イベント駆動式制御プログラム(イベント処理制
御手段) 23 ポーリング式制御プログラム(ポーリング処理制
御手段) 24 共有メモリ 25 端末回線物理制御タスク 26 端末回線論理制御タスク 27 装置動作管理タスク 28 FAX論理制御タスク 29 プログラム動作切換タスク 30 FAX回線制御タスク 31 手順制御タスク 32 画像制御タスク 33 NCU制御タスク 41 イベント駆動式制御プログラムコマンド・レスポ
ンスエリア 42 ポーリング式制御プログラムコマンド・レスポン
スエリア
1 External Terminal Device 2 Communication Terminal Device 3 Facsimile 4 Transmission Line 5 Communication Line 6 External Terminal Interface Unit 7 Central Processing Unit 8 Communication Line Interface Unit 9 Storage Unit 21 Operating System 22 Event Driven Control Program (Event Processing Control Means) 23 Polling control program (polling processing control means) 24 Shared memory 25 Terminal line physical control task 26 Terminal line logical control task 27 Device operation management task 28 FAX logical control task 29 Program operation switching task 30 FAX line control task 31 Procedure control task 32 Image control task 33 NCU control task 41 Event-driven control program command / response area 42 Polling control program command / response area

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 単一のマイクロ・コンピュータ・システ
ムで構成された通信端末装置におけるプログラム制御方
法において、 外部からの要因が発生することによって対応した処理を
起動させるイベント処理制御手段と、回線の状況を逐次
処理で繰り返し監視し、起動要因を検出するポーリング
処理制御手段とを有し、 前記ポーリング処理制御手段は、前記イベント処理制御
手段が動作しない処理空時間があるときに逐次処理で動
作を繰り返し回線の状況に応じた処理を行い、外部から
の要因が発生したときに動作中のポーリング処理制御手
段から、イベント処理制御手段に切り換えて動作させ
て、 1つのオペレーティング・システム管理下で前記イベン
ト処理制御手段およびポーリング処理制御手段を動作さ
せるようにしたことを特徴とする通信端末装置における
プログラム制御方法。
1. In a program control method in a communication terminal device composed of a single microcomputer system, an event processing control means for activating a corresponding processing when an external factor occurs, and a status of a line. And a polling process control unit that detects an activation factor by repeatedly monitoring the event process, and the polling process control unit repeats the operation by the sequential process when there is a processing idle time when the event process control unit does not operate. The processing according to the status of the line is performed, and when an external factor occurs, the polling processing control means that is operating is switched to the event processing control means to operate, and the event processing is performed under the control of one operating system. The control means and the polling process control means are operated. A program control method in a communication terminal device.
【請求項2】 請求項1記載の通信端末装置におけるプ
ログラム制御方法において、前記ポーリング処理制御手
段は、イベント処理制御手段が長時間動作し処理空時間
が確保できないときに、一定時間周期毎に優先して動作
するようにしたことを特徴とする通信端末装置における
プログラム制御方法。
2. The program control method for a communication terminal device according to claim 1, wherein the polling processing control means is prioritized at regular time intervals when the event processing control means operates for a long time and processing idle time cannot be secured. And a program control method in a communication terminal device.
【請求項3】 請求項1記載の通信端末装置におけるプ
ログラム制御方法において、前記イベント処理制御手段
とポーリング処理制御手段は、メモリ空間の一部を両手
段が参照・書き込みできる共有メモリを通して両手段間
通信を行うことを特徴とする通信端末装置におけるプロ
グラム制御方法。
3. The program control method for a communication terminal device according to claim 1, wherein the event processing control means and the polling processing control means are provided between a pair of means through a shared memory in which a part of the memory space can be referenced and written by both means. A program control method in a communication terminal device, characterized in that communication is performed.
JP7109170A 1995-04-11 1995-04-11 Program controlling method in communication terminal equipment Pending JPH08286994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7109170A JPH08286994A (en) 1995-04-11 1995-04-11 Program controlling method in communication terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7109170A JPH08286994A (en) 1995-04-11 1995-04-11 Program controlling method in communication terminal equipment

Publications (1)

Publication Number Publication Date
JPH08286994A true JPH08286994A (en) 1996-11-01

Family

ID=14503439

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7109170A Pending JPH08286994A (en) 1995-04-11 1995-04-11 Program controlling method in communication terminal equipment

Country Status (1)

Country Link
JP (1) JPH08286994A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100337083B1 (en) * 2000-05-18 2002-05-16 송재인 Programmer's External Equipment Control Method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100337083B1 (en) * 2000-05-18 2002-05-16 송재인 Programmer's External Equipment Control Method

Similar Documents

Publication Publication Date Title
KR0172003B1 (en) Computer system and its control method
JPH1015836A (en) Robot controller and method for controlling the same
CN108427609A (en) Controller and control method for updating program
CN108804109B (en) Industrial deployment and control method based on multi-path functional equivalent module redundancy arbitration
CN110231781B (en) Control device, storage medium, and control method
JP7493871B2 (en) Electronic device and method for responding to a wake-up trigger - Patents.com
US8423681B2 (en) Control apparatus for process input-output device
JP2009251663A (en) Task control method and multitask system
JPH08286994A (en) Program controlling method in communication terminal equipment
JPWO2018211865A1 (en) Vehicle control device
JPH064364A (en) Cpu operation recording system
JPH064318A (en) Error detecting system
JP4535663B2 (en) State machine control method and state machine
JP2006350891A (en) Communication device
JPS61267854A (en) Data processing system
JPH0447339B2 (en)
JPH0744276A (en) Information processor
JP2002006996A (en) Power-on system of information processing system
JPH04301952A (en) Communication equipment
JP5244759B2 (en) Information processing apparatus and image forming apparatus
JP2901714B2 (en) Programmable controller
JP3611166B2 (en) Data processing method and apparatus
JPH0834615B2 (en) Line state management control method in switching system
JPH0756773A (en) Method for diagnosing control device
JP2000029850A (en) Task controlling method using inter-processor communication of operating system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20040302