[go: up one dir, main page]

JP2015028714A - Communication device - Google Patents

Communication device Download PDF

Info

Publication number
JP2015028714A
JP2015028714A JP2013157996A JP2013157996A JP2015028714A JP 2015028714 A JP2015028714 A JP 2015028714A JP 2013157996 A JP2013157996 A JP 2013157996A JP 2013157996 A JP2013157996 A JP 2013157996A JP 2015028714 A JP2015028714 A JP 2015028714A
Authority
JP
Japan
Prior art keywords
request
state
recording medium
communication
response
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
JP2013157996A
Other languages
Japanese (ja)
Inventor
秋元 康博
Yasuhiro Akimoto
康博 秋元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2013157996A priority Critical patent/JP2015028714A/en
Publication of JP2015028714A publication Critical patent/JP2015028714A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent an impact on an external device, enable completion of continuable file transfer (backup) without interruption, and make it possible to prevent damage to a recording medium at a backup destination even if the recording medium has shifted to a read-only mode during communication with the external device.SOLUTION: A device prevents communication interruption due to an error occurring at a time of connection with an external apparatus, at the device using a recording medium that shifts to a read-only mode when an alternative block runs out.

Description

本発明は、外部装置と接続する通信装置に関するものである。   The present invention relates to a communication device connected to an external device.

近年、撮像装置の記録媒体としてフラッシュメモリが用いられている。   In recent years, a flash memory has been used as a recording medium of an imaging apparatus.

このフラッシュメモリのデータフォーマットでは、ブロックと呼ばれる単位に区分されており、データの消去/書き込みをこのブロック単位で行っている。あるブロックのデータの消去/書き込み回数が所定回数以上になると、ブロックのデータの書き込みの信頼性が低下したり、場合によってはそのブロックが使用不能になることがある。   The data format of the flash memory is divided into units called blocks, and data is erased / written in units of blocks. When the number of times of erasing / writing data in a block exceeds a predetermined number, the reliability of writing data in the block may decrease, or the block may become unusable in some cases.

フラッシュメモリでは、代替ブロックと呼ばれる予備の領域が設けられている。そして、データの記録に使用するブロックで不良ブロックが生じた場合には、その不良ブロックを使用禁止にすると共に代替ブロックを使用することで、不良ブロックがある程度発生してもフラッシュメモリ自体が使用できなくなることを回避するための処置をしている。   In the flash memory, a spare area called a substitute block is provided. If a bad block occurs in a block used for data recording, the flash memory itself can be used even if a bad block occurs to some extent by disabling the bad block and using an alternative block. We are taking measures to avoid being lost.

しかし、ユーザが同じフラッシュメモリを長期間にわたり使用していると、フラッシュメモリのデータ書き換え回数の増加に伴って、記憶データの信頼性が低下したり、不良ブロックの数が多くなりフラッシュメモリ全体が使用不能になることがある。   However, if the user has used the same flash memory for a long time, the reliability of stored data will decrease as the number of data rewrites in the flash memory increases, and the number of defective blocks will increase, resulting in the entire flash memory It may become unusable.

従来のフラッシュメモリでは、特許文献1で開示されているように代替ブロックを使い切ってしまった場合、フラッシュメモリ内の全データを読み出し専用にする機能を備えている。   The conventional flash memory has a function of making all data in the flash memory read-only when the alternative block is used up as disclosed in Patent Document 1.

特開平9−163293号公報JP-A-9-163293

記録媒体に記録されたファイルを外部装置に転送(バックアップ)する際に、転送が完了したファイルが転送済みであることを表すデータを書き込み(アーカイブ属性を書き換えて)、次回転送時に同ファイルを重複してバックアップしないようにすることが一般的に行われている。   When transferring a file recorded on a recording medium to an external device (backup), write the data indicating that the transferred file has been transferred (rewrite the archive attribute), and duplicate the same file the next time it is transferred And it is generally done not to backup.

ところが、上記先行技術において、外部装置へファイル転送中に記録媒体が読み出し専用に変化しても、記録媒体の挿抜を行っていない状況では、外部装置は読み出し専用かどうかを取得するコマンドを発行しないため、外部装置に読み出し専用になったことを通知できない。   However, in the above-described prior art, even if the recording medium changes to read-only during file transfer to the external device, the external device does not issue a command for acquiring whether or not the read-only is used in the situation where the recording medium is not inserted or removed Therefore, it cannot be notified to the external device that it has become read-only.

そのため、読み出し専用になったことを通知していない外部装置は、バックアップ中にアーカイブ属性を書き換えるため書き込みコマンドを発行するが、読み出し専用に変化しているためエラー応答せざるを得ない。   Therefore, an external device that has not notified that it has become read-only issues a write command to rewrite the archive attribute during backup, but is forced to respond with an error because it has changed to read-only.

この場合、外部装置はバックアップ中にエラーを受信することになり、全てのバックアップが完了していなくても途中で中止する。更に、より深刻な影響として、書き込み可能であるはずの記録媒体(と外部装置は認識している)からの想定外のエラーによって、外部装置がハングアップしたり異常動作の可能性がある。加えて、外部装置が受信ファイルを追記できない光ディスク等の記録媒体に書き込んでいた場合は、ディスクの損失も発生することになる。   In this case, the external device receives an error during backup, and stops halfway even if all backups are not completed. Furthermore, as a more serious influence, there is a possibility that the external device hangs up or malfunctions due to an unexpected error from the recording medium (and the external device recognizes) that should be writable. In addition, if the external device writes the received file on a recording medium such as an optical disk, the loss of the disk also occurs.

本発明は上記の課題を解決するため、請求項1の発明は、第一の状態と第二の状態を有する記録媒体と、外部装置と通信を行う通信手段と、前記通信手段によって取得した要求を実行する実行手段と、前記通信手段によって取得した要求が第一の要求と第二の要求の何れかを判定する判定手段と、を備える通信装置において、前記記録媒体が第一の状態の場合は、前記実行手段の結果に応じて、第一、或いは第二の応答を送信し、前記記録媒体が第二の状態の場合は、前記判定手段が第一の要求の場合に、第一の応答を送信し、前記判定手段が第二の要求の場合に、第二の応答を送信することを特徴とする。   In order to solve the above problems, the present invention provides a recording medium having a first state and a second state, a communication unit for communicating with an external device, and a request acquired by the communication unit. In a communication apparatus comprising: an execution unit that executes the process; and a determination unit that determines whether the request acquired by the communication unit is a first request or a second request. When the recording medium is in the first state Sends a first or second response according to the result of the execution means, and if the recording medium is in the second state, the first means A response is transmitted, and when the determination means is a second request, a second response is transmitted.

また、請求項2の発明は、不良ブロックを代替する代替ブロックの領域を有する記録媒体と、前記代替ブロックの領域の残量を検出し、検出結果に応じて前記記録媒体の第一の状態ないし第二の状態を判定する状態判定手段と、外部装置と通信を行う通信手段と、前記通信手段によって取得した要求を実行する実行手段と、前記通信手段によって取得した要求が第一の要求と第二の要求の何れかを判定する要求判定手段と、を備える通信装置において、前記記録媒体が第一の状態の場合は、前記実行手段の結果に応じて、第一、或いは第二の応答を送信し、前記記録媒体が第二の状態の場合は、前記要求判定手段が第一の要求の場合は、第一の応答を送信し、前記要求判定手段が第二の要求の場合は、第二の応答を送信することを特徴とする。   According to a second aspect of the present invention, a recording medium having a replacement block area that replaces a defective block, and a remaining amount of the replacement block area are detected, and a first state or state of the recording medium is detected according to a detection result. State determination means for determining the second state, communication means for communicating with the external device, execution means for executing the request acquired by the communication means, and the request acquired by the communication means are the first request and the first request And a request judging means for judging one of the two requests. When the recording medium is in the first state, a first response or a second response is sent according to the result of the execution means. And when the recording medium is in the second state, the request determination means transmits a first response when the request is the first request, and when the request determination means is the second request, Sending a second response

本発明によれば、外部装置との通信中に記録媒体が読み出し専用に変化しても、外部装置への影響を防止すると共に、継続可能なファイル転送(バックアップ)を中断することなく完了することができ、更にバックアップ先の記録媒体の損失も防止することが出来る。   According to the present invention, even if the recording medium changes to read-only during communication with the external device, the influence on the external device is prevented and the continuous file transfer (backup) can be completed without interruption. In addition, loss of the backup destination recording medium can be prevented.

本発明を適用した通信装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the communication apparatus to which this invention is applied. 本発明を適用した通信装置の制御フローチャートである。It is a control flowchart of the communication apparatus to which this invention is applied. 本発明を適用した通信装置の制御フローチャートである。It is a control flowchart of the communication apparatus to which this invention is applied. PTPの独自コマンドとして定義した場合の、アーカイブ属性変更コマンド仕様の図である。It is a figure of an archive attribute change command specification at the time of defining as an original command of PTP.

以下、図面を参照しながら本発明を説明する。なお、ここで示す実施の形態はあくまでも一例であって、必ずしもこの実施の形態に限定されるものではない。   The present invention will be described below with reference to the drawings. In addition, embodiment shown here is an example to the last, Comprising: It is not necessarily limited to this embodiment.

図1は、本発明を実施した、第1、及び第2の実施形態において共通の、通信装置の概略構成を示すブロック図である。本実施例に係る接続方法は、図1に示すように、通信装置100、外部装置120、接続ケーブル130の構成で実施される。通信装置100と外部装置120は、接続ケーブル130を介して接続されている。100は、本発明を適用した通信装置である。なお、以下実施の形態ではビデオカメラを例に取って説明するが、例えばスチルカメラ等の機器であってもよい。ビデオカメラ100は、USB規格で規定された、デバイス機器として動作する。   FIG. 1 is a block diagram showing a schematic configuration of a communication apparatus common to the first and second embodiments in which the present invention is implemented. As shown in FIG. 1, the connection method according to the present embodiment is implemented with a configuration of a communication device 100, an external device 120, and a connection cable 130. The communication device 100 and the external device 120 are connected via a connection cable 130. Reference numeral 100 denotes a communication apparatus to which the present invention is applied. In the following embodiments, a video camera will be described as an example, but a device such as a still camera may be used. The video camera 100 operates as a device device defined by the USB standard.

101は、各部の動作を制御するCPUであり、後述する記録媒体の情報取得、外部装置との通信処理を行う部分である。102は、前記CPU101がワークエリアとして使用するRAMである。また、記録媒体に記録されている全ファイルの属性情報が記録されているセクタ番号を一時的に保持することにも使用する。   Reference numeral 101 denotes a CPU that controls the operation of each unit, and is a part that performs information acquisition of a recording medium, which will be described later, and communication processing with an external device. A RAM 102 is used by the CPU 101 as a work area. It is also used to temporarily hold sector numbers in which attribute information of all files recorded on the recording medium is recorded.

103は、静止画像や動画ストリームを記録することが可能な記録媒体である。これは内蔵のものでも、着脱可能なものでもよい。記録媒体103は、不良ブロックのための代替ブロックを含む複数の記録ブロックを有する。記録媒体103は内部にコントローラを有し、記録先として指定された記録ブロックが不良ブロックである場合、代替ブロックにデータを記録する。また、記録媒体103は、代替ブロックを全て使い切ってしまった場合、読み出し専用の記録媒体に変更する。このとき、記録媒体103のコントローラは、CPU101に対し、読み出し専用の記録媒体である旨の情報を出力する。   Reference numeral 103 denotes a recording medium capable of recording still images and moving image streams. This may be built-in or removable. The recording medium 103 has a plurality of recording blocks including replacement blocks for defective blocks. The recording medium 103 has an internal controller, and when the recording block designated as the recording destination is a defective block, data is recorded in the alternative block. Further, the recording medium 103 is changed to a read-only recording medium when all the alternative blocks are used up. At this time, the controller of the recording medium 103 outputs information indicating that the recording medium is a read-only recording medium to the CPU 101.

104は、記録媒体103が読み書き可能であるか読み出し専用であるかの判定と、記録媒体103の記録情報を取得する部分である。105は、外部装置120と通信を行う通信部であり、接続された外部装置120へのデータ送信や、外部装置120からコマンドやデータの受信を行う。106は、外部装置120から受信したコマンドが、ファイル属性情報の書き替え要求か否かを判定する部分である。外部装置120の一例として、PC(Personal Computer)を用いるが、例えばレコーダやDVDライター等の機器でもよい。PC120は、USB規格で規定されたホスト機器として動作する。また、PC120は図示されないビデオカメラと通信を行う通信部、表示部、CPU、RAM等を含む。接続ケーブル130の一例として、USB規格に準拠した接続ケーブルを用いる。以下、USB規格に準拠した接続ケーブルを「USBケーブル」という。USBケーブルは、VBUS、D+、D−、GNDの4つのラインを含んで構成されている。   Reference numeral 104 denotes a portion for determining whether the recording medium 103 is readable / writable or read-only, and acquiring the recording information of the recording medium 103. Reference numeral 105 denotes a communication unit that communicates with the external device 120, and transmits data to the connected external device 120 and receives commands and data from the external device 120. Reference numeral 106 denotes a part for determining whether or not the command received from the external device 120 is a request for rewriting file attribute information. As an example of the external device 120, a PC (Personal Computer) is used, but a device such as a recorder or a DVD writer may be used. The PC 120 operates as a host device defined by the USB standard. The PC 120 includes a communication unit that communicates with a video camera (not shown), a display unit, a CPU, a RAM, and the like. As an example of the connection cable 130, a connection cable conforming to the USB standard is used. Hereinafter, a connection cable compliant with the USB standard is referred to as a “USB cable”. The USB cable is configured to include four lines of VBUS, D +, D-, and GND.

<第1の実施形態>
図2に基づいて、本発明を実施したビデオカメラとPCとのUSBケーブルでの接続において、記録媒体の状態に応じて、コマンドの応答内容を切替える制御を説明する。なお、以下実施の形態ではUSBマスストレージクラスのプロトコルとコマンドを例にして説明するが、同様の処理を目的とした独自のプロトコル、独自のコマンドであっても構わない。また本実施例において、記録媒体のファイルシステムをFAT16を例にして説明するが、本発明はファイルシステムを限定しない。
<First Embodiment>
Based on FIG. 2, a description will be given of the control for switching the response content of a command in accordance with the state of a recording medium in the connection of the video camera embodying the present invention and a PC with a USB cable. In the following embodiments, a USB mass storage class protocol and command will be described as an example. However, a unique protocol or a unique command for the same processing may be used. In the present embodiment, the file system of the recording medium will be described by taking FAT 16 as an example, but the present invention does not limit the file system.

ステップS201でUSBケーブルの接続を検出する。ケーブルの接続検出は、USB信号ラインVBUSの電圧がHighレベルの検出によって行う。この電圧は、USB規格に基づいて、USBケーブルの反対側に接続されているPCによって印加される。通信の開始は、USBのD+信号ラインのプルアップ抵抗をONに制御し、D+信号をHighレベルに制御する。この信号ラインの電圧変化を接続相手のPCが検出して、ビデオカメラの接続を認識し、USB通信が開始される。   In step S201, connection of the USB cable is detected. The cable connection is detected by detecting the voltage of the USB signal line VBUS at a high level. This voltage is applied by a PC connected to the opposite side of the USB cable based on the USB standard. To start communication, the pull-up resistor of the USB D + signal line is controlled to ON, and the D + signal is controlled to the High level. The connection partner PC detects this voltage change in the signal line, recognizes the connection of the video camera, and starts USB communication.

ステップS202では、USBのVBUS信号の電圧レベルを検出し、Lowレベルであれば、ステップS203へ移行して通信を終了する。VBUS信号電圧がHighレベルであれば、通信を終了せずにステップS204へ移行する。   In step S202, the voltage level of the USB VBUS signal is detected. If the voltage level is low, the process proceeds to step S203 and communication is terminated. If the VBUS signal voltage is high level, the process proceeds to step S204 without terminating the communication.

ステップS204では、記録媒体103が通信開始時に既に読み出し専用かどうか(書き込み不可かどうか)、或いは通信開始後に読み出し専用に変化したかを判定する。   In step S204, it is determined whether or not the recording medium 103 has already been read-only at the start of communication (whether or not writing is possible) or has changed to read-only after the start of communication.

ステップS205において、記録情報取得部104は、記録媒体103のファイルシステムの管理データであるMBRに記載しているファイルシステムタイプを解析してファイルフォーマットを特定し、BPB等の管理データに記載されているセクタサイズ、クラスタサイズ、FATサイズ等を用いて、全てのファイルのディレクトリエントリのファイル属性(アトリビュート)が記録されているセクタ番号を抽出し、RAM102に展開する。   In step S205, the recording information acquisition unit 104 analyzes the file system type described in the MBR, which is the management data of the file system of the recording medium 103, identifies the file format, and is described in the management data such as BPB. The sector numbers in which the file attributes (attributes) of the directory entries of all the files are recorded are extracted using the sector size, cluster size, FAT size, etc., and are expanded in the RAM 102.

ステップS206では、コマンドを受信したかどうかを判定して、受信していなければステップS202へ移行して、再び通信終了を判定する。   In step S206, it is determined whether or not a command has been received. If it has not been received, the process proceeds to step S202 to determine again the end of communication.

コマンドを受信していればステップS207へ移行して、コマンドがWRITEコマンドかどうかを確認する。   If a command has been received, the process proceeds to step S207 to check whether the command is a WRITE command.

受信コマンドがWRITEコマンドでなければステップS212へ移行してコマンドを実行し、ステップS213でコマンド実行結果を送信する。   If the received command is not the WRITE command, the process proceeds to step S212 to execute the command, and the command execution result is transmitted in step S213.

一方、ステップS207で受信したコマンドがWRITEコマンドであればステップS208へ移行して、記録媒体103が読み出し専用かを判定する。読み出し専用でなければステップS212へ移行して、WRITEコマンドを実行する。   On the other hand, if the command received in step S207 is a WRITE command, the process proceeds to step S208 to determine whether the recording medium 103 is read-only. If it is not read-only, the process proceeds to step S212, and a WRITE command is executed.

読み出し専用の記録媒体に対してWRITEコマンドが発行された場合はステップS209に移行し、WRITEコマンドの書き込みアドレスから書き込みデータサイズの範囲内に、ステップS205でRAM102へ展開したセクタ番号が含まれていれば、ファイル属性の変更と判断して、コマンドを実行せずにステップS210へ移行して、コマンドが成功した応答をPCに送信する。   When the WRITE command is issued to the read-only recording medium, the process proceeds to step S209, and the sector number developed in the RAM 102 in step S205 is included within the range of the write data size from the write address of the WRITE command. For example, it is determined that the file attribute has been changed, and the process proceeds to step S210 without executing the command, and a response indicating that the command was successful is transmitted to the PC.

ステップS209で、WRITEコマンドがその他のデータ書き込み(書き替え)と判断した場合は、ステップS211へ移行して、コマンドが実行できない(失敗した)応答をPCに送信する。   If it is determined in step S209 that the WRITE command is another data write (rewrite), the process proceeds to step S211 and a response indicating that the command cannot be executed (failed) is transmitted to the PC.

なお、ステップS209においてファイル属性の変更かどうかを判定するその他の一例を以下に挙げる。   In addition, another example which determines whether it is a change of a file attribute in step S209 is given below.

マスストレージに相当する独自プロトコルにおける通信を用いる場合は、通信相手となる外部装置が限定され、外部装置の通信仕様が明確、且つ限定される。その場合に、外部装置から発行されるWRITEコマンドに相当するコマンドが、ファイル属性の変更に限定して発行されることが明確な場合は、セクタ番号を用いた判断を省略して、WRITEコマンドは必ずファイル属性の変更であると判断しても良い。   When communication using a unique protocol corresponding to mass storage is used, external devices that are communication partners are limited, and the communication specifications of the external devices are clear and limited. In this case, if it is clear that the command corresponding to the WRITE command issued from the external device is issued only for changing the file attribute, the determination using the sector number is omitted, and the WRITE command is It may be determined that this is a change in file attributes.

<第2の実施形態>
図3に基づいて、本発明を実施したビデオカメラとPCとのUSBケーブルでの接続において、記録媒体の状態に応じて、コマンドの応答内容を切替える制御を説明する。なお、以下実施の形態ではUSBスチルイメージキャプチャデバイスクラスにおけるPTP(Picture−Transfer−Protocol)のベンダユニーク(独自)コマンドを例にして説明するが、同様の処理を目的としたその他のプロトコル、コマンドであっても構わない。
<Second Embodiment>
Based on FIG. 3, a description will be given of the control for switching the response content of a command in accordance with the state of the recording medium in the connection between the video camera and the PC implementing the present invention with a USB cable. In the following embodiments, a PTP (Picture-Transfer-Protocol) vendor unique (unique) command in the USB still image capture device class will be described as an example. It does not matter.

ステップS301〜S303は、第1の実施形態に記載した図2におけるステップS201〜203と同内容のため省略する。   Steps S301 to S303 are the same as steps S201 to S203 in FIG. 2 described in the first embodiment, and are therefore omitted.

ステップS304では、コマンドを受信したかどうかを判定して、受信していなければステップS302へ移行して、再び通信終了を判定する。   In step S304, it is determined whether a command has been received. If it has not been received, the process proceeds to step S302 to determine again the end of communication.

コマンドを受信していればステップS305へ移行して、コマンドがWRITE系コマンドかどうかを確認する。WRITE系コマンドとは、SendObjectに代表されるオブジェクトの書き込みや、オブジェクトの属性変更コマンドを含む。   If a command has been received, the process proceeds to step S305 to check whether the command is a WRITE command. The WRITE command includes an object write represented by SendObject and an object attribute change command.

受信コマンドがWRITE系コマンドでなければステップS310へ移行してコマンドを実行し、ステップS311でコマンド実行結果を送信する。   If the received command is not a WRITE command, the process proceeds to step S310 to execute the command, and the command execution result is transmitted in step S311.

一方、ステップS305で受信したコマンドがWRITE系コマンドであればステップS306へ移行して、記録媒体103が読み出し専用かを判定する。読み出し専用でなければステップS310へ移行して、WRITE系コマンドを実行する。   On the other hand, if the command received in step S305 is a WRITE command, the process proceeds to step S306 to determine whether the recording medium 103 is read-only. If it is not read-only, the process proceeds to step S310, and a WRITE command is executed.

読み出し専用の記録媒体に対してWRITE系コマンドが発行された場合はステップS307に移行し、アーカイブ属性を変更するコマンドかどうかを判定する。PTPの規格ではアーカイブ属性を変更するコマンドは規定されていないが、MSN(Most Significant Nibble)が9のコマンドコードをベンダユニーク(独自)コマンドとして使用できる。例えば図4のコマンドをアーカイブ属性の変更コマンドとして定義し、このコマンドを受信した場合はファイル属性の変更と判断して、コマンドを実行せずにステップS308へ移行して、コマンドが成功した応答をPCに送信する。   When a WRITE command is issued for a read-only recording medium, the process proceeds to step S307, and it is determined whether the command is a command for changing an archive attribute. Although the command for changing the archive attribute is not defined in the PTP standard, a command code of MSN (Most Significant Nibble) 9 can be used as a vendor unique (unique) command. For example, the command in FIG. 4 is defined as an archive attribute change command, and if this command is received, it is determined that the file attribute has been changed, and the process proceeds to step S308 without executing the command. Send to PC.

ステップS307で、WRITE系コマンドがオブジェクト書き込みやその他のデータ書き込み(書き替え)と判断した場合は、ステップS309へ移行して、コマンドが実行できない(失敗した)応答をPCに送信する。   If it is determined in step S307 that the WRITE command is object writing or other data writing (rewriting), the process proceeds to step S309, and a response indicating that the command cannot be executed (failed) is transmitted to the PC.

以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。上述の実施形態の一部を適宜組み合わせてもよい。   Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included. A part of the above-described embodiments may be appropriately combined.

また、上述の実施形態の機能を実現するソフトウェアのプログラムを、記録媒体から直接、或いは有線/無線通信を用いてプログラムを実行可能なコンピュータを有するシステム又は装置に供給し、そのプログラムを実行する場合も本発明に含む。   Also, when a software program that realizes the functions of the above-described embodiments is supplied from a recording medium directly to a system or apparatus having a computer that can execute the program using wired / wireless communication, and the program is executed Are also included in the present invention.

従って、本発明の機能処理をコンピュータで実現するために、該コンピュータに供給、インストールされるプログラムコード自体も本発明を実現するものである。つまり、本発明の機能処理を実現するためのコンピュータプログラム自体も本発明に含まれる。   Accordingly, the program code itself supplied and installed in the computer in order to implement the functional processing of the present invention by the computer also realizes the present invention. That is, the computer program itself for realizing the functional processing of the present invention is also included in the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等、プログラムの形態を問わない。   In this case, the program may be in any form as long as it has a program function, such as an object code, a program executed by an interpreter, or script data supplied to the OS.

プログラムを供給するための記録媒体としては、例えば、ハードディスク、磁気テープ等の磁気記録媒体、光/光磁気記憶媒体、不揮発性の半導体メモリでもよい。   As a recording medium for supplying the program, for example, a magnetic recording medium such as a hard disk or a magnetic tape, an optical / magneto-optical storage medium, or a nonvolatile semiconductor memory may be used.

また、プログラムの供給方法としては、コンピュータネットワーク上のサーバに本発明を形成するコンピュータプログラムを記憶し、接続のあったクライアントコンピュータはがコンピュータプログラムをダウンロードしてプログラムするような方法も考えられる。   As a program supply method, a computer program that forms the present invention is stored in a server on a computer network, and a connected client computer downloads and programs the computer program.

100‥‥通信装置
101‥‥CPU
102‥‥RAM
103‥‥記録媒体
104‥‥記録情報取得部
105‥‥通信部
106‥‥要求判定部
120‥‥外部装置
130‥‥USBケーブル
100 ... Communication device 101 ... CPU
102 ... RAM
103 Recording medium 104 Recording information acquisition unit 105 Communication unit 106 Request determination unit 120 External device 130 USB cable

Claims (10)

第一の状態と第二の状態を有する記録媒体と、
外部装置と通信を行う通信手段と、
前記通信手段によって取得した要求を実行する実行手段と、
前記通信手段によって取得した要求が第一の要求と第二の要求の何れかを判定する判定手段と、
を備える通信装置において、
前記記録媒体が第一の状態の場合は、
前記実行手段の結果に応じて、第一、或いは第二の応答を送信し、
前記記録媒体が第二の状態の場合は、
前記判定手段が第一の要求の場合に、第一の応答を送信し、
前記判定手段が第二の要求の場合に、第二の応答を送信する
ことを特徴とする通信装置。
A recording medium having a first state and a second state;
A communication means for communicating with an external device;
Execution means for executing the request acquired by the communication means;
Determination means for determining whether the request acquired by the communication means is a first request or a second request;
In a communication device comprising:
When the recording medium is in the first state,
Depending on the result of the execution means, a first or second response is transmitted,
When the recording medium is in the second state,
If the determination means is a first request, send a first response;
A communication apparatus characterized by transmitting a second response when the determination means is a second request.
不良ブロックを代替する代替ブロックの領域を有する記録媒体と、
前記代替ブロックの領域の残量を検出し、検出結果に応じて前記記録媒体の第一の状態ないし第二の状態を判定する状態判定手段と、
外部装置と通信を行う通信手段と、
前記通信手段によって取得した要求を実行する実行手段と、
前記通信手段によって取得した要求が第一の要求と第二の要求の何れかを判定する要求判定手段と、
を備える通信装置において、
前記記録媒体が第一の状態の場合は、
前記実行手段の結果に応じて、第一、或いは第二の応答を送信し、
前記記録媒体が第二の状態の場合は、
前記要求判定手段が第一の要求の場合は、第一の応答を送信し、
前記要求判定手段が第二の要求の場合は、第二の応答を送信する
ことを特徴とする通信装置。
A recording medium having a replacement block area for replacing a bad block;
State determination means for detecting the remaining amount of the area of the alternative block and determining a first state or a second state of the recording medium according to a detection result;
A communication means for communicating with an external device;
Execution means for executing the request acquired by the communication means;
Request determination means for determining whether the request acquired by the communication means is a first request or a second request;
In a communication device comprising:
When the recording medium is in the first state,
Depending on the result of the execution means, a first or second response is transmitted,
When the recording medium is in the second state,
If the request determination means is a first request, send a first response,
If the request determination means is a second request, a communication apparatus is characterized in that a second response is transmitted.
前記第一の状態とは書き込みが可能な状態であり、前記第二の状態とは書き込みが不可能な状態であることを特徴とする請求項1又は請求項2に記載の通信装置。 The communication apparatus according to claim 1, wherein the first state is a state where writing is possible, and the second state is a state where writing is impossible. 前記第一の要求とは、前記記録媒体へのファイルデータの書き込み要求であり、前記第二の要求とは、前記記録媒体へのファイル属性の書き換え要求であることを特徴とする請求項1又は請求項2に記載の通信装置。 The first request is a request to write file data to the recording medium, and the second request is a request to rewrite a file attribute to the recording medium. The communication apparatus according to claim 2. 前記第一の応答とは、前記要求が成功しなかったことを表す応答であり、前記第二の応答とは、前記要求が成功したことを表す応答であることを特徴とする請求項1又は請求項2に記載の通信装置。 The first response is a response indicating that the request was not successful, and the second response is a response indicating that the request was successful. The communication apparatus according to claim 2. 前記状態判定手段は、前記代替ブロックの領域が使用可能な状態の場合は第一の状態を判定し、前記代替ブロックの領域が使用不可能な状態の場合は第二の状態を判定することを特徴とする請求項1に記載の通信装置。 The state determination means determines a first state when the replacement block area is usable, and determines a second state when the replacement block area is unusable. The communication device according to claim 1. 前記代替ブロックの領域が使用不可能な状態とは、代替ブロックの領域の残量が、代替ブロックの領域の残量が無しとなった状態であることを特徴とする請求項6に記載の通信装置。 The communication according to claim 6, wherein the state in which the area of the substitute block is unusable is a state in which the remaining amount of the area of the substitute block is no longer remaining in the area of the substitute block. apparatus. 前記代替ブロックの領域が使用不可能な状態とは、代替ブロックの領域の残量が、不良ブロックの代替するのに不十分な残量となった状態であることを特徴とする請求項6に記載の通信装置。 The state in which the area of the replacement block is unusable is a state in which the remaining amount of the replacement block area is insufficient to replace a defective block. The communication device described. 前記通信手段とは、USBマスストレージに代表される、コマンド実行においてファイルシステムを介在しないプロトコルであることを特徴とする請求項1又は請求項2に記載の通信装置。 3. The communication apparatus according to claim 1, wherein the communication unit is a protocol that does not involve a file system in command execution, typified by USB mass storage. 前記通信手段とは、Picture Transfer Protocolに代表される、コマンド実行においてファイルシステムが介在するプロトコルであることを特徴とする請求項1又は請求項2に記載の通信装置。
The communication apparatus according to claim 1 or 2, wherein the communication means is a protocol in which a file system is interposed in command execution, typified by a Picture Transfer Protocol.
JP2013157996A 2013-07-30 2013-07-30 Communication device Pending JP2015028714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013157996A JP2015028714A (en) 2013-07-30 2013-07-30 Communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013157996A JP2015028714A (en) 2013-07-30 2013-07-30 Communication device

Publications (1)

Publication Number Publication Date
JP2015028714A true JP2015028714A (en) 2015-02-12

Family

ID=52492382

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013157996A Pending JP2015028714A (en) 2013-07-30 2013-07-30 Communication device

Country Status (1)

Country Link
JP (1) JP2015028714A (en)

Similar Documents

Publication Publication Date Title
JP5409159B2 (en) Information processing apparatus, information processing apparatus control method, and program
US7555602B2 (en) Data processing apparatus and method for restoring a file system
US9952966B2 (en) Control apparatus and control method therefor
EP2819016B1 (en) Storage controller, storage system, and control program
JP6350090B2 (en) Storage control device, copy control program, and copy control method
US20150081953A1 (en) Ssd (solid state drive) device
CN101796495A (en) Memory device and file system
JP2012018501A (en) Information processing apparatus, control method of information processing apparatus, and program
US8924669B2 (en) Information processing apparatus, control method, and program
JP2014194682A (en) Information processing device and processing method thereof
KR100827287B1 (en) Semiconductor auxiliary memory and data storage method using same
WO2022242665A1 (en) Data storage method and related device
CN114420183A (en) Data storage control method, electronic device and storage medium
US20150089122A1 (en) Apparatus, control apparatus, control method and storage medium
US20220027097A1 (en) Recording apparatus, recording method, storage medium, and memory card
US8627157B2 (en) Storing apparatus
JP2015028714A (en) Communication device
US20070174739A1 (en) Disk device, method of writing data in disk device, and computer product
JP4262220B2 (en) Digital camera
US20090172454A1 (en) Information recording device and information recording method
JP2006260158A (en) Information processing apparatus, information processing method and program
JP5359309B2 (en) Electronics
JP6924088B2 (en) Information processing equipment, its control method, and programs
JP2009129282A (en) Data storage apparatus, data backup method and data backup program
JP2005346306A (en) Storage device, image forming apparatus, and file server