JP2003309618A - Communication apparatus and communication method - Google Patents

Communication apparatus and communication method

Info

Publication number
JP2003309618A
JP2003309618A JP2002113623A JP2002113623A JP2003309618A JP 2003309618 A JP2003309618 A JP 2003309618A JP 2002113623 A JP2002113623 A JP 2002113623A JP 2002113623 A JP2002113623 A JP 2002113623A JP 2003309618 A JP2003309618 A JP 2003309618A
Authority
JP
Japan
Prior art keywords
communication
mode
external device
data
switching
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.)
Withdrawn
Application number
JP2002113623A
Other languages
Japanese (ja)
Inventor
Takuya Tsujimoto
卓哉 辻本
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2002113623A priority Critical patent/JP2003309618A/en
Publication of JP2003309618A publication Critical patent/JP2003309618A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To dynamically select a receiving process suited to a protocol to be used. <P>SOLUTION: The communication method for transmitting and receiving data to/from an external unit connected through a digital interface at a receiving node (1) having communication means adaptable to a plurality of communication protocols comprises a step of discriminating a communication protocol the external unit utilizes (S103-S105), a step of switching over and setting a first mode for receiving the data sent from the external unit in an interruption system, and a second mode for receiving the data in a polling system according to the identified communication protocol in the identification step (S106, S107), and a step of controlling the communication means for receiving data in the set first or second mode. <P>COPYRIGHT: (C)2004,JPO

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、IEEE Std 1394-19
95およびそれに関連する規格に準拠したデジタルインタ
フェースを有する通信装置及び通信方法に関する。
TECHNICAL FIELD The present invention relates to IEEE Std 1394-19.
The present invention relates to a communication device and a communication method having a digital interface compliant with 95 and related standards.

【0002】[0002]

【従来の技術】IEEE Std 1394-1995では周期的に連続し
た時間帯の中である一定の帯域を保証し、エラーが発生
した時にも再送手続きを行わないデータ転送モードであ
るアイソクロナス転送と、帯域は保証しないがエラーの
発生時には再送手続きにより確実なデータの転送を保証
する転送モードであるアシンクロナス転送という2種類
の転送モードを備えている。ディジタルビデオカメラな
どに見られる大容量の動画像データの転送にはアイソク
ロナス転送が、ストレージデバイスやプリンタやスキャ
ナなどのデータ落ちが許されないデバイスへの転送には
アシンクロナス転送が主に使用される。転送モードの優
先順位としてはアイソクロナス転送の方が高いため、ア
シンクロナス転送はアイソクロナス転送で使用していな
い帯域を使うことになる。またアシンクロナス転送では
受信側ノードがパケットを受信できない状態(ビジー状
態)のとき、パケットの再送を可能とするリトライプロ
トコルを備えている。
2. Description of the Related Art IEEE Std 1394-1995 guarantees a certain band within a time period that is cyclically continuous and does not perform a retransmission procedure even when an error occurs. Although not guaranteed, there are two types of transfer modes called asynchronous transfer, which is a transfer mode that guarantees reliable data transfer by a retransmission procedure when an error occurs. Isochronous transfer is mainly used for transferring large-capacity moving image data found in digital video cameras and the like, and asynchronous transfer is mainly used for transferring to devices such as storage devices, printers, and scanners where data loss is not allowed. Since isochronous transfer has a higher priority in the transfer mode, asynchronous transfer uses a band that is not used in isochronous transfer. Also, in the asynchronous transfer, a retry protocol is provided that enables the packet to be retransmitted when the receiving node cannot receive the packet (busy state).

【0003】アシンクロナス転送にはライト、リードお
よびロックの各トランザクションが存在し、あるノード
からデータ落ちの許されない大容量のデータを転送する
場合には、データを持つノードが能動的にデータを送信
するライトトランザクション(リクエストパケットでデ
ータを転送)、もしくはデータを受信する側のノードが
データを読み取ろうとするリードトランザクション(レ
スポンスパケットでデータを転送)が使用される。
Asynchronous transfer includes write, read, and lock transactions, and when transferring a large amount of data that cannot be lost from a certain node, the node having the data actively transmits the data. A write transaction (transferring data with a request packet) or a read transaction (transferring data with a response packet) in which a node receiving the data tries to read the data is used.

【0004】このうちライトトランザクションで送信さ
れたパケットを受信側ノードで受信する場合には、非同
期で送信されてくるパケットをどのタイミングで確認
し、データを処理するかを考慮する必要がある。一般に
は、パケットの受信のたびに割り込みを発生させ受信パ
ケットを確認する割り込み方式を用いる場合と、一定の
周期でパケットの受信を確認にいくポーリング方式を用
いる場合とがある。
Of these, when the packet transmitted by the write transaction is received by the receiving side node, it is necessary to consider at which timing the packet transmitted asynchronously is confirmed and the data is processed. In general, there are a case where an interrupt method is used in which an interrupt is generated and a received packet is confirmed each time a packet is received, and a case where a polling method is used in which packet reception is confirmed at a fixed cycle.

【0005】[0005]

【発明が解決しようとする課題】しかしながら上述した
従来の技術においては、1394上に複数存在するプロ
トコルのうちサポートするプロトコルが限られている間
は、使用するプロトコルに合った受信処理方法(割り込
み方式かポーリング方式か)を選択すれば問題はなかっ
た。しかし、例えばプリンタデバイスなどでは、PCか
ら非PC(例えばスキャナやディジタルカメラ等)まで
様々なデバイスからのプリントアウト要求に応えるため
に、今後複数のプロトコルをサポートする必要性が出て
きている。これはプリンタデバイスに限られた話ではな
いが、例えばプリンタデバイスの場合、PCとの通信で
はSBP−2を、非PCとの通信ではDPPをそれぞれ
サポートする必要がある。その場合、パケットの受信処
理方法をどちらか一方に固定(割り込みによって処理を
行うか、ポーリングによって処理を行うかどちらか一方
に固定)にすると、以下のような問題の発生が考えられ
る。
However, in the above-mentioned conventional technique, while the protocol supported by the plurality of protocols existing on 1394 is limited, the reception processing method (interrupt method) suitable for the protocol to be used is provided. Or polling method), there was no problem. However, for example, in a printer device or the like, it is necessary to support a plurality of protocols in the future in order to meet printout requests from various devices from a PC to a non-PC (for example, a scanner and a digital camera). This is not limited to a printer device, but in the case of a printer device, for example, it is necessary to support SBP-2 in communication with a PC and DPP in communication with a non-PC. In that case, if the packet reception processing method is fixed to either one (either interrupt processing or polling processing is fixed), the following problems may occur.

【0006】1.割り込み方式ではIEEE1394イ
ンタフェース部での処理は良好であるが、IEEE13
94インタフェースを制御するコントローラと、そのデ
バイス自身を制御するコントローラが物理的に一つのハ
ードウェアで構成されているような場合、パケット受信
のたびに割り込みを受けて処理を行うと頻発する非同期
な割り込みの発生によってインタフェース以外で行うべ
き処理(例えばプリンタであれば画像処理や印字機構の
制御等)が滞る。最悪の場合にはその他の処理が正常に
行えなくなるか、もしくはその他の処理の方の優先順位
が高ければパケットの受信ができないという自体も起こ
りうる。すなわち、全体として処理がインタフェース部
分に左右されるため、インタフェース部の処理とその他
のメイン処理との間で処理時間の不均衡が生じる場合を
考慮したシステム設計を行う必要がある。
1. In the interrupt method, the processing in the IEEE 1394 interface section is good, but the IEEE 13
When the controller that controls the 94 interface and the controller that controls the device itself are physically composed of one piece of hardware, an asynchronous interrupt that frequently occurs when an interrupt is received and processing is performed each time a packet is received. Occurrence of processing delays processing (for example, image processing or control of printing mechanism in the case of a printer) that should be performed by other than the interface. In the worst case, other processing may not be performed normally, or the packet itself may not be received if the other processing has a higher priority. That is, since the processing as a whole depends on the interface portion, it is necessary to design the system in consideration of the case where the processing time is imbalanced between the processing of the interface portion and other main processing.

【0007】2.ポーリング方式では割り込み方式に比
べてシステム全体の設計はし易いが、ポーリング間隔が
パケット受信の間隔に比べて相対的に短ければ頻繁な周
期割り込みによる無駄な処理が発生する。逆に長ければ
パケットを受信できなくなり取りこぼし(FIFOフル
によるデバイスビジーや、リクエストパケット受信後に
送信すべきレスポンスパケットの送信が遅延し送信側ノ
ードでスプリットタイムアウトが発生)の可能性もあ
る。ビジーやスプリットタイムアウトによって行われる
送信側ノードからのパケット再送信(リトライ)はバス
上に無駄なパケットを流すことになるため帯域の有効な
利用ができないという問題も発生する。またそれらポー
リング周期とパケット受信の間隔については一様に定義
されているわけではなく、各デバイスの性能や構成およ
び採用するプロトコルによっても設定値が異なるため最
適な間隔を一意に決めることは難しい。
2. The polling method is easier to design the entire system than the interrupt method, but if the polling interval is relatively shorter than the packet reception interval, useless processing occurs due to frequent periodic interrupts. On the contrary, if it is long, packets cannot be received and may be dropped (device busy due to FIFO full, or transmission of response packet to be transmitted after reception of request packet is delayed and split timeout occurs at the transmitting side node). Retransmission of packets (retry) from the transmitting node due to busy or split timeout causes wasteful packets to flow on the bus, which causes a problem that the band cannot be effectively used. Also, the polling period and the packet reception interval are not uniformly defined, and it is difficult to uniquely determine the optimum interval because the setting values differ depending on the performance and configuration of each device and the protocol adopted.

【0008】本発明は上記問題点に鑑みて為されたもの
であり、使用するプロトコルに適した受信処理を動的に
選択できるようにすることを目的とする。
The present invention has been made in view of the above problems, and it is an object of the present invention to dynamically select a reception process suitable for a protocol to be used.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、本発明の通信装置は、デジタルインタフェースを介
して接続された外部装置とデータの送受信を行う、複数
の通信プロトコルに対応した通信手段と、前記外部装置
から送信されるデータの受信を、割り込み方式により行
う第1のモードと、ポーリング方式により行う第2のモ
ードとを切り換え、設定する切り換え手段と、前記切り
換え手段により設定された第1又は第2のモードでデー
タを受信するために、前記通信手段を制御する制御手段
とを有し、前記切り換え手段は、前記外部装置が利用す
る通信プロトコルに応じて設定を行う。
In order to achieve the above object, the communication device of the present invention is a communication device that supports a plurality of communication protocols for transmitting / receiving data to / from an external device connected via a digital interface. And switching means for switching and setting a first mode in which the data transmitted from the external device is received by an interrupt method and a second mode in which the data is transmitted by a polling method, and a first mode set by the switching means. In order to receive the data in the 1st or 2nd mode, it has a control means which controls the said communication means, The said switching means sets according to the communication protocol which the said external device utilizes.

【0010】また、デジタルインタフェースを介して接
続された外部装置とデータの送受信を行う、複数の通信
プロトコルに対応した通信手段を有する装置における本
発明の通信方法は、前記外部装置が利用する通信プロト
コルを判別する判別工程と、前記外部装置から送信され
るデータの受信を、割り込み方式により行う第1のモー
ドと、ポーリング方式により行う第2のモードとを、前
記判別工程により判別した通信プロトコルに切り換え、
設定する切り換え工程と、前記切り換え工程において設
定された第1又は第2のモードでデータを受信するため
に、前記通信手段を制御する制御工程とを有する。
Further, the communication method of the present invention in an apparatus having communication means corresponding to a plurality of communication protocols for transmitting / receiving data to / from an external apparatus connected through a digital interface is a communication protocol used by the external apparatus. And a communication mode determined in the determination step between a first mode in which an interrupt method is used to receive data transmitted from the external device and a second mode in which a polling method is used to receive data transmitted from the external device. ,
There is a switching step for setting, and a control step for controlling the communication means to receive data in the first or second mode set in the switching step.

【0011】[0011]

【発明の実施の形態】以下、添付図面を参照して本発明
の好適な実施の形態を詳細に説明する。
Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

【0012】まず、図1を参照し、本実施の形態におけ
る通信装置1の概要を説明する。
First, an outline of the communication device 1 according to the present embodiment will be described with reference to FIG.

【0013】2は、IEEE Std 1394-1995およびそれに関
連する規格に準拠したシリアルバスである。3は、IEEE
Std 1394-1995およびそれに関連する規格に準拠したデ
ジタルインタフェース(以下、IEEE1394インタ
フェース)である。4は、トランザクションレイヤレベ
ルの機能を制御するIEEE1394ドライバである。
5は、プリントデータを印刷するプリンタ部である。
Reference numeral 2 is a serial bus that complies with IEEE Std 1394-1995 and related standards. 3 is IEEE
It is a digital interface (hereinafter, IEEE 1394 interface) compliant with Std 1394-1995 and standards related thereto. An IEEE 1394 driver 4 controls a transaction layer level function.
A printer unit 5 prints print data.

【0014】6は、IEEE1394上に複数存在する
プロトコルのうち、SBP−2に対応した制御を行うた
めのSBP−2制御部である。SBP−2(Serial Bus
Protocol-2)は、IEEE1394に適したトランスポ
ートプロトコルで、さらに上位で定義されたコマンドセ
ットのためのフレームワークを提供している。通信を行
うデバイス間の構造は、Initiator-Target(master-slav
e)の形式をとっており、非対称となっている。ホストで
あるInitiator側が主導権を握り、接続はlogin、logout
によって行われる。本実施の形態では対象デバイスが通
信装置1であるため、Targetデバイスとなる。SBP−
2フレームワーク上にさらに上位のプロトコルがのる形
で転送が行われるが、プリンタデバイスを想定している
ため上位にはSCSIcやPPDT(Peer to Peer Data
Transport)などのプロトコル、コマンドセットが適用
され、ホストであるPCとの間で通信が行われる。通信
はInitiatorであるホスト(PC)が主導権を持って行
うが、データ転送自体はTargetデバイスからのリードト
ランザクションによって行われる。
Reference numeral 6 is an SBP-2 control unit for performing control corresponding to SBP-2 among a plurality of protocols existing on IEEE1394. SBP-2 (Serial Bus
Protocol-2) is a transport protocol suitable for IEEE 1394, and provides a framework for a command set defined above. The structure between communicating devices is Initiator-Target (master-slav
It has the form of e) and is asymmetric. The host Initiator takes the initiative, and the connections are login and logout.
Done by In the present embodiment, the target device is the communication device 1, and therefore the target device. SBP-
Although the upper layer protocol is transferred on top of the two frameworks, since it is assumed to be a printer device, the upper layer is SCSIc or PPDT (Peer to Peer Data).
Transport) and other protocols and command sets are applied, and communication is performed with a PC that is a host. The host (PC), which is the Initiator, takes the initiative in communication, but the data transfer itself is performed by a read transaction from the Target device.

【0015】7は、同じく1394上に複数存在するプ
ロトコルのうち、DPPに対応した制御を行うためのD
PP制御部である。DPP(Direct Print Protocol)
は、ホストPC無しでイメージソースデバイス(例えば
スキャナやディジタルカメラ等)から直接印字を可能と
するプロトコルである。Thin Session、Thin Transacti
onというレイア化された構造を持ち、イメージソースデ
バイスからのライトトランザクションによってデータ転
送が行われる。
Reference numeral 7 is a D for performing control corresponding to DPP among a plurality of protocols that similarly exist on 1394.
It is a PP controller. DPP (Direct Print Protocol)
Is a protocol that enables printing directly from an image source device (such as a scanner or digital camera) without a host PC. Thin Session, Thin Transacti
It has a layered structure called on, and data transfer is performed by a write transaction from the image source device.

【0016】8は、アプリケーションレイヤレベルの機
能を制御するアプリケーションコントローラである。ア
プリケーションコントローラ8は、プリントデータに対
するコマンドの解析、プリントデータに対する画像処理
(補正処理や解凍処理)、プリンタ部5の制御等も行
う。
Reference numeral 8 is an application controller for controlling the function at the application layer level. The application controller 8 also analyzes commands for print data, performs image processing (correction processing and decompression processing) on print data, and controls the printer unit 5.

【0017】9は、パケット受信処理をポーリング方式
で行うか割り込み方式で行うかの切り換えを行う受信処
理制御部である。アプリケーション208の判断によっ
て受信処理を通信プロトコルに適したものに切り換え
る。その際、割り込み方式を選択する場合はポーリング
周期で発生する割り込みのマスク、もしくは周期ハンド
ラの非活性化を行う。ポーリング方式を選択する場合は
パケット受信時の割り込みをマスクする。
Reference numeral 9 denotes a reception processing control unit for switching between packet reception processing by a polling method and an interrupt method. The reception process is switched to one suitable for the communication protocol according to the judgment of the application 208. At that time, when the interrupt method is selected, the interrupt generated in the polling cycle is masked or the cyclic handler is deactivated. When selecting the polling method, mask interrupts when packets are received.

【0018】次に、図2に示すフローチャートを参照
し、本実施の形態における受信方式設定処理の処理手順
を説明する。
Next, with reference to the flow chart shown in FIG. 2, the processing procedure of the receiving method setting processing in the present embodiment will be described.

【0019】ステップS201では、パケットを受信す
る通信装置1のパケット受信処理の初期設定を行う。上
述したように、通信装置1は、パケットを割り込み方式
で受信するか、ポーリング方式で受信するかを選択する
ことが可能なデバイスである。また、複数のプロトコル
をサポートする。通常は通信装置1となるデバイスの電
源投入時、およびあるデータ転送が終了した時点でパケ
ット受信処理の初期設定を行う。ポーリングの周期は、
通信装置1を制御するCPUもしくはIEEE1394
インタフェースを制御するIEEE1394インタフェ
ース3に付属のハードウェアタイマを使用する。
In step S201, the packet receiving process of the communication device 1 which receives the packet is initialized. As described above, the communication device 1 is a device capable of selecting whether to receive a packet by the interrupt method or the polling method. It also supports multiple protocols. Normally, the packet receiving process is initialized when the power of the device which is the communication device 1 is turned on and when a certain data transfer is completed. The polling cycle is
CPU or IEEE 1394 that controls the communication device 1
A hardware timer attached to the IEEE 1394 interface 3 that controls the interface is used.

【0020】ステップS202では、送信リクエストノ
ードからのデータ転送要求を受け付ける。このとき、サ
ポートするプロトコルのうちどのプロトコルでデータ転
送の要求が行われたのかを把握する。本実施の形態で
は、サポートするプロトコルとしてSBP−2とDPP
を対象とする。データ転送がSBP−2またはDPPで
ある場合のみ(ステップS203でYES)、以下の手
続きを踏むものとする。それ以外の場合は(ステップS
203でNO)、設定処理を終了する。
In step S202, a data transfer request from the transmission request node is accepted. At this time, it is understood which of the supported protocols the data transfer request was made. In this embodiment, SBP-2 and DPP are supported protocols.
Target. Only when the data transfer is SBP-2 or DPP (YES in step S203), the following procedure is taken. Otherwise (step S
If NO in 203), the setting process ends.

【0021】ステップS204では、転送要求がLogin
によって為されたかどうかを判断する。LoginはSBP
−2での占有コマンドである。SBP−2では、データ
転送が通信装置1からのリードトランザクションによっ
て行われる。リードトランザクションは、送信側ノード
にあるデータを通信装置1の所定タイミングで取得でき
る転送モードである。つまり、受信側ノードが好きなタ
イミングでリクエストパケットを送信し、送信側ノード
がレスポンスパケットのペイロードにデータを格納して
送信する。転送要求のあったデバイスが用いるプロトコ
ルがSBP−2である場合、つまり受け付けたコマンド
がLoginである場合はステップS207へ、そうでない
場合はステップS205へ進む。
In step S204, the transfer request is Login.
Determine if done by. Login is SBP
It is an exclusive command at -2. In SBP-2, data transfer is performed by a read transaction from the communication device 1. The read transaction is a transfer mode in which the data in the transmission side node can be acquired at a predetermined timing of the communication device 1. That is, the reception side node transmits the request packet at a desired timing, and the transmission side node stores the data in the payload of the response packet and transmits it. If the protocol used by the device that has made the transfer request is SBP-2, that is, if the accepted command is Login, the process proceeds to step S207, and if not, the process proceeds to step S205.

【0022】ステップS207では、転送要求がLogin
コマンドであること、つまりSBP−2を用いてデータ
転送が行われることを受けて、ポーリング方式を選択す
る。SBP−2では、通信装置1のタイミングでリクエ
ストパケットを送信するので予想以上のパケット受信が
発生することはないと考えられるため、システムに負荷
のかからないポーリング方式を選択する。ここでは既に
初期設定でパケット受信処理としてポーリング方式を選
択しているため、特にポーリング周期の設定の変更等が
なければそのまま処理を終了する。プロトコルや転送を
行うデータ量、およびその他通信装置1との兼ね合いで
ポーリング周期を変更する場合は周期の設定を変更す
る。
In step S207, the transfer request is Login.
The polling method is selected in response to the command, that is, the data transfer using SBP-2. In SBP-2, since the request packet is transmitted at the timing of the communication device 1, it is considered that packet reception may not occur more than expected, so a polling method that does not impose a load on the system is selected. Here, since the polling method has already been selected as the packet reception process in the initial setting, the process is terminated without any particular change in the setting of the polling cycle. When changing the polling cycle in consideration of the protocol, the amount of data to be transferred, and other factors, the setting of the cycle is changed.

【0023】ステップS205では、転送要求がConnec
t Requestによって為されたかどうかを判断する。Conne
ct RequestはDPPの接続コマンドである。DPPで
は、データ転送が送信側ノードからのライトトランザク
ションによって行われる。ライトトランザクションは、
送信側ノードにあるデータを送信側ノードの所定タイミ
ングで送出する転送モードである。つまり、送信側ノー
ドのタイミングでデータペイロードを持つリクエストパ
ケットを送信し、通信装置1では非同期に受信するリク
エストパケットを格納し、レスポンスパケットを返送す
る。転送要求のあったデバイスが用いるプロトコルがD
PPである場合、つまり受け付けたコマンドがConnect
Requestである場合はステップS206へ、そうでない
場合、例えば他のサポートしていないプロトコルの接続
要求やアイソクロナス転送を使用する場合などは処理を
終了する。
In step S205, the transfer request is Connec.
Determine if it was done by t Request. Conne
ct Request is a DPP connection command. In DPP, data transfer is performed by a write transaction from the sending node. The light transaction is
This is a transfer mode in which data in the sending node is sent out at a predetermined timing of the sending node. That is, the request packet having the data payload is transmitted at the timing of the transmitting node, the communication device 1 stores the request packet received asynchronously, and returns the response packet. The protocol used by the device that requested the transfer is D
If it is PP, that is, the received command is Connect
If the request is Request, the process proceeds to step S206. If not, for example, when a connection request of another unsupported protocol or isochronous transfer is used, the process ends.

【0024】ステップS206では、受信パケットの処
理方法として割り込み方式を選択し、システムタイマも
しくはユーザタイマで設定した値で発生する周期的な割
り込みを受けないように設定する。つまり、ポーリング
の周期割り込みの要因をマスクする。もしくは周期ハン
ドラ自体を非活性化することでポーリング周期での割り
込みの発生をなくすよう設定する。割り込み方式の選択
は、ポーリング方式選択時に可能性のある受信パケット
の取りこぼしの発生をなくすためである。これはポーリ
ング方式を選択した場合、受信したリクエストパケット
への応答(レスポンスパケットの送信)がスプリットタ
イムアウトレジスタで設定した値より遅れる可能性や、
FIFOにパケットが溜まりデバイスビジーとしてパケ
ットの受付が出来なくなる可能性があるためである。そ
のため、ここではシステムに負担のかかる非同期割り込
みによるパケット受信処理を選択し、受信処理の設定を
終了する。ステップS205でデータ転送がDPPによ
って行われることがわかっているため、非同期パケット
の受信処理を行いやすい割り込み方式を選択し、設定す
る。
In step S206, the interrupt method is selected as the processing method of the received packet, and it is set so as not to receive the periodic interrupt generated by the value set by the system timer or the user timer. That is, the factor of the periodic interrupt of polling is masked. Alternatively, deactivate the cyclic handler itself so that interrupts are not generated in the polling cycle. The selection of the interrupt method is to eliminate the possibility of dropping the received packet that may occur when the polling method is selected. This is because when the polling method is selected, the response to the received request packet (transmission of response packet) may be delayed from the value set in the split timeout register,
This is because there is a possibility that packets will not be able to be received as device busy because packets are accumulated in the FIFO. Therefore, here, the packet reception process by the asynchronous interrupt, which burdens the system, is selected, and the setting of the reception process is completed. Since it is known in step S205 that data transfer is performed by DPP, an interrupt method that facilitates asynchronous packet reception processing is selected and set.

【0025】以上説明したように、本実施の形態によれ
ば、通信プロトコルに最適な受信処理を動的に選択する
ことが可能になる。その結果、割り込み方式を選択した
場合はパケットの取りこぼしの発生がなくなり、ポーリ
ング方式を選択した場合はインタフェースにおける非同
期割り込みの数を減らして、本来受信側ノードとなるデ
バイスが行うべき通信以外の処理にかける時間との均等
化を実現することができる。また今後策定されるであろ
う数々の新しいプロトコルを実装する場合にも有効であ
る。
As described above, according to this embodiment, it is possible to dynamically select the optimum receiving process for the communication protocol. As a result, when the interrupt method is selected, packet dropouts do not occur, and when the polling method is selected, the number of asynchronous interrupts in the interface is reduced, and processing other than communication that the device that is originally the receiving node should perform. Equalization with the time taken can be realized. It is also effective when implementing a number of new protocols that will be developed in the future.

【0026】なお、本発明は、SBP−2およびDPP
に限るものではなく、他の通信プロトコルに適用するこ
とも可能である。
The present invention is based on SBP-2 and DPP.
The present invention is not limited to the above, but can be applied to other communication protocols.

【0027】[0027]

【他の実施の形態】また、本発明の目的は、前述した実
施の形態の機能を実現するソフトウェアのプログラムコ
ードを記録した記憶媒体(または記録媒体)を、システ
ムあるいは装置に供給し、そのシステムあるいは装置の
コンピュータ(またはCPUやMPU)が記憶媒体に格
納されたプログラムコードを読み出し実行することによ
っても、達成されることは言うまでもない。この場合、
記憶媒体から読み出されたプログラムコード自体が前述
した実施の形態の機能を実現することになり、そのプロ
グラムコードを記憶した記憶媒体は本発明を構成するこ
とになる。また、コンピュータが読み出したプログラム
コードを実行することにより、前述した実施の形態の機
能が実現されるだけでなく、そのプログラムコードの指
示に基づき、コンピュータ上で稼働しているオペレーテ
ィングシステム(OS)などが実際の処理の一部または
全部を行い、その処理によって前述した実施の形態の機
能が実現される場合も含まれることは言うまでもない。
Other Embodiments Another object of the present invention is to supply a storage medium (or recording medium) recording a program code of software for realizing the functions of the above-described embodiments to a system or apparatus, and to supply the system or apparatus. Alternatively, it is needless to say that it is also achieved by the computer (or CPU or MPU) of the device reading and executing the program code stored in the storage medium. in this case,
The program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instructions of the program code. Needless to say, this also includes a case where a part or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing.

【0028】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張カー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書込まれた後、そのプログラムコードの指示
に基づき、その機能拡張カードや機能拡張ユニットに備
わるCPUなどが実際の処理の一部または全部を行い、
その処理によって前述した実施の形態の機能が実現され
る場合も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written in the memory provided in the function expansion card inserted into the computer or the function expansion unit connected to the computer, based on the instruction of the program code. , The CPU provided in the function expansion card or the function expansion unit performs some or all of the actual processing,
It goes without saying that the processing includes the case where the functions of the above-described embodiments are realized.

【0029】本発明を上記記憶媒体に適用する場合、そ
の記憶媒体には、先に説明した図2に示すフローチャー
トに対応するプログラムコードが格納されることにな
る。
When the present invention is applied to the above storage medium, the storage medium stores the program code corresponding to the flowchart shown in FIG. 2 described above.

【0030】[0030]

【発明の効果】本発明によれば、使用する通信プロトコ
ルに適した受信処理を動的に選択することが可能とな
る。
According to the present invention, it is possible to dynamically select a reception process suitable for the communication protocol used.

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

【図1】本実施の形態における通信装置の概要を示すブ
ロック図である。
FIG. 1 is a block diagram showing an outline of a communication device according to the present embodiment.

【図2】本実施の形態における受信処理設定処理の処理
手順を示すフローチャートである。
FIG. 2 is a flowchart showing a processing procedure of a reception processing setting processing according to the present embodiment.

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

1 通信装置 2 シリアルバス 3 IEEE1394インタフェース 4 IEEE1394ドライバ 5 プリンタ部 6 SBP−2制御部 7 DPP制御部 8 アプリケーションコントローラ 9 受信処理制御部 1 communication device 2 serial bus 3 IEEE 1394 interface 4 IEEE 1394 driver 5 Printer section 6 SBP-2 controller 7 DPP controller 8 Application controller 9 Reception processing control unit

Claims (23)

【特許請求の範囲】[Claims] 【請求項1】 デジタルインタフェースを介して接続さ
れた外部装置とデータの送受信を行う、複数の通信プロ
トコルに対応した通信手段と、 前記外部装置から送信されるデータの受信を、割り込み
方式により行う第1のモードと、ポーリング方式により
行う第2のモードとを切り換え、設定する切り換え手段
と、 前記切り換え手段により設定された第1又は第2のモー
ドでデータを受信するために、前記通信手段を制御する
制御手段とを有し、 前記切り換え手段は、前記外部装置が利用する通信プロ
トコルに応じて設定を行うことを特徴とする通信装置。
1. A communication means for transmitting / receiving data to / from an external device connected via a digital interface, the communication means being compatible with a plurality of communication protocols, and receiving data transmitted from the external device by an interrupt method. Switching means for switching and setting the first mode and the second mode performed by the polling method, and controlling the communication means to receive data in the first or second mode set by the switching means. The communication device is characterized in that the switching device performs setting according to a communication protocol used by the external device.
【請求項2】 前記第2のモードでデータを受信する場
合に、前記割り込み方式をマスクすることを特徴とする
請求項1に記載の通信装置。
2. The communication device according to claim 1, wherein the interrupt method is masked when data is received in the second mode.
【請求項3】 前記切り換え手段は、前記外部装置から
のライトトランザクションによるデータ転送を行う場合
に前記第1のモードに設定し、当該通信装置からのリー
ドトランザクションによるデータ転送を行う場合に前記
第2のモードに設定することを特徴とする請求項1又は
2に記載の通信装置。
3. The switching means sets the first mode when performing data transfer by a write transaction from the external device, and sets the second mode when performing data transfer by a read transaction from the communication device. The communication device according to claim 1, wherein the communication device is set to the mode.
【請求項4】 前記切り換え手段は、前記外部装置の当
該通信装置に対する接続方法により通信プロトコルを判
別することを特徴とする請求項1乃至3のいずれかに記
載の通信装置。
4. The communication device according to claim 1, wherein the switching unit determines a communication protocol according to a connection method of the external device to the communication device.
【請求項5】 前記切り換え手段は、前記外部装置がCo
nnect Requestにより接続を行った場合に前記第1のモ
ードに設定し、前記外部装置がログインコマンドにより
接続を行った場合に前記第2のモードに設定することを
特徴とする請求項4に記載の通信装置。
5. The switching means is configured such that the external device is Co.
5. The method according to claim 4, wherein the first mode is set when a connection is made by nnect Request, and the second mode is set when the external device makes a connection by a login command. Communication device.
【請求項6】 前記第2のモードにおいて、ポーリング
の周期を設定し直す設定手段を更に有することを特徴と
する請求項1乃至5のいずれかに記載の通信装置。
6. The communication device according to claim 1, further comprising setting means for resetting a polling cycle in the second mode.
【請求項7】 前記第2のモードでは、ポーリングの周
期を計測するためにOSのシステムタイマーを使用する
ことを特徴とする請求項1乃至6のいずれかに記載の通
信装置。
7. The communication device according to claim 1, wherein in the second mode, an OS system timer is used to measure a polling cycle.
【請求項8】 前記第1のモードが設定された場合に、
ポーリング方式を非活性化することを特徴とする請求項
7に記載の通信装置。
8. When the first mode is set,
The communication device according to claim 7, wherein the polling method is deactivated.
【請求項9】 前記第2のモードでは、ポーリングの周
期を計測するためにユーザ定義のタイマーを使用するこ
とを特徴とする請求項1乃至5のいずれかに記載の通信
装置。
9. The communication device according to claim 1, wherein in the second mode, a user-defined timer is used to measure a polling cycle.
【請求項10】 前記通信手段は、IEEE1394に
準拠していることを特徴とする請求項4乃至9のいずれ
かに記載の通信装置。
10. The communication device according to claim 4, wherein the communication unit complies with IEEE 1394.
【請求項11】 デジタルインタフェースを介して接続
された外部装置とデータの送受信を行う、複数の通信プ
ロトコルに対応した通信手段を有する装置における通信
方法であって、 前記外部装置が利用する通信プロトコルを判別する判別
工程と、 前記外部装置から送信されるデータの受信を、割り込み
方式により行う第1のモードと、ポーリング方式により
行う第2のモードとを、前記判別工程により判別した通
信プロトコルに切り換え、設定する切り換え工程と、 前記切り換え工程において設定された第1又は第2のモ
ードでデータを受信するために、前記通信手段を制御す
る制御工程とを有することを特徴とする通信方法。
11. A communication method in a device having a communication means compatible with a plurality of communication protocols for transmitting / receiving data to / from an external device connected via a digital interface, the communication protocol being used by the external device. A determination step of determining, a first mode of performing reception of data transmitted from the external device by an interrupt method, and a second mode of performing a polling method are switched to the communication protocol determined by the determination step, A communication method comprising: a switching step of setting; and a control step of controlling the communication means to receive data in the first or second mode set in the switching step.
【請求項12】 前記第2のモードでデータを受信する
場合に、前記割り込み方式をマスクすることを特徴とす
る請求項11に記載の通信方法。
12. The communication method according to claim 11, wherein the interrupt method is masked when data is received in the second mode.
【請求項13】 前記切り換え工程では、前記外部装置
からのライトトランザクションによるデータ転送を行う
場合に前記第1のモードに設定し、当該通信装置からの
リードトランザクションによるデータ転送を行う場合に
前記第2のモードに設定することを特徴とする請求項1
1又は12に記載の通信方法。
13. In the switching step, the first mode is set when data transfer is performed by a write transaction from the external device, and the second mode is set when data transfer is performed by a read transaction from the communication device. 2. The mode is set to 1.
The communication method according to 1 or 12.
【請求項14】 前記切り換え工程では、前記外部装置
の当該通信装置に対する接続方法により通信プロトコル
を判別することを特徴とする請求項11乃至13のいず
れかに記載の通信方法。
14. The communication method according to claim 11, wherein in the switching step, the communication protocol is determined by a connection method of the external device to the communication device.
【請求項15】 前記切り換え工程では、前記外部装置
がConnect Requestにより接続を行った場合に前記第1
のモードに設定し、前記外部装置がログインコマンドに
より接続を行った場合に前記第2のモードに設定するこ
とを特徴とする請求項14に記載の通信方法。
15. In the switching step, the first device is connected when the external device connects by a Connect Request.
15. The communication method according to claim 14, wherein the second mode is set when the external device connects by a login command.
【請求項16】 前記第2のモードにおいて、ポーリン
グの周期を設定し直す設定工程を更に有することを特徴
とする請求項11乃至15のいずれかに記載の通信方
法。
16. The communication method according to claim 11, further comprising a setting step of resetting a polling cycle in the second mode.
【請求項17】 前記第2のモードでは、ポーリングの
周期を計測するためにOSのシステムタイマーを使用す
ることを特徴とする請求項11乃至16のいずれかに記
載の通信方法。
17. The communication method according to claim 11, wherein in the second mode, an OS system timer is used to measure a polling cycle.
【請求項18】 前記第1のモードが設定された場合
に、ポーリング方式を非活性化することを特徴とする請
求項17に記載の通信方法。
18. The communication method according to claim 17, wherein the polling method is deactivated when the first mode is set.
【請求項19】 前記第2のモードでは、ポーリングの
周期を計測するためにユーザ定義のタイマーを使用する
ことを特徴とする請求項11乃至15のいずれかに記載
の通信方法。
19. The communication method according to claim 11, wherein in the second mode, a user-defined timer is used to measure a polling cycle.
【請求項20】 前記通信手段は、IEEE1394に
準拠していることを特徴とする請求項14乃至19のい
ずれかに記載の通信方法。
20. The communication method according to claim 14, wherein the communication unit complies with IEEE 1394.
【請求項21】 情報処理装置が実行可能なプログラム
であって、前記プログラムを実行した情報処理装置を、
請求項1乃至10のいずれかに記載の通信装置として機
能させることを特徴とするプログラム。
21. A program executable by an information processing device, the information processing device executing the program comprising:
A program causing the communication device according to any one of claims 1 to 10 to function.
【請求項22】 請求項11乃至20のいずれかに記載
の通信方法を実現するためのプログラムコードを有する
情報処理装置が実行可能なプログラム。
22. A program executable by an information processing device, having a program code for realizing the communication method according to claim 11.
【請求項23】 請求項21又は22に記載のプログラ
ムを記憶した記憶媒体。
23. A storage medium storing the program according to claim 21 or 22.
JP2002113623A 2002-04-16 2002-04-16 Communication apparatus and communication method Withdrawn JP2003309618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002113623A JP2003309618A (en) 2002-04-16 2002-04-16 Communication apparatus and communication method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002113623A JP2003309618A (en) 2002-04-16 2002-04-16 Communication apparatus and communication method

Publications (1)

Publication Number Publication Date
JP2003309618A true JP2003309618A (en) 2003-10-31

Family

ID=29395756

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002113623A Withdrawn JP2003309618A (en) 2002-04-16 2002-04-16 Communication apparatus and communication method

Country Status (1)

Country Link
JP (1) JP2003309618A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7014374B2 (en) * 2002-09-25 2006-03-21 Seiko Epson Corporation Printing apparatus and printing method for performing pre-communication with an external device
JP2006268092A (en) * 2005-03-22 2006-10-05 Fuji Xerox Co Ltd Image processor
JP2015104093A (en) * 2013-11-28 2015-06-04 株式会社日立製作所 Communication packet processing device and communication packet processing method
WO2023008362A1 (en) * 2021-07-28 2023-02-02 京セラドキュメントソリューションズ株式会社 Output device and image forming device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7014374B2 (en) * 2002-09-25 2006-03-21 Seiko Epson Corporation Printing apparatus and printing method for performing pre-communication with an external device
JP2006268092A (en) * 2005-03-22 2006-10-05 Fuji Xerox Co Ltd Image processor
JP4720236B2 (en) * 2005-03-22 2011-07-13 富士ゼロックス株式会社 Image processing device
JP2015104093A (en) * 2013-11-28 2015-06-04 株式会社日立製作所 Communication packet processing device and communication packet processing method
WO2023008362A1 (en) * 2021-07-28 2023-02-02 京セラドキュメントソリューションズ株式会社 Output device and image forming device

Similar Documents

Publication Publication Date Title
US6690648B2 (en) Data communication apparatus, method, and system utilizing reception capability information of a destination node
JPH11316657A (en) Data transfer device, method thereof, data transfer system and medium
US7028111B2 (en) Bus system and bus interface for connection to a bus
JP3598923B2 (en) Data transfer control device, information storage medium, and electronic device
KR20040041623A (en) Bus system and bus interface for connection to a bus
US20120191989A1 (en) Information processing apparatus with power saving mode, and control method and communication apparatus therefor
KR100311707B1 (en) Data communication system, data communication method, data communication apparatus, and digital interface
JP2003309618A (en) Communication apparatus and communication method
JP3774540B2 (en) Data transfer method, image processing system and apparatus
JP4428750B2 (en) Data communication system
JP4065466B2 (en) Data communication system
JP2005074928A (en) Data processing system, data processor, and data receiving program
JP3606145B2 (en) Data transfer control device and electronic device
JP3598924B2 (en) Data transfer control device, information storage medium, and electronic device
JP3624767B2 (en) Data transfer control device, information storage medium, and electronic device
JP4026979B2 (en) Data communication system
JP3943698B2 (en) Data communication system and data communication apparatus
JPH11252153A (en) Data communication system, equipment and method
JP3598922B2 (en) Data transfer control device, information storage medium, and electronic device
JP2003309567A (en) Apparatus and method for communication
JP6033383B2 (en) Information processing apparatus, control method thereof, and control program
JPH11261608A (en) Data communication system, data communication equipment, data communication method and storage medium
JP3593882B2 (en) Printing apparatus and interface control method
JP4413041B2 (en) Data transfer system and image forming apparatus
JP4175373B2 (en) Information processing apparatus and method, and data communication system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050705