JP2008107997A5 - - Google Patents

Download PDF

Info

Publication number
JP2008107997A5
JP2008107997A5 JP2006289037A JP2006289037A JP2008107997A5 JP 2008107997 A5 JP2008107997 A5 JP 2008107997A5 JP 2006289037 A JP2006289037 A JP 2006289037A JP 2006289037 A JP2006289037 A JP 2006289037A JP 2008107997 A5 JP2008107997 A5 JP 2008107997A5
Authority
JP
Japan
Prior art keywords
data
transmission
host computer
transmission data
communication
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2006289037A
Other languages
Japanese (ja)
Other versions
JP2008107997A (en
Filing date
Publication date
Application filed filed Critical
Priority to JP2006289037A priority Critical patent/JP2008107997A/en
Priority claimed from JP2006289037A external-priority patent/JP2008107997A/en
Publication of JP2008107997A publication Critical patent/JP2008107997A/en
Publication of JP2008107997A5 publication Critical patent/JP2008107997A5/ja
Withdrawn legal-status Critical Current

Links

Description

データ通信方法、データ通信装置及びデータ通信システムData communication method, data communication apparatus, and data communication system

本発明は、ホストコンピュータとデータ通信装置との間に設定される複数の論理的なデータチャネルを介して行われるUSBのデータ通信方法、データ通信装置及びデータ通信システムに関する。   The present invention relates to a USB data communication method, a data communication apparatus, and a data communication system which are performed via a plurality of logical data channels set between a host computer and a data communication apparatus.

キーボードやマウス、モデム、ジョイスティックなどのデバイスとホストコンピュータを結ぶデータ伝送路の規格としてUSB(Universal Serial Bus)が周知である。ホストコンピュータとの間であまり大容量のデータをやりとりしない機器を接続するための規格としてはUSB1.1が知られているが、近年では、高速転送の需要を満たすことを目的としてUSB2.0(HI-SPEED USB)が策定されている。   USB (Universal Serial Bus) is well known as a standard for data transmission paths connecting devices such as a keyboard, mouse, modem, and joystick to a host computer. USB 1.1 is known as a standard for connecting a device that does not exchange a large amount of data with a host computer. However, in recent years, USB 2.0 ( HI-SPEED USB) has been formulated.

ここで、USB規格を採用したデータ転送方式について図6を参照して簡単に説明する。ホストコンピュータとUSBデバイスとがUSBケーブルによって物理的に接続されると、物理的な通信路とは別に論理的な通信路が設定され、ホストコンピュータとUSBデバイスとの間でデータ転送をするには、この論理的な通信路を介して行われる。USBデバイスには送受信されるデータを格納しておくメモリ領域が予め設定されている。このメモリ領域は、一般にエンドポイントバッファと呼ばれ、USBデバイスは複数のエンドポイントバッファを持つことが可能であり、各エンドポイントバッファとホストコンピュータ間を論理的な通信路によって接続されている。複数のエンドポイントバッファをグループ化することで、インターフェースという単位とすることができる。   Here, a data transfer method adopting the USB standard will be briefly described with reference to FIG. When the host computer and the USB device are physically connected by a USB cable, a logical communication path is set apart from the physical communication path, and data is transferred between the host computer and the USB device. This is done via this logical communication path. A memory area for storing data to be transmitted and received is set in advance in the USB device. This memory area is generally called an endpoint buffer, and a USB device can have a plurality of endpoint buffers, and each endpoint buffer and the host computer are connected by a logical communication path. By grouping a plurality of endpoint buffers, a unit called an interface can be obtained.

特許文献1には、非同期転送用バッファ、同期転送用バッファ、及びデータ転送方式通知用バッファから構成されたエンドポイントバッファを備えた周辺機器(プリンタ)が開示されている。ここでは、ホストコンピュータとプリンタとの間は、これら3つのバッファに対応する3つの論理的な通信路によって通信可能に接続された構成となっている。   Patent Document 1 discloses a peripheral device (printer) that includes an endpoint buffer that includes an asynchronous transfer buffer, a synchronous transfer buffer, and a data transfer method notification buffer. Here, the host computer and the printer are configured to be communicably connected via three logical communication paths corresponding to these three buffers.

ホストコンピュータは、デバイスのUSBアドレスと、エンドポイント番号を使ってアクセスし、各エンドポイントバッファに対してポーリングを行う。特許文献2には、複数のデータチャネルを所定の間隔でポーリングする方法が開示されている。   The host computer accesses using the USB address of the device and the endpoint number, and polls each endpoint buffer. Patent Document 2 discloses a method of polling a plurality of data channels at predetermined intervals.

図6及び図7を参照して、エンドポイントバッファ0〜エンドポントバッファ3の合計4つのエンドポイントバッファを備えたデバイスと、ホストコンピュータとの間のデータ通信方法を説明する。なお、以下本明細書において各エンドポイントバッファとホストコンピュータとの間に構成される論理的な通信路をデータチャネルと呼ぶこととする。   With reference to FIGS. 6 and 7, a data communication method between a host computer and a device having a total of four endpoint buffers, that is, endpoint buffer 0 to endpoint buffer 3, will be described. In the following description, a logical communication path configured between each endpoint buffer and the host computer is referred to as a data channel.

エンドポイントバッファ1のみに送信データが格納された状態を前提に以下、説明する。ホストコンピュータは、デバイスのエンドポイントバッファ0〜エンドポントバッファ3に対して順次、データ送信要求を行う。まず、T100で、エンドポイントバッファ0に対してデータ送信要求1を行うが、エンドポイントバッファ0には送信データがないため、次にエンドポイントバッファ1に対するデータ送信要求2を行う(T101)。エンドポイントバッファ1には、送信データが格納されているため、エンドポイントバッファからホストコンピュータへ送信データを転送する(T102)。続けて、エンドポイントバッファ2に対してデータ要求3を行うが(T103)、エンドポイントバッファ2にも送信データがないため、エンドポイントバッファ3に対して次のデータ送信要求4を行うが(T104)、エンドポイントバッファ4にも送信データがないため、エンドポイントバッファ0に対して再びデータ送信要求1を行う(T105)。このように、各エンドポイントバッファに対するポーリングを行うことで、各データチャネルを介して転送される送信データの有無を判断する。 The following description is based on the assumption that transmission data is stored only in the endpoint buffer 1. The host computer sequentially issues data transmission requests to the endpoint buffer 0 to the endpoint buffer 3 of the device. First, at T100, a data transmission request 1 is made to the endpoint buffer 0, but since there is no transmission data in the endpoint buffer 0, a data transmission request 2 to the endpoint buffer 1 is made next (T101). Since transmission data is stored in the endpoint buffer 1 , the transmission data is transferred from the endpoint buffer 1 to the host computer (T102). Subsequently, the data request 3 is made to the endpoint buffer 2 (T103), but since there is no transmission data in the endpoint buffer 2, the next data transmission request 4 is made to the endpoint buffer 3 (T104). ) Since there is no transmission data in the endpoint buffer 4, the data transmission request 1 is again made to the endpoint buffer 0 (T105). In this way, by polling each endpoint buffer, it is determined whether there is transmission data transferred via each data channel.

特開2003−248558号公報JP 2003-248558 A 特表2004−515966号公報JP-T-2004-515966

しかしながら、従来のように、全てのエンドポイントバッファに対してポーリングし、送信データが格納されたエンドポイントバッファがあれば送信データを送信するようなデータ通信方法では、インターフェースの設計の仕方によってエンドポイントバッファが増設されたり、データチャネル数が増加した場合には、それに比例してポーリング回数が増加するため、通信負荷が増えてしまい通信パフォーマンスが低下してしまうという問題があった。   However, in the conventional data communication method in which all endpoint buffers are polled and transmission data is transmitted if there is an endpoint buffer in which transmission data is stored, the endpoint is determined depending on how the interface is designed. When the number of buffers is increased or the number of data channels is increased, the number of polling increases in proportion thereto, which causes a problem that the communication load increases and the communication performance is deteriorated.

本発明は係る事情に鑑みてなされたものであり、ホストコンピュータとデータ通信装置との間に設定される複数の論理的なデータチャネルを介して行われるデータ通信において、通信パフォーマンスの良いデータ転送を行うことを目的とする。   The present invention has been made in view of such circumstances, and in data communication performed via a plurality of logical data channels set between a host computer and a data communication device, data transfer with good communication performance is performed. The purpose is to do.

上記課題は以下の手段によって解決することができる。
本発明は、ホストコンピュータとデータ通信装置との間に設定される複数の論理的なデータチャネルを介して行われるUSBのデータ通信方法であって、
前記ホストコンピュータは、前記複数の論理的なデータチャネルのうち何れかのデータチャネルを介して、前記データ通信装置に対して定期的に問い合わせを行い、
前記データ通信装置は、前記問い合わせに応じて、前記ホストコンピュータへ送信する送信データの有無を示すデバイス送信状態を含む通信ステータスを前記ホストコンピュータへ送信し、
前記ホストコンピュータは、前記デバイス送信状態に基づき前記送信データが有ると判断すると送信データ送信要求を前記データ通信装置へ送信し
前記データ通信装置は、該当するデータチャネルを介して前記送信データを前記ホストコンピュータへ送信することを特徴とする。
The above problem can be solved by the following means.
The present invention is a USB data communication method performed via a plurality of logical data channels set between a host computer and a data communication device,
The host computer periodically inquires the data communication device via any one of the plurality of logical data channels,
In response to the inquiry , the data communication apparatus transmits a communication status including a device transmission state indicating presence / absence of transmission data to be transmitted to the host computer, to the host computer ,
When the host computer determines that the transmission data exists based on the device transmission state , the host computer transmits a transmission data transmission request to the data communication device ,
The data communication apparatus, and transmits the transmission data through the corresponding data channel to the host computer.

上記構成によれば、ホストコンピュータは複数のデータチャネルのうち1つのデータチャネルを介して問い合わせを行い、問い合わせに応じて送信された通信ステータスに含まれるデバイス送信状態から送信データの有無を判断するよう構成されている。したがって、全てのデータチャネルに対して逐一問い合わせを行う必要がないので通信負荷を軽減することができる。さらに、送信データが有る場合には、該当するデータチャネルを介してホストコンピュータからデータ送信要求を行うので、データチャネル数が増加されても、通信パフォーマンスを低下させずに、データ転送することが可能である。   According to the above configuration, the host computer makes an inquiry through one data channel among a plurality of data channels, and determines whether there is transmission data from the device transmission state included in the communication status transmitted in response to the inquiry. It is configured. Accordingly, since it is not necessary to make an inquiry for every data channel, the communication load can be reduced. In addition, when there is transmission data, a data transmission request is made from the host computer via the corresponding data channel, so even if the number of data channels is increased, it is possible to transfer data without degrading communication performance. It is.

また、上記データ通信方式において、前記データ通信装置は、前記該当するデータチャネルのうち、優先度の高い順に前記送信データを前記ホストコンピュータへ送信することを特徴とする。 In the data communication system, the data communication apparatus transmits the transmission data to the host computer in descending order of priority among the corresponding data channels.

上記構成によれば、送信データが複数ある場合でも、送信優先度の高い順に、該当するデータチャネルを介してホストコンピュータから送信データが送信されるので、送信データが複数あった場合でも、複数のデータチャネルを効率的に使用することが可能である。   According to the above configuration, even when there are a plurality of transmission data, the transmission data is transmitted from the host computer via the corresponding data channel in the order of the transmission priority. It is possible to use the data channel efficiently.

また、本発明は、ホストコンピュータとの間に設定される複数の論理的なデータチャネルを介して、USBのデータ通信を行うデータ通信装置であって、
前記ホストコンピュータへ送信する送信データが格納され、かつ前記データチャネルに対応するよう設定される複数の送信データ格納領域と、各送信データ格納領域に前記送信データが格納されているか否かを示すデバイス送信状態を含む通信ステータスを生成する通信ステータス生成部と、を備え、
前記ホストコンピュータからの送信データ送信要求に応じて、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とする。
また、本発明は、ホストコンピュータと、前記ホストコンピュータとの間に設定される複数の論理的なデータチャネルを介してUSBのデータ通信を行うデータ通信装置と、を備えたデータ通信システムであって、
前記データ通信装置は、
前記ホストコンピュータへ送信する送信データが格納され、かつ前記データチャネルに対応するよう設定される複数の送信データ格納領域と、各送信データ格納領域に前記送信データが格納されているか否かを示すデバイス送信状態を含む通信ステータスを生成する通信ステータス生成部と、を備え
前記ホストコンピュータからの送信データ送信要求に応じて、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とする。
Further, the present invention is a data communication apparatus for performing USB data communication via a plurality of logical data channels set with a host computer,
A plurality of transmission data storage areas in which transmission data to be transmitted to the host computer are stored and set to correspond to the data channel, and a device indicating whether or not the transmission data is stored in each transmission data storage area A communication status generation unit that generates a communication status including a transmission state, and
The transmission data is transmitted from a transmission data storage area in which the transmission data is stored in response to a transmission data transmission request from the host computer.
The present invention also provides a data communication system comprising a host computer and a data communication device that performs USB data communication via a plurality of logical data channels set between the host computer. ,
The data communication device includes:
A plurality of transmission data storage areas in which transmission data to be transmitted to the host computer are stored and set to correspond to the data channel, and a device indicating whether or not the transmission data is stored in each transmission data storage area A communication status generation unit for generating a communication status including a transmission state, and transmitting the transmission data from a transmission data storage area in which the transmission data is stored in response to a transmission data transmission request from the host computer. Features.

上記構成によれば、データ通信装置は、各送信データ格納領域に送信データが格納されているか否かを示すデバイス送信状態を含む通信ステータスを生成する通信ステータス生成部を備えている。したがって、ホストコンピュータは、通信ステータスを受信するだけで、送信データの有無を確認することができる。これにより、全てのデータチャネルに対して逐一問い合わせを行う必要がないので、通信負荷を軽減することができる。さらに、送信データが有る場合にのみホストコンピュータからの送信データ送信要求に応じて、該当するデータチャネルを介して送信データを送信するので、データチャネル数が増加されても、通信パフォーマンスを低下させずに、データ転送することが可能である。   According to the above configuration, the data communication apparatus includes the communication status generation unit that generates a communication status including a device transmission state indicating whether or not transmission data is stored in each transmission data storage area. Therefore, the host computer can confirm the presence / absence of transmission data only by receiving the communication status. As a result, it is not necessary to make an inquiry for every data channel one by one, so that the communication load can be reduced. Furthermore, since transmission data is transmitted through the corresponding data channel in response to a transmission data transmission request from the host computer only when there is transmission data, communication performance is not degraded even if the number of data channels is increased. It is possible to transfer data.

また、本発明において、前記データチャネルには送信データの送信優先度が設定されており、前記ホストコンピュータから送信された送信データ送信要求に応じて、前記送信優先度にしたがって、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とする。   In the present invention, transmission priority of transmission data is set in the data channel, and the transmission data is stored according to the transmission priority in response to a transmission data transmission request transmitted from the host computer. The transmission data is transmitted from the transmitted data storage area.

上記構成によれば、送信データが複数のデータ格納領域に格納されていた場合でも、送信優先度の高い順に、該当するデータチャネルを介して送信データを送信することができるので、送信データが複数あった場合でも、複数のデータチャネルを効率的に使用することが可能である。   According to the above configuration, even when the transmission data is stored in a plurality of data storage areas, the transmission data can be transmitted through the corresponding data channel in the descending order of transmission priority. Even in such a case, it is possible to efficiently use a plurality of data channels.

以下、本発明に係るデータ通信方法、データ通信装置及びデータ通信システムの実施形態について、図面を用いて説明する。なお、データ通信装置の一例として、ホストコンピュータに接続されたUSBデバイスを挙げて説明する。図1は、本実施形態のデータ通信システム200を示した概略図である。
図1に示すように、本実施形態では、ホストコンピュータ100のUSBポートに複数のUSBデバイスを接続するための分岐装置であるハブ11を介して 、レーベルプリンタ20、メディアドライブ30及びメディア搬送機構40の3つのUSBデバイスが通信可能に接続されている。レーベルプリンタ20はCD/DVDなどのメディアの片面にレーベル印刷を行い、メディアドライブ30はメディアの他面にデータを書き込み、メディア搬送機構40は搬送アームを駆動させて、これらのUSBデバイスとメディアをスタックするメディアスタッカとの間でメディアを搬送する。
本実施形態では、レーベルプリンタ20、メディアドライブ30及びメディア搬送機構40と、が図示せぬ筐体によって覆われて、メディアに対するデータの書込み、レーベル印刷を行うメディア処理装置10を形成している。
Hereinafter, embodiments of a data communication method, a data communication apparatus, and a data communication system according to the present invention will be described with reference to the drawings. Note that a USB device connected to a host computer will be described as an example of the data communication apparatus. FIG. 1 is a schematic diagram showing a data communication system 200 of the present embodiment.
As shown in FIG. 1, in this embodiment, the label printer 20, the media drive 30, and the media transport mechanism 40 are connected via a hub 11 that is a branch device for connecting a plurality of USB devices to the USB port of the host computer 100. Are connected so that they can communicate. The label printer 20 performs label printing on one side of a medium such as a CD / DVD, the media drive 30 writes data on the other side of the medium, and the media transport mechanism 40 drives the transport arm to connect these USB devices and media. Media is transported to and from the stacked media stacker.
In this embodiment, the label printer 20, the media drive 30, and the media transport mechanism 40 are covered by a housing (not shown) to form the media processing device 10 that writes data to the media and performs label printing.

以下では、ホストコンピュータ100とメディア搬送機構40との間で行われるUSBのデータ通信について説明する。まず、背景技術の説明において参照した図6に基づき、一般的なUSBデバイスの内部構成について説明する。   Hereinafter, USB data communication performed between the host computer 100 and the media transport mechanism 40 will be described. First, an internal configuration of a general USB device will be described based on FIG. 6 referred to in the description of the background art.

USBのデータ転送は、ホストコンピュータがUSBデバイスに対して定期的にデータ送信要求を行い(ポーリング)、データ送信要求にデバイスが応答するという形式で行われる。USBの場合には、ホストコンピュータに複数のデバイスが接続されている場合が多いため、各デバイスのCPUがデータ送信要求に応答するのではなく、エンドポイントという概念を用いて、エンドポイント単位でホストコンピュータからのポーリングやデータ転送を行っている。   USB data transfer is performed in such a manner that the host computer periodically makes a data transmission request to the USB device (polling), and the device responds to the data transmission request. In the case of USB, there are many cases where a plurality of devices are connected to a host computer. Therefore, the CPU of each device does not respond to a data transmission request, but uses the concept of an endpoint, and hosts each endpoint. Polling and data transfer from the computer.

ここで、エンドポイントは、一般にFIFO(First In First out)バッファメモリになっており、USBのデータ転送は、ホストコンピュータと各エンドポイント(エンドポイントバッファ0〜エンドポイントバッファ3)との間に構成される論理的な通信路(データチャネル0〜データチャネル3を使って行うことになっている。   Here, the endpoint is generally a FIFO (First In First Out) buffer memory, and USB data transfer is configured between the host computer and each endpoint (endpoint buffer 0 to endpoint buffer 3). Logical channels (data channel 0 to data channel 3 are used.

通常、エンドポイントバッファ0は、デバイスのコンフィギュレーションや基本情報のやり取りに使用される双方向のデータチャネル0をホストコンピュータとの間に構成し、これ以外のエンドポイントバッファ1〜エンドポイントバッファ3は、単方向のデータチャネル1〜データチャネル3を構成する。なお、エンドポイントバッファの数、データチャネル数、データ転送方向等はデバイス側で自由に設定することが可能である。   Normally, the endpoint buffer 0 configures a bidirectional data channel 0 used for device configuration and basic information exchange with the host computer, and the other endpoint buffers 1 to 3 are The unidirectional data channel 1 to data channel 3 are configured. Note that the number of endpoint buffers, the number of data channels, the data transfer direction, and the like can be freely set on the device side.

(本実施形態におけるUSBデバイスの内部処理について)
次に、図2を参照して本実施形態におけるUSBデバイスであるメディア搬送機構の内部構成について説明する。図2は、本実施形態におけるメディア搬送機構の内部処理を説明するためのブロック図である。
(About internal processing of USB device in this embodiment)
Next, the internal configuration of the media transport mechanism that is a USB device in the present embodiment will be described with reference to FIG. FIG. 2 is a block diagram for explaining the internal processing of the media transport mechanism in the present embodiment.

上述のごとく、メディア搬送機構40は、ホストコンピュータ100との間に、デバイスのコンフィギュレーションや基本情報のやり取りに使用される双方向のデータチャネルを構成するエンドポイントバッファ0が設定されており、本実施形態では、エンドポイントバッファ0とホストコンピュータ100との間には双方向の通信路としてデータチャネル1とデータチャネル4とが、構成される。   As described above, the media transport mechanism 40 is set with the host computer 100 in which the endpoint buffer 0 that constitutes a bidirectional data channel used for device configuration and basic information exchange is set. In the embodiment, a data channel 1 and a data channel 4 are configured as a bidirectional communication path between the endpoint buffer 0 and the host computer 100.

データチャネル1は、ホストコンピュータ100からメディア搬送機構40に対するコマンドやそれに対する応答が転送される通信路である。例えば、図示しない搬送アームの移動コマンド、メディア搬送機構40からの電源ON通知、電源OFF通知、ホストコンピュータから定期的に行われる通信ステータス要求(問い合わせ)等は、データチャネル1を介して転送される。また、メディア搬送機構40に送信データが有る場合に、ホストコンピュータ100から送信される送信データ送信要求もデータチャネル1を介して転送される。一方、データチャネル4は、リアルタイムコマンドやそれに対する応答が転送される。 The data channel 1 is a communication path through which commands and responses to the media transport mechanism 40 are transferred from the host computer 100. For example, a transfer arm movement command (not shown), a power ON notification from the media transfer mechanism 40 , a power OFF notification, a communication status request (inquiry) periodically issued from the host computer, and the like are transferred via the data channel 1. . Further, when there is transmission data in the media transport mechanism 40, a transmission data transmission request transmitted from the host computer 100 is also transferred via the data channel 1. On the other hand, in the data channel 4, a real time command and a response to the real time command are transferred.

さらに、ホストコンピュータ100との間には、単方向のデータチャネルを形成するエンドポイントバッファ1及びエンドポイントバッファ2とが設定されている。本実施形態では、ホストコンピュータ100からエンドポイントバッファ1への単方向の通信路としてデータチャネル3が、エンドポイントバッファ2からホストコンピュータ100への単方向の通信路としてデータチャネル0とデータチャネル2とが、構成されている。   Further, an endpoint buffer 1 and an endpoint buffer 2 that form a unidirectional data channel are set between the host computer 100 and the host computer 100. In this embodiment, the data channel 3 is a unidirectional communication path from the host computer 100 to the endpoint buffer 1, and the data channel 0 and the data channel 2 are unidirectional communication paths from the endpoint buffer 2 to the host computer 100. Is configured.

データチャネル3は、メディア搬送機構40が備えるファームウェアを書き換える際に、ホストコンピュータ100からメディア搬送機構40への書き換えデータの転送に利用されるチャネルである。
データチャネル0は、後述するメディア搬送機構40の通信ステータスをホストコンピュータ100へ転送するために利用される。
さらに、データチャネル2は、メディア搬送機構40の状態が変化する毎に自動的にその変化をホストコンピュータへ通知する(以下、「オートステータスバック」という。)ためのステータスが転送されるチャネルである。
The data channel 3 is a channel used for transferring rewritten data from the host computer 100 to the media transport mechanism 40 when the firmware included in the media transport mechanism 40 is rewritten.
The data channel 0 is used to transfer the communication status of the media transport mechanism 40 described later to the host computer 100.
Further, the data channel 2 is a channel to which a status for automatically notifying the host computer of the change every time the state of the media transport mechanism 40 changes (hereinafter referred to as “auto status back”) is transferred. .

このように、本実施形態のメディア搬送機構40には、エンドポイントバッファ0〜エンドポイントバッファ2の合計3つのバッファを1つのグループとして、インターフェース41が構成されている。   As described above, the media transport mechanism 40 according to the present embodiment includes the interface 41 with a total of three buffers of the endpoint buffer 0 to the endpoint buffer 2 as one group.

また、各エンドポイントバッファはレポートデータ生成部42と接続されている。レポートデータ生成部42は、各データチャネルを介して行われるデータ転送の転送単位であるレポートデータを生成する。図3にレポートデータのフォーマットを示す。
図3に示すように、レポートデータ50は、レポートID51と、チャネル番号52と、有効バイト数53と、データ部54とから構成される。データ部54は、実際に転送されるデータが定義される領域である。具体的には、コマンドやそれに対する応答、オートステータス、通信ステータス、リアルタイムコマンドやそれに対する応答、及びファームウェアの書き換えデータ等が定義される。
Each endpoint buffer is connected to the report data generation unit 42. The report data generation unit 42 generates report data that is a transfer unit of data transfer performed through each data channel. FIG. 3 shows a report data format.
As shown in FIG. 3, the report data 50 includes a report ID 51, a channel number 52, a valid byte number 53, and a data part 54. The data part 54 is an area where data to be actually transferred is defined. Specifically, a command and a response to the command, an auto status, a communication status, a real-time command and a response to the command, firmware rewrite data, and the like are defined.

有効バイト数53は、データ部54に定義されるデータの有効バイト数が定義される。チャネル番号52には、データ部54に定義されるデータの用途、データのあて先、データの優先度に応じて、データチャネル0からデータチャネル4の何れかの番号が定義される。レポートID51は、データ部54に定義されるデータの長さに応じて定義され、レポートIDが定義されると、データの有効バイト数の最大値が決定される。   The number of valid bytes 53 defines the number of valid bytes of data defined in the data portion 54. In the channel number 52, any number of the data channel 0 to the data channel 4 is defined according to the use of data defined in the data portion 54, the data destination, and the data priority. The report ID 51 is defined according to the length of data defined in the data part 54. When the report ID is defined, the maximum value of the number of valid bytes of data is determined.

レポートデータ生成部42は、ホストコンピュータ100からのデータ送信要求や、通信ステータスの要求に応じて、レポートデータを生成し、ホストコンピュータ100へ転送する。また、各エンドポイントバッファの送信データの有無を監視しており、通信ステータスの問い合わせがあると、送信データが格納されていれば「送信データ有り」を、送信データが格納されていなければ「送信データ無し」を含む通信ステータスを生成し、通信ステータスをレポートデータ50の転送フォーマットとして生成する。なお、通信ステータスとは、メディア搬送機構40の各エンドポイントバッファにおるデータ送信状態を示すものである。 The report data generation unit 42 generates report data in response to a data transmission request from the host computer 100 or a communication status request, and transfers the report data to the host computer 100. Also, each endpoint buffer is monitored for the presence of transmission data, and if there is an inquiry about the communication status, "transmission data is present" if the transmission data is stored, and "transmission" if the transmission data is not stored A communication status including “no data” is generated, and the communication status is generated as a transfer format of the report data 50. Incidentally, the communication status shows the Contact only that data transmission state to each endpoint buffers of the media transportation mechanism 40.

(本実施形態におけるデータ転送処理について)
次に、本実施形態のホストコンピュータ100とメディア搬送機構40との間で行われるデータ転送処理について説明する。図4は、ホストコンピュータ100とメディア搬送機構40との間で行われるデータ転送処理を説明するためのフローチャートであり、図4(a)はホストコンピュータ側の処理を示し、図4(b)はメディア搬送機構側の処理を示している。図5は、ホストコンピュータ100とメディア搬送機構40との間で行われるデータ転送処理を説明するタイムチャートである。
(About data transfer processing in this embodiment)
Next, a data transfer process performed between the host computer 100 and the media transport mechanism 40 according to the present embodiment will be described. FIG. 4 is a flowchart for explaining data transfer processing performed between the host computer 100 and the media transport mechanism 40. FIG. 4A shows processing on the host computer side, and FIG. The processing on the media transport mechanism side is shown. FIG. 5 is a time chart for explaining data transfer processing performed between the host computer 100 and the media transport mechanism 40.

ここでは、例えばエンドポイントバッファ2に送信データが格納されていた場合を例として説明する。
まず、メディア搬送機構40の各エンドポイントバッファのデータ送信状態を確認するため、ホストコンピュータ100からデータチャネル1を介して通信ステータスの送信要求が転送されると(ステップS11:T1)、通信ステータスの送信要求がエンドポイントバッファ0に格納される(ステップS11a)。レポートデータ生成部42が、エンドポイントバッファ0の通信ステータスの送信要求を確認すると、エンドポイントバッファ0〜エンドポイントバッファ2の送信データの有無を確認し、レポートデータを生成する。
Here, for example, a case where transmission data is stored in the endpoint buffer 2 will be described as an example.
First, in order to confirm the data transmission state of each endpoint buffer of the media transport mechanism 40, when a communication status transmission request is transferred from the host computer 100 via the data channel 1 (step S11: T1), the communication status The transmission request is stored in the endpoint buffer 0 (step S11a) . When the report data generation unit 42 confirms the transmission request for the communication status of the endpoint buffer 0, the report data generation unit 42 confirms whether there is transmission data in the endpoint buffer 0 to the endpoint buffer 2, and generates report data.

このとき、レポートデータ生成部42は、レポートデータ50のデータ部54に「送信データ有り」を示す通信ステータスを定義し、通信ステータスを転送するデータチャネルとしてチャネル番号52にデータチャネル0を定義して、レポートデータを生成し、データチャネル0を介してホストコンピュータ100へ送信する(ステップS12:T2)。   At this time, the report data generation unit 42 defines a communication status indicating “there is transmission data” in the data portion 54 of the report data 50, and defines a data channel 0 in the channel number 52 as a data channel for transferring the communication status. Then, report data is generated and transmitted to the host computer 100 via the data channel 0 (step S12: T2).

ホストコンピュータ100は、レポートデータを受信すると(ステップS12a)、通信ステータスに基づき、送信データが有ると判断し(ステップS13:Yes)、送信データを要求するためデータチャネル1を介して、送信データ送信要求を転送する(ステップS14:T3)。エンドポイントバッファ0が送信データ送信要求を受信すると(ステップS14a)、送信データが格納されたエンドポイントバッファ2から、データチャネル2を介して送信データがホストコンピュータ100へ転送され(ステップS15:T4)、ホストコンピュータ100は送信データを受信する(ステップS16)When receiving the report data (step S12a) , the host computer 100 determines that there is transmission data based on the communication status (step S13: Yes), and transmits the transmission data via the data channel 1 to request the transmission data. The request is transferred (step S14: T3). When the endpoint buffer 0 receives the transmission data transmission request (step S14a) , the transmission data is transferred from the endpoint buffer 2 storing the transmission data to the host computer 100 via the data channel 2 (step S15: T4). The host computer 100 receives the transmission data (step S16) .

ステップS11に戻り、ホストコンピュータ100から定期的にデータチャネル1を介して通信ステータス要求が送信されると(T5)、ステップS12からステップS1の処理を繰り返し行い、送信データが有る場合には、該当するデータチャネルを介して送信データが転送され、送信データが無い場合には(ステプS13:No)再び送られてくるホストコンピュータ100からの通信ステータス要求を待って(ステップS11)、ステップS12からステップS1の処理を繰り返し行う。 Returning to step S11, when the regular communication status request via the data channel 1 from the host computer 100 is transmitted (T5), carried out from the step S12 repeats the processing in step S1 6, when there is transmission data, corresponding transmission data over a data channel which is transferred, when there is no transmission data (step-up S13: no), it waits for communication status request from the host computer 100 sent again (step S11), and repeatedly performs the process of step S1 6 from step S12.

なお、エンドポイントバッファに送信データが複数ある場合には、データチャネルにデータ転送の優先度を設定しておくことで対応することができる。本実施形態では、データチャネルを優先度1位に設定しておけば、他のデータチャネルに優先してデータ転送を行うことができる。 Note that when there are a plurality of transmission data in the endpoint buffer, it can be dealt with by setting the data transfer priority in the data channel. In the present embodiment, if the data channel 2 is set to the first priority, data transfer can be performed with priority over other data channels.

このように、本実施形態で説明したデータ転送方法によれば、エンドポイントバッファのデータ送信状態を通信ステータスによって確認することができる。したがって、従来のように各エンドポイントバッファにポーリングを行う必要がないので、通信負荷が軽減され、パフォーマンスの良いデータ転送を行うことができる。
さらに、メディア搬送機構40のエンドポイントバッファに送信データが有ることを確認できた場合だけ、ホストコンピュータ100は送信データの送信要求を転送するようにしたため、送信要求の頻度が減少し、ホストコンピュータ100の処理負荷を軽減することができる。
As described above, according to the data transfer method described in the present embodiment, the data transmission state of the endpoint buffer can be confirmed by the communication status. Accordingly, since it is not necessary to poll each endpoint buffer as in the prior art, the communication load is reduced and data transfer with good performance can be performed.
Furthermore, the host computer 100 transfers the transmission request for transmission data only when it can be confirmed that there is transmission data in the end point buffer of the media transport mechanism 40, so the frequency of the transmission request is reduced, and the host computer 100 Can reduce the processing load.

本実施形態のデータ通信システムを示した概略図である。It is the schematic which showed the data communication system of this embodiment. 本実施形態におけるメディア搬送機構の内部処理を説明するためのブロック図である。It is a block diagram for demonstrating the internal process of the media conveyance mechanism in this embodiment. レポートデータのフォーマットの概略図である。It is the schematic of the format of report data. ホストコンピュータとメディア搬送機構との間で行われるデータ転送処理を説明するためのフローチャートである。(a)はホストコンピュータ側の処理を示し、(b)はメディア搬送機構側の処理を示している。 6 is a flowchart for explaining data transfer processing performed between a host computer and a media transport mechanism. (A) shows processing on the host computer side, and (b) shows processing on the media transport mechanism side. ホストコンピュータとメディア搬送機構との間で行われるデータ転送処理を説明するタイムチャートである。It is a time chart explaining the data transfer process performed between a host computer and a media conveyance mechanism. 一般的なUSBデバイスの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a general USB device. ホストコンピュータとメディア搬送機構との間で行われる従来のデータ転送処理を説明するタイムチャートである。It is a time chart explaining the conventional data transfer process performed between a host computer and a media conveyance mechanism.

10:メディア処理装置、20:レーベルプリンタ、30:メディアドライブ、40:メディア搬送機構、41:インターフェース、42:レポートデータ生成部、50:レポートデータ、51:レポートID、52:チャネル番号、53:有効バイト数、54:データ部 10: Media processing device, 20: Label printer, 30: Media drive, 40: Media transport mechanism, 41: Interface, 42: Report data generation unit, 50: Report data, 51: Report ID, 52: Channel number, 53: Number of valid bytes, 54: Data part

Claims (6)

ホストコンピュータとデータ通信装置との間に設定される複数の論理的なデータチャネルを介して行われるUSBのデータ通信方法であって、
前記ホストコンピュータは、前記複数の論理的なデータチャネルのうち何れかのデータチャネルを介して、前記データ通信装置に対して定期的に問い合わせを行い、
前記データ通信装置は、前記問い合わせに応じて、前記ホストコンピュータへ送信する送信データの有無を示すデバイス送信状態を含む通信ステータスを前記ホストコンピュータへ送信し、
前記ホストコンピュータは、前記デバイス送信状態に基づき前記送信データが有ると判断すると送信データ送信要求を前記データ通信装置へ送信し
前記データ通信装置は、該当するデータチャネルを介して前記送信データを前記ホストコンピュータへ送信することを特徴とするデータ通信方法。
A USB data communication method performed via a plurality of logical data channels set between a host computer and a data communication device,
The host computer periodically inquires the data communication device via any one of the plurality of logical data channels,
In response to the inquiry , the data communication apparatus transmits a communication status including a device transmission state indicating presence / absence of transmission data to be transmitted to the host computer, to the host computer ,
When the host computer determines that the transmission data exists based on the device transmission state , the host computer transmits a transmission data transmission request to the data communication device ,
The data communication apparatus, data communication method, characterized by transmitting the transmission data via the corresponding data channel to the host computer.
前記データ通信装置は、前記該当するデータチャネルのうち、優先度の高い順に前記送信データを前記ホストコンピュータへ送信することを特徴とする請求項1に記載のデータ通信方法。 The data communication method according to claim 1, wherein the data communication apparatus transmits the transmission data to the host computer in descending order of priority among the corresponding data channels. ホストコンピュータとの間に設定される複数の論理的なデータチャネルを介して、USBのデータ通信を行うデータ通信装置であって、
前記ホストコンピュータへ送信する送信データが格納され、かつ前記データチャネルに対応するよう設定される複数の送信データ格納領域と、
各送信データ格納領域に前記送信データが格納されているか否かを示すデバイス送信状態を含む通信ステータスを生成する通信ステータス生成部と、を備え
前記ホストコンピュータからの送信データ送信要求に応じて、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とするデータ通信装置。
A data communication device that performs USB data communication via a plurality of logical data channels set with a host computer,
A plurality of transmission data storage areas in which transmission data to be transmitted to the host computer are stored and set to correspond to the data channel;
A communication status generation unit that generates a communication status including a device transmission state indicating whether or not the transmission data is stored in each transmission data storage area, in response to a transmission data transmission request from the host computer, A data communication apparatus, wherein the transmission data is transmitted from a transmission data storage area in which transmission data is stored.
前記データチャネルには送信データの送信優先度が設定されており、
前記ホストコンピュータから送信された送信データ送信要求に応じて、前記送信優先度にしたがって、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とする請求項3に記載のデータ通信装置。
A transmission priority of transmission data is set for the data channel,
4. The transmission data is transmitted from a transmission data storage area in which the transmission data is stored according to the transmission priority in response to a transmission data transmission request transmitted from the host computer. Data communication equipment.
ホストコンピュータと、前記ホストコンピュータとの間に設定される複数の論理的なデータチャネルを介してUSBのデータ通信を行うデータ通信装置と、を備えたデータ通信システムであって、
前記データ通信装置は、
前記ホストコンピュータへ送信する送信データが格納され、かつ前記データチャネルに対応するよう設定される複数の送信データ格納領域と、
各送信データ格納領域に前記送信データが格納されているか否かを示すデバイス送信状態を含む通信ステータスを生成する通信ステータス生成部と、を備え、
前記ホストコンピュータからの送信データ送信要求に応じて、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とするデータ通信システム。
A data communication system comprising: a host computer; and a data communication device that performs USB data communication via a plurality of logical data channels set between the host computer,
The data communication device includes:
A plurality of transmission data storage areas in which transmission data to be transmitted to the host computer are stored and set to correspond to the data channel;
A communication status generation unit that generates a communication status including a device transmission state indicating whether or not the transmission data is stored in each transmission data storage area,
A data communication system, wherein the transmission data is transmitted from a transmission data storage area in which the transmission data is stored in response to a transmission data transmission request from the host computer.
前記データチャネルには送信データの送信優先度が設定されており、
前記ホストコンピュータから送信された送信データ送信要求に応じて、前記送信優先度にしたがって、前記送信データが格納された送信データ格納領域から前記送信データを送信することを特徴とする請求項5に記載のデータ通信システム。
A transmission priority of transmission data is set for the data channel,
6. The transmission data is transmitted from a transmission data storage area in which the transmission data is stored according to the transmission priority in response to a transmission data transmission request transmitted from the host computer. Data communication system.
JP2006289037A 2006-10-24 2006-10-24 Data communication method, data communication device and data communication system Withdrawn JP2008107997A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006289037A JP2008107997A (en) 2006-10-24 2006-10-24 Data communication method, data communication device and data communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006289037A JP2008107997A (en) 2006-10-24 2006-10-24 Data communication method, data communication device and data communication system

Publications (2)

Publication Number Publication Date
JP2008107997A JP2008107997A (en) 2008-05-08
JP2008107997A5 true JP2008107997A5 (en) 2009-11-26

Family

ID=39441310

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006289037A Withdrawn JP2008107997A (en) 2006-10-24 2006-10-24 Data communication method, data communication device and data communication system

Country Status (1)

Country Link
JP (1) JP2008107997A (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0632896B2 (en) * 1987-08-11 1994-05-02 アミテック株式会社 Grinding device for rectangular frame
JP5153868B2 (en) 2008-04-17 2013-02-27 シャープ株式会社 Tracking drive solar power generator
JP5577769B2 (en) * 2010-03-15 2014-08-27 株式会社リコー Communication apparatus and communication method
JP6162454B2 (en) * 2013-03-29 2017-07-12 日本電産サンキョー株式会社 Information processing apparatus, information processing method, and information processing system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2003263093A1 (en) * 2002-09-06 2004-03-29 Maxtor Corporation One button external backup
AU2003228076A1 (en) * 2002-09-24 2004-04-19 Koninklijke Philips Electronics N.V. Bus connection system
JP2006024046A (en) * 2004-07-09 2006-01-26 Casio Comput Co Ltd Data maintaining device and data transferring method
JP2006285529A (en) * 2005-03-31 2006-10-19 Sanyo Electric Co Ltd Host controller

Similar Documents

Publication Publication Date Title
CA2733089C (en) Method and apparatus for connecting usb devices to a remote computer
JP5103371B2 (en) Method and apparatus for improving the performance of USB mass storage devices in the presence of long transmission delays
US9875206B2 (en) Methods and devices for extending USB 3.0-compliant communication
JP4376040B2 (en) Apparatus and method for performing information processing using a plurality of processors
US8856388B2 (en) Method and apparatus for connecting USB devices to a computer
JP2010061670A (en) Bus connection system
JP2011023016A5 (en)
JP2001358733A (en) Method for using universal serial but (usb) as peer-to- peer network
EP2842293B1 (en) Usb 3.0 link layer timer adjustment to extend distance
JP5695126B2 (en) Computer system, server module and storage module
JP2003208268A5 (en)
JP6007152B2 (en) Communication system and communication system redundancy method
JP2003208267A5 (en)
US8402180B2 (en) Autonomous multi-packet transfer for universal serial bus
CN102843284B (en) ISCSI memory node, framework and reading, wiring method
US7460531B2 (en) Method, system, and program for constructing a packet
JP2008107997A5 (en)
JP2008107997A (en) Data communication method, data communication device and data communication system
CN102843435A (en) Access and response method and access and response system of storing medium in cluster system
US7043589B2 (en) Bus system and bus interface
CN101826061A (en) Shared system and management method of hardware device
US20220327088A1 (en) Predicting free buffer space in a usb extension environment
CN100474275C (en) Efficient data transfer to/from storage medium of computing device
JP5305754B2 (en) Information processing apparatus, client, information processing method, and program
JP2007259000A (en) Data transfer apparatus, data transferring method, and the like