デバイスディスクリプタ
アセンブラの魔女 ⧫ PTP ⧫ Still Image Capture Device Class ⧫ デバイスディスクリプタ
アセンブラの魔女 ⧫ PTP ⧫ Still Image Capture Device Class ⧫ デバイスディスクリプタ
 Still Image Capture Deviceクラスのデバイス ディスクリプタは、以下のような内容となります。

vspace(10);

オフセット
[byte]
フィールド サイズ
[byte]
値 説明
0 bLength 1 0x12 このディスクリプタのサイズ(byte)。常に0x12を設定する
1 bDescriptorType 1 0x01 常にデバイス ディスクリプタであることを意味する0x01を設定する
2 bcdUSB 2 0x0110 デバイスが準拠するUSB仕様のバージョン。0x0110値は、USBバージョン01.10に準拠したデバイスであることを意味する
4 bDeviceClass 1 0x00 常に0x00を設定(*1)
5 bDeviceSubClass 1 0x00 常に0x00を設定(*1)
6 bDeviceProtocol 1 0x00 常に0x00を設定(*1)
7 bMaxPacketSize0 1 number エンドポイント0の最大パケットサイズ(byte)。デバイスの仕様に基づき8, 16,32, 64のいずれかを設定する
8 idVendor 2 ID ベンダーID(*2)
10 idProduct 2 ID プロダクトID(*3)
12 bcdDevice 2 BCD デバイスのリリース番号(BCD値)(*3)
14 iManufacturer 1 index ストリングディスクリプタ上の製造業者名文字列の位置を示すインデックス。この文字列をサポートしない場合はゼロを設定
15 iProduct 1 index ストリングディスクリプタ上の製品名文字列の位置を示すインデックス。この文字列をサポートしない場合はゼロを設定
16 iSerialNumber 1 index ストリングディスクリプタ上のシリアル番号文字列の位置を示すインデックス。この文字列をサポートしない場合はゼロを設定
17 iNumConfigurations 1 number デバイスの持つコンフィグレーションの総数

(*1)Still Image Capture Deviceクラスでは、bDeviceClass, bDeviceClass, bDeviceProtocolには常に0x00を設定します。

(*2)ベンダーIDはUSBインプリメンターズ・フォーラムによってベンダーごとにユニークな値が割り当てられます。

(*3)プロダクトID, デバイスのリリース番号は、デバイスのベンダーが割り当てる値です。

 2000年代のPTP対応デジタルスチルカメラ「DSC-U60」のデバイス ディスクリプタは、以下のような内容となっています。

オフセット
[byte]
フィールド サイズ
[byte]
値 説明
0 bLength 1 0x12 このディスクリプタのサイズ=0x12バイト
1 bDescriptorType 1 0x01 0x01:ディスクリプタタイプ=デバイス ディスクリプタ
2 bcdUSB 2 0x0110 0x0110:USB Specification 1.10に準拠するデバイス
4 bDeviceClass 1 0x00 0x00:Still Image Capture Deviceクラスでは0x00を設定
5 bDeviceSubClass 1 0x00 0x00:Still Image Capture Deviceクラスでは0x00を設定
6 bDeviceProtocol 1 0x00 0x00:Still Image Capture Deviceクラスでは0x00を設定
7 bMaxPacketSize0 1 0x08 エンドポイント0の最大パケットサイズ=8バイト
8 idVendor 2 0x054C ベンダーID:1356=Sony Corporation
10 idProduct 2 0x004E プロダクトID
12 bcdDevice 2 0x01 デバイスのリリース番号(BCD値)
14 iManufacturer 1 0x01 ストリングディスクリプタ上の製造業者名文字列の位置を示すインデックス=1
15 iProduct 1 0x02 ストリングディスクリプタ上の製品名文字列の位置を示すインデックス=2
16 iSerialNumber 1 0 ストリングディスクリプタ上にシリアル番号文字列を持たない
17 iNumConfigurations 1 1 デバイスの持つコンフィグレーションの総数=1

▼ Property
記事情報
datePublished2011-01-01
dateModified2018-06-26
authorアセンブラの魔女
headlineStill Image Capture Device Classのデバイスディスクリプタについての説明記事です
keywordsPTP
keywordsUSB
keywordsStill Image Capture Device Class
keywordsデバイスディスクリプタ
publisher name= wiredFish, logo.name= wiredFish, logo.url= https://books-nekoya.jp/Programming/chigu-hagu-title-01.png size= 208 pixel x 50 pixel
image.url url= https://books-nekoya.jp/Programming/chigu-hagu-title-01.png , size= 208 pixel x 50 pixel