JP2007265299A - Communication system, and peripheral device used therefor - Google Patents

Communication system, and peripheral device used therefor Download PDF

Info

Publication number
JP2007265299A
JP2007265299A JP2006092556A JP2006092556A JP2007265299A JP 2007265299 A JP2007265299 A JP 2007265299A JP 2006092556 A JP2006092556 A JP 2006092556A JP 2006092556 A JP2006092556 A JP 2006092556A JP 2007265299 A JP2007265299 A JP 2007265299A
Authority
JP
Japan
Prior art keywords
peripheral device
data
information
trigger
command
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
JP2006092556A
Other languages
Japanese (ja)
Inventor
Minoru Oishi
稔 大石
Fumitoshi Uno
文敏 宇野
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.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2006092556A priority Critical patent/JP2007265299A/en
Priority to US11/691,273 priority patent/US7797398B2/en
Publication of JP2007265299A publication Critical patent/JP2007265299A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a communication system capable of autonomously starting a specific communication event by a user's operation on a peripheral device side in spite of the fact that the issuing direction of commands conducting execution of communication events is regulated to one direction from a PC side to the peripheral device side. <P>SOLUTION: The peripheral device generates a peripheral device-side trigger for urging a host device to start a target communication event based on the user's operation, and a host device issues a trigger report request command for monitoring generation of the peripheral device-side trigger in the peripheral device toward the peripheral device according to a main communication protocol. The host device receives trigger generation report information from the peripheral device which has received the command, and starts the target communication event when presence of the peripheral device-side trigger is determined from the content of the trigger generation report information. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、パーソナルコンピュータ(以下「PC」と略称する)やワークステーション等をホスト装置としてこれに周辺装置が接続された通信システムと、それに使用する周辺装置とに関する。   The present invention relates to a communication system in which a peripheral device is connected to a personal computer (hereinafter abbreviated as “PC”), a workstation, or the like as a host device, and a peripheral device used therefor.

特開2005−18645号公報JP 2005-18645 A 特開2005−107875号公報JP 2005-107875 A

近年、フラッシュメモリなどの不揮発性メモリがカード型にパッケージングされたいわゆるメモリーカード(記録メディアの一例)が広く知られている。このメモリーカードは、デジタルカメラや携帯音楽プレーヤーなどのデジタル機器に用いられるデータの記憶媒体として急速に普及している。メモリーカードの仕様は統一されておらず、例えば、コンパクトフラッシュ(登録商標、以下「CF」と略称する)、スマートメディア(登録商標、以下「SM」と略称する)、メモリースティック(登録商標、以下「MS」と略称する)、SDメモリーカード(登録商標、以下「SD」と略称する)など、種々のものが市場に出回っている。   In recent years, a so-called memory card (an example of a recording medium) in which a nonvolatile memory such as a flash memory is packaged in a card type is widely known. This memory card is rapidly spreading as a data storage medium used in digital devices such as digital cameras and portable music players. The specifications of the memory card are not unified. For example, compact flash (registered trademark, hereinafter abbreviated as “CF”), smart media (registered trademark, hereinafter abbreviated as “SM”), memory stick (registered trademark, hereinafter referred to as “SM”). Various products such as “MS” and SD memory card (registered trademark, hereinafter abbreviated as “SD”) are on the market.

上記メモリーカードは、PCなどに接続されてメモリーカードの読み書きを行なうメモリーカードリーダライタ(周辺装置の一例、以下「リーダライタ」と略称する)を用いることで、PCから上記メモリーカードへのアクセスが可能となる。これにより、PCとメモリーカードとの間でデータ通信が行なえるようになる。こうしたリーダライタには、メモリーカードを挿入するスロットを一つ備えたシングルスロットタイプと、複数のスロットを備えて複数のメモリーカードに対するデータの読み書きが可能なマルチスロットタイプなどがある(特許文献1〜3)。   By using a memory card reader / writer (an example of a peripheral device, hereinafter abbreviated as “reader / writer”) connected to a PC or the like, the memory card can be accessed from the PC. It becomes possible. As a result, data communication can be performed between the PC and the memory card. Such reader / writers include a single slot type having one slot for inserting a memory card, and a multi-slot type having a plurality of slots and capable of reading / writing data from / to a plurality of memory cards (Patent Documents 1 to 3). 3).

ところで、上記のようなリーダライタは、マルチメディアの普及によりデータ転送容量が飛躍的に増大した背景から、PCとの間のデータ伝送をシリアル通信にて行なうことも一般化してきている。しかしながら、データアクセスのための制御には、複数記憶媒体の取り扱いが容易、といった観点から、パラレル通信用周辺機器の調停/アクセス制御にて使用されていた方式を引き継いだ機器も数多く存在する。その典型例として、PCとリーダライタとのデータ通信を、いわゆるSCSI規格で定義されたプロトコル(以下、SCSIプロトコルともいう)に基づいて行われるように設計されたシステムを例示できる。SCSI規格は、ANSI(American National Standard Institute;米規格協会)によって規格化され、国際的に広く準拠されている通信プロトコルである。該プロトコルは、PC及びリーダライタの汎用性を高めることができるため広く用いられている。なお、以下の説明において、SCSI規格とは主としてSCSI−2を示すものとする。   By the way, the reader / writer as described above has also been generalized to perform data transmission with a PC by serial communication due to the background of the dramatic increase in data transfer capacity due to the spread of multimedia. However, in the control for data access, there are many devices that take over the method used in the arbitration / access control of peripheral devices for parallel communication from the viewpoint of easy handling of a plurality of storage media. As a typical example, a system designed to perform data communication between a PC and a reader / writer based on a protocol defined by a so-called SCSI standard (hereinafter also referred to as a SCSI protocol) can be exemplified. The SCSI standard is a communication protocol standardized by ANSI (American National Standard Institute) and widely internationally compliant. This protocol is widely used because it can enhance the versatility of PCs and reader / writers. In the following description, the SCSI standard mainly indicates SCSI-2.

SCSIプロトコルにおいては、ホスト装置となるPCは、通信イベントの起動決定権が与えられたイニシエータとして機能し、周辺装置は該ホスト装置の通信対象であるターゲットとして定められる。通信イベントを実行命令するためのコマンドはPCから周辺装置に向けて順次発行される一方、発行されたコマンドを受領した周辺装置が当該コマンドに対応する処理(例えば、データの読出しや書き込み、消去、及び種々の付随的な処理)を逐次実行し、その実行結果に応じた応答情報をホスト装置側に返信する。そして、通信イベントの実行を司るコマンドの発行方向は、ホスト装置側から周辺装置側への一方向に規制されている。   In the SCSI protocol, a PC serving as a host device functions as an initiator to which a communication event activation decision right is given, and a peripheral device is defined as a target that is a communication target of the host device. A command for instructing execution of a communication event is sequentially issued from the PC to the peripheral device, while the peripheral device that has received the issued command performs processing corresponding to the command (for example, data read, write, erase, And various incidental processes) are sequentially executed, and response information corresponding to the execution result is returned to the host device side. The issue direction of the command that controls the execution of the communication event is restricted to one direction from the host device side to the peripheral device side.

上記のごとく、SCSI通信はPCと周辺装置との間での双方向通信ではあるが、通信イベントの実行を司るコマンドの発行方向が、上記のごとく、PC側から周辺装置側への一方向に規制されており、通信処理開始の主導権は常にイニシエータとなるPC側が握る形となる。つまり、SCSIプロトコルに従う限り、周辺装置側でホスト装置側に通信イベント始動のためのコマンドを逆発行することは不可能であり、周辺装置側で特定の通信イベントを自発的に起動する方法が存在しなかった。例えば、リーダライタに装着したメモリーカードに記憶されたデータファイルをPC側で読み出したり、あるいはハードディスクドライブ(HDD)等のPC側の記憶装置に保存したりする場合、ユーザーは必ずPC側でそれら読み書き処理の操作(つまり、コマンド実行入力)を行なわなければならない。このため、PCから離れた場所に配置されたリーダライタにデータファイルが格納されたメモリーカードを装着しても、そのデータファイルをPCに保存したい場合、わざわざPC位置まで赴かなければ保存のための操作を行なうことができず、非常に不便であった。   As described above, the SCSI communication is bidirectional communication between the PC and the peripheral device. However, as described above, the command issuing direction for executing the communication event is unidirectional from the PC side to the peripheral device side. It is regulated, and the initiative to start communication processing is always held by the PC side that is the initiator. In other words, as long as the SCSI protocol is followed, it is impossible for the peripheral device side to reversely issue a command for starting a communication event to the host device side, and there is a method for spontaneously starting a specific communication event on the peripheral device side. I did not. For example, when data files stored in a memory card attached to a reader / writer are read on the PC side or stored in a storage device on the PC side such as a hard disk drive (HDD), the user must read and write them on the PC side. Processing operations (that is, command execution input) must be performed. For this reason, even if a memory card storing a data file is attached to a reader / writer placed at a location away from the PC, if the data file is to be stored on the PC, the data file must be saved unless it is bothered to the PC position. It was very inconvenient because it could not be operated.

本発明の課題は、通信イベントの実行を司るコマンドの発行方向が、上記のごとく、PC側から周辺装置側への一方向に規制されているにも拘わらず、周辺装置側でのユーザー操作により特定の通信イベントを自発的に起動することが可能な通信システムと、それに使用する周辺装置とを提供することにある。   The problem of the present invention is that, although the issue direction of the command for executing the communication event is restricted to one direction from the PC side to the peripheral device side as described above, the command is issued by a user operation on the peripheral device side. An object of the present invention is to provide a communication system capable of spontaneously starting a specific communication event and a peripheral device used for the communication system.

課題を解決するための手段及び発明の効果Means for Solving the Problems and Effects of the Invention

上記課題を解決するための本発明の通信システムは、通信イベントの起動決定権を有したホスト装置と、該ホスト装置に接続される該ホスト装置の通信対象となる周辺装置とを含み、通信イベントを実行命令するためのコマンドをホスト装置から周辺装置に向けて順次発行する一方、発行されたコマンドを受領した周辺装置が当該コマンドに対応するデータ処理を逐次実行し、その実行結果に応じた応答情報をホスト装置側に返信するようになっており、かつ、コマンドの発行方向がホスト装置側から周辺装置側への一方向に規制された主通信プロトコルを有する通信システムであって、
周辺装置に設けられ、予め定められた内容の対象通信イベントの起動をホスト装置に促すための周辺装置側トリガを、該周辺装置側でのユーザー操作に基づいて発生させる周辺装置側トリガ発生手段と、
ホスト装置側に設けられ、周辺装置における周辺装置側トリガの発生を監視するために、トリガ発生報告情報を応答情報として要求するためのトリガ報告要求コマンドを、主通信プロトコルに従い周辺装置に向けて発行するトリガ報告要求コマンド発行手段と、
周辺装置側に設けられ、周辺装置側トリガの発生の有無を反映したトリガ発生報告情報を応答情報としてホスト装置に主通信プロトコルに従い返信するトリガ発生報告情報返信手段と、
ホスト装置側に設けられ、トリガ発生報告情報を周辺装置から受領する報告情報受領手段と、
当該トリガ発生報告情報の内容に基づいて周辺装置側トリガの有無を判定し、該周辺装置側トリガがありと判定された場合に、対象通信イベントを起動させる対象通信イベント起動手段と、を有してなることを特徴とする。
A communication system according to the present invention for solving the above-mentioned problem includes a host device having a communication event activation decision right and a peripheral device to be communicated with by the host device connected to the host device, Are sequentially issued from the host device to the peripheral device, while the peripheral device receiving the issued command sequentially executes the data processing corresponding to the command, and responds according to the execution result. A communication system having a main communication protocol in which information is sent back to the host device side, and the command issuance direction is regulated in one direction from the host device side to the peripheral device side,
Peripheral device-side trigger generating means provided in the peripheral device for generating a peripheral device-side trigger for prompting the host device to start a target communication event having a predetermined content based on a user operation on the peripheral device side; ,
Issuing a trigger report request command for requesting trigger occurrence report information as response information to the peripheral device according to the main communication protocol in order to monitor the occurrence of the peripheral device trigger in the peripheral device Trigger report request command issuing means,
Trigger occurrence report information return means provided on the peripheral device side, which returns the trigger occurrence report information reflecting the presence or absence of the occurrence of the peripheral device side trigger as response information to the host device according to the main communication protocol,
Report information receiving means provided on the host device side for receiving trigger generation report information from the peripheral device;
And determining whether or not there is a peripheral device side trigger based on the content of the trigger occurrence report information, and when it is determined that the peripheral device side trigger is present, has a target communication event starting means for starting the target communication event It is characterized by.

また、本発明の周辺装置は、上記本発明の通信システムを構成する周辺装置であって、予め定められた内容の対象通信イベントの起動をホスト装置に促すための周辺装置側トリガを、該周辺装置側でのユーザー操作に基づいて発生させる周辺装置側トリガ発生手段と、
周辺装置側に設けられ、ホスト装置からのトリガ報告要求コマンドに対応するトリガ発生報告情報を応答情報としてホスト装置に主通信プロトコルに従い返信するトリガ発生報告情報返信手段と、を有してなることを特徴とする。
Further, the peripheral device of the present invention is a peripheral device constituting the communication system of the present invention, and a peripheral device side trigger for prompting the host device to start a target communication event having a predetermined content is provided. Peripheral device side trigger generating means for generating based on user operation on the device side,
Trigger occurrence report information return means provided on the peripheral device side and returning the trigger occurrence report information corresponding to the trigger report request command from the host device as response information to the host device in accordance with the main communication protocol. Features.

上記本発明によると、対象通信イベントの起動をホスト装置に促すための周辺装置側トリガをユーザー操作に基づいて発生させ、ホスト装置側では、周辺装置における周辺装置側トリガの発生を監視するためのトリガ報告要求コマンドを、主通信プロトコルに従い周辺装置に向けて発行する。これを受けた周辺装置からのトリガ発生報告情報をホスト装置側で受領し、当該トリガ発生報告情報の内容から周辺装置側トリガがありと判定された場合に、対象通信イベントを起動させる。これにより、通信イベントの実行を司るコマンドの発行方向が、ホスト装置側から周辺装置側への一方向に規制されているにも拘わらず、特定の通信イベントを周辺装置側でのユーザー操作により(ホスト装置側にて)自発的に起動することが可能となる。   According to the present invention, the peripheral device-side trigger for prompting the host device to start the target communication event is generated based on a user operation, and the host device side monitors the generation of the peripheral device-side trigger in the peripheral device. A trigger report request command is issued to the peripheral device according to the main communication protocol. The host device receives the trigger occurrence report information from the peripheral device that has received this, and activates the target communication event when it is determined from the content of the trigger occurrence report information that there is a peripheral device side trigger. As a result, even though the direction of issuing a command for executing the communication event is restricted to one direction from the host device side to the peripheral device side, a specific communication event is controlled by a user operation on the peripheral device side ( It can be activated spontaneously (on the host device side).

主通信プロトコルとしては、本発明においてはSCSIプロトコル(SCSI−1、SCSI−2及びSCSI−3のいずれか:特に、現在も多くのOSカーネルで使われつづけているSCSI−2)を採用することができる。   As the main communication protocol, in the present invention, the SCSI protocol (either SCSI-1, SCSI-2, or SCSI-3: in particular, SCSI-2 that is still used in many OS kernels) is adopted. Can do.

トリガ報告要求コマンド発行手段は、トリガ報告要求コマンドを周辺装置に対し予め定められた時間間隔で繰り返し継続的に発行するものとすることができる。トリガ報告要求コマンドを繰り返し継続的に発行することで、周辺装置側トリガがどのようなタイミングで発生しても、ホスト装置側でこれを確実に取得することができる。   The trigger report request command issuing means can repeatedly issue the trigger report request command to the peripheral device at a predetermined time interval. By issuing the trigger report request command repeatedly and continuously, the host device can reliably acquire the peripheral device-side trigger no matter what timing it occurs.

なお、本発明では、周辺装置との間でピア・ツー・ピア通信が可能な別プロトコルに準拠した通信インターフェース(例えば、IEEE1394ないし1394b)をホスト装置側に組み込み、その通信インターフェースの端子に周辺装置を接続する構成も可能である。このハードウェア構成では、周辺装置側から上記通信インターフェース(すなわち、ホスト装置)に通信処理用のコマンドを発行することができるので、トリガ報告要求コマンド発行手段(ホスト装置側)やトリガ発生報告情報返信手段(周辺装置側)などの主通信プロトコルに従う機能を省略した、本発明に属さない参考技術態様へのシフトが一応可能ではある。ただし、この参考技術態様は、ホスト装置側のシステムに上記ピア・ツー・ピア通信を可能とするための別プロトコルを取り扱うモジュールも組み入れねばならず、通信インターフェースの高コスト化も免れ得ない欠点があるので現実的ではない。   In the present invention, a communication interface (for example, IEEE 1394 to 1394b) compliant with another protocol capable of peer-to-peer communication with a peripheral device is incorporated on the host device side, and the peripheral device is connected to the terminal of the communication interface. It is also possible to connect them. In this hardware configuration, since a command for communication processing can be issued from the peripheral device side to the communication interface (that is, the host device), trigger report request command issuing means (host device side) or trigger occurrence report information return It is possible to shift to a reference technical mode that does not belong to the present invention, omitting the function according to the main communication protocol such as means (peripheral device side). However, this reference technical aspect has a drawback in that it is necessary to incorporate a module for handling another protocol for enabling the peer-to-peer communication in the system on the host device side, and the cost of the communication interface cannot be avoided. Because it is, it is not realistic.

他方、本発明においては、周辺装置とホスト装置とを、ホスト装置側からの周辺装置のポーリングは可能であって、該周辺装置側からのホスト装置の逆ポーリングが不能なシリアル通信機構を介して接続し、通信イベントを実行するためのホスト装置と周辺装置との間における情報転送を、ホスト装置が周辺装置をポーリングする形式にてシリアル通信により実行するものとして構成できる。この構成では、周辺装置側からホスト装置をポーリングすることができない(つまり、周辺装置側に通信開始の決定権が与えられない)形になるので、本発明の効果がより有効に発揮されるばかりでなく、周辺装置を直接接続するためのホスト装置側の通信インターフェースが大幅に簡略化され、システム構成の軽量・低コスト化を図ることができる。このようなシリアル通信の規格として、USB(Universal Serial Bus)を例示できる。また、本明細書では、主通信プロトコルとしてSCSIプロトコルが採用され、かつ、ホスト装置とUSBプロトコルに従うシリアル通信バスにより接続される周辺機器のことを、USB/SCSI型周辺機器とも称する。   On the other hand, in the present invention, the peripheral device and the host device can be polled by the peripheral device from the host device side through a serial communication mechanism in which the reverse polling of the host device from the peripheral device side is impossible. Information transfer between the host device and the peripheral device for connecting and executing a communication event can be configured to be executed by serial communication in a format in which the host device polls the peripheral device. In this configuration, since the host device cannot be polled from the peripheral device side (that is, the peripheral device side is not given the right to start communication), the effect of the present invention is more effectively exhibited. In addition, the communication interface on the host device side for directly connecting the peripheral devices is greatly simplified, and the system configuration can be reduced in weight and cost. An example of such a serial communication standard is USB (Universal Serial Bus). Further, in this specification, a peripheral device that adopts the SCSI protocol as a main communication protocol and is connected to the host device by a serial communication bus according to the USB protocol is also referred to as a USB / SCSI type peripheral device.

USBを採用する場合、周辺装置は、より具体的には以下のように構成できる。すなわち、コマンドをホスト装置から受信してコマンド内容を解析するコマンド解析ステップと、該コマンドの解析内容を反映したデータ処理を実行するデータ処理ステップと、データ処理の結果を示す応答情報をホスト装置に返信する応答情報返信ステップとをこの順序で実行する形で周辺機器側の通信処理制御を行なうアクセス制御デバイスと、上記コマンド及び応答情報の相互転送を、前記ホスト装置が複数の前記アクセス制御デバイスをポーリングする形式にてシリアル通信により実行するシリアル通信部とを有するものとして構成する。アクセス制御デバイスは、シリアル通信部との間でコマンド及び応答情報を送受信する送受信部と、コマンドを解釈してその内容に応じたデータ処理を制御実行主体とからなるものとして構成される。なお、送受信部とシリアル通信部とは専用ICに集積することができる。この構成では、USBプロトコルに従うシリアル通信にバスを介して、SCSI等の主通信プロトコルに従うコマンドないし応答情報のやり取りを問題なく行なうことができる。   When USB is adopted, the peripheral device can be configured more specifically as follows. That is, a command analysis step for receiving a command from the host device and analyzing the command content, a data processing step for executing data processing reflecting the analysis content of the command, and response information indicating the result of the data processing are sent to the host device. A response information return step for replying is executed in this order, and an access control device for controlling communication processing on the peripheral device side, and mutual transfer of the command and response information is performed by the host device with a plurality of access control devices. And a serial communication unit that executes serial communication in a polling format. The access control device includes a transmission / reception unit that transmits / receives command and response information to / from the serial communication unit, and a control execution entity that interprets the command and performs data processing according to the content. The transmission / reception unit and the serial communication unit can be integrated in a dedicated IC. In this configuration, commands or response information according to a main communication protocol such as SCSI can be exchanged without problems via a bus for serial communication according to the USB protocol.

より具体的には、周辺装置側のシリアル通信部が、ホスト装置からのシリアル通信バスを接続する通信バス接続端子と、シリアル通信バスと送受信部との間でコマンド及び応答情報の転送通信処理を実行する通信制御部とを備え、該通信制御部が、通信バス接続端子に接続される通信処理のプロトコルエンジン部と、該プロトコルエンジン部にFIFOメモリからなる制御用の双方向エンドポイントを介して接続され、転送通信処理の制御を司る制御指令部とを備えたものとして構成できる。そして、送受信部は上記プロトコルエンジン部に対し、FIFOメモリからなる該プロトコルエンジン部への入力用エンドポイントと、FIFOメモリからなる該プロトコルエンジン部からの出力用エンドポイントとを介して入出力経路が分離された形で接続することができる。また、通信制御部は、ホスト装置側から、データアクセスの対象となる送受信部の特定情報と、該送受信部に対応するエンドポイントの特定情報とを受信して、各送受信部をターゲットデバイスとしてポーリングするものとなるように構成することができる。送受信のデータバッファとなるエンドポイントを送信側と受信側とで独立して設け、ポーリング時にいずれのエンドポイントを指定するかによって、データの転送方向も容易に特定することができる。   More specifically, the serial communication unit on the peripheral device side performs the communication processing of the command and response information between the communication bus connection terminal for connecting the serial communication bus from the host device and the serial communication bus and the transmission / reception unit. A communication control unit that executes communication protocol unit connected to the communication bus connection terminal, and the protocol engine unit via a bidirectional endpoint for control including a FIFO memory. A control command unit that is connected and controls the transfer communication process can be provided. The transmission / reception unit has an input / output path to the protocol engine unit via an input endpoint to the protocol engine unit including a FIFO memory and an output endpoint from the protocol engine unit including a FIFO memory. Can be connected separately. In addition, the communication control unit receives from the host device side the identification information of the transmission / reception unit to be accessed and the identification information of the endpoint corresponding to the transmission / reception unit, and polls each transmission / reception unit as a target device. It can be configured to be. Endpoints serving as transmission / reception data buffers are provided independently on the transmission side and the reception side, and the data transfer direction can be easily specified depending on which endpoint is designated at the time of polling.

次に、本発明の周辺装置は、少なくともデータの読出しに係るデータアクセスが可能とされた記憶媒体が内蔵されるか又は着脱可能に装着され、通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成することができる。この場合、対象通信イベントは、記憶媒体に記憶されたデータファイルを、周辺装置にて読み出してホスト装置へ送信する情報読出し送信処理を含むものとして定めることができる。これにより、ホスト装置から離れた場所に配置された周辺機器にデータファイルが格納された記憶媒体を装着した場合、周辺機器側でのユーザー操作によりそのデータファイルをホスト装置へ送信でき、周辺機器がホスト装置から離れて接続されている場合でも、該データファイル送信を周辺機器側からの遠隔操作により行なうことができる。   Next, in the peripheral device of the present invention, at least a storage medium capable of data access relating to data reading is built in or detachably mounted, and data access is performed on the storage medium by a communication event. It can be configured as a storage device. In this case, the target communication event can be defined as including an information reading and transmitting process in which a data file stored in the storage medium is read by the peripheral device and transmitted to the host device. As a result, when a storage medium storing a data file is attached to a peripheral device located away from the host device, the data file can be transmitted to the host device by a user operation on the peripheral device side. Even when connected remotely from the host device, the data file transmission can be performed by remote operation from the peripheral device side.

この場合、ホスト装置側には、対象通信イベントにて周辺装置から受信したデータファイルを該ホスト装置側に設けられたホスト装置側記憶装置上の予め定められた保存領域に保存するデータファイル保存手段を設けることができる。これにより、記憶媒体のデータファイルのホスト装置側への送信及び保存処理を、周辺機器側でのユーザー操作により実行でき、周辺機器がホスト装置から離れて接続されている場合でも、該データファイルの保存処理を周辺機器側からの遠隔操作により行なうことができる。   In this case, the host device side stores data file received from the peripheral device at the target communication event in a predetermined storage area on the host device side storage device provided on the host device side. Can be provided. Thereby, transmission and storage processing of the data file of the storage medium to the host device side can be executed by a user operation on the peripheral device side, and even if the peripheral device is connected away from the host device, the data file The storage process can be performed by remote control from the peripheral device side.

また、記憶媒体は、データの読出し、書き込み及び削除に係るデータアクセスが可能とされたものとされる場合、ホスト装置側には、データファイル保存手段による保存領域へのデータファイルの格納に対応して、周辺装置に対し記憶媒体上の送信元のデータファイルを削除させるファイルムーブイベントを起動するファイルムーブ制御手段を設けることができる。これにより、データファイルの移動(ムーブ)処理も、周辺機器側からの遠隔操作により行なうことができる。   In addition, when the storage medium is capable of data access related to reading, writing, and deletion of data, the host device side supports data file storage in the storage area by the data file storage means. Thus, it is possible to provide file move control means for starting a file move event that causes the peripheral device to delete the data file of the transmission source on the storage medium. As a result, the data file can be moved (moved) by remote operation from the peripheral device side.

また、ホスト装置側には、データファイルの保存領域への保存環境を設定する保存環境設定手段を設けることができる。これにより、ホスト装置側でデータファイルの保存環境を設定でき、周辺機器側からの遠隔操作により行なう保存処理をユーザーが望む環境(あるいは条件)にて実行することができる。保存環境設定手段は、具体的には、データファイルの保存領域を設定・変更するための保存領域設定変更手段を有するものとして構成できる。これにより、周辺機器側からの遠隔操作により、記憶媒体中のデータファイルをホスト装置側記憶装置内の所望の保存領域に保存することができる。   On the host device side, storage environment setting means for setting a storage environment for storing data files can be provided. Thereby, the storage environment of the data file can be set on the host device side, and the storage process performed by remote operation from the peripheral device side can be executed in the environment (or conditions) desired by the user. Specifically, the storage environment setting means can be configured as having storage area setting changing means for setting / changing the storage area of the data file. Accordingly, the data file in the storage medium can be stored in a desired storage area in the storage device on the host device side by remote operation from the peripheral device side.

データファイルの移動(ムーブ)処理を可能とする前述の構成では、保存環境設定手段は、ファイルムーブ制御手段によるファイルムーブイベントの起動が禁止されるファイルコピーモードと、ファイルムーブイベントの起動が許可されるファイルムーブモードとを切り替えるファイル保存モード切替手段を有するものとすることができる。これにより、周辺機器側からの遠隔操作により記憶媒体中のデータファイルの保存モードを、コピーとムーブとの間で切り替え設定することができる。なお、コピー制限の付与されたファイルが検出された場合、自動的にムーブモードが選択されるように構成してもよい。   In the above-described configuration that enables data file movement (move) processing, the storage environment setting means is permitted to start a file move mode in which a file move event is prohibited by the file move control means, and to start a file move event. File storage mode switching means for switching between the file move mode and the file move mode. Thereby, the storage mode of the data file in the storage medium can be switched between copy and move by remote operation from the peripheral device side. Note that when a file with copy restrictions is detected, the move mode may be automatically selected.

周辺装置側トリガ発生手段は、周辺装置に設けられた手動操作部と、当該手動操作部による操作信号を周辺装置側トリガとして発生させる操作信号発生部とを有するものとして構成することができる。周辺装置に設けられた手動操作部を操作することで、主通信プロトコルの介在により従来はホスト装置側からしか起動できなかった通信イベント(例えば前述のデータファイルの読出しや保存)を、周辺機器側からの遠隔操作により簡単に始動できるようになる。   The peripheral device side trigger generating means can be configured to have a manual operation unit provided in the peripheral device and an operation signal generating unit for generating an operation signal by the manual operation unit as a peripheral device side trigger. By operating the manual operation unit provided in the peripheral device, communication events that could only be started from the host device side by the intervention of the main communication protocol (for example, reading and saving of the above-mentioned data file) It can be started easily by remote control from.

他方、周辺装置が、少なくともデータの読出しに係るデータアクセスが可能とされた記憶媒体が着脱可能に装着され、通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成される場合、周辺装置側トリガ発生手段は、周辺装置が記憶媒体の非装着状態から装着状態への移行を検出し、その検出信号を周辺装置側トリガとして発生させる記憶媒体装着検出信号発生手段を備えるものとしても構成することができる。このようにすると、主通信プロトコルの介在により従来はホスト装置側からしか起動できなかった通信イベント(例えば前述のデータファイルの読出しや保存)を、記憶媒体を周辺装置に装着するに伴い自動的に始動できるようになる。   On the other hand, if the peripheral device is configured as a storage device that is detachably mounted with a storage medium that enables data access related to data reading, and is configured to perform data access to the storage medium by a communication event, The apparatus-side trigger generation means is configured to include storage medium attachment detection signal generation means for detecting the transition of the storage device from the non-attached state to the attached state of the storage medium and generating the detection signal as a peripheral device-side trigger. can do. In this way, a communication event (for example, reading or saving of the data file described above) that can only be started from the host device side due to the intervention of the main communication protocol is automatically performed as the storage medium is attached to the peripheral device. It will be possible to start.

次に、トリガ報告要求コマンドは、周辺装置に対し該周辺装置自身に対する調査報告処理を要求する調査要求コマンドとすることができる。ホスト装置は、調査要求コマンドの発行に伴い、調査報告指示内容を示す予め定められたフレームフォーマットを有するとともに当該フレームの予め定められたフィールドに周辺装置側トリガの発生報告指示が書き込まれた調査指示データを作成する調査指示データ作成手段と、作成された調査指示データを周辺装置に送信する調査指示データ送信手段を有するものとして構成できる。また、周辺装置は、該調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成する調査報告データ生成手段と、該調査報告データの予め定められたフィールドにトリガ発生報告情報を書き込むトリガ発生報告情報書き込み手段と、当該トリガ発生報告情報が書き込まれた調査報告データを応答情報としてホスト装置に送信する調査報告データ送信手段とを有するものとできる。   Next, the trigger report request command may be a survey request command for requesting the peripheral device to perform a survey report process on the peripheral device itself. The host apparatus has a predetermined frame format indicating the contents of the investigation report instruction, and the investigation instruction in which the generation report instruction of the peripheral device side trigger is written in a predetermined field of the frame when the investigation request command is issued It can be configured as having survey instruction data creating means for creating data and survey instruction data transmitting means for transmitting the created survey instruction data to the peripheral device. In addition, the peripheral device receives the survey instruction data and generates survey report data generating means for generating survey report data having a predetermined frame format, and trigger occurrence report information in a predetermined field of the survey report data Trigger occurrence report information writing means for writing, and investigation report data transmitting means for transmitting the investigation report data in which the trigger occurrence report information is written to the host device as response information.

上記のように構成すると、ホスト装置側で周辺装置に調査要求コマンドを自発的に発行し、さらに、該調査要求コマンドの発行に続いて、所定のフレームフォーマットを有した調査指示データの予め定められたフィールドに周辺装置側トリガの発生報告指示を書き込んで、周辺装置に送り付けるようにする。そして、周辺装置側では、該調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成するとともに、該調査報告データの予め定められたフィールドにトリガ発生報告情報を書き込んでホスト装置側に送り返す。これにより、種々の報告事項が規定される調査報告処理において、周辺装置側トリガの発生報告指示を周辺装置側に適確に伝えることができ、また、周辺装置側での周辺装置側トリガを調査報告データ中のトリガ発生報告情報により確実に把握することができる。   When configured as described above, the host apparatus side voluntarily issues a survey request command to the peripheral device, and, following the issuance of the survey request command, survey instruction data having a predetermined frame format is predetermined. In this field, a peripheral device side trigger generation report instruction is written and sent to the peripheral device. The peripheral device receives the survey instruction data, generates survey report data having a predetermined frame format, and writes trigger occurrence report information in a predetermined field of the survey report data Send it back to the device. As a result, in the investigation report process in which various report items are defined, the peripheral device side trigger generation report instruction can be accurately transmitted to the peripheral device side, and the peripheral device side trigger on the peripheral device side is investigated. The trigger occurrence report information in the report data can be reliably grasped.

調査指示データ作成手段は調査指示データにおいて、格納するべき主格納情報として発生報告指示情報以外の情報が格納されるよう主通信プロトコルに規定されたフィールドに、発生報告指示情報を主格納情報に兼用させる形で書き込むものとすることができる。主通信プロトコルがSCSIプロトコルのごとく既製の通信規格に従う場合などにおいては、本発明において初めて発生する技術概念である(トリガ)発生報告指示情報用の専用フィールドを、調査指示データのフレーム内に新たに設定できる余地が存在しない場合がある。このとき、上記のように本来発生報告指示情報とは全く別の主格納情報用に用意されたフィールドに、発生報告指示情報(を含む付加情報)を当該主格納情報に兼用させる形で書き込むようにすれば、上記のごとく専用フィールドを設ける余裕がない場合でも発生報告指示情報を問題なく書き込むことができる。   The investigation instruction data creation means uses the occurrence report instruction information as the main storage information in the field defined in the main communication protocol so that information other than the occurrence report instruction information is stored as the main storage information to be stored in the investigation instruction data. It can be written in the form of When the main communication protocol conforms to an off-the-shelf communication standard such as the SCSI protocol, a dedicated field for (trigger) occurrence report instruction information, which is a technical concept generated for the first time in the present invention, is newly added in the frame of the investigation instruction data. There may be no room for setting. At this time, as described above, the occurrence report instruction information (including additional information) is written in the field prepared for the main storage information that is completely different from the original occurrence report instruction information in a form that is also used as the main storage information. By doing so, even when there is no room for providing a dedicated field as described above, the occurrence report instruction information can be written without any problem.

例えば、周辺装置が、少なくともデータの読出しに係るデータアクセスが可能とされた記憶媒体が内蔵されるか又は着脱可能に装着され、通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成される場合、調査指示データにおいて、主通信プロトコルに従い記憶媒体に対するデータの読み出し又は書き込みに係る通信イベントを実行する際に、該読み出し処理又は書き込み処理に割り当てられる当該記憶媒体上のメモリ領域のアロケーション長を設定するためのフィールドをアロケーション長設定フィールドとして確保することができる。この場合、該アロケーション長設定フィールドにおいてアロケーション長情報を主格納情報とする形で、該アロケーション長情報に兼用される発生報告指示情報を書き込むことができる。このようにすると、アロケーション長情報に兼用させる形で、主通信プロトコルに規定されていない固有の付加情報を周辺装置側へ送信することが可能となり、周辺装置側トリガの発生報告指示情報を周辺装置側へ問題なく送信できる。   For example, the peripheral device is configured as a storage device in which a storage medium capable of at least data access relating to data reading is incorporated or detachably mounted, and data access to the storage medium is performed by a communication event When performing a communication event related to reading or writing of data with respect to the storage medium in accordance with the main communication protocol in the survey instruction data, the allocation length of the memory area on the storage medium assigned to the reading process or the writing process Can be secured as an allocation length setting field. In this case, the occurrence report instruction information that is also used as the allocation length information can be written in the allocation length setting field, with the allocation length information as the main storage information. In this way, it is possible to transmit specific additional information not defined in the main communication protocol to the peripheral device side in a form that is also used as allocation length information, and the peripheral device side trigger generation report instruction information is transmitted to the peripheral device. Can be sent to the other side without problems

主通信プロトコルにおいて、アロケーション長設定フィールドのサイズが一定ビット長に定められる場合、アロケーション長設定フィールドに上記付加情報を書き込む空き領域を形成するために、次のような巧妙な方法が存在する。すなわち、アロケーション長として設定可能な最大値をバイト単位にて表わしたときのビット数を、アロケーション長設定フィールドの総ビット数未満に設定する。そして、上記最大値を超えるアロケーション長がアロケーション長設定フィールドに記述された場合には、記述されたアロケーション長値とは無関係に上記最大値をアロケーション長の実設定値として定める。そして、該最大値を超える冗長なアロケーション長記述値に一義的に対応付ける形で、発生報告指示情報を含む、異なる付加情報内容を定義することができる。例えば、SCSIプロトコルにおける後述のInquiryコマンドのCDBを調査指示データとして使用する場合、このCDBはSCSIプロトコル制御用に割り振られたフィールドばかりからなり、ユーザーが新たなデータを書き込むための余裕は一見全く存在しないように見える。しかし、本来はSCSIプロトコルの主格納情報であるアロケーション長の設定フィールドにおいて、上記のごとくアロケーション長として設定可能な最大値をアロケーション長設定フィールドの総ビット数未満に設定することで、該最大値を超える冗長なアロケーション長の設定記述値に、発生報告指示情報を含む付加情報としての意味をもたせることができる。   In the main communication protocol, when the size of the allocation length setting field is set to a certain bit length, the following clever method exists to form a free area in which the additional information is written in the allocation length setting field. That is, the number of bits when the maximum value that can be set as the allocation length is expressed in bytes is set to be less than the total number of bits in the allocation length setting field. If an allocation length exceeding the maximum value is described in the allocation length setting field, the maximum value is determined as the actual setting value of the allocation length regardless of the described allocation length value. Then, different additional information contents including the occurrence report instruction information can be defined in a manner that uniquely associates with the redundant allocation length description value exceeding the maximum value. For example, when a CDB of an inquiry command (to be described later) in the SCSI protocol is used as the survey instruction data, this CDB consists only of fields allocated for SCSI protocol control, and there is no room for the user to write new data. Looks like not. However, by setting the maximum value that can be set as the allocation length as described above in the allocation length setting field that is originally the main storage information of the SCSI protocol, the maximum value is set to be less than the total number of bits of the allocation length setting field. It is possible to give a meaning as additional information including occurrence report instruction information to the setting description value of the redundant allocation length exceeding.

次に、SCSIプロトコル等の場合、調査要求コマンドにはいくつかの種別が用意されている場合がある。この場合、どのような種別の調査要求コマンドをトリガ報告要求コマンドとして使用するかが問題になる場合がある。例えば、周辺装置が、データの読出し及び書込の双方に係るデータアクセスが可能とされた記憶媒体が着脱可能に装着され、通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成される場合、周辺装置には、記憶媒体の交換がなされた場合に当該記憶媒体の交換をホスト装置に通知するための交換通知情報を保持する交換通知情報保持手段と、ホスト装置から予め定められた第一種コマンドを受信した場合には、該コマンドの実行後に交換通知情報保持手段に保持されている交換通知情報をクリアし、同じく第一種コマンド以外の第二種コマンドを受信した場合は、該コマンドの実行後においても交換通知情報保持手段による交換通知情報の保持状態を保留する交換通知情報保持制御手段とが設けられる場合がある。この場合、トリガ報告要求コマンドとして使用する調査要求コマンドとしては、第二種コマンドの使用が強く推奨される。なぜならば、このような目的に第一種コマンドを使用した場合、交換通知情報を特に必要としないトリガ報告要求イベントであるにも拘わらず、処理終了時には交換通知情報がクリアされてしまい、ホスト装置側でこの交換通知情報を本来必要とするシステムコンポーネント(例えばファイルシステム)が、これを取得できなくなってしまう状況が発生し、記憶媒体の記憶内容が破壊されたりするといったトラブルにつながる場合があるためである。   Next, in the case of the SCSI protocol or the like, there are cases where some types of investigation request commands are prepared. In this case, what type of investigation request command is used as a trigger report request command may be a problem. For example, the peripheral device is configured as a storage device in which a storage medium capable of data access for both reading and writing of data is detachably mounted and data access to the storage medium is performed by a communication event. When the storage medium is replaced, the peripheral device includes a replacement notification information holding unit that holds replacement notification information for notifying the host device of the replacement of the storage medium, When the first type command is received, the exchange notification information held in the exchange notification information holding unit is cleared after the execution of the command, and when the second type command other than the first type command is received, In some cases, after the execution of the command, there is provided an exchange notification information holding control means for holding the exchange notification information holding state by the exchange notification information holding means. That. In this case, the use of the second type command is strongly recommended as the investigation request command used as the trigger report request command. This is because when the first type command is used for such a purpose, the exchange notification information is cleared at the end of the process, even though it is a trigger report request event that does not particularly require the exchange notification information. The system component (for example, a file system) that originally needs the exchange notification information on the side may not be able to obtain it, which may lead to troubles such as the storage contents of the storage medium being destroyed. It is.

調査要求コマンドとしては、例えば、周辺装置に対し該周辺装置自身の構成及び属性を特定する情報である構成/属性特定情報の報告を指示する構成/属性調査要求コマンドを採用することができる。このような周辺装置自身の構成及び属性の特定に係る通信イベントは、主通信プロトコル上では、例えばどのような種別の周辺装置(デバイス:SCSIの場合、ターゲット)が接続されているのかを、装置立ち上げ時に認識するために実行する目的で使用されることが多いが、これを本発明では、周辺装置における周辺装置側トリガの発生を監視用に、装置立ち上げ後においても所定のタイミングで繰り返し発行する。該構成/属性調査要求コマンドにより規定される通信イベントは、本来的には(装置使用中においては不変となる)周辺装置のいわば「素性」を認識することのみが目的であり、例えば、コマンドの発生の前後で記憶媒体の交換があった場合において、交換通知情報の保持状態等に不要な影響を与えるべきではないので、上記の第二種コマンドとして用意することが望ましいのである。これを周辺装置側トリガの発生監視用に流用することで、該コマンドを何度繰り返し発行しても交換通知情報の保持状態には影響が及ばず、前述のトラブルを防ぐことができる。   As the investigation request command, for example, a configuration / attribute investigation request command for instructing a peripheral device to report configuration / attribute identification information that is information for identifying the configuration and attributes of the peripheral device itself can be employed. Such a communication event related to specifying the configuration and attributes of the peripheral device itself indicates, for example, what type of peripheral device (device: target in the case of SCSI) is connected on the main communication protocol. In many cases, this is used for the purpose of executing recognition at the time of start-up. In the present invention, this is repeated at a predetermined timing even after device start-up for monitoring the generation of a peripheral device-side trigger in the peripheral device. Issue. The communication event defined by the configuration / attribute investigation request command is originally intended only to recognize the so-called “feature” of the peripheral device (which remains unchanged when the device is in use). When the storage medium is exchanged before and after the occurrence, it should not be unnecessarily affected in the exchange notification information holding state or the like, so it is desirable to prepare it as the second type command. By using this for monitoring the generation of the peripheral device side trigger, no matter how many times the command is repeatedly issued, the holding state of the exchange notification information is not affected, and the above-mentioned trouble can be prevented.

主通信プロトコルがSCSIプロトコルである場合、上記の調査要求コマンドとしてInquiry(照会)コマンドを使用することが望ましい。この場合、ホスト装置(イニシエータ)から周辺装置(ターゲット)に送られる調査指示データは、Inquiryコマンドの詳細内容を記述する、CDB(Command Descriptor Block:コマンド記述ブロック、コマンド毎にフレーム形式がSCSIプロトコルにて詳細に規定されている)であり、周辺装置(ターゲット)からホスト装置(イニシエータ)に返される調査報告データはInquiryデータ(フレーム形式がSCSIプロトコルにて詳細に規定されている)である。表1はInquiryコマンドに対応するCDBの形式を示すものである。   When the main communication protocol is the SCSI protocol, it is desirable to use an inquiry command as the above-mentioned investigation request command. In this case, the investigation instruction data sent from the host device (initiator) to the peripheral device (target) describes the detailed contents of the inquiry command, CDB (Command Descriptor Block: command description block, and the frame format for each command conforms to the SCSI protocol. The investigation report data returned from the peripheral device (target) to the host device (initiator) is inquiry data (the frame format is defined in detail by the SCSI protocol). Table 1 shows a CDB format corresponding to the inquiry command.

Figure 2007265299
Figure 2007265299

SCSIプロトコルでは、ホスト装置(イニシエータ)側で周辺装置(ターゲット)から返されるInquiryデータの種別を指定することができる。具体的には、Inquiryコマンドに対応するCDBには、EVPD(Enable Vital Product Data)と称されるフィールド(1ビット)と、ページコード(8ビット)と称されるフィールドが形成されている。表2に示すごとくEVPDフィールドに「0」が記述されているCDB(以下、CDB(0)と略記する)に対しては、Inquiryデータとして、表3に示すような、周辺装置の仕様に関係なく形式及び内容が共通に定められたスタンダードInquiryデータ(以下、S/Iデータと略称する)が返される。S/Iデータのうち、SCSIプロトコルによる通信制御に直接使用しない空き領域を、トリガ発生報告情報等、本発明特有の応答情報(以下、特有応答情報という)の記述フィールドとして使用することができる。   In the SCSI protocol, the type of inquiry data returned from the peripheral device (target) can be specified on the host device (initiator) side. Specifically, a field called EVPD (Enable Vital Product Data) (1 bit) and a field called page code (8 bits) are formed in the CDB corresponding to the inquiry command. As shown in Table 2, for a CDB in which “0” is described in the EVPD field (hereinafter abbreviated as CDB (0)), the inquiry data is related to the peripheral device specifications as shown in Table 3. Instead, standard inquiry data (hereinafter abbreviated as S / I data) whose format and contents are defined in common is returned. Of the S / I data, a free area that is not directly used for communication control by the SCSI protocol can be used as a description field of response information unique to the present invention (hereinafter referred to as unique response information) such as trigger generation report information.

Figure 2007265299
Figure 2007265299

Figure 2007265299
Figure 2007265299

例えば、S/Iデータでは、デバイスのベンダに固有の情報を記述するための一定長のフィールド(以下、ベンダ固有領域という)が設けられており、このフィールドに空き領域がある場合は、これを本発明特有の応答情報の記述フィールドとして使用することができる。また、ビット数は僅少であるが、次のような空き領域も、本発明特有の応答情報の記述フィールドとして利用することができる。すなわち、8ビットに設定された追加データ長フィールド(S/Iデータのバイト5以降のデータ長)は、S/Iデータにおけるデータフレーム長の上限から、最大データ長が8ビットに満たないことがある。この場合、追加データ長フィールドに上記最大データ長を超えるデータ長が指定される場合、追加データ長フィールドの記述内容によらず、最大データ長が指定されることとなる。その結果、最大データ長を超えるビット値の範囲は、実質的に特有応答情報を記述するための「空き領域」として活用できる。   For example, in the S / I data, a fixed-length field (hereinafter referred to as a vendor-specific area) for describing information specific to a device vendor is provided. If there is a free area in this field, It can be used as a description field for response information unique to the present invention. Although the number of bits is very small, the following free space can also be used as a description field for response information unique to the present invention. In other words, the additional data length field (data length after byte 5 of S / I data) set to 8 bits may have a maximum data length of less than 8 bits due to the upper limit of the data frame length in S / I data. is there. In this case, when a data length exceeding the maximum data length is specified in the additional data length field, the maximum data length is specified regardless of the description content of the additional data length field. As a result, a range of bit values exceeding the maximum data length can be utilized as a “free area” for describing the specific response information substantially.

一方、表4のごとく、EVPDフィールドに「1」が記述されているCDB(以下、CDB(1)と略記する)は、ホスト装置(イニシエータ)により詳細な、あるいはデバイス固有の情報を提供するための、表5のようなVPD(Vital Product Data)と称される特殊なInquiryデータが返される。   On the other hand, as shown in Table 4, a CDB in which “1” is described in the EVPD field (hereinafter abbreviated as CDB (1)) provides detailed or device-specific information to the host device (initiator). As shown in Table 5, special inquiry data called VPD (Vital Product Data) is returned.

Figure 2007265299
Figure 2007265299

Figure 2007265299
Figure 2007265299

VPDにはいくつかの種類が規定されており、どの種別のVPDを指定するかをCDBのページコードフィールドに記述する(具体的には、ページコードリスト(ページコード:00)、FRU ASCII情報(ページコード:01〜7F)、ユニットシリアル番号(ページコード:80)、動作モード定義(ページコード:81)、ASCII動作モード定義(ページコード:82)、及びベンダ固有の形式(ページコード:C0〜FF))。周辺装置はページコードフィールドで指定された種類のVDPを作成し、ホスト装置に返信する。特に、FRU ASCII情報形式及びASCII動作モード定義形式のVPDは、ページ長フィールドに続いて、必要なASCII情報を書き込むフィールドのデータ長のフィールドと、そのデータ長で指定されるASCII情報フィールドとが形成されるが、以降のフィールドはベンダ固有領域として、特有応答情報を記述するための「空き領域」として活用できる。例えば、ASCII動作モード定義形式のVPDにおいて、ASCII情報フィールドを、デバイスのバージョン情報などを記述するためのバイト数の小さい(例えば1〜3バイト)のフィールドとして定義すれば、ベンダ固有領域となる残りのフィールドの長さを比較的大きく確保することができ、ある程度サイズの大きい特有応答情報を書き込むことが可能となる。 The VPD are defined several types, or to specify the VPD of which type to describe (specifically page code field of the CDB, pages Listing (Page Code: 00 h), FRU ASCII information (page code: 01 h ~7F h), the unit serial number (page code: 80 h), the operation mode definition (page code: 81 h), ASCII operation mode definition (page code: 82 h), and vendor-specific format (page code: C0 h ~FF h)). The peripheral device creates a VDP of the type specified in the page code field and returns it to the host device. In particular, in the VPD in the FRU ASCII information format and the ASCII operation mode definition format, a data length field in which necessary ASCII information is written and an ASCII information field specified by the data length are formed following the page length field. However, the following fields can be used as a “free area” for describing unique response information as a vendor specific area. For example, in the ASCII operation mode definition format VPD, if the ASCII information field is defined as a field having a small number of bytes (for example, 1 to 3 bytes) for describing the version information of the device, the remaining vendor-specific area It is possible to ensure a relatively large field length, and to write specific response information that is somewhat large in size.

SCSIプロトコルでは、ターゲット(周辺装置)、あるいはこれに含まれる1又は複数のロジカルユニット(周辺装置が記憶装置である場合は、1又は複数の記憶媒体装着スロットである)上で事象や状態の変化が、ホスト装置(イニシエータ)の動作とは非同期に発生した場合、これを該イニシエータに通知するためのユニット・アテンション・コンディションを生成する機能が設けられている。周辺装置にて記憶媒体の交換が発生した場合、その交換通知情報が生成されるユニット・アテンション・コンディションに反映されることとなる。SCSIプロトコルでは、そのようなユニット・アテンション・コンディションを保留中の周辺装置に向けてInquiryコマンドが発行された場合、該周辺装置は保留中のユニット・アテンション・コンディションをクリアせずに(ただし、Copy Aborded(CA)状態の生成前に限る)、発行されたInquiryコマンドが実行される(Inquiryデータの作成・返信)。従って、トリガ発生報告情報など特有応答情報の返信要求イベントを起動する際にあっては、Inquiryコマンドを用いることで、記憶媒体の交換がなされた場合も、その交換通知情報を含むユニット・アテンション・コンディションが保持され、交換通知情報の喪失を防ぐことができる。Inquiryコマンドが前述の第二種コマンドに該当するものであることは明らかである。   In the SCSI protocol, a change in an event or a state on a target (peripheral device) or one or a plurality of logical units included therein (or one or a plurality of storage medium mounting slots when the peripheral device is a storage device). However, when the operation occurs asynchronously with the operation of the host device (initiator), a function is provided for generating a unit attention condition for notifying the initiator. When the storage medium is exchanged in the peripheral device, the exchange notification information is reflected in the generated unit attention condition. In the SCSI protocol, when an inquiry command is issued to a peripheral device that has such a unit attention condition pending, the peripheral device does not clear the pending unit attention condition (however, Copy The issued Inquiry command is executed (created / returned Inquiry data) only when the Aborted (CA) state is generated. Therefore, when the response request event of the specific response information such as the trigger occurrence report information is activated, even if the storage medium is exchanged by using the inquiry command, the unit attention including the exchange notification information is used. Conditions are maintained and loss of exchange notification information can be prevented. It is clear that the inquiry command corresponds to the above-described second type command.

なお、SCSIプロトコルでは、Request Senseコマンドと称される別の調査要求コマンドも使用が可能である。Request Senseコマンドは、周辺装置(ターゲット)に例えばエラー原因や種類などを報告するためのセンスデータを要求するコマンドであり、調査報告データとして該センスデータが規定フォーマットのフレームに記述されて返される。本発明においては、このセンスデータの空き領域を利用してトリガ発生報告情報など特有応答情報を書き込み、ホスト装置に返すことも原理的には可能である。しかし、SCSIプロトコルでは、SCSIプロトコルでは、ユニット・アテンション・コンディションを保留中の周辺装置に向けてRequest Senseコマンドが発行された場合、該周辺装置は保留中のユニット・アテンション・コンディションをクリアするように(ただし、Copy Aborded(CA)状態の生成前に限る)決められており、記憶媒体の交換がなされた場合に、その交換通知情報を含むユニット・アテンション・コンディションがクリアされ、交換通知情報が喪失する惧れがある。つまり、Request Senseコマンドは前述の第一種コマンドに該当するものである。   In the SCSI protocol, another investigation request command called a Request Sense command can also be used. The Request Sense command is a command for requesting sense data for reporting, for example, an error cause and type to a peripheral device (target), and the sense data is described and returned as a survey report data in a frame of a prescribed format. In the present invention, it is also possible in principle to write specific response information such as trigger occurrence report information using the empty space of the sense data and return it to the host device. However, in the SCSI protocol, in the SCSI protocol, when a Request Sense command is issued to a peripheral device that is holding a unit attention condition, the peripheral device is configured to clear the pending unit attention condition. (However, only before the creation of the Copy Aborted (CA) state) When a storage medium is replaced, the unit attention condition including the replacement notification information is cleared and the replacement notification information is lost. There is a fear. That is, the Request Sense command corresponds to the first type command described above.

(実施形態1)
以下、適宜図面を参照して本発明の第1の実施形態に係る通信システム1について説明する。図1は通信システム1に適用されるマルチリーダライタ2(記憶装置:周辺装置の一例)の斜視図、図2はマルチリーダライタ2の概略構成を示すブロック図、図6は通信システム1に適用されるPC3(ホスト装置の一例)の概略構成を示すブロック図である。なお、以下に説明する通信システム1の構成は、本発明を具現化するための単なる一例であり、本発明の要旨を変更しない範囲で構成を適宜変更できることは当然である。
(Embodiment 1)
The communication system 1 according to the first embodiment of the present invention will be described below with reference to the drawings as appropriate. 1 is a perspective view of a multi-reader / writer 2 (storage device: an example of a peripheral device) applied to the communication system 1, FIG. 2 is a block diagram showing a schematic configuration of the multi-reader / writer 2, and FIG. It is a block diagram which shows schematic structure of PC3 (an example of a host apparatus) performed. Note that the configuration of the communication system 1 described below is merely an example for embodying the present invention, and it is natural that the configuration can be appropriately changed without departing from the gist of the present invention.

図1(a)に示すように、マルチリーダライタ2は、その前面に着脱可能な記憶媒体として、第1メモリーカード11(例えばCF)を挿入するための第1スロット16と、第2メモリーカード12(例えばSM)を挿入するための第2スロット17と、第3メモリーカード13(例えばMS)を挿入するための第3スロット18と、第4メモリーカード14(例えばSD)を挿入するための第4スロット19とを備えている。なお、本実施形態では、周辺装置としてマルチリーダライタ2を例示して説明するが、シングルスロットタイプのリーダライタにも適用可能である。また、CFやSMなどのメモリーカードに代えてCD−ROM、DVD−ROMあるいはリムーバブルハードディスクなどのディスク記録メディアとする場合は、該ディスク記録メディアを単数あるいは複数着脱可能に挿入可能な挿入部を備えてなる、いわゆるチェンジャー型ドライブ周辺装置となる。該周辺装置を備えて構成された通信システムにも本発明は適用可能である。   As shown in FIG. 1A, the multi-reader / writer 2 includes a first slot 16 for inserting a first memory card 11 (for example, CF) as a removable storage medium on the front surface thereof, and a second memory card. A second slot 17 for inserting 12 (for example, SM), a third slot 18 for inserting a third memory card 13 (for example, MS), and a fourth memory card 14 (for example, SD). And a fourth slot 19. In the present embodiment, the multi-reader / writer 2 is described as an example of the peripheral device, but the present invention can also be applied to a single slot type reader / writer. Also, when a disk recording medium such as a CD-ROM, a DVD-ROM or a removable hard disk is used instead of a memory card such as CF or SM, an insertion section is provided that allows the disk recording medium to be detachably inserted. This is a so-called changer-type drive peripheral device. The present invention is also applicable to a communication system configured with the peripheral device.

マルチリーダライタ2はUSB/SCSI型周辺機器として構成され、その背面には、図1B及び図2に示すように、USBケーブル25(図2参照)を接続するためのUSB端子24が設けられている。また、本実施形態では、主通信プロトコルとしてSCSI−2のプロトコルが採用されているものとする。図2に示すように、マルチリーダライタ2は、その内部に、各構成部を制御するCPU27と、制御プログラムや種々のデータ等を格納するROM28と、CPU27による演算の作業領域となるRAM29と、入出力制御LSI31と、USBチップ32とを備え、これらがバス33を介して相互にデータ転送が可能なように接続されている。マルチリーダライタ2は、該マルチリーダライタ2が接続されるPC3との間で、SCSIプロトコルに従うデータ通信を行なう。   The multi-reader / writer 2 is configured as a USB / SCSI type peripheral device, and a USB terminal 24 for connecting a USB cable 25 (see FIG. 2) is provided on the back of the multi-reader / writer 2 as shown in FIG. 1B and FIG. Yes. In this embodiment, it is assumed that the SCSI-2 protocol is adopted as the main communication protocol. As shown in FIG. 2, the multi-reader / writer 2 includes therein a CPU 27 that controls each component, a ROM 28 that stores a control program, various data, and the like, and a RAM 29 that is a work area for operations by the CPU 27. An input / output control LSI 31 and a USB chip 32 are provided, and these are connected via a bus 33 so that data can be transferred to each other. The multi-reader / writer 2 performs data communication according to the SCSI protocol with the PC 3 to which the multi-reader / writer 2 is connected.

具体的には、ROM28には、SCSIプロトコルに基づいて作成された通信制御プログラムと、PC3から送信されたデータ(CDB)を解析するために用いられる解析データのテーブルリストが格納され、CPU27は、リーダライタ2がSCSI対応機器のターゲットとして機能するための、受信したSCSIコマンドに対応した通信イベントの実行制御処理を行なう。また、各スロット16〜19に着脱可能に装着される各第1〜第4メモリーカード11〜14は、例えば、コンパクトフラッシュ(CF:登録商標)、スマートメディア(SM:登録商標)、メモリースティック(MS:登録商標)、SDメモリーカード(SD:登録商標)など、PCによるデータの書き込み、書き換え、消去、読出し、メディア装着確認等のデータアクセスが可能なフラッシュメモリを搭載したカード型記憶メディアである。なお、記憶デバイスとしては、CD−ROM、DVD−ROM、リムーバブルハードディスク等の読出し専用の記憶媒体からデータの読出しを行なうドライブ装置を用いることもできる。   Specifically, the ROM 28 stores a communication control program created based on the SCSI protocol and a table list of analysis data used for analyzing data (CDB) transmitted from the PC 3. In order for the reader / writer 2 to function as a target of a SCSI compatible device, a communication event execution control process corresponding to the received SCSI command is performed. The first to fourth memory cards 11 to 14 that are detachably mounted in the slots 16 to 19 are, for example, compact flash (CF: registered trademark), smart media (SM: registered trademark), memory stick (MS). : Registered trademark), SD memory card (SD: registered trademark), etc., are card-type storage media equipped with a flash memory capable of data access such as data writing, rewriting, erasing, reading, and media loading confirmation by a PC. As the storage device, a drive device that reads data from a read-only storage medium such as a CD-ROM, a DVD-ROM, or a removable hard disk may be used.

SCSIプロトコルに従い、PC3はホスト装置として通信イベントの起動決定権が与えられ、該PC3(ホスト装置:イニシエータ)に接続されるマルチリーダライタ2は、PC3(ホスト装置)の通信対象(ターゲット)となる。そして、通信イベントを実行命令するためのSCSIコマンドがPC3(ホスト装置)からマルチリーダライタ2(周辺装置)に向けて順次発行される一方、発行されたコマンドを受領したマルチリーダライタ2(周辺装置)が当該SCSIコマンドに対応するデータ処理を逐次実行し、その実行結果に応じた応答情報をホスト装置側に返信する。また、SCSIコマンドの発行方向は、PC3(ホスト装置)側からマルチリーダライタ2(周辺装置)側への一方向に規制されている。   In accordance with the SCSI protocol, the PC 3 is given the right to determine a communication event as a host device, and the multi-reader / writer 2 connected to the PC 3 (host device: initiator) becomes a communication target (target) of the PC 3 (host device). . SCSI commands for instructing execution of communication events are sequentially issued from the PC 3 (host device) to the multi-reader / writer 2 (peripheral device), while the multi-reader / writer 2 (peripheral device) that has received the issued command. ) Sequentially executes data processing corresponding to the SCSI command, and returns response information corresponding to the execution result to the host device side. Further, the issuing direction of the SCSI command is restricted to one direction from the PC 3 (host device) side to the multi-reader / writer 2 (peripheral device) side.

次に、マルチリーダライタ2には、予め定められた内容の対象通信イベントの起動をホスト装置に促すための周辺装置側トリガを、該周辺装置側でのユーザー操作に基づいて発生させる周辺装置側トリガ発生手段の機能が具備されている。具体的には、周辺装置側トリガ発生手段を構成する手動操作部としてボタン22が設けられている。ボタン22を押すことで、図1Cに示すように、スイッチ出力信号のレベルが変化する(本実施形態では、Hレベルがスイッチ押圧状態に対応する)。このスイッチ出力信号を周辺装置側トリガ信号として利用できる。この場合、周辺装置側トリガ信号としては、ボタン22の押圧に伴うスイッチ出力信号のレベル変化エッジを検出してもよいし、スイッチ押圧状態に対応する信号レベル(ここでは、Hレベル)を検出してもよい。該周辺装置側トリガ信号は、図1Aにおいて入力制御LSI30に入力される。   Next, the multi-reader / writer 2 generates a peripheral device-side trigger for prompting the host device to start a target communication event having a predetermined content based on a user operation on the peripheral device side. A function of trigger generation means is provided. Specifically, a button 22 is provided as a manual operation unit constituting the peripheral device side trigger generating means. By pressing the button 22, the level of the switch output signal changes as shown in FIG. 1C (in this embodiment, the H level corresponds to the switch pressing state). This switch output signal can be used as a peripheral device side trigger signal. In this case, as the trigger signal on the peripheral device side, a level change edge of the switch output signal accompanying the pressing of the button 22 may be detected, or a signal level (here, H level) corresponding to the switch pressing state is detected. May be. The peripheral device side trigger signal is input to the input control LSI 30 in FIG. 1A.

例えばレベル変化エッジを利用する場合は、入力制御LSI30内に、レベル変化エッジを検出してトリガ検出データ信号をデータバス上に出力するトリガ検出データ信号発生回路を設ける。他方、スイッチ押圧状態に対応する信号レベルを利用する場合は、該信号レベルを保持するラッチ回路を設け、そのラッチ保持出力をトリガ検出データ信号としてデータバス上に出力するようにする。データバス上のトリガ検出データ信号は、後述のInquiryコマンド実行時に参照され、トリガ検出データが「トリガあり」の状態を示していれば作成されるInquiryデータに「トリガあり」の内容で書き込まれる。つまり、ボタン22(手動操作部)が操作されているか否かの検出は、PC3からの指示に従って行われる。なお、Inquiryデータ作成後は、トリガ検出データ信号はリセットされる。また、ボタン22に対応したスイッチと、信号電源Vccとが、周辺装置側トリガを発生させる操作信号発生部を構成している。   For example, when a level change edge is used, a trigger detection data signal generation circuit that detects a level change edge and outputs a trigger detection data signal on the data bus is provided in the input control LSI 30. On the other hand, when the signal level corresponding to the switch pressing state is used, a latch circuit for holding the signal level is provided, and the latch holding output is output on the data bus as a trigger detection data signal. The trigger detection data signal on the data bus is referred to when an inquiry command (to be described later) is executed. If the trigger detection data indicates a “triggered” state, it is written to the created inquiry data with the contents of “triggered”. That is, detection of whether or not the button 22 (manual operation unit) is operated is performed according to an instruction from the PC 3. Note that the trigger detection data signal is reset after the inquiry data is created. In addition, the switch corresponding to the button 22 and the signal power source Vcc constitute an operation signal generation unit that generates a peripheral device side trigger.

次に、USBチップ32には、各外部メモリ入出力制御部51〜54に対応して設けられたコマンド・データ・ステータス送受信部(以下、単に「送受信部」という;転送要素送受信部)41〜44と、USB端子(通信バス接続端子)24に、USBハブ回路315を介して接続されたUSBプロトコルエンジン(プロトコルエンジン部)321と、転送通信処理の制御を司るUSBコントロール部(制御指令部)331とが集積されてなる。   Next, the USB chip 32 has command / data / status transmission / reception units (hereinafter simply referred to as “transmission / reception units”; transfer element transmission / reception units) 41 to 41 provided corresponding to the external memory input / output control units 51 to 54. 44, a USB protocol engine (protocol engine unit) 321 connected to the USB terminal (communication bus connection terminal) 24 via a USB hub circuit 315, and a USB control unit (control command unit) that controls the transfer communication processing. 331 are integrated.

ここで、USBプロトコルエンジン(プロトコルエンジン部)321と、USBコントロール部(制御指令部)331とで構成される部分が通信制御部に該当し、また、この通信制御部と、USB端子(通信バス接続端子)24とで構成される部分がシリアル通信部に該当する。   Here, a portion composed of a USB protocol engine (protocol engine unit) 321 and a USB control unit (control command unit) 331 corresponds to the communication control unit, and this communication control unit and a USB terminal (communication bus) The portion composed of the connection terminal 24 corresponds to the serial communication unit.

USBコントロール部331は、USBプロトコルエンジン321にFIFOメモリからなる制御用の双方向エンドポイントを介して接続されている。また、それぞれの送受信部341〜344は、USBプロトコルエンジン321に対し、FIFOメモリからなるUSBプロトコルエンジン321への入力用エンドポイントと、FIFOメモリからなるUSBプロトコルエンジン321からの出力用エンドポイントとを介して入出力経路が分離された形で接続されている。   The USB control unit 331 is connected to the USB protocol engine 321 via a bidirectional endpoint for control including a FIFO memory. Further, each of the transmission / reception units 341 to 344 sends an input endpoint to the USB protocol engine 321 composed of a FIFO memory and an output endpoint from the USB protocol engine 321 composed of a FIFO memory to the USB protocol engine 321. The input / output paths are connected in a separated manner.

USBプロトコルエンジン321とUSBコントロール部331とで構成される通信制御部は、それぞれ、PC側から、対象となる送受信部341〜344の特定情報と、該送受信部341〜344に対応するエンドポイントの特定情報とを受信して、各送受信部341〜344をターゲットデバイスとしてポーリングすることにより、データアクセス先となる外部メモリ入出力制御部51〜54とデータ送受信の方向とを特定する。なお、当然のことであるが、ターゲットデバイスとなる送受信部341〜344側からホスト装置であるPC3を逆ポーリングすることは、USBプロトコルでは許されていない。   The communication control unit composed of the USB protocol engine 321 and the USB control unit 331 respectively specifies the specific information of the target transmission / reception units 341 to 344 and the endpoints corresponding to the transmission / reception units 341 to 344 from the PC side. By receiving the specific information and polling each of the transmission / reception units 341 to 344 as a target device, the external memory input / output control units 51 to 54 serving as data access destinations and the direction of data transmission / reception are specified. As a matter of course, reverse polling of the PC 3 as the host device from the transmission / reception units 341 to 344 serving as the target device is not permitted in the USB protocol.

送受信部(転送要素送受信部)41〜44は、USBプロトコルエンジン321との間でSCSIプロトコルに従う送受信するものである。ここで、転送要素とは、PCとの間でUSBバスを介してやり取りされる、通信イベントの内容を特定するコマンド(SCSIコマンド)と、通信イベント処理実行に対応して周辺装置側から返信される応答情報(ステータス)とを含む(SCSIコマンドに特定された処理内容が、メモリーカードに記憶されたデータの送受信に関係するデータアクセス処理であった場合は、そのデータも転送要素となる。   The transmission / reception units (transfer element transmission / reception units) 41 to 44 perform transmission / reception with the USB protocol engine 321 according to the SCSI protocol. Here, the transfer element is a command (SCSI command) for specifying the contents of a communication event exchanged with the PC via the USB bus, and is returned from the peripheral device side corresponding to the execution of the communication event process. If the processing content specified in the SCSI command is data access processing related to transmission / reception of data stored in the memory card, the data is also a transfer element.

また、送受信部341〜344は、図3に示すように、コントロールレジスタ81(図4参照)、ステータスレジスタ82(図5参照)、SCSIコマンドバッファ83、SCSIステータスバッファ84、SCSIデータDMAアドレスレジスタ85、SCSIデータDMAカウントレジスタ86を有する。これらの詳細については後述する。   As shown in FIG. 3, the transmission / reception units 341 to 344 have a control register 81 (see FIG. 4), a status register 82 (see FIG. 5), a SCSI command buffer 83, a SCSI status buffer 84, and a SCSI data DMA address register 85. And a SCSI data DMA count register 86. Details of these will be described later.

CPU27は、対象となる送受信部341〜344が受信したSCSIコマンドを解析するコマンド解析ステップと、該SCSIコマンドに特定された内容の通信イベントを、対象となる外部メモリ入出力制御部51〜54(つまり、リーダライタ2をターゲットとした場合、それに含まれている複数のロジカルユニット)との間で行なうイベント実行ステップと、ステータスを送受信部341〜344に送信させるステータス送信ステップと、をこの順序で実行する。   The CPU 27 analyzes a command analysis step for analyzing the SCSI command received by the target transmission / reception units 341 to 344 and the communication event having the content specified by the SCSI command into the target external memory input / output control units 51 to 54 ( That is, when the reader / writer 2 is targeted, an event execution step performed with a plurality of logical units included in the reader / writer 2 and a status transmission step for transmitting the status to the transmission / reception units 341 to 344 in this order. Execute.

マルチリーダライタ2では、挿入されたメモリーカードに対してデータの読み書きを行なう場合は、該メモリーカードからデータを読み出すために使用するメモリ領域あるいは該メモリーカードにデータを記憶するために使用するメモリ領域の割り当てが行われる。この割り当てられるメモリ領域のデータ長はアロケーション長と呼ばれている。一般に、該アロケーション長はマルチリーダライタ2にアクセスするPC3からの指定されたデータ長に設定されるが、本実施形態では、マルチリーダライタ2で設定可能なアロケーション長の最大値が、PC3側から指定し得る最大数値未満に設定されている。   In the multi-reader / writer 2, when reading / writing data from / to the inserted memory card, a memory area used for reading data from the memory card or a memory area used for storing data in the memory card Is assigned. The data length of the allocated memory area is called an allocation length. In general, the allocation length is set to a specified data length from the PC 3 that accesses the multi-reader / writer 2, but in this embodiment, the maximum value of the allocation length that can be set by the multi-reader / writer 2 is from the PC 3 side. It is set to less than the maximum value that can be specified.

PC3は、図6に示すように、各構成部を制御するCPU41と、ROM42と、RAM43と、各種ソフトウェアプログラムやデータが格納されたHDD44と、ビデオコントロールLSI45と、USBチップ46と、ビデオ端子47と、複数の入出力ポートを有するUSB端子48などを備え、これらがバス100を介して相互にデータ転送が可能なように接続されている。これら各部はいわゆるマザーボードと呼ばれるメイン制御基板に一体的に組み込まれている。ビデオ端子47にはビデオケーブルを介してディスプレイ56が接続されている。USB端子48はUSBハブ機能を有する。このUSB端子48には、キーボード57及びマウス58等の入力手段が接続されており、さらに、マルチリーダライタ2が接続されている。   As shown in FIG. 6, the PC 3 includes a CPU 41 that controls each component, a ROM 42, a RAM 43, an HDD 44 that stores various software programs and data, a video control LSI 45, a USB chip 46, and a video terminal 47. And a USB terminal 48 having a plurality of input / output ports, which are connected to each other via the bus 100 so that data can be transferred to each other. These parts are integrated into a main control board called a so-called mother board. A display 56 is connected to the video terminal 47 via a video cable. The USB terminal 48 has a USB hub function. Input means such as a keyboard 57 and a mouse 58 are connected to the USB terminal 48, and the multi-reader / writer 2 is further connected.

ROM42には、マルチリーダライタ2へ送信されるデータであって、マルチリーダライタ2のCPU27に所定の処理を実行させる指示データが格納されている。該指示データはテーブルリスト化された状態でHDD44又はROM42に格納されている。また、HDD44のプログラム格納領域には、PC3のオペレーションシステムであるWindows2000(登録商標)のSP3(以下「WIN2000」と称する)や、マルチリーダライタ2へのデータの書き込み及び読み出しを可能とするためのR/Wアプリケーションなどのソフトウェアプログラムが格納されている。これらソフトウェアプログラムがCPU41によって読み出されて所定の演算処理がなされることにより、各アプリケーションがPC3において動作可能となる。また、上記プログラム格納領域には、マルチリーダライタ2との間でSCSIプロトコルに従うデータ通信プログラムが格納されている。本実施形態では、WIN2000が搭載されたPC3を例示して説明するが、Linuxシリーズ、MacOSシリーズなどのOSが搭載されたものであってもよい。もちろん、Windows2000のSP3をSP4や、WindowsXP(登録商標)に代替することも可能である。   The ROM 42 stores instruction data that is transmitted to the multi-reader / writer 2 and causes the CPU 27 of the multi-reader / writer 2 to execute predetermined processing. The instruction data is stored in the HDD 44 or the ROM 42 in the form of a table list. In addition, in the program storage area of the HDD 44, it is possible to write and read data to / from the Windows 3 (registered trademark) SP3 (hereinafter referred to as “WIN2000”), which is an operation system of the PC 3, and the multi-reader / writer 2. A software program such as an R / W application is stored. These software programs are read by the CPU 41 and subjected to predetermined calculation processing, whereby each application can operate on the PC 3. The program storage area stores a data communication program according to the SCSI protocol with the multi reader / writer 2. In this embodiment, the PC 3 on which WIN2000 is installed will be described as an example. However, an OS such as Linux series or MacOS series may be installed. Of course, SP3 of Windows 2000 can be replaced with SP4 or Windows XP (registered trademark).

上記R/Wアプリケーション、PC3側のデータ通信プログラム及びリーダライタ2側の制御プログラムは、互いに協働して、以下の各手段を機能的に実現する処理を行なう。
・トリガ報告要求コマンド発行手段:PC3(ホスト装置)側のR/Wアプリケーションにより機能実現され、リーダライタ2(周辺装置)においてボタン(手動操作部)3が操作されるに伴い発生する周辺装置側トリガを監視するために、SCSIプロトコル(主通信プロトコル)に従い、トリガ発生報告情報を応答情報として要求するためのトリガ報告要求コマンドを、Inquiryコマンド、具体的には前述のCDB(1)を用いたInquiryコマンド(以下、Inq(1)コマンドという)として、リーダライタ2(周辺装置)に向けて発行する。
・トリガ発生報告情報返信手段:リーダライタ2側の制御プログラム(ROM28内)により機能実現され、周辺装置側トリガの発生の有無を反映したトリガ発生報告情報を応答情報としてPC3(ホスト装置)にSCSIプロトコルに従い返信する。
The R / W application, the data communication program on the PC 3 side, and the control program on the reader / writer 2 side cooperate with each other to perform processing for functionally realizing the following means.
Trigger report request command issuing means: Peripheral device side that is realized by the R / W application on the PC 3 (host device) side and that occurs when the button (manual operation unit) 3 is operated in the reader / writer 2 (peripheral device) In order to monitor the trigger, according to the SCSI protocol (main communication protocol), a trigger report request command for requesting trigger generation report information as response information is an inquiry command, specifically, the above-mentioned CDB (1) is used. It is issued to the reader / writer 2 (peripheral device) as an inquiry command (hereinafter referred to as an Inq (1) command).
Trigger occurrence report information return means: The function is realized by the control program (in the ROM 28) on the reader / writer 2 side, and the trigger occurrence report information reflecting the presence or absence of the trigger on the peripheral device side is sent to the PC 3 (host device) as response information to the SCSI. Reply according to protocol.

・報告情報受領手段:R/Wアプリケーションにより機能実現され、トリガ発生報告情報をリーダライタ2から受領する。
・対象通信イベント起動手段:R/Wアプリケーションにより機能実現され、受け取ったトリガ発生報告情報の内容に基づいて周辺装置側トリガの有無を判定し、該周辺装置側トリガがありと判定された場合に、対象通信イベント、具体的には、リーダライタ2の装着されたメモリーカード11〜14に格納されたデータファイルを読み出して、PC3のHDD44(図6)の指定されたフォルダに保存する通信イベントを起動させる。
Report information receiving means: The function is realized by the R / W application, and trigger generation report information is received from the reader / writer 2.
Target communication event activation means: When the function is realized by the R / W application, the presence or absence of the peripheral device side trigger is determined based on the content of the received trigger occurrence report information, and it is determined that the peripheral device side trigger exists The target communication event, specifically, the communication event for reading the data file stored in the memory card 11 to 14 loaded with the reader / writer 2 and storing it in the designated folder of the HDD 44 (FIG. 6) of the PC 3 Start.

まず、図7を用いて、SCSIコマンドに基づいて、PC3と、USB−I/F78を介して該PC3とUSB接続されたリーダライタ2との間で行われるデータ通信の概略について説明する。OS70は、GUI(Graphical User Interface)71とファイルシステム72とOSカーネル73を備えてその基幹システムが構成されている。GUI71は、コンピュータグラフィックスとマウスなどのポインティングデバイスを用いてユーザーの入力操作を実現するユーザインターフェースであり、ファイルシステム72は、コンピュータ内部でファイルやフォルダを用いてデータを管理する方式及びその管理システムである。また、OSカーネル73はアプリケーションや周辺機器を監視する等の基本機能を実装したソフトウェアである。なお、PC3には、リーダライタ2へのアクセスが可能なようにドライバソフト74が予めインストールされており、該ドライバソフト74はモジュール化された状態でOSカーネル73に実装されている。   First, an outline of data communication performed between the PC 3 and the reader / writer 2 connected via USB to the PC 3 via the USB-I / F 78 will be described with reference to FIG. The OS 70 includes a GUI (Graphical User Interface) 71, a file system 72, and an OS kernel 73, and the basic system is configured. The GUI 71 is a user interface that realizes a user input operation using a computer graphics and a pointing device such as a mouse, and the file system 72 is a method of managing data using files and folders in the computer and its management system. It is. The OS kernel 73 is software that implements basic functions such as monitoring applications and peripheral devices. The PC 3 is preinstalled with driver software 74 so that the reader / writer 2 can be accessed. The driver software 74 is installed in the OS kernel 73 in a modular state.

例えば、リーダライタ2へアクセスするためのアプリケーションの一例であるエクスプローラ75とR/Wアプリケーション76とがPC3上で起動されたとする。エクスプローラ75は周知のごとく、ファイルやフォルダを管理するためのものである。エクスプローラ75はOS70のシステムに準拠して作成されており、一般には、OS70の一機能として認識されている。従って、エクスプローラ75はファイルシステム72を介してリーダライタ2と通信する。一方、R/Wアプリケーション76は、例えばリーダライタ2の製造メーカが開発した独自のアプリケーションソフトであって、リーダライタ2に挿入された記録メディアに対してデータを書き込む処理あるいはデータを読み出す処理を行なうものである。一般に、R/Wアプリケーション76は、ファイルシステム72の仕様が公開されていないため、OS70には準拠せずに作成される。   For example, it is assumed that an explorer 75 and an R / W application 76, which are examples of applications for accessing the reader / writer 2, are activated on the PC 3. As is well known, the explorer 75 is for managing files and folders. The explorer 75 is created in conformity with the OS 70 system and is generally recognized as a function of the OS 70. Therefore, the explorer 75 communicates with the reader / writer 2 via the file system 72. On the other hand, the R / W application 76 is unique application software developed by the manufacturer of the reader / writer 2, for example, and performs a process of writing data to a recording medium inserted in the reader / writer 2 or a process of reading data. Is. Generally, the R / W application 76 is created without conforming to the OS 70 because the specification of the file system 72 is not disclosed.

まず、エクスプローラ75からリーダライタ2にアクセスする場合について説明する。OS70が起動され、エクスプローラ75が起動されると、エクスプローラ75によって、Inquiryコマンドがファイルシステム72を介してOSカーネル73に発行される。なお、Inquiryコマンドを含み全てのSCSIコマンドは、OSカーネル73において仮想的に設けられたSCSIコマンド処理入口79に対して発行されるようになっている。上記Inquiryコマンドが発行されると、リーダライタ2へは対応するCDB(ここではCDB(0);表2)が送信され、リーダライタ2は応答情報として、その型式やデバイス名、SCSI−ID、LUNの有無、メモリーカードの種別などの構成情報を含むInquiryデータ(この場合、S/Iデータ(表3))を作成し、PC3に返信する。これにより、リーダライタ2が認識される。   First, a case where the reader / writer 2 is accessed from the explorer 75 will be described. When the OS 70 is activated and the explorer 75 is activated, the explorer 75 issues an inquiry command to the OS kernel 73 via the file system 72. Note that all SCSI commands including the inquiry command are issued to the SCSI command processing entrance 79 virtually provided in the OS kernel 73. When the inquiry command is issued, the corresponding CDB (here, CDB (0); Table 2) is transmitted to the reader / writer 2, and the reader / writer 2 receives the model, device name, SCSI-ID, Inquiry data (in this case, S / I data (Table 3)) including configuration information such as the presence / absence of a LUN and the type of memory card is created and returned to the PC 3. Thereby, the reader / writer 2 is recognized.

リーダライタ2が認識されると、GUI71によってエクスプローラ75上にリーダライタ2のドライブアイコンが生成される。そして、ユーザーがマウスなどを用いて上記ドライブアイコンにアクセスするなどして、データの読出指示が入力されると、エクスプローラ75はファイルシステム72に働きかけて、OSカーネル73に対してReadコマンド(SCSIコマンドの一例)を発行させる。一方、同様に、書込指示を入力すると、OSカーネル73に対してWriteコマンド(SCSIコマンドの一例)を発行させる。これらのコマンドデータがUSBなどのI/Fを介してリーダライタ2に転送され、該コマンドに従った読み出し若しくは書き込みがリーダライタ2側で実行される。なお、上記InquiryコマンドはPC3にリーダライタ2が接続されたときや、リーダライタ2が接続された状態でPC3の電源がリセットされたときにも発行される。   When the reader / writer 2 is recognized, a drive icon of the reader / writer 2 is generated on the explorer 75 by the GUI 71. When a data read instruction is input, for example, when the user accesses the drive icon using a mouse or the like, the explorer 75 works on the file system 72 to read the OS kernel 73 with a Read command (SCSI command). Issue an example). On the other hand, similarly, when a write instruction is input, a write command (an example of a SCSI command) is issued to the OS kernel 73. These command data are transferred to the reader / writer 2 via an I / F such as a USB, and reading or writing according to the command is executed on the reader / writer 2 side. The Inquiry command is also issued when the reader / writer 2 is connected to the PC 3 or when the power of the PC 3 is reset while the reader / writer 2 is connected.

次に、R/Wアプリケーション76からリーダライタ2にアクセスする場合について説明する。R/Wアプリケーション76が起動されると、OSカーネル73に対してR/Wアプリケーションにのみデータバスを開放する要求が出される。OSカーネル73はこの要求を受けてR/Wアプリケーション76にデータバスを占有させる。換言すれば、ファイル72からSCSIコマンド処理入口79に対して発行されたSCSIコマンドを該SCSIコマンド処理入口79で受け入れないようにする。従って、R/Wアプリケーション76の起動中は、ファイルシステム72はリーダライタ2へアクセスできなくなる。また、R/Wアプリケーション76が起動されると、GUI71によってR/Wアプリケーション76でプログラムされた入力画面(ユーザインターフェース画面)がディスプレイ上に表示される。また、ドライバソフト74によって、InquiryコマンドがOSカーネル73に発行されて、その応答情報であるInquiryデータ(この場合、表3のS/Iデータ)の返信により、リーダライタ2の型式やデバイス名などの構成情報が取得される。これにより、リーダライタ2が認識される。その後、ドライバソフト74によってOSカーネル73に対して出されたReadコマンドやWriteコマンドに従って、リーダライタ2側でデータの読み出し若しくは書き込みが実行される。   Next, a case where the reader / writer 2 is accessed from the R / W application 76 will be described. When the R / W application 76 is activated, a request to release the data bus only to the R / W application is issued to the OS kernel 73. In response to this request, the OS kernel 73 makes the R / W application 76 occupy the data bus. In other words, the SCSI command issued from the file 72 to the SCSI command processing entrance 79 is not accepted by the SCSI command processing entrance 79. Therefore, the file system 72 cannot access the reader / writer 2 while the R / W application 76 is activated. When the R / W application 76 is activated, an input screen (user interface screen) programmed by the R / W application 76 is displayed on the display by the GUI 71. Also, the driver software 74 issues an inquiry command to the OS kernel 73, and returns the inquiry data (in this case, S / I data in Table 3) as response information. Configuration information is acquired. Thereby, the reader / writer 2 is recognized. Thereafter, reading or writing of data is executed on the reader / writer 2 side in accordance with a Read command or a Write command issued to the OS kernel 73 by the driver software 74.

なお、リーダライタ2の認識は次のようにして行われる。すなわち、まず、OSカーネル73に対してInquiryコマンドを発行した際に生成されるCDB(0)(表2)をリーダライタ2に送信する。該CDB(0)を受信したリーダライタ2側では、CDB(0)に含まれる種々の情報を参照して、該情報に従った構成情報を生成し、該構成情報を含むS/Iデータ(表3)をPCへ返信する。この返信されたS/Iデータに基づき、リーダライタ2が認識される。   The reader / writer 2 is recognized as follows. That is, first, CDB (0) (Table 2) generated when an inquiry command is issued to the OS kernel 73 is transmitted to the reader / writer 2. The reader / writer 2 that has received the CDB (0) refers to various information included in the CDB (0), generates configuration information according to the information, and generates S / I data including the configuration information ( Return Table 3) to the PC. The reader / writer 2 is recognized based on the returned S / I data.

なお、リーダライタ2(ターゲット:周辺装置)上のいずれかのスロット(あるいは外部メモリ入出力制御部:ロジカルユニット)上で、メモリーカードの交換(つまり、事象や状態の変化)がなされると、PC3(イニシエータ)に通知するためのユニット・アテンション・コンディションが生成される。PC3のファイルシステムは、このユニット・アテンション・コンディションを参照してメモリーカードの交換を認識し、FAT(ファイル・アロケーション・テーブル)等のファイル情報の更新を行なう。このようなユニット・アテンション・コンディションを保留中のロジカルユニットに向けてInquiryコマンドが発行された場合、該ロジカルユニットは保留中のユニット・アテンション・コンディションをクリアせずに、Inquiryコマンドを実行する。つまり、Inquiryコマンドが実行された場合でも、該ユニット・アテンション・コンディションに反映されているメモリーカードの交換通知情報は消去されずに保持されるので、PC3のファイルシステムは、交換後のメモリーカードに対するアクセスを問題なく行なうことができる。   When a memory card is exchanged (that is, an event or a state is changed) on any slot (or external memory input / output control unit: logical unit) on the reader / writer 2 (target: peripheral device), A unit attention condition for notifying the PC 3 (initiator) is generated. The file system of the PC 3 recognizes the replacement of the memory card with reference to the unit attention condition, and updates file information such as FAT (file allocation table). When an inquiry command is issued to a logical unit that holds such a unit attention condition, the logical unit executes the inquiry command without clearing the pending unit attention condition. That is, even when the inquiry command is executed, the replacement notification information of the memory card reflected in the unit attention condition is not erased and is retained. Access can be performed without problems.

次に、リーダライタ2のより具体的な動作について、図8のフローチャートを用いて説明する。なお、以下の説明では、1つのスロットに対する処理についてのみ行っている。複数のスロットに対しては、当該処理が割り込み処理により並列して行われる。CPU27は、PCからUSBケーブルを介して供給される電源(バスパワー)によりONされると(T1)、USBチップ32からの割り込みを許可する状態となる(T2)。USBチップ32では、PC側からUSBバス上を伝送してきたコマンドを、USBプロトコルエンジン321及びUSBコントロール部331の動作によって、対象となる送受信部341〜344へ振り分ける。なお、ここではまだ、コマンドを受け取ったことを示すレスポンスを返さない。   Next, a more specific operation of the reader / writer 2 will be described using the flowchart of FIG. In the following description, only processing for one slot is performed. For a plurality of slots, the processing is performed in parallel by interrupt processing. When the CPU 27 is turned on by the power (bus power) supplied from the PC via the USB cable (T1), the CPU 27 enters a state of permitting an interrupt from the USB chip 32 (T2). The USB chip 32 distributes commands transmitted on the USB bus from the PC side to the target transmission / reception units 341 to 344 by the operations of the USB protocol engine 321 and the USB control unit 331. Note that no response indicating that a command has been received is returned yet.

送受信部341〜344は、コマンドを受け取ると、ステータスレジスタ82の「コマンド受信完了」bitを1にし、CPU27に割り込みを掛ける。この場合、CPU27は、ステータスレジスタ82を参照することで何のための割り込みなのかを把握することができる。また、受け取ったコマンドは、SCSIコマンドバッファ83に格納される。   When receiving the command, the transmission / reception units 341 to 344 set the “command reception completion” bit of the status register 82 to 1 and interrupt the CPU 27. In this case, the CPU 27 can grasp what the interrupt is for by referring to the status register 82. The received command is stored in the SCSI command buffer 83.

CPU27は、割り込みがあると(T3:YES)、送受信部341〜344が受け取ったコマンドの解釈を行なう(T5)。すなわち、CPU27は、送受信部341〜344のステータスレジスタ82を参照し、送受信部341〜344がコマンドを受け取ったことを知ると、SCSIコマンドバッファ83からコマンドを取得して、それを解釈する。これにより、CPU27は、SCSIデータの有無や伝送方向、大きさを把握する。   When there is an interrupt (T3: YES), the CPU 27 interprets the command received by the transmission / reception units 341 to 344 (T5). That is, when the CPU 27 refers to the status register 82 of the transmission / reception units 341 to 344 and knows that the transmission / reception units 341 to 344 have received the command, the CPU 27 acquires the command from the SCSI command buffer 83 and interprets it. Thereby, the CPU 27 grasps the presence / absence, transmission direction, and size of the SCSI data.

CPU27は、コマンドの解釈によって、SCSIデータが無いと把握した場合(例えば、InquiryコマンドやTest Unit Readyコマンドの場合)およびSCSIデータの伝送方向がデバイス→PC(送信)であると把握した場合(例えば、Readコマンドの場合)には(T6:YES)、送受信部341〜344のコントロールレジスタ81の「コマンド受付完了」bitと「ステータスレジスタクリア」bitに1を書き込む(T7)。   When the CPU 27 recognizes that there is no SCSI data by interpreting the command (for example, in the case of an inquiry command or a test unit ready command), and the CPU 27 recognizes that the transmission direction of the SCSI data is device → PC (transmission) (for example, In the case of a Read command) (T6: YES), 1 is written in the “command acceptance complete” bit and “status register clear” bit of the control register 81 of the transmission / reception units 341 to 344 (T7).

送受信部341〜344は、T7で「コマンド受付完了」bitに1が書き込まれた時点で、PCに対してコマンドを受け取ったことを示すレスポンスを返す。ここで、PC側は、レスポンスを受け取ると、SCSIデータが無い場合には次がSCSIステータスの受信で、SCSIデータの伝送方向がデバイス→PCである場合には次がSCSIデータの受信であるので、デバイス待ちの状態に遷移する。   The transmission / reception units 341 to 344 return a response indicating that the command has been received to the PC when 1 is written in the “command reception completion” bit in T7. Here, when the response is received, the PC side receives the SCSI status when there is no SCSI data, and when the SCSI data transmission direction is device → PC, the next is reception of SCSI data. Transition to a device waiting state.

他方、CPU27は、コマンドの解釈によって、SCSIデータの伝送方向がPC→デバイス(受信)であると把握した場合(例えば、Writeコマンドの場合)には(T6:NO)、PCからのSCSIデータを受信する準備をする(T8)。具体的には、RAM29上に受信に必要な領域を確保し、その先頭アドレスをSCSIデータDMAアドレスレジスタ85に書き込み、受信するバイト数をSCSIデータDMAカウントレジスタ86に書き込む。その後、送受信部341〜344のコントロールレジスタ81の「コマンド受付完了」bitと「ステータスレジスタクリア」bitに1を書き込む(T9)。   On the other hand, when the CPU 27 recognizes that the SCSI data transmission direction is PC → device (reception) by interpreting the command (for example, in the case of the Write command) (T6: NO), the CPU 27 receives the SCSI data from the PC. Prepare to receive (T8). Specifically, an area necessary for reception is secured on the RAM 29, the head address is written in the SCSI data DMA address register 85, and the number of received bytes is written in the SCSI data DMA count register 86. Thereafter, 1 is written in the “command acceptance complete” bit and “status register clear” bit of the control register 81 of the transmission / reception units 341 to 344 (T9).

送受信部341〜344は、T9で「コマンド受付完了」bitに1が書き込まれた時点で、PCに対してコマンドを受け取ったことを示すレスポンスを返す。ここで、PC側は、レスポンスを受け取ると、デバイス側でコマンドを解釈してSCSIデータを受け取る準備が出来たと認識して、SCSIデータの送信を開始する。   The transmission / reception units 341 to 344 return a response indicating that the command has been received to the PC when 1 is written in the “command reception completion” bit in T9. Here, when receiving the response, the PC side recognizes that the device side is ready to receive the SCSI data by interpreting the command, and starts transmission of the SCSI data.

そして、送受信部341〜344は、SCSIデータDMAカウントレジスタ86が0になった時点で、ステータスレジスタ82の「データ受信完了」bitを1にし、CPU27に割り込みを掛ける。   Then, when the SCSI data DMA count register 86 becomes 0, the transmission / reception units 341 to 344 set the “data reception completion” bit of the status register 82 to 1 and interrupt the CPU 27.

CPU27は、割り込みがあると(T10:YES)、送受信部341〜344のコントロールレジスタ81の「データ受取完了」bitと「ステータスレジスタクリア」bitに1を書き込んで、SCSIデータの受信を完了する(T11:YES)。ここで、PC3側は、SCSIデータがデバイスに到達されたことが通知され、次がSCSIステータスの受信であるので、デバイス待ちの状態に遷移する。   When there is an interrupt (T10: YES), the CPU 27 writes 1 to the “data reception completion” bit and “status register clear” bit of the control register 81 of the transmission / reception units 341 to 344 to complete the reception of the SCSI data ( T11: YES). Here, the PC 3 side is notified that the SCSI data has arrived at the device, and the next is the reception of the SCSI status.

T7及びT11(YES)の後には、CPU27は、コマンドを実行する(T12)。例えばTest Unit Readyコマンドなら、第1〜第4メモリーカード11〜14が挿入されているか否かを判断する。例えばReadコマンドなら、第1〜第4メモリーカード11〜14からデータを読み出す。例えばWriteコマンドなら、この時点で書き込むべきデータをPCから受け取っているので(上述のT8〜T11)、それを第1〜第4メモリーカード11〜14に書き込む。   After T7 and T11 (YES), the CPU 27 executes the command (T12). For example, if it is a Test Unit Ready command, it is determined whether or not the first to fourth memory cards 11 to 14 are inserted. For example, in the case of a Read command, data is read from the first to fourth memory cards 11 to 14. For example, in the case of the Write command, since data to be written is received from the PC at this time (the above-described T8 to T11), it is written to the first to fourth memory cards 11 to 14.

次に、CPU27は、SCSIデータの伝送方向がデバイス→PC(送信)である場合(例えば、Readコマンドの場合)には(T13:YES)、読み出したデータをPCへ送信する準備をする(T14)。具体的には、RAM29上に送信に必要な領域を確保して読み出したデータを格納するとともに、その先頭アドレスをSCSIデータDMAアドレスレジスタ85に書き込み、受信するバイト数をSCSIデータDMAカウントレジスタ86に書き込む。そして、送受信部341〜344のコントロールレジスタ81の「データ送信開始」bitに1を書き込む。   Next, when the SCSI data transmission direction is device → PC (transmission) (for example, in the case of a Read command) (T13: YES), the CPU 27 prepares to transmit the read data to the PC (T14). ). More specifically, the read data is stored on the RAM 29 while securing the area necessary for transmission, the head address is written in the SCSI data DMA address register 85, and the number of received bytes is stored in the SCSI data DMA count register 86. Write. Then, 1 is written in the “data transmission start” bit of the control register 81 of the transmission / reception units 341 to 344.

送受信部341〜344は、T14で「データ送信開始」bitに1が書き込まれた時点で、PCへSCSIデータの転送を開始する。そして、送受信部341〜344は、SCSIデータの転送が終わったら、ステータスレジスタ82の「データ送信完了」bitを1にし、CPU27に割り込みを掛ける。   The transmission / reception units 341 to 344 start transfer of SCSI data to the PC when 1 is written in the “data transmission start” bit in T14. Then, when the transfer of the SCSI data is completed, the transmission / reception units 341 to 344 set the “data transmission completion” bit of the status register 82 to 1 and interrupt the CPU 27.

CPU27は、割り込みがあると(T15:YES)、SCSIデータの転送が終わったことを把握するので、送受信部341〜344のコントロールレジスタ81の「ステータスレジスタクリア」bitに1を書き込んで、SCSIデータの送信を完了する(T16:YES)。   When there is an interrupt (T15: YES), the CPU 27 grasps that the transfer of the SCSI data is finished. Therefore, the CPU 27 writes 1 to the “status register clear” bit of the control register 81 of the transmission / reception units 341 to 344, and the SCSI data Is completed (T16: YES).

T13(NO)およびT16(YES)の後には、CPU27は、SCSIステータスの送信を開始する(T17)。具体的には、CPU27は、上記処理の中で、PCに返すべきステータスを既に決定しているので、そのステータスをSCSIステータスバッファ84に書き込み、送受信部341〜344のコントロールレジスタ81の「ステータス送信開始」bitに1を書き込んで、SCSIステータスの送信を開始する。   After T13 (NO) and T16 (YES), the CPU 27 starts transmission of the SCSI status (T17). Specifically, since the CPU 27 has already determined the status to be returned to the PC in the above processing, the status is written in the SCSI status buffer 84 and “status transmission” in the control register 81 of the transmission / reception units 341 to 344 is written. 1 is written in the “start” bit, and transmission of the SCSI status is started.

送受信部341〜344は、T17で「ステータス送信開始」bitに1が書き込まれた時点で、PCへSCSIステータスの送信を開始する。そして、送受信部341〜344は、PC側からSCSIステータスを受け取ったレスポンスを受けると、ステータスレジスタ82の「ステータス送信完了」bitを1にし、CPUに割り込みを掛ける。   The transmission / reception units 341 to 344 start transmission of the SCSI status to the PC when 1 is written in the “status transmission start” bit in T17. Upon receiving the response that received the SCSI status from the PC side, the transmission / reception units 341 to 344 set the “status transmission complete” bit in the status register 82 to 1 and interrupt the CPU.

CPU27は、割り込みがあると(T18:YES)、SCSIステータスの送信が終わったことを把握するので、送受信部341〜344のコントロールレジスタ81の「ステータスレジスタクリア」bitに1を書き込んで、SCSIデータの送信を完了する(T19:YES)。これにより、送受信部341〜344のステータスレジスタ82がクリアされて、元の状態に戻る。   When there is an interrupt (T18: YES), the CPU 27 grasps that the transmission of the SCSI status is finished. Therefore, the CPU 27 writes 1 to the “status register clear” bit of the control register 81 of the transmission / reception units 341 to 344, and the SCSI data Is completed (T19: YES). As a result, the status register 82 of the transmission / reception units 341 to 344 is cleared, and the original state is restored.

次に、本通信システム1において、Inquiryデータを用いた本発明の主要機能に係るデータ通信処理の流れの一例について説明を行なう。なお、各ステップにおける処理は、PC3のCPU41あるいはマルチリーダライタ2のCPU27によって各構成部が制御されることにより行われる。図9は、主処理の流れを示すフローチャートである。すなわち、PC3にマルチリーダライタ2が接続され、各装置に電源が投入されると、まず、PC3に接続されている不明なデバイスに対してドライブを割り当てるドライブ割当処理(S1)が実行される。本実施形態では、デバイスとしてマルチリーダライタ2だけが接続されているため、これのみにドライブが割り当てられる。   Next, an example of the flow of data communication processing according to the main function of the present invention using inquiry data in the communication system 1 will be described. Note that the processing in each step is performed by controlling each component by the CPU 41 of the PC 3 or the CPU 27 of the multi-reader / writer 2. FIG. 9 is a flowchart showing the flow of main processing. That is, when the multi-reader / writer 2 is connected to the PC 3 and each apparatus is powered on, first, a drive allocation process (S1) for allocating a drive to an unknown device connected to the PC 3 is executed. In this embodiment, since only the multi-reader / writer 2 is connected as a device, a drive is assigned only to this.

次に、ユーザーによって選択されたドライブを通信相手として設定するドライブ設定処理(S2)が行われる。ドライブが設定されると、設定されたドライブに対応するデバイス(本実施形態ではマルチリーダライタ2)が通信相手として認識される。そして、マルチリーダライタ2に設けられたボタン22(手動操作部)の操作状態、つまり、周辺装置側トリガの発生を監視するための周辺装置側トリガ監視処理(S3)が実施される。該周辺装置側トリガ監視処理(S3)を含む主処理ルーチンは、起動管理タイマールーチンから定期的に出される起動トリガを用いる等により、一定の時間間隔(例えば100ms〜1000ms:例えば500ms)で繰り返し定常的に実行される。   Next, drive setting processing (S2) for setting the drive selected by the user as the communication partner is performed. When the drive is set, a device (multi-reader / writer 2 in the present embodiment) corresponding to the set drive is recognized as a communication partner. Then, a peripheral device side trigger monitoring process (S3) for monitoring the operation state of the button 22 (manual operation unit) provided in the multi-reader / writer 2, that is, the generation of the peripheral device side trigger is performed. The main processing routine including the peripheral device side trigger monitoring process (S3) is repeatedly and regularly performed at regular time intervals (for example, 100 ms to 1000 ms: for example, 500 ms) by using an activation trigger periodically issued from the activation management timer routine. Is executed automatically.

図5は、PC3においてCPU41により実行されるドライブ割当処理(S1)の詳細を示すものである。まず、参照されるドライブ(以下「参照ドライブ」と称する)がAドライブに初期設定される(S101)。該参照ドライブは、PC3側で割り当て可能なドライブのことを意味するものであって、該ドライブが複数存在する場合はドライブの割り当て処理時に昇順で参照される。参照ドライブは、PC3のWIN2000のOSカーネルで管理されている。本実施形態では、割り当て可能なドライブ数をA〜Zの26個としている。   FIG. 5 shows the details of the drive allocation process (S1) executed by the CPU 41 in the PC 3. First, a drive to be referred (hereinafter referred to as “reference drive”) is initialized to A drive (S101). The reference drive means a drive that can be allocated on the PC 3 side, and when there are a plurality of the drives, they are referred to in ascending order during the drive allocation process. The reference drive is managed by the OS kernel of WIN2000 of PC3. In the present embodiment, the number of drives that can be allocated is 26 from A to Z.

参照ドライブが設定されると、次に、CPU41によって、ドライブが割り当てられるデバイスからS/Iデータを返信させるためのInquiryコマンド(以下「Inq(0)コマンド」と称する)が参照ドライブに対して発行される(S102)。実際には、CPU41によって該Inq(0)コマンドがOSカーネルに対して発行され、該OSカーネルにおいて該Inq(0)コマンドが参照ドライブに発行されたものとして取り扱われる。そして、OSカーネルにより、EVPD領域が“0”に設定されたCDB(0)が生成されて、参照ドライブに関連づけられた不明デバイスに送信される。SCSI規格では、EVPD領域が“0”に設定されている場合はS/Iデータを返信するよう定義されている。CDB(0)の具体例は、前述のごとく表2に示している。なお、表2のデータ欄には、各データが16進数表記で示されている。本明細書において特に明示しない限り、データ欄は全て16進数表記で示すものとする。   When the reference drive is set, the CPU 41 then issues an inquiry command (hereinafter referred to as “Inq (0) command”) for returning S / I data from the device to which the drive is assigned to the reference drive. (S102). Actually, the CPU 41 issues the Inq (0) command to the OS kernel, and the OS kernel treats the Inq (0) command as being issued to the reference drive. Then, a CDB (0) in which the EVPD area is set to “0” is generated by the OS kernel and transmitted to the unknown device associated with the reference drive. The SCSI standard defines that S / I data is returned when the EVPD area is set to “0”. Specific examples of CDB (0) are shown in Table 2 as described above. In the data column of Table 2, each data is shown in hexadecimal notation. Unless otherwise specified in this specification, all data fields are shown in hexadecimal notation.

参照ドライブに関連づけられたデバイスが存在する場合であって、該デバイスがSCSIコマンドを処理することができるデバイス(SCSIコマンド対応デバイス)である場合は、該デバイスからS/Iデータが返信される。一方、デバイスが存在しない場合、あるいは存在していても該デバイスがSCSIコマンドを処理することができない場合(SCSIコマンド非対応デバイス)は、該デバイスからS/Iデータは返信されない。S103では、S/Iデータの返信の有無に基づいてCPU41によってエラー判定が行われる。具体的には、S/Iデータの返信がない場合はエラーと判定される(S103のYes側)。この場合、その後の処理はステップS107に進む。また、S/Iデータの返信がある場合はエラーと判定されない(S103のNo側)。すなわち、当該参照ドライブに関連づけられたデバイスが存在すると判定される。この場合、その後の処理はステップS105に進む。   If there is a device associated with the reference drive and the device is a device that can process a SCSI command (a SCSI command compatible device), S / I data is returned from the device. On the other hand, if the device does not exist, or if the device exists, the device cannot process the SCSI command (device that does not support the SCSI command), the S / I data is not returned from the device. In S103, the CPU 41 makes an error determination based on whether or not S / I data is returned. Specifically, when no S / I data is returned, it is determined as an error (Yes in S103). In this case, the subsequent processing proceeds to step S107. Further, when there is a reply of S / I data, it is not determined as an error (No side of S103). That is, it is determined that there is a device associated with the reference drive. In this case, the subsequent processing proceeds to step S105.

S103においてエラーでないと判定されると、返信されたS/Iデータに基づいて、参照ドライブに関連づけられたデバイスが通信対象となり得るデバイスであるかどうか、すなわち、通信可能なデバイスであるかどうかが判定される。本実施形態では、当該ステップは、参照ドライブに関連付けられたデバイスがマルチリーダライタ2であるかどうかを判定するために行われる。また、本実施形態では、マルチリーダライタ2から、表3に示すS/IデータがPC3へ返信されるようになっており、当該ステップにおける判定処理は、返信されたS/Iデータのバイト0の領域やバイト1の領域のデータ、あるいは、バイト8〜15の領域のベンダIDや、バイト16〜31の領域のプロダクトIDなどが、PC3側で予め登録しておいたID情報等と一致しているかどうかによって行われる。当該ステップで、通信可能なデバイスであると判定されると(S104のYes側)、処理はステップS105に進み、通信可能なデバイスではないと判定されると(S104のNo側)、処理はS107に進む。なお、表3中のバイト0領域のデータ「0x00」はダイレクトアクセスデバイスを示し、バイト1の領域のデータ「0x80」は可換記憶媒体を示すものである。上述の各バイト領域に記述される内容については、SCSI規格で定義されているため、詳細については、当該規格書を参照されたい。   If it is determined in S103 that there is no error, whether or not the device associated with the reference drive is a device that can be communicated based on the returned S / I data, that is, whether or not it is a communicable device. Determined. In the present embodiment, this step is performed to determine whether or not the device associated with the reference drive is the multi-reader / writer 2. In the present embodiment, the S / I data shown in Table 3 is returned from the multi-reader / writer 2 to the PC 3, and the determination process in this step is byte 0 of the returned S / I data. The data of the area of byte 1 and the area of byte 1, or the vendor ID of the area of bytes 8 to 15 and the product ID of the area of bytes 16 to 31 match the ID information registered in advance on the PC 3 side. Done depending on whether or not. If it is determined in this step that the device is communicable (Yes in S104), the process proceeds to step S105. If it is determined that the device is not communicable (No in S104), the process proceeds to S107. Proceed to In Table 3, the data “0x00” in the byte 0 area indicates a direct access device, and the data “0x80” in the byte 1 area indicates a removable storage medium. Since the contents described in each byte area are defined by the SCSI standard, refer to the standard for details.

処理がS105に進むと、ここでは、返信されたS/Iデータに基づいて、当該参照ドライブのLUN(Logical Unit Number:ロジカルユニット番号)が“0”であるかどうかがCPU41によって判定される。かかる判定は、S/Iデータにおけるベンダ固有領域のバイト54の領域のデータに基づいて行われる。本実施形態では、上述したように、マルチリーダライタ2から、表3に示すS/IデータがPC3へ返信されるようになっている。また、表3のバイト54領域の備考欄にも記載しているように、マルチリーダライタ2では、S/Iデータを返信する際に、バイト54の領域の上位4ビットに該マルチリーダライタ2の物理的I/Fを示す情報(本実施形態ではUSBであることを示す情報)が格納され、下位4ビットにLUNの番号を格納するようにプログラミングされている。従って、CPU41は、バイト54の領域のデータを参照すれば、LUNの情報を取得することができる。これにより、当該ステップの判定処理を行なうことができる。例えば、バイト54の領域に「0x10」が格納されている場合は、物理的I/FがUSB接続コネクタであって、LUNが0であることが取得され、「0x23」が格納されている場合は、物理的I/FがSCSI接続コネクタであって、LUNが3であることが取得される。   When the process proceeds to S105, the CPU 41 determines whether the LUN (Logical Unit Number) of the reference drive is “0” based on the returned S / I data. This determination is made based on the data in the area of byte 54 of the vendor specific area in the S / I data. In the present embodiment, as described above, the S / I data shown in Table 3 is returned from the multi-reader / writer 2 to the PC 3. Further, as described in the remarks column of the byte 54 area of Table 3, when the multi reader / writer 2 returns S / I data, the multi reader / writer 2 is added to the upper 4 bits of the byte 54 area. Information indicating the physical I / F (information indicating USB in the present embodiment) is stored, and programmed to store the LUN number in the lower 4 bits. Therefore, the CPU 41 can acquire the LUN information by referring to the data in the byte 54 area. Thereby, the determination process of the said step can be performed. For example, when “0x10” is stored in the area of the byte 54, it is acquired that the physical I / F is a USB connector and LUN is 0, and “0x23” is stored. Is obtained that the physical I / F is a SCSI connector and the LUN is 3.

S105で、LUNが“0”であると判定されると(S105のYes側)処理はS106に進み、LUNが“0”でないと判定されると(S105のNo側)処理はS107に進む。なお、WIN2000がインストールされたPC3と接続されている場合は、マルチリーダライタ2側でバイト54の領域に、例えばLUN=1の情報を格納したとしても、PC3側ではLUN=0として認識するようになっている。そのため、当該S105の処理は必ずYes側に進むことになる。この場合は、S105の判定処理は意味を成さないため省略してもよい。   If it is determined in S105 that the LUN is “0” (Yes in S105), the process proceeds to S106, and if it is determined that the LUN is not “0” (No in S105), the process proceeds to S107. When connected to the PC 3 on which WIN2000 is installed, even if information such as LUN = 1 is stored in the byte 54 area on the multi-reader / writer 2 side, it is recognized that LUN = 0 on the PC 3 side. It has become. Therefore, the process of S105 always proceeds to the Yes side. In this case, the determination process in S105 does not make sense and may be omitted.

S106では、現在の参照ドライブを対応ドライブリストに追加する処理が実行される。対応ドライブリストは、最終的にドライブが割り当てられる参照ドライブをリストアップしたものである。詳細には、該対応ドライブリストがRAM43の所定の記憶領域に展開されており、該当する参照ドライブが該記憶領域に書き込まれる。その後、処理はS107に進む。   In S106, a process of adding the current reference drive to the corresponding drive list is executed. The corresponding drive list is a list of reference drives to which drives are finally assigned. Specifically, the corresponding drive list is expanded in a predetermined storage area of the RAM 43, and the corresponding reference drive is written in the storage area. Thereafter, the process proceeds to S107.

S107では、参照ドライブがZドライブであるかどうかがCPU41によって判定される。例えば、カウンタメモリなどにドライブの参照順をカウントさせておき、そのカウンタ値をCPU41が監視することにより、現在の参照ドライブがZドライブであるかどうかの判定が可能である。かかる判定は、設定された参照ドライブが最後であるかどうかを判定するために行われる。ここで、参照ドライブがZドライブであると判定されると、参照可能なドライブが存在しないため、続く処理はS109に進む。参照ドライブがZドライブではないと判定されると、参照ドライブを次順のドライブに設定した後に(S108)、S102からの処理がS107においてYesと判定されるまで繰り返し行われる。   In S107, the CPU 41 determines whether or not the reference drive is the Z drive. For example, it is possible to determine whether the current reference drive is the Z drive by causing the counter memory or the like to count the reference order of the drives and monitoring the counter value by the CPU 41. Such determination is performed to determine whether the set reference drive is the last. Here, if it is determined that the reference drive is the Z drive, there is no drive that can be referred to, and the subsequent process advances to S109. If it is determined that the reference drive is not the Z drive, after setting the reference drive as the next drive (S108), the processing from S102 is repeated until it is determined Yes in S107.

処理がS109に進むと、ここでは、対応ドライブリストに基づいてドライブの割り当てがなされる。これにより、一連のドライブ割当処理(S1)が終了する。なお、本実施形態では、外部ストレージデバイスとしてマルチリーダライタ2のみが接続されているため、Aドライブに対してマルチリーダライタ2が割り当てられ、他のドライブには何ら割り当てられないものとする。   When the process proceeds to S109, here, a drive is allocated based on the corresponding drive list. Thereby, a series of drive allocation processes (S1) are complete | finished. In the present embodiment, since only the multi-reader / writer 2 is connected as an external storage device, the multi-reader / writer 2 is assigned to the A drive and is not assigned to any other drive.

続いて、図11は、ドライブ設定処理(S2)の詳細を示すものである。S201では、前記ドライブ割当処理(S1)によって割り当てられたドライブ(以下「対応ドライブ」と称する)が存在するかどうかが判定される(S201)。すなわち、PC3で割当可能なドライブのいずれかに所定のデバイスが割り当てられたかどうかが判定される。本実施形態では、マルチリーダライタ2が割り当てられたAドライブが存在するため、対応ドライブがあると判定される。その後、対応ドライブが1つであるかどうかが判定される(S202)。一方、S201で、対応ドライブが存在しないと判定されると(S201のNo側)、通信対象が存在しないため、処理が終了する。   Next, FIG. 11 shows details of the drive setting process (S2). In S201, it is determined whether there is a drive (hereinafter referred to as “corresponding drive”) allocated by the drive allocation process (S1) (S201). That is, it is determined whether or not a predetermined device is assigned to any of the drives that can be assigned by the PC 3. In the present embodiment, since there is an A drive to which the multi-reader / writer 2 is assigned, it is determined that there is a corresponding drive. Thereafter, it is determined whether there is one corresponding drive (S202). On the other hand, if it is determined in S201 that the corresponding drive does not exist (No side in S201), the process ends because there is no communication target.

S202で対応ドライブが1つであると判定されると(S202のYes側)、当該対応ドライブが通信対象として設定される(S205)。すなわち、当該対応ドライブに関連付けられたデバイスが通信対象に設定される。なお、本実施形態では、Aドライブが通信対象として設定される。換言すれば、マルチリーダライタ2が通信対象のデバイスとして設定される。   If it is determined in S202 that there is one corresponding drive (Yes in S202), the corresponding drive is set as a communication target (S205). That is, a device associated with the corresponding drive is set as a communication target. In the present embodiment, the A drive is set as a communication target. In other words, the multi-reader / writer 2 is set as a communication target device.

一方、対応ドライブが複数存在すると判定された場合は(S202のNo側)、対応ドライブを示すアイコンをダイアログ表示させる(S203)。その後、ユーザーからいずれかのアイコンが選択されることによって所望の対応ドライブが選択されると、選択された対応ドライブが通信対象として設定される。なお、いずれのアイコンも選択されない場合であっても、例えば、対応ドライブごとに優先度が設定されている場合は、最も優先度の高い対応ドライブが通信対象に自動的に設定される。これにより、一連のドライブ設定処理(S2)が終了する。   On the other hand, when it is determined that there are a plurality of corresponding drives (No in S202), an icon indicating the corresponding drive is displayed in a dialog (S203). Thereafter, when a desired corresponding drive is selected by selecting any icon from the user, the selected corresponding drive is set as a communication target. Even when no icon is selected, for example, when a priority is set for each corresponding drive, the corresponding drive with the highest priority is automatically set as a communication target. Thereby, a series of drive setting processes (S2) are complete | finished.

次に、図12は、周辺装置側トリガ監視処理(S3)の詳細を示すものである。まず、PC3側において、マルチリーダライタ2から該マルチリーダライタ2のVPD(Vital Product Data)を返信させるためのInquiryコマンド(以下「Inq(1)コマンド」と称する)がAドライブに対して発行される(S301)。実際には、該Inq(1)コマンドが、OSカーネルに対して発行され、該OSカーネルによってAドライブに対して発行されたものとして取り扱われる。上記Inq(1)コマンドが発行されると、OSカーネルによって、EVPD領域が“1”に設定されたCDB(1)が生成されて、Aドライブに関連づけられたマルチリーダライタ2にUSBケーブル25を介して送信される。このとき生成されるCDB(1)を表4に示す。すなわち、該CDB(1)のバイト2の領域にはページコード「0xE0」が記述されている。   Next, FIG. 12 shows the details of the peripheral device side trigger monitoring process (S3). First, on the PC 3 side, an inquiry command (hereinafter referred to as “Inq (1) command”) for returning a VPD (Vital Product Data) of the multi-reader / writer 2 is issued from the multi-reader / writer 2 to the A drive. (S301). Actually, the Inq (1) command is issued to the OS kernel, and is treated as being issued to the A drive by the OS kernel. When the Inq (1) command is issued, the OS kernel generates a CDB (1) in which the EVPD area is set to “1”, and connects the USB cable 25 to the multi-reader / writer 2 associated with the A drive. Sent through. Table 4 shows the CDB (1) generated at this time. That is, the page code “0xE0” is described in the byte 2 area of the CDB (1).

CDB(1)のバイト4の領域、すなわちアロケーション長領域には「0x10」(2進数表記では「00010000」)が格納されている。本来、アロケーション長領域には、接続されたデバイスに要求するデータ長が格納される。本実施の形態では、マルチリーダライタ2のアロケーション長の最大値が予め固定長(ここでは、仮に15バイトとしているが、これに限定されるものではない)に設定されている。この“15”という数は下位4ビットで表現できる。SCSI規格に従えば、マルチリーダライタ2において設定された上記最大値以上の数値がアロケーション長として指定されたとしても、マルチリーダライタ2のアロケーション長は上記最大値、すなわち、15バイトに設定される。従って、アロケーション長領域に「0x10」が記述されていても、また、「0x11」以上が記述されていても、アロケーション長は15バイトに設定される。これは、アロケーション長領域のデータのうち、上位4ビットのいずれかのビットが「1」である場合は、該アロケーション長領域のデータを(アロケーション長の設定値に兼用された)任意のデータ(付加情報)として自由に使用することができるということを意味する。すなわち、上位4ビットのいずれかのビットを「1」とすることにより、アロケーション長領域における当該ビット以外のビットを、いわば仮想的な空き領域として確保することができる。このように確保された仮想的な空き領域に任意のデータを付加することで、PC3とマルチリーダライタ2との間で、上記付加情報に係るデータ通信が可能となるのである。   In the area of byte 4 of the CDB (1), that is, the allocation length area, “0x10” (“00010000” in binary notation) is stored. Originally, the data length required for the connected device is stored in the allocation length area. In the present embodiment, the maximum value of the allocation length of the multi-reader / writer 2 is set in advance to a fixed length (here, it is assumed to be 15 bytes, but is not limited to this). This number “15” can be expressed by the lower 4 bits. According to the SCSI standard, the allocation length of the multi-reader / writer 2 is set to the maximum value, that is, 15 bytes even if a numerical value greater than or equal to the maximum value set in the multi-reader / writer 2 is designated as the allocation length. . Therefore, even if “0x10” is described in the allocation length area, or “0x11” or more is described, the allocation length is set to 15 bytes. This means that if any one of the upper 4 bits of the allocation length area data is “1”, the data in the allocation length area is any data (also used as the setting value of the allocation length). It means that it can be used freely as additional information). That is, by setting any one of the upper 4 bits to “1”, bits other than the bit in the allocation length area can be reserved as a virtual free area. By adding arbitrary data to the virtual empty area secured in this way, data communication according to the additional information can be performed between the PC 3 and the multi-reader / writer 2.

なお、上記アロケーション長は常に固定長(ここでは15バイト)に設定されるのではなく、CDB(1)のページコードに応じてその最大値が設定されるようにしてもよい。例えば、ページコード「0xE0」の場合は、アロケーション長の最大値が15バイトの固定長に設定され、ページコード「0xE2」の場合は、9バイトの固定長に設定される。かかる設定処理は、CDB(1)を受信したマルチリーダライタ2のCPU27によってページコードの内容が読み取られ、読み取られた内容に応じて、予めROM28に格納しておいた固定長対応リストから該当する固定長を選定することにより行われる。もちろん、15バイトあるいは9バイトと定めた上記アロケーション長は任意に設定することができる。   The allocation length is not always set to a fixed length (here, 15 bytes), but may be set to a maximum value according to the page code of CDB (1). For example, in the case of page code “0xE0”, the maximum value of the allocation length is set to a fixed length of 15 bytes, and in the case of page code “0xE2”, it is set to a fixed length of 9 bytes. The setting process corresponds to the fixed length correspondence list stored in the ROM 28 in advance according to the read content of the page code read by the CPU 27 of the multi-reader / writer 2 that has received the CDB (1). This is done by selecting a fixed length. Of course, the allocation length set to 15 bytes or 9 bytes can be arbitrarily set.

表6に、上記アロケーション長領域に確保された空き領域に付加される通信データを類別して示す。各表のデータ内容欄に示すように、各データには、それ自体が何を意味するものであるのかが定義づけられている。具体的には、データ内容欄の記載を参照されたい。なお、表6はページコードが「0xE0」の場合に送信される通信データであるが、CDB(調査指示データ)において、このページコード(調査指示データ種別識別情報)を変更すれば、アロケーション長最大値や付加情報内容の異なる別の調査指示データフォーマットを生成することができる。   Table 6 shows the classification of communication data added to the empty area secured in the allocation length area. As shown in the data content column of each table, each data defines what it means. Specifically, refer to the description in the data content column. Table 6 shows communication data transmitted when the page code is “0xE0”. If the page code (survey instruction data type identification information) is changed in the CDB (survey instruction data), the allocation length is maximum. Another survey instruction data format with different values and additional information contents can be generated.

Figure 2007265299
Figure 2007265299

表6の左欄には、アロケーション長領域に記述されるデータそのものが、右欄にはそのデータの意味する内容が示されている。PC3側からマルチリーダライタ2に上記左欄のデータが送信されると、マルチリーダライタ2側では、CPU27により、受信したCDB(1)からアロケーション長領域のデータが抽出され、抽出されたデータの内容が解析され、そして、解析されたデータの内容に従った処理が実行される。なお、表6に示す内容は、テーブルリスト化されて、PC3のHDD44又はROM42と、マルチリーダライタ2のROM28に予め格納されている。   The left column of Table 6 shows the data itself described in the allocation length area, and the right column shows the meaning of the data. When the data in the left column is transmitted from the PC 3 side to the multi-reader / writer 2, on the multi-reader / writer 2 side, the CPU 27 extracts the allocation length area data from the received CDB (1), and the extracted data The contents are analyzed, and processing according to the contents of the analyzed data is executed. The contents shown in Table 6 are made into a table list and stored in advance in the HDD 44 or ROM 42 of the PC 3 and the ROM 28 of the multi-reader / writer 2.

上記S301でInq(1)コマンドが発行されて生成されたCDB(1)には、表5に示すように、アロケーション長領域に「0x10」が記述されている。従って、Inq(1)コマンドは、PC3からマルチリーダライタ2に対してボタン22の操作状態(押圧状態)に対応したトリガ検出データ信号を読み出させるための命令であることを意味する。一方、マルチリーダライタ2側では、送信されたCDB(1)が受信される。その後、CPU27によって、CDB(1)内のアロケーション長領域のデータ「0x10」が抽出され、そして、該データに従って、操作状態(トリガ検出データ信号のレベル)を検出する処理が行われる(S302)。   In CDB (1) generated by issuing the Inq (1) command in S301, “0x10” is described in the allocation length area as shown in Table 5. Therefore, the Inq (1) command means that the PC 3 is a command for causing the multi-reader / writer 2 to read a trigger detection data signal corresponding to the operation state (pressed state) of the button 22. On the other hand, on the multi-reader / writer 2 side, the transmitted CDB (1) is received. Thereafter, the CPU 27 extracts the data “0x10” of the allocation length area in the CDB (1), and performs processing for detecting the operation state (the level of the trigger detection data signal) according to the data (S302).

ボタン22の操作状態検出が終了すると、その検出結果がCPU27によってPC3へ返信される(S305)。該返信処理は、具体的には、CDB(1)の受信後に生成されてPC3へ返信されるVPD(表7参照)に上記検出結果を書き込むことにより行われる(S304)。より詳細には、表7に示すように、バイト7の領域に操作のありなし(トリガ検出データ信号のありなし)が書き込まれる。本実施形態では、操作なしの場合は「0x00」が書き込まれ、操作ありの場合は「0x01」が書き込まれる。なお、表7は操作ありの場合のVPDを示す。   When the detection of the operation state of the button 22 is completed, the detection result is returned to the PC 3 by the CPU 27 (S305). Specifically, the reply process is performed by writing the detection result in a VPD (see Table 7) generated after receiving CDB (1) and returned to the PC 3 (S304). More specifically, as shown in Table 7, the presence or absence of an operation (the presence or absence of a trigger detection data signal) is written in the area of byte 7. In this embodiment, “0x00” is written when there is no operation, and “0x01” is written when there is an operation. Table 7 shows the VPD when there is an operation.

Figure 2007265299
Figure 2007265299

続いて、PC3側では、マルチリーダライタ2から返信されるVPDを受信して、該VPDのバイト7の領域を参照することにより、ボタン22(手動操作部)の操作状態が判定される(S306)。ボタン22の操作ありと判定されると(S307のYes側)、R/Wアプリケーションに、マルチリーダライタ2に装着されたメモリーカード(記憶媒体)のデータファイルに対する、該データファイル受信を含む予め定められたファイル処理(通信イベント)を指令する。   Subsequently, on the PC 3 side, the VPD returned from the multi-reader / writer 2 is received, and the operation state of the button 22 (manual operation unit) is determined by referring to the byte 7 area of the VPD (S306). ). If it is determined that the button 22 is operated (Yes in S307), the R / W application includes a predetermined data file reception for the data file stored in the memory card (storage medium) attached to the multi-reader / writer 2. Command file processing (communication event).

図13は、R/Wアプリケーションの上記ファイル処理に係る部分を抜き出して示すフローチャートである(このルーチンは、定期的に繰り返し実行されるものである)。S401では、ユーザー入力による設定カスタマイズコマンドがあるかどうかを調べる。設定カスタマイズコマンドがある場合はS407の設定カスタマイズ処理に移る。   FIG. 13 is a flowchart showing an extracted portion related to the file processing of the R / W application (this routine is repeatedly executed periodically). In S401, it is checked whether there is a setting customization command by user input. If there is a setting customization command, the process proceeds to the setting customization process in S407.

図14は、設定カスタマイズ処理の流れを示すもので、S501ではマルチリーダライタ2からのファイル転送モードを、マウス58あるいはキーボード57により入力・選択する。ファイル転送モードには、メモリーカード11〜14から転送されたデータファイルを、HDD44(データファイル保存手段)上の予め定められたフォルダ(保存領域)にコピーする(この場合、メモリーカード11〜14からデータファイルは削除されない)コピーモードと、同じくムーブ(移動:メモリーカード11〜14からデータファイルが削除される)するムーブモードとがあり、上記の入力内容に従い、S502〜S506で、そのいずれかが選択可能とされる。また、S507では、データファイルの格納先を指定する入力を行なう。例えば、周知のごとくディスプレイ56にファイルディレクトリ構造を、フォルダツリー形式で表示し、マウス58によるクリックにより、格納先とするフォルダを選択することができる。S508で選択されたフォルダがファイル格納先として設定される。   FIG. 14 shows the flow of setting customization processing. In S501, the file transfer mode from the multi-reader / writer 2 is input and selected by the mouse 58 or the keyboard 57. In the file transfer mode, the data file transferred from the memory cards 11 to 14 is copied to a predetermined folder (storage area) on the HDD 44 (data file storage means) (in this case, from the memory cards 11 to 14). Data file is not deleted) and copy mode and move mode (moving: the data file is deleted from the memory cards 11 to 14), and either of them is performed in S502 to S506 in accordance with the above input contents. Selectable. In S507, an input for designating the storage destination of the data file is performed. For example, as is well known, the file directory structure is displayed on the display 56 in the form of a folder tree, and a folder to be stored can be selected by clicking with the mouse 58. The folder selected in S508 is set as the file storage destination.

図13に戻り、S401で設定カスタマイズコマンドのない場合は、上記のように設定された条件に従い、ファイル処理が行なわれる(設定カスタマイズが実施されていない場合は、デフォルト設定に従う)。具体的にはS402に進み、前述の「操作あり」検出に対応するファイル処理の起動指令を受けたかどうかを確認する。受けた場合はS403に進み、OSのファイルシステムを用いてメモリーカードのデータファイルを読み出す通信イベントを起動し、マルチリーダライタ2から読み出されたデータファイルを受信する。そしてS404で、受信したデータファイルを保存先として指定されているHDD44内のフォルダに書き込む。次いでS405に進み、コピーモードが選択されている場合はここでファイル処理を終了するが、ムーブモードが選択されている場合はさらにS406に進み、メモリーカードの送信元となるデータファイルを削除する通信イベントを起動する。そして、削除完了のステータスを受領すれば処理を終了する。   Returning to FIG. 13, when there is no setting customization command in S401, file processing is performed according to the conditions set as described above (when setting customization is not performed, the default setting is followed). Specifically, the process proceeds to S402, and it is confirmed whether or not a file processing start command corresponding to the above-described “operation” detection has been received. If received, the process proceeds to S403, where a communication event for reading the data file of the memory card is started using the OS file system, and the data file read from the multi-reader / writer 2 is received. In step S404, the received data file is written in the folder in the HDD 44 designated as the storage destination. Next, the process proceeds to S405, and if the copy mode is selected, the file processing ends here. If the move mode is selected, the process further proceeds to S406 to delete the data file that is the transmission source of the memory card. Fire event. When the deletion completion status is received, the process is terminated.

なお、本実施形態では、手動操作部としてボタン22を設けていたが、レバー式スイッチ、ダイアルスイッチ、タッチパネル等の接触検知スイッチ、近接スイッチや光学式センサなどの非接触式センサ等を使用することも可能である。また、手動操作部の操作に伴い周辺装置側トリガを発生させるのに替えて、メモリーカードをマルチリーダライタ2に装着するに伴い、その非装着状態から装着状態への移行を検出し、その検出信号を周辺装置側トリガとして使用することも可能である。この場合は、例えばメモリーカードをマルチリーダライタ2に装着すると、メモリーカード内のデータファイルを自動的に読み出してPC3側で保存する、といった機能も実現可能となる。   In this embodiment, the button 22 is provided as a manual operation unit, but a contact detection switch such as a lever switch, a dial switch, or a touch panel, a non-contact sensor such as a proximity switch or an optical sensor, or the like is used. Is also possible. Further, instead of generating the peripheral device side trigger in accordance with the operation of the manual operation unit, when the memory card is attached to the multi-reader / writer 2, the transition from the non-attached state to the attached state is detected, and the detection is performed. It is also possible to use the signal as a peripheral device side trigger. In this case, for example, when a memory card is attached to the multi-reader / writer 2, a function of automatically reading out a data file in the memory card and storing it on the PC 3 side can be realized.

(実施形態2)
上記第1の実施形態では、周辺装置の一例としてマルチリーダライタ2の単体品を例示して説明したが、本実施形態では、周辺装置として、図15に示す多機能装置(MFD:Multi Function Device)80を用いた場合の通信システムについて説明する。多機能装置80は、マルチリーダライタ2をプリンタに組み込んだプリンタ複合機として構成され、下部に配設されたプリンタ部182と、その上部に配設されたスキャナ部183と、ADF84を備えた原稿カバー86と、装置上面の前方側に配置された操作パネル85と、装置前面にスロットが露出するように配設されたマルチリーダライタ部88とを一体的に備えてなり、プリンタ機能、スキャナ機能、コピー機能及びファクシミリ機能などを有する。
(Embodiment 2)
In the first embodiment, the multi-reader / writer 2 is illustrated as an example of a peripheral device. However, in this embodiment, a multi-function device (MFD: Multi Function Device) shown in FIG. 15 is used as the peripheral device. ) A communication system using 80 will be described. The multi-function device 80 is configured as a multi-function printer in which the multi-reader / writer 2 is incorporated in a printer, and includes a printer unit 182 disposed in a lower part, a scanner unit 183 disposed in the upper part, and a document including an ADF 84. A cover 86, an operation panel 85 disposed on the front side of the upper surface of the apparatus, and a multi-reader / writer unit 88 disposed so that the slot is exposed on the front surface of the apparatus are integrally provided. A copy function and a facsimile function.

多機能装置80は、主に第1の実施形態で説明したPC3(図6参照)と接続されて、該PC3から送信された画像データや文書データを含む印刷データに基づいて、プリンタ部182において、画像や文書を記録用紙に記録する。また、プリンタ部182は、マルチリーダライタ部88によってメモリーカードから読み取られた上記印刷データに基づいても、画像や文書を記録用紙に記録する。さらに、PC3と接続されて、PC3とマルチリーダライタ部88に挿入されたメモリーカードとの間でデータ通信を行なうリーダライタ装置としても機能する。また、スキャナ部183により読み取られた画像データをPC3へ送信したり、スキャナ部183で読み取った画像をプリンタ部182において記録するいわゆるコピーを行なうことも可能である。   The multi-function device 80 is mainly connected to the PC 3 (see FIG. 6) described in the first embodiment, and in the printer unit 182 based on print data including image data and document data transmitted from the PC 3. Record images and documents on recording paper. The printer unit 182 also records an image or document on a recording sheet based on the print data read from the memory card by the multi-reader / writer unit 88. Further, it functions as a reader / writer device that is connected to the PC 3 and performs data communication between the PC 3 and a memory card inserted into the multi-reader / writer unit 88. It is also possible to send image data read by the scanner unit 183 to the PC 3 or perform so-called copying in which an image read by the scanner unit 183 is recorded by the printer unit 182.

多機能装置80のマルチリーダライタ部88は、図16に示すように、第1スロット16,第2スロット17,第3スロット18、第4スロット19を備えている。各スロットの構成・機能及び各スロットに挿入されるメモリーカードは、第3スロット18及び第4スロット19とが一体化されていることを除けば、実施形態1でマルチリーダライタ2が備える各スロットの構成・機能及びメモリーカードと同じものである。また、マルチリーダライタ部88は、上記各スロットが配置された前面に、液晶表示部21と切換スイッチ22が設けられている。これらも実施形態1で説明したものとその構成及び機能は同じである。それ故、実施形態1と同じの構成要素には同一の符号を付与して詳細な説明は略する。   As shown in FIG. 16, the multi-reader / writer unit 88 of the multi-function device 80 includes a first slot 16, a second slot 17, a third slot 18, and a fourth slot 19. The configuration and function of each slot and the memory card inserted into each slot are the slots included in the multi-reader / writer 2 according to the first embodiment except that the third slot 18 and the fourth slot 19 are integrated. This is the same configuration and function as the memory card. The multi-reader / writer unit 88 is provided with a liquid crystal display unit 21 and a changeover switch 22 on the front surface where the slots are arranged. These are the same in configuration and function as those described in the first embodiment. Therefore, the same components as those in the first embodiment are denoted by the same reference numerals, and detailed description thereof is omitted.

なお、上述した実施形態1,2は本発明の一例にすぎず、本発明の要旨を変更しない範囲で、実施形態を適宜変更することができる。   In addition, Embodiment 1 and 2 mentioned above are only examples of this invention, and can change suitably Embodiment in the range which does not change the summary of this invention.

本発明の通信システムに適用されるマルチリーダライタの一例を正面側から見た斜視図。The perspective view which looked at an example of the multi reader / writer applied to the communication system of this invention from the front side. 同じく背面側から見た斜視図。The perspective view similarly seen from the back side. ボタン22の操作検出を行なうスイッチ機構の一例を示す回路図。FIG. 3 is a circuit diagram showing an example of a switch mechanism that detects operation of a button 22; マルチリーダライタの電気的構成の一例を示すブロック図。FIG. 3 is a block diagram illustrating an example of an electrical configuration of a multi-reader / writer. マルチリーダライタのSCSIコマンド・データ・ステータス送受信部の説明図Explanatory drawing of SCSI command / data / status transmission / reception unit of multi-reader / writer コントロールレジスタの説明図Explanation of control register ステータスレジスタの説明図Explanation of status register 本発明の通信システムに適用されるPCの概略構成を示すブロック図。The block diagram which shows schematic structure of PC applied to the communication system of this invention. PC上で動作するOSと、該OS上で動作するアプリケーションを説明するための概念図。The conceptual diagram for demonstrating OS which operate | moves on PC, and the application which operate | moves on this OS. マルチリーダライタのSCSIコマンド・データ・ステータス送受信部が行なう処理の流れを表すフローチャート。The flowchart showing the flow of the process which the SCSI command data data status transmission / reception part of a multi reader / writer performs. 本発明の通信システムにおいて実行されるデータ通信処理の処理の流れを表すフローチャート。The flowchart showing the flow of the process of the data communication process performed in the communication system of this invention. 図9のドライブ割当処理の流れを表すフローチャート。10 is a flowchart showing the flow of drive allocation processing in FIG. 9. 図9のドライブ設定処理の流れを表すフローチャート。10 is a flowchart showing the flow of drive setting processing in FIG. 9. 図9の周辺装置側トリガ監視監視処理の流れを表すフローチャート。The flowchart showing the flow of the peripheral device side trigger monitoring monitoring process of FIG. R/Wアプリケーションの本発明の要旨に係る処理部分の流れを表すフローチャート。The flowchart showing the flow of the process part which concerns on the summary of this invention of R / W application. 図13の、設定カスタマイズの処理の流れを表すフローチャート。14 is a flowchart showing the flow of setting customization processing in FIG. 13. 多機能装置の外観構成を示す斜視図。The perspective view which shows the external appearance structure of a multifunctional apparatus. 図15のマルチリーダライタ部の拡大図。FIG. 16 is an enlarged view of the multi-reader / writer unit of FIG. 15.

符号の説明Explanation of symbols

1 通信システム
2 マルチリーダライタ(周辺装置)
3 PC(ホスト装置)
11 第1メモリーカード(記憶媒体)
12 第2メモリーカード(記憶媒体)
13 第3メモリーカード(記憶媒体)
14 第4メモリーカード(記憶媒体)
22 ボタン(手動操作、周辺装置側トリガ発生手段)
27 CPU(トリガ発生報告情報返信手段、調査報告データ生成手段、トリガ発生報告情報書き込み手段、調査報告データ送信手段、交換通知情報保持手段、交換通知情報保持制御手段)
41 CPU(トリガ報告要求コマンド発行手段、報告情報受領手段、対象通信イベント起動手段、保存環境設定手段、保存領域設定変更手段、ファイル保存モード切替手段、調査指示データ作成手段、調査指示データ送信手段)
80 多機能装置(周辺装置)
88 マルチリーダライタ部
1 Communication system 2 Multi reader / writer (peripheral device)
3 PC (host device)
11 First memory card (storage medium)
12 Second memory card (storage medium)
13 Third memory card (storage medium)
14 Fourth memory card (storage medium)
22 buttons (manual operation, peripheral device trigger generation means)
27 CPU (trigger occurrence report information return means, investigation report data generation means, trigger occurrence report information writing means, investigation report data transmission means, exchange notification information holding means, exchange notification information holding control means)
41 CPU (trigger report request command issuing means, report information receiving means, target communication event starting means, storage environment setting means, storage area setting changing means, file storage mode switching means, investigation instruction data creation means, investigation instruction data transmission means)
80 Multifunctional device (peripheral device)
88 Multi reader / writer

Claims (19)

通信イベントの起動決定権を有したホスト装置と、該ホスト装置に接続される該ホスト装置の通信対象となる周辺装置とを含み、前記通信イベントを実行命令するためのコマンドを前記ホスト装置から前記周辺装置に向けて順次発行する一方、発行されたコマンドを受領した前記周辺装置が当該コマンドに対応するデータ処理を逐次実行し、その実行結果に応じた応答情報を前記ホスト装置側に返信するようになっており、かつ、前記コマンドの発行方向が前記ホスト装置側から前記周辺装置側への一方向に規制された主通信プロトコルを有する通信システムにおいて、
前記周辺装置に設けられ、予め定められた内容の対象通信イベントの起動を前記ホスト装置に促すための周辺装置側トリガを、該周辺装置側でのユーザー操作に基づいて発生させる周辺装置側トリガ発生手段と、
前記ホスト装置側に設けられ、前記周辺装置における前記周辺装置側トリガの発生を監視するために、前記トリガ発生報告情報を前記応答情報として要求するためのトリガ報告要求コマンドを、前記主通信プロトコルに従い前記周辺装置に向けて発行するトリガ報告要求コマンド発行手段と、
前記周辺装置側に設けられ、前記周辺装置側トリガの発生の有無を反映したトリガ発生報告情報を前記応答情報として前記ホスト装置に前記主通信プロトコルに従い返信するトリガ発生報告情報返信手段と、
前記ホスト装置側に設けられ、前記トリガ発生報告情報を前記周辺装置から受領する報告情報受領手段と、
当該トリガ発生報告情報の内容に基づいて前記周辺装置側トリガの有無を判定し、該周辺装置側トリガがありと判定された場合に、前記対象通信イベントを起動させる対象通信イベント起動手段と、
を有してなることを特徴とする通信システム。
A host device having a communication event activation decision right, and a peripheral device to be communicated with the host device connected to the host device, and a command for instructing execution of the communication event from the host device While sequentially issuing to the peripheral device, the peripheral device that has received the issued command sequentially executes data processing corresponding to the command, and returns response information corresponding to the execution result to the host device side. In the communication system having a main communication protocol in which the command issuance direction is restricted in one direction from the host device side to the peripheral device side,
Peripheral device side trigger generation that is provided in the peripheral device and generates a peripheral device side trigger for prompting the host device to start a target communication event with predetermined contents based on a user operation on the peripheral device side Means,
A trigger report request command for requesting the trigger occurrence report information as the response information for monitoring the occurrence of the peripheral device side trigger in the peripheral device is provided according to the main communication protocol. Trigger report request command issuing means for issuing to the peripheral device;
Trigger occurrence report information return means provided on the peripheral device side, which returns trigger occurrence report information reflecting the presence or absence of the occurrence of the peripheral device trigger as the response information to the host device according to the main communication protocol;
Report information receiving means provided on the host device side for receiving the trigger occurrence report information from the peripheral device;
Determining the presence or absence of the peripheral device side trigger based on the content of the trigger occurrence report information, and when it is determined that there is a peripheral device side trigger, target communication event starting means for starting the target communication event;
A communication system comprising:
前記トリガ報告要求コマンド発行手段は、前記トリガ報告要求コマンドを前記周辺装置に対し予め定められた時間間隔で繰り返し継続的に発行するものである請求項1記載の通信システム。   The communication system according to claim 1, wherein the trigger report request command issuing means repeatedly issues the trigger report request command to the peripheral device at predetermined time intervals. 前記周辺装置と前記ホスト装置とは、前記ホスト装置側からの前記周辺装置のポーリングは可能であって、該周辺装置側からの前記ホスト装置の逆ポーリングが不能なシリアル通信機構を介して接続され、前記通信イベントを実行するための前記ホスト装置と前記周辺装置との間における情報転送が、前記ホスト装置が前記周辺装置をポーリングする形式にてシリアル通信により実行されるようになっている請求項1又は請求項2に記載の通信システム。   The peripheral device and the host device are connected via a serial communication mechanism in which the peripheral device can be polled from the host device side and the host device cannot be reversely polled from the peripheral device side. The information transfer between the host device and the peripheral device for executing the communication event is executed by serial communication in a format in which the host device polls the peripheral device. The communication system according to claim 1 or 2. 前記シリアル通信機構はUSBプロトコルに従うものである請求項3記載の通信システム。   4. The communication system according to claim 3, wherein the serial communication mechanism conforms to a USB protocol. 前記周辺装置が、少なくともデータの読出しに係るデータアクセスが可能とされた記憶媒体が内蔵されるか又は着脱可能に装着され、前記通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成され、
前記対象通信イベントは、前記記憶媒体に記憶されたデータファイルを、前記周辺装置にて読み出して前記ホスト装置へ送信する情報読出し送信処理を含むものとして定められている請求項1ないし請求項4のいずれか1項に記載の通信システム。
The peripheral device is configured as a storage device in which a storage medium capable of at least data access relating to data reading is incorporated or detachably mounted, and data access to the storage medium is performed by the communication event And
5. The target communication event is defined as including an information read transmission process in which a data file stored in the storage medium is read by the peripheral device and transmitted to the host device. The communication system according to any one of the above.
前記ホスト装置側に設けられ、前記対象通信イベントにて前記周辺装置から受信した前記データファイルを該ホスト装置側に設けられたホスト装置側記憶装置上の予め定められた保存領域に保存するデータファイル保存手段を有する請求項5記載の通信システム。   A data file that is provided on the host device side and that stores the data file received from the peripheral device at the target communication event in a predetermined storage area on the host device side storage device provided on the host device side The communication system according to claim 5, further comprising a storage unit. 前記記憶媒体は、前記データの読出し、書き込み及び削除に係るデータアクセスが可能とされたものであり、
前記ホスト装置側に設けられ、前記データファイル保存手段による前記保存領域への前記データファイルの格納に対応して、前記周辺装置に対し前記記憶媒体上の送信元のデータファイルを削除させるファイルムーブイベントを起動するファイルムーブ制御手段が設けられている請求項6記載の通信システム。
The storage medium is capable of data access related to reading, writing and deletion of the data,
A file move event that is provided on the host device side and causes the peripheral device to delete a transmission source data file on the storage medium in response to storage of the data file in the storage area by the data file storage means The communication system according to claim 6, further comprising a file move control means for activating.
前記ホスト装置側に設けられ、前記データファイルの前記保存領域への保存環境を設定する保存環境設定手段が設けられている請求項6又は請求項7に記載の通信システム。   8. The communication system according to claim 6, further comprising a storage environment setting unit that is provided on the host device side and sets a storage environment of the data file in the storage area. 前記保存環境設定手段は、前記データファイルの前記保存領域を設定・変更するための保存領域設定変更手段を有する請求項8記載の通信システム。   9. The communication system according to claim 8, wherein the storage environment setting means includes storage area setting change means for setting / changing the storage area of the data file. 請求項7記載の要件を備え、前記保存環境設定手段は、前記ファイルムーブ制御手段による前記ファイルムーブイベントの起動が禁止されるファイルコピーモードと、前記前記ファイルムーブイベントの起動が許可されるファイルムーブモードとを切り替えるファイル保存モード切替手段を有する請求項8又は請求項9に記載の通信システム。   8. The storage environment setting means according to claim 7, wherein the storage environment setting means includes a file copy mode in which activation of the file move event is prohibited by the file move control means, and a file move in which activation of the file move event is permitted. The communication system according to claim 8 or 9, further comprising file storage mode switching means for switching between modes. 前記周辺装置側トリガ発生手段は、前記周辺装置に設けられた手動操作部と、当該手動操作部による操作信号を前記周辺装置側トリガとして発生させる操作信号発生部とを有する請求項1ないし請求項10のいずれか1項に記載の通信システム。   The peripheral device-side trigger generation means includes a manual operation unit provided in the peripheral device, and an operation signal generation unit that generates an operation signal generated by the manual operation unit as the peripheral device-side trigger. The communication system according to any one of 10. 前記トリガ報告要求コマンドは、前記周辺装置に対し該周辺装置自身に対する調査報告処理を要求する調査要求コマンドであり、
前記ホスト装置は、前記調査要求コマンドの発行に伴い、調査報告指示内容を示す予め定められたフレームフォーマットを有するとともに当該フレームの予め定められたフィールドに、前記周辺装置側トリガの発生報告指示情報が付加情報として書き込まれた調査指示データを作成する調査指示データ作成手段と、作成された前記調査指示データを前記周辺装置に送信する調査指示データ送信手段とを有し、
前記周辺装置は、該調査指示データを受けて、予め定められたフレームフォーマットを有する調査報告データを生成する調査報告データ生成手段と、該調査報告データの予め定められたフィールドに前記トリガ発生報告情報を書き込むトリガ発生報告情報書き込み手段と、当該トリガ発生報告情報が書き込まれた前記調査報告データを応答情報として前記ホスト装置に送信する調査報告データ送信手段とが設けられる請求項1ないし請求項11のいずれか1項に記載の通信システム。
The trigger report request command is a survey request command for requesting the peripheral device to perform a survey report process on the peripheral device itself,
The host device has a predetermined frame format indicating the content of the investigation report instruction in response to the issue of the investigation request command, and the peripheral device side trigger generation report instruction information is stored in a predetermined field of the frame. Survey instruction data creating means for creating survey instruction data written as additional information, and survey instruction data transmitting means for transmitting the created survey instruction data to the peripheral device,
The peripheral device receives the survey instruction data, generates survey report data having a predetermined frame format, and generates trigger report information in a predetermined field of the survey report data. 12. A trigger generation report information writing means for writing the response information, and a survey report data transmitting means for transmitting the investigation report data in which the trigger occurrence report information is written as response information to the host device. The communication system according to any one of the above.
前記調査指示データ作成手段は前記調査指示データにおいて、格納するべき主格納情報として前記発生報告指示情報以外の情報が格納されるよう前記主通信プロトコルに規定されたフィールドに、前記発生報告指示情報を前記主格納情報に兼用させる形で書き込むものである請求項12記載の通信システム。   The investigation instruction data creating means stores the occurrence report instruction information in a field defined in the main communication protocol so that information other than the occurrence report instruction information is stored as main storage information to be stored in the investigation instruction data. 13. The communication system according to claim 12, wherein the communication is written in a form that is also used as the main storage information. 前記周辺装置が、少なくともデータの読出しに係るデータアクセスが可能とされた記憶媒体が内蔵されるか又は着脱可能に装着され、前記通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成され、
前記調査指示データにおいて、前記主通信プロトコルに従い前記記憶媒体に対するデータの読み出し又は書き込みに係る通信イベントを実行する際に、該読み出し処理又は書き込み処理に割り当てられる当該記憶媒体上のメモリ領域のアロケーション長情報を格納するためのフィールドがアロケーション長設定フィールドとして確保されてなり、該アロケーション長設定フィールドにおいて前記アロケーション長情報を前記主格納情報とする形で、該アロケーション長情報に兼用される前記発生報告指示情報を書き込む請求項13記載の通信システム。
The peripheral device is configured as a storage device in which a storage medium capable of at least data access relating to data reading is incorporated or detachably mounted, and data access to the storage medium is performed by the communication event And
In the survey instruction data, when executing a communication event related to reading or writing of data to the storage medium according to the main communication protocol, the allocation length information of the memory area on the storage medium assigned to the reading or writing process Is generated as an allocation length setting field, and the occurrence report instruction information that is also used as the allocation length information in the form of the allocation length information in the allocation length setting field as the main storage information. The communication system according to claim 13, wherein:
前記主通信プロトコルにおいて、前記アロケーション長設定フィールドのサイズが一定ビット長に定められるとともに、前記アロケーション長として設定可能な最大値をバイト単位にて表わしたときのビット数を、前記アロケーション長設定フィールドの総ビット数未満に設定し、前記最大値を超えるアロケーション長が前記アロケーション長設定フィールドに記述された場合には、記述されたアロケーション長値とは無関係に前記最大値を前記アロケーション長の実設定値として定める一方、該最大値を超える冗長なアロケーション長記述値に一義的に対応付ける形で、前記発生報告指示情報を含む、異なる付加情報内容が定義されてなる請求項14に記載の通信システム。   In the main communication protocol, the size of the allocation length setting field is determined to be a constant bit length, and the number of bits when the maximum value that can be set as the allocation length is expressed in bytes is expressed in the allocation length setting field. When the allocation length is set to less than the total number of bits and an allocation length exceeding the maximum value is described in the allocation length setting field, the maximum value is set to the actual setting value of the allocation length regardless of the described allocation length value. 15. The communication system according to claim 14, wherein different additional information contents including the occurrence report instruction information are defined in a manner that uniquely defines a redundant allocation length description value exceeding the maximum value. 前記周辺装置は、データの読出し及び書込の双方に係るデータアクセスが可能とされた記憶媒体が着脱可能に装着され、前記通信イベントにより該記憶媒体に対してデータアクセスを行なう記憶装置として構成されるとともに、
前記周辺装置には、前記記憶媒体の交換がなされた場合に当該記憶媒体の交換を前記ホスト装置に通知するための交換通知情報を保持する交換通知情報保持手段と、前記ホスト装置から予め定められた第一種コマンドを受信した場合には、該コマンドの実行後に前記交換通知情報保持手段に保持されている前記交換通知情報をクリアし、同じく前記第一種コマンド以外の第二種コマンドを受信した場合は、該コマンドの実行後においても前記交換通知情報保持手段による前記交換通知情報の保持状態を保留する交換通知情報保持制御手段とを有し、
前記トリガ報告要求コマンドとして使用する前記調査要求コマンドとして前記第二種コマンドが使用される請求項12ないし請求項15のいずれか1項に記載の通信システム。
The peripheral device is configured as a storage device in which a storage medium capable of data access for both reading and writing of data is detachably mounted and data access to the storage medium is performed by the communication event. And
In the peripheral device, when the storage medium is exchanged, exchange notice information holding means for holding exchange notice information for notifying the host apparatus of the exchange of the storage medium, and predetermined from the host apparatus. When the first type command is received, the exchange notification information held in the exchange notification information holding unit is cleared after the command is executed, and the second type command other than the first type command is received. In this case, it has an exchange notification information holding control means for holding the exchange notification information holding state by the exchange notification information holding means even after execution of the command,
The communication system according to any one of claims 12 to 15, wherein the second type command is used as the investigation request command used as the trigger report request command.
前記調査要求コマンドが、前記周辺装置に対し該周辺装置自身の構成及び属性を特定する情報である構成/属性特定情報の報告を指示するための、前記第二種コマンドをなす構成/属性調査要求コマンドである請求項15記載の通信システム。   Configuration / attribute survey request that constitutes the second type command for the survey request command to instruct the peripheral device to report configuration / attribute identification information that is information identifying the configuration and attributes of the peripheral device itself. The communication system according to claim 15, wherein the communication system is a command. 前記主通信プロトコルがSCSIプロトコルであり、前記調査要求コマンドとしてInquiryコマンドが使用される請求項17に記載の通信システム。   The communication system according to claim 17, wherein the main communication protocol is a SCSI protocol, and an inquiry command is used as the investigation request command. 請求項1ないし請求項18のいずれか1項に記載の通信システムを構成する前記周辺装置であって、予め定められた内容の対象通信イベントの起動を前記ホスト装置に促すための周辺装置側トリガを、該周辺装置側でのユーザー操作に基づいて発生させる前記周辺装置側トリガ発生手段と、
前記周辺装置側に設けられ、前記ホスト装置からの前記トリガ報告要求コマンドに対応する前記トリガ発生報告情報を前記応答情報として前記ホスト装置に前記主通信プロトコルに従い返信するトリガ発生報告情報返信手段と、
を有してなることを特徴とする周辺装置。
19. The peripheral device constituting the communication system according to claim 1, wherein the peripheral device side trigger for prompting the host device to start a target communication event having a predetermined content. The peripheral device side trigger generating means for generating the peripheral device based on a user operation on the peripheral device side,
Trigger generation report information return means provided on the peripheral device side, which returns the trigger generation report information corresponding to the trigger report request command from the host device as the response information to the host device according to the main communication protocol;
A peripheral device comprising:
JP2006092556A 2005-09-20 2006-03-29 Communication system, and peripheral device used therefor Pending JP2007265299A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006092556A JP2007265299A (en) 2006-03-29 2006-03-29 Communication system, and peripheral device used therefor
US11/691,273 US7797398B2 (en) 2005-09-20 2007-03-26 Communication system, and peripheral device having trigger generating device and computer program product that monitors whether a trigger has been generated

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006092556A JP2007265299A (en) 2006-03-29 2006-03-29 Communication system, and peripheral device used therefor

Publications (1)

Publication Number Publication Date
JP2007265299A true JP2007265299A (en) 2007-10-11

Family

ID=38638184

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006092556A Pending JP2007265299A (en) 2005-09-20 2006-03-29 Communication system, and peripheral device used therefor

Country Status (1)

Country Link
JP (1) JP2007265299A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892955A (en) * 1996-09-20 1999-04-06 Emc Corporation Control of a multi-user disk storage system
JP2002077690A (en) * 2000-08-31 2002-03-15 Olympus Optical Co Ltd Electronic camera and computer system
JP2002109528A (en) * 2000-09-26 2002-04-12 Funai Electric Co Ltd Data storage device
JP2005050192A (en) * 2003-07-30 2005-02-24 Matsushita Electric Ind Co Ltd Information recording system
JP2005538455A (en) * 2002-09-06 2005-12-15 マクスター コーポレイション 1 button external backup

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5892955A (en) * 1996-09-20 1999-04-06 Emc Corporation Control of a multi-user disk storage system
JP2002077690A (en) * 2000-08-31 2002-03-15 Olympus Optical Co Ltd Electronic camera and computer system
JP2002109528A (en) * 2000-09-26 2002-04-12 Funai Electric Co Ltd Data storage device
JP2005538455A (en) * 2002-09-06 2005-12-15 マクスター コーポレイション 1 button external backup
JP2005050192A (en) * 2003-07-30 2005-02-24 Matsushita Electric Ind Co Ltd Information recording system

Similar Documents

Publication Publication Date Title
US7797398B2 (en) Communication system, and peripheral device having trigger generating device and computer program product that monitors whether a trigger has been generated
US7941579B2 (en) Communication system for authenticating authority of host device for accessing storage medium set to periphery device
JP4551320B2 (en) Electronic flash memory external storage method and apparatus
US6993618B2 (en) Dual-mode flash storage exchanger that transfers flash-card data to a removable USB flash key-drive with or without a PC host
US7975101B2 (en) Storage medium storing drive configuration setting program
US20040078514A1 (en) Apparatus and method for simply launching computer process to perform task
US7869074B2 (en) Communication system, information processing device, peripheral device and communication method
JP2003241908A (en) External connection equipment and host equipment
JP4622770B2 (en) COMMUNICATION SYSTEM, INFORMATION PROCESSING DEVICE, PERIPHERAL DEVICE, AND COMMUNICATION METHOD
JP3914949B2 (en) USB storage device, control device thereof, and program for causing control device to execute
US20040068601A1 (en) Information input device with multiple memory card reader
EP1749268B1 (en) Method for managing the plug-in or removal of a memory card into or from a card reader and apparatus for use in said method
JP3699717B2 (en) USB storage device and control device thereof
JP4618560B2 (en) Communication system and peripheral device used therefor
TW446884B (en) Automatic configuration of primary and secondary peripheral devices for a computer
JP2007265303A (en) Computer program
JP4618559B2 (en) Communication system and peripheral device used therefor
JP2007265299A (en) Communication system, and peripheral device used therefor
JP2007265300A (en) Communication system and peripheral equipment to be used for the same
JP2007265302A (en) Communication system and peripheral device to be used for the same
JP2007265305A (en) Communication system and peripheral equipment to be used for the same
JP4807667B2 (en) Communication system and peripheral device used therefor
US20010017701A1 (en) Peripheral device for information processing and information processing system
JP2007265304A (en) Communication system and peripheral device used therefor
JP2008033451A (en) Detachable storage medium

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100218

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100810