ホーム › Storage.Nvme › NVME_OCP_DEVICE_LATENCY_MONITOR_LOG
NVME_OCP_DEVICE_LATENCY_MONITOR_LOG
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| FeatureStatus | LATENCY_MONITOR_FEATURE_STATUS | 8/4 | +0 | +0 | レイテンシ監視機能の有効状態を示す。 |
| Reserved0 | BYTE | 1 | +8 | +4 | 予約領域。将来拡張用で0とする。 |
| ActiveBucketTimer | WORD | 2 | +9 | +5 | アクティブバケットタイマの現在値。 |
| ActiveBucketTimerThreshold | WORD | 2 | +11 | +7 | アクティブバケットタイマのしきい値。 |
| ActiveThresholdA | BYTE | 1 | +13 | +9 | アクティブバケットAのレイテンシしきい値。 |
| ActiveThresholdB | BYTE | 1 | +14 | +10 | アクティブバケットBのレイテンシしきい値。 |
| ActiveThresholdC | BYTE | 1 | +15 | +11 | アクティブバケットCのレイテンシしきい値。 |
| ActiveThresholdD | BYTE | 1 | +16 | +12 | アクティブバケットDのレイテンシしきい値。 |
| ActiveLatencyConfig | ACTIVE_LATENCY_CONFIGURATION | 8/4 | +17 | +13 | アクティブレイテンシ監視の設定値。 |
| ActiveLatencyMinimumWindow | BYTE | 1 | +25 | +17 | アクティブレイテンシ計測の最小ウィンドウ幅。 |
| Reserved1 | BYTE | 19 | +26 | +18 | 予約領域。将来拡張用で0とする。 |
| ActiveBucketCounter0 | BUCKET_COUNTER | 16 | +45 | +37 | アクティブバケット0の操作種別ごとのカウンタ。 |
| ActiveBucketCounter1 | BUCKET_COUNTER | 16 | +61 | +53 | アクティブバケット1の操作種別ごとのカウンタ。 |
| ActiveBucketCounter2 | BUCKET_COUNTER | 16 | +77 | +69 | アクティブバケット2の操作種別ごとのカウンタ。 |
| ActiveBucketCounter3 | BUCKET_COUNTER | 16 | +93 | +85 | アクティブバケット3の操作種別ごとのカウンタ。 |
| ActiveLatencyStamp | LATENCY_STAMP | 96 | +109 | +101 | アクティブ計測のレイテンシスタンプ群。 |
| ActiveMeasuredLatency | MEASURED_LATENCY | 24 | +205 | +197 | アクティブ計測で得られたレイテンシ値群。 |
| ActiveLatencyStampUnits | LATENCY_STAMP_UNITS | 2 | +229 | +221 | アクティブレイテンシスタンプの時間単位。 |
| Reserved2 | BYTE | 22 | +231 | +223 | 予約領域。将来拡張用で0とする。 |
| StaticBucketCounter0 | BUCKET_COUNTER | 16 | +253 | +245 | 静的バケット0の操作種別ごとのカウンタ。 |
| StaticBucketCounter1 | BUCKET_COUNTER | 16 | +269 | +261 | 静的バケット1の操作種別ごとのカウンタ。 |
| StaticBucketCounter2 | BUCKET_COUNTER | 16 | +285 | +277 | 静的バケット2の操作種別ごとのカウンタ。 |
| StaticBucketCounter3 | BUCKET_COUNTER | 16 | +301 | +293 | 静的バケット3の操作種別ごとのカウンタ。 |
| StaticLatencyStamp | LATENCY_STAMP | 96 | +317 | +309 | 静的計測のレイテンシスタンプ群。 |
| StaticMeasuredLatency | MEASURED_LATENCY | 24 | +413 | +405 | 静的計測で得られたレイテンシ値群。 |
| StaticLatencyStampUnits | LATENCY_STAMP_UNITS | 2 | +437 | +429 | 静的レイテンシスタンプの時間単位。 |
| Reserved3 | BYTE | 22 | +439 | +431 | 予約領域。将来拡張用で0とする。 |
| DebugLogTriggerEnable | DEBUG_BIT_FIELD | 2 | +461 | +453 | デバッグログトリガの有効化ビット群。 |
| DebugLogMeasuredLatency | WORD | 2 | +463 | +455 | デバッグログに記録された計測レイテンシ値。 |
| DebugLogLatencyStamp | ULONGLONG | 8 | +465 | +457 | デバッグログのレイテンシタイムスタンプ。 |
| DebugLogPointer | WORD | 2 | +473 | +465 | デバッグログ内の書き込み位置ポインタ。 |
| DebugCounterTriggerSource | DEBUG_BIT_FIELD | 2 | +475 | +467 | デバッグカウンタのトリガ要因ビット群。 |
| DebugLogStampUnits | _DebugLogStampUnits_e__Union | 8/4 | +477 | +469 | デバッグログスタンプの時間単位を保持する共用体。 |
| Reserved4 | BYTE | 29 | +485 | +473 | 予約領域。将来拡張用で0とする。 |
| LogPageVersionNumber | WORD | 2 | +514 | +502 | このログページの版数。 |
| LogPageGUID | GUID | 16 | +516 | +504 | ログページを識別する16バイトGUID。 |
共用体: _DebugLogStampUnits_e__Union x64 8B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Anonymous | _Anonymous_e__Struct | 8/4 | +0 | +0 |
| AsUchar | BYTE | 1 | +0 | +0 |
各言語での定義
#include <windows.h>
// LATENCY_MONITOR_FEATURE_STATUS (x64 8 / x86 4 バイト)
typedef struct LATENCY_MONITOR_FEATURE_STATUS {
_Anonymous_e__Union Anonymous;
} LATENCY_MONITOR_FEATURE_STATUS;
// ACTIVE_LATENCY_CONFIGURATION (x64 8 / x86 4 バイト)
typedef struct ACTIVE_LATENCY_CONFIGURATION {
_Anonymous_e__Union Anonymous;
} ACTIVE_LATENCY_CONFIGURATION;
// BUCKET_COUNTER (x64 16 / x86 16 バイト)
#pragma pack(push, 1)
typedef struct BUCKET_COUNTER {
DWORD Reserved;
DWORD Trim;
DWORD Write;
DWORD Read;
} BUCKET_COUNTER;
#pragma pack(pop)
// LATENCY_STAMP (x64 96 / x86 96 バイト)
#pragma pack(push, 1)
typedef struct LATENCY_STAMP {
ULONGLONG Trim3;
ULONGLONG Write3;
ULONGLONG Read3;
ULONGLONG Trim2;
ULONGLONG Write2;
ULONGLONG Read2;
ULONGLONG Trim1;
ULONGLONG Write1;
ULONGLONG Read1;
ULONGLONG Trim0;
ULONGLONG Write0;
ULONGLONG Read0;
} LATENCY_STAMP;
#pragma pack(pop)
// MEASURED_LATENCY (x64 24 / x86 24 バイト)
#pragma pack(push, 1)
typedef struct MEASURED_LATENCY {
WORD Trim3;
WORD Write3;
WORD Read3;
WORD Trim2;
WORD Write2;
WORD Read2;
WORD Trim1;
WORD Write1;
WORD Read1;
WORD Trim0;
WORD Write0;
WORD Read0;
} MEASURED_LATENCY;
#pragma pack(pop)
// LATENCY_STAMP_UNITS (x64 2 / x86 2 バイト)
#pragma pack(push, 1)
typedef struct LATENCY_STAMP_UNITS {
WORD _bitfield;
} LATENCY_STAMP_UNITS;
#pragma pack(pop)
// DEBUG_BIT_FIELD (x64 2 / x86 2 バイト)
#pragma pack(push, 1)
typedef struct DEBUG_BIT_FIELD {
WORD _bitfield;
} DEBUG_BIT_FIELD;
#pragma pack(pop)
// NVME_OCP_DEVICE_LATENCY_MONITOR_LOG (x64 532 / x86 520 バイト)
#pragma pack(push, 1)
typedef struct NVME_OCP_DEVICE_LATENCY_MONITOR_LOG {
LATENCY_MONITOR_FEATURE_STATUS FeatureStatus;
BYTE Reserved0;
WORD ActiveBucketTimer;
WORD ActiveBucketTimerThreshold;
BYTE ActiveThresholdA;
BYTE ActiveThresholdB;
BYTE ActiveThresholdC;
BYTE ActiveThresholdD;
ACTIVE_LATENCY_CONFIGURATION ActiveLatencyConfig;
BYTE ActiveLatencyMinimumWindow;
BYTE Reserved1[19];
BUCKET_COUNTER ActiveBucketCounter0;
BUCKET_COUNTER ActiveBucketCounter1;
BUCKET_COUNTER ActiveBucketCounter2;
BUCKET_COUNTER ActiveBucketCounter3;
LATENCY_STAMP ActiveLatencyStamp;
MEASURED_LATENCY ActiveMeasuredLatency;
LATENCY_STAMP_UNITS ActiveLatencyStampUnits;
BYTE Reserved2[22];
BUCKET_COUNTER StaticBucketCounter0;
BUCKET_COUNTER StaticBucketCounter1;
BUCKET_COUNTER StaticBucketCounter2;
BUCKET_COUNTER StaticBucketCounter3;
LATENCY_STAMP StaticLatencyStamp;
MEASURED_LATENCY StaticMeasuredLatency;
LATENCY_STAMP_UNITS StaticLatencyStampUnits;
BYTE Reserved3[22];
DEBUG_BIT_FIELD DebugLogTriggerEnable;
WORD DebugLogMeasuredLatency;
ULONGLONG DebugLogLatencyStamp;
WORD DebugLogPointer;
DEBUG_BIT_FIELD DebugCounterTriggerSource;
_DebugLogStampUnits_e__Union DebugLogStampUnits;
BYTE Reserved4[29];
WORD LogPageVersionNumber;
GUID LogPageGUID;
} NVME_OCP_DEVICE_LATENCY_MONITOR_LOG;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct LATENCY_MONITOR_FEATURE_STATUS
{
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ACTIVE_LATENCY_CONFIGURATION
{
public _Anonymous_e__Union Anonymous;
}
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct BUCKET_COUNTER
{
public uint Reserved;
public uint Trim;
public uint Write;
public uint Read;
}
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LATENCY_STAMP
{
public ulong Trim3;
public ulong Write3;
public ulong Read3;
public ulong Trim2;
public ulong Write2;
public ulong Read2;
public ulong Trim1;
public ulong Write1;
public ulong Read1;
public ulong Trim0;
public ulong Write0;
public ulong Read0;
}
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct MEASURED_LATENCY
{
public ushort Trim3;
public ushort Write3;
public ushort Read3;
public ushort Trim2;
public ushort Write2;
public ushort Read2;
public ushort Trim1;
public ushort Write1;
public ushort Read1;
public ushort Trim0;
public ushort Write0;
public ushort Read0;
}
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct LATENCY_STAMP_UNITS
{
public ushort _bitfield;
}
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct DEBUG_BIT_FIELD
{
public ushort _bitfield;
}
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct NVME_OCP_DEVICE_LATENCY_MONITOR_LOG
{
public LATENCY_MONITOR_FEATURE_STATUS FeatureStatus;
public byte Reserved0;
public ushort ActiveBucketTimer;
public ushort ActiveBucketTimerThreshold;
public byte ActiveThresholdA;
public byte ActiveThresholdB;
public byte ActiveThresholdC;
public byte ActiveThresholdD;
public ACTIVE_LATENCY_CONFIGURATION ActiveLatencyConfig;
public byte ActiveLatencyMinimumWindow;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 19)] public byte[] Reserved1;
public BUCKET_COUNTER ActiveBucketCounter0;
public BUCKET_COUNTER ActiveBucketCounter1;
public BUCKET_COUNTER ActiveBucketCounter2;
public BUCKET_COUNTER ActiveBucketCounter3;
public LATENCY_STAMP ActiveLatencyStamp;
public MEASURED_LATENCY ActiveMeasuredLatency;
public LATENCY_STAMP_UNITS ActiveLatencyStampUnits;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] Reserved2;
public BUCKET_COUNTER StaticBucketCounter0;
public BUCKET_COUNTER StaticBucketCounter1;
public BUCKET_COUNTER StaticBucketCounter2;
public BUCKET_COUNTER StaticBucketCounter3;
public LATENCY_STAMP StaticLatencyStamp;
public MEASURED_LATENCY StaticMeasuredLatency;
public LATENCY_STAMP_UNITS StaticLatencyStampUnits;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 22)] public byte[] Reserved3;
public DEBUG_BIT_FIELD DebugLogTriggerEnable;
public ushort DebugLogMeasuredLatency;
public ulong DebugLogLatencyStamp;
public ushort DebugLogPointer;
public DEBUG_BIT_FIELD DebugCounterTriggerSource;
public _DebugLogStampUnits_e__Union DebugLogStampUnits;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 29)] public byte[] Reserved4;
public ushort LogPageVersionNumber;
public Guid LogPageGUID;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure LATENCY_MONITOR_FEATURE_STATUS
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ACTIVE_LATENCY_CONFIGURATION
Public Anonymous As _Anonymous_e__Union
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure BUCKET_COUNTER
Public Reserved As UInteger
Public Trim As UInteger
Public Write As UInteger
Public Read As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LATENCY_STAMP
Public Trim3 As ULong
Public Write3 As ULong
Public Read3 As ULong
Public Trim2 As ULong
Public Write2 As ULong
Public Read2 As ULong
Public Trim1 As ULong
Public Write1 As ULong
Public Read1 As ULong
Public Trim0 As ULong
Public Write0 As ULong
Public Read0 As ULong
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure MEASURED_LATENCY
Public Trim3 As UShort
Public Write3 As UShort
Public Read3 As UShort
Public Trim2 As UShort
Public Write2 As UShort
Public Read2 As UShort
Public Trim1 As UShort
Public Write1 As UShort
Public Read1 As UShort
Public Trim0 As UShort
Public Write0 As UShort
Public Read0 As UShort
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure LATENCY_STAMP_UNITS
Public _bitfield As UShort
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure DEBUG_BIT_FIELD
Public _bitfield As UShort
End Structure
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure NVME_OCP_DEVICE_LATENCY_MONITOR_LOG
Public FeatureStatus As LATENCY_MONITOR_FEATURE_STATUS
Public Reserved0 As Byte
Public ActiveBucketTimer As UShort
Public ActiveBucketTimerThreshold As UShort
Public ActiveThresholdA As Byte
Public ActiveThresholdB As Byte
Public ActiveThresholdC As Byte
Public ActiveThresholdD As Byte
Public ActiveLatencyConfig As ACTIVE_LATENCY_CONFIGURATION
Public ActiveLatencyMinimumWindow As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=19)> Public Reserved1() As Byte
Public ActiveBucketCounter0 As BUCKET_COUNTER
Public ActiveBucketCounter1 As BUCKET_COUNTER
Public ActiveBucketCounter2 As BUCKET_COUNTER
Public ActiveBucketCounter3 As BUCKET_COUNTER
Public ActiveLatencyStamp As LATENCY_STAMP
Public ActiveMeasuredLatency As MEASURED_LATENCY
Public ActiveLatencyStampUnits As LATENCY_STAMP_UNITS
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=22)> Public Reserved2() As Byte
Public StaticBucketCounter0 As BUCKET_COUNTER
Public StaticBucketCounter1 As BUCKET_COUNTER
Public StaticBucketCounter2 As BUCKET_COUNTER
Public StaticBucketCounter3 As BUCKET_COUNTER
Public StaticLatencyStamp As LATENCY_STAMP
Public StaticMeasuredLatency As MEASURED_LATENCY
Public StaticLatencyStampUnits As LATENCY_STAMP_UNITS
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=22)> Public Reserved3() As Byte
Public DebugLogTriggerEnable As DEBUG_BIT_FIELD
Public DebugLogMeasuredLatency As UShort
Public DebugLogLatencyStamp As ULong
Public DebugLogPointer As UShort
Public DebugCounterTriggerSource As DEBUG_BIT_FIELD
Public DebugLogStampUnits As _DebugLogStampUnits_e__Union
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=29)> Public Reserved4() As Byte
Public LogPageVersionNumber As UShort
Public LogPageGUID As Guid
End Structureimport ctypes
from ctypes import wintypes
class LATENCY_MONITOR_FEATURE_STATUS(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Union),
]
class ACTIVE_LATENCY_CONFIGURATION(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Union),
]
class BUCKET_COUNTER(ctypes.Structure):
_pack_ = 1
_fields_ = [
("Reserved", wintypes.DWORD),
("Trim", wintypes.DWORD),
("Write", wintypes.DWORD),
("Read", wintypes.DWORD),
]
class LATENCY_STAMP(ctypes.Structure):
_pack_ = 1
_fields_ = [
("Trim3", ctypes.c_ulonglong),
("Write3", ctypes.c_ulonglong),
("Read3", ctypes.c_ulonglong),
("Trim2", ctypes.c_ulonglong),
("Write2", ctypes.c_ulonglong),
("Read2", ctypes.c_ulonglong),
("Trim1", ctypes.c_ulonglong),
("Write1", ctypes.c_ulonglong),
("Read1", ctypes.c_ulonglong),
("Trim0", ctypes.c_ulonglong),
("Write0", ctypes.c_ulonglong),
("Read0", ctypes.c_ulonglong),
]
class MEASURED_LATENCY(ctypes.Structure):
_pack_ = 1
_fields_ = [
("Trim3", ctypes.c_ushort),
("Write3", ctypes.c_ushort),
("Read3", ctypes.c_ushort),
("Trim2", ctypes.c_ushort),
("Write2", ctypes.c_ushort),
("Read2", ctypes.c_ushort),
("Trim1", ctypes.c_ushort),
("Write1", ctypes.c_ushort),
("Read1", ctypes.c_ushort),
("Trim0", ctypes.c_ushort),
("Write0", ctypes.c_ushort),
("Read0", ctypes.c_ushort),
]
class LATENCY_STAMP_UNITS(ctypes.Structure):
_pack_ = 1
_fields_ = [
("_bitfield", ctypes.c_ushort),
]
class DEBUG_BIT_FIELD(ctypes.Structure):
_pack_ = 1
_fields_ = [
("_bitfield", ctypes.c_ushort),
]
class NVME_OCP_DEVICE_LATENCY_MONITOR_LOG(ctypes.Structure):
_pack_ = 1
_fields_ = [
("FeatureStatus", LATENCY_MONITOR_FEATURE_STATUS),
("Reserved0", ctypes.c_ubyte),
("ActiveBucketTimer", ctypes.c_ushort),
("ActiveBucketTimerThreshold", ctypes.c_ushort),
("ActiveThresholdA", ctypes.c_ubyte),
("ActiveThresholdB", ctypes.c_ubyte),
("ActiveThresholdC", ctypes.c_ubyte),
("ActiveThresholdD", ctypes.c_ubyte),
("ActiveLatencyConfig", ACTIVE_LATENCY_CONFIGURATION),
("ActiveLatencyMinimumWindow", ctypes.c_ubyte),
("Reserved1", ctypes.c_ubyte * 19),
("ActiveBucketCounter0", BUCKET_COUNTER),
("ActiveBucketCounter1", BUCKET_COUNTER),
("ActiveBucketCounter2", BUCKET_COUNTER),
("ActiveBucketCounter3", BUCKET_COUNTER),
("ActiveLatencyStamp", LATENCY_STAMP),
("ActiveMeasuredLatency", MEASURED_LATENCY),
("ActiveLatencyStampUnits", LATENCY_STAMP_UNITS),
("Reserved2", ctypes.c_ubyte * 22),
("StaticBucketCounter0", BUCKET_COUNTER),
("StaticBucketCounter1", BUCKET_COUNTER),
("StaticBucketCounter2", BUCKET_COUNTER),
("StaticBucketCounter3", BUCKET_COUNTER),
("StaticLatencyStamp", LATENCY_STAMP),
("StaticMeasuredLatency", MEASURED_LATENCY),
("StaticLatencyStampUnits", LATENCY_STAMP_UNITS),
("Reserved3", ctypes.c_ubyte * 22),
("DebugLogTriggerEnable", DEBUG_BIT_FIELD),
("DebugLogMeasuredLatency", ctypes.c_ushort),
("DebugLogLatencyStamp", ctypes.c_ulonglong),
("DebugLogPointer", ctypes.c_ushort),
("DebugCounterTriggerSource", DEBUG_BIT_FIELD),
("DebugLogStampUnits", _DebugLogStampUnits_e__Union),
("Reserved4", ctypes.c_ubyte * 29),
("LogPageVersionNumber", ctypes.c_ushort),
("LogPageGUID", GUID),
]#[repr(C)]
pub struct LATENCY_MONITOR_FEATURE_STATUS {
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C)]
pub struct ACTIVE_LATENCY_CONFIGURATION {
pub Anonymous: _Anonymous_e__Union,
}
#[repr(C, packed(1))]
pub struct BUCKET_COUNTER {
pub Reserved: u32,
pub Trim: u32,
pub Write: u32,
pub Read: u32,
}
#[repr(C, packed(1))]
pub struct LATENCY_STAMP {
pub Trim3: u64,
pub Write3: u64,
pub Read3: u64,
pub Trim2: u64,
pub Write2: u64,
pub Read2: u64,
pub Trim1: u64,
pub Write1: u64,
pub Read1: u64,
pub Trim0: u64,
pub Write0: u64,
pub Read0: u64,
}
#[repr(C, packed(1))]
pub struct MEASURED_LATENCY {
pub Trim3: u16,
pub Write3: u16,
pub Read3: u16,
pub Trim2: u16,
pub Write2: u16,
pub Read2: u16,
pub Trim1: u16,
pub Write1: u16,
pub Read1: u16,
pub Trim0: u16,
pub Write0: u16,
pub Read0: u16,
}
#[repr(C, packed(1))]
pub struct LATENCY_STAMP_UNITS {
pub _bitfield: u16,
}
#[repr(C, packed(1))]
pub struct DEBUG_BIT_FIELD {
pub _bitfield: u16,
}
#[repr(C, packed(1))]
pub struct NVME_OCP_DEVICE_LATENCY_MONITOR_LOG {
pub FeatureStatus: LATENCY_MONITOR_FEATURE_STATUS,
pub Reserved0: u8,
pub ActiveBucketTimer: u16,
pub ActiveBucketTimerThreshold: u16,
pub ActiveThresholdA: u8,
pub ActiveThresholdB: u8,
pub ActiveThresholdC: u8,
pub ActiveThresholdD: u8,
pub ActiveLatencyConfig: ACTIVE_LATENCY_CONFIGURATION,
pub ActiveLatencyMinimumWindow: u8,
pub Reserved1: [u8; 19],
pub ActiveBucketCounter0: BUCKET_COUNTER,
pub ActiveBucketCounter1: BUCKET_COUNTER,
pub ActiveBucketCounter2: BUCKET_COUNTER,
pub ActiveBucketCounter3: BUCKET_COUNTER,
pub ActiveLatencyStamp: LATENCY_STAMP,
pub ActiveMeasuredLatency: MEASURED_LATENCY,
pub ActiveLatencyStampUnits: LATENCY_STAMP_UNITS,
pub Reserved2: [u8; 22],
pub StaticBucketCounter0: BUCKET_COUNTER,
pub StaticBucketCounter1: BUCKET_COUNTER,
pub StaticBucketCounter2: BUCKET_COUNTER,
pub StaticBucketCounter3: BUCKET_COUNTER,
pub StaticLatencyStamp: LATENCY_STAMP,
pub StaticMeasuredLatency: MEASURED_LATENCY,
pub StaticLatencyStampUnits: LATENCY_STAMP_UNITS,
pub Reserved3: [u8; 22],
pub DebugLogTriggerEnable: DEBUG_BIT_FIELD,
pub DebugLogMeasuredLatency: u16,
pub DebugLogLatencyStamp: u64,
pub DebugLogPointer: u16,
pub DebugCounterTriggerSource: DEBUG_BIT_FIELD,
pub DebugLogStampUnits: _DebugLogStampUnits_e__Union,
pub Reserved4: [u8; 29],
pub LogPageVersionNumber: u16,
pub LogPageGUID: GUID,
}import "golang.org/x/sys/windows"
type LATENCY_MONITOR_FEATURE_STATUS struct {
Anonymous _Anonymous_e__Union
}
type ACTIVE_LATENCY_CONFIGURATION struct {
Anonymous _Anonymous_e__Union
}
type BUCKET_COUNTER struct {
Reserved uint32
Trim uint32
Write uint32
Read uint32
}
type LATENCY_STAMP struct {
Trim3 uint64
Write3 uint64
Read3 uint64
Trim2 uint64
Write2 uint64
Read2 uint64
Trim1 uint64
Write1 uint64
Read1 uint64
Trim0 uint64
Write0 uint64
Read0 uint64
}
type MEASURED_LATENCY struct {
Trim3 uint16
Write3 uint16
Read3 uint16
Trim2 uint16
Write2 uint16
Read2 uint16
Trim1 uint16
Write1 uint16
Read1 uint16
Trim0 uint16
Write0 uint16
Read0 uint16
}
type LATENCY_STAMP_UNITS struct {
_bitfield uint16
}
type DEBUG_BIT_FIELD struct {
_bitfield uint16
}
type NVME_OCP_DEVICE_LATENCY_MONITOR_LOG struct {
FeatureStatus LATENCY_MONITOR_FEATURE_STATUS
Reserved0 byte
ActiveBucketTimer uint16
ActiveBucketTimerThreshold uint16
ActiveThresholdA byte
ActiveThresholdB byte
ActiveThresholdC byte
ActiveThresholdD byte
ActiveLatencyConfig ACTIVE_LATENCY_CONFIGURATION
ActiveLatencyMinimumWindow byte
Reserved1 [19]byte
ActiveBucketCounter0 BUCKET_COUNTER
ActiveBucketCounter1 BUCKET_COUNTER
ActiveBucketCounter2 BUCKET_COUNTER
ActiveBucketCounter3 BUCKET_COUNTER
ActiveLatencyStamp LATENCY_STAMP
ActiveMeasuredLatency MEASURED_LATENCY
ActiveLatencyStampUnits LATENCY_STAMP_UNITS
Reserved2 [22]byte
StaticBucketCounter0 BUCKET_COUNTER
StaticBucketCounter1 BUCKET_COUNTER
StaticBucketCounter2 BUCKET_COUNTER
StaticBucketCounter3 BUCKET_COUNTER
StaticLatencyStamp LATENCY_STAMP
StaticMeasuredLatency MEASURED_LATENCY
StaticLatencyStampUnits LATENCY_STAMP_UNITS
Reserved3 [22]byte
DebugLogTriggerEnable DEBUG_BIT_FIELD
DebugLogMeasuredLatency uint16
DebugLogLatencyStamp uint64
DebugLogPointer uint16
DebugCounterTriggerSource DEBUG_BIT_FIELD
DebugLogStampUnits _DebugLogStampUnits_e__Union
Reserved4 [29]byte
LogPageVersionNumber uint16
LogPageGUID windows.GUID
}type
LATENCY_MONITOR_FEATURE_STATUS = record
Anonymous: _Anonymous_e__Union;
end;
ACTIVE_LATENCY_CONFIGURATION = record
Anonymous: _Anonymous_e__Union;
end;
BUCKET_COUNTER = packed record
Reserved: DWORD;
Trim: DWORD;
Write: DWORD;
Read: DWORD;
end;
LATENCY_STAMP = packed record
Trim3: UInt64;
Write3: UInt64;
Read3: UInt64;
Trim2: UInt64;
Write2: UInt64;
Read2: UInt64;
Trim1: UInt64;
Write1: UInt64;
Read1: UInt64;
Trim0: UInt64;
Write0: UInt64;
Read0: UInt64;
end;
MEASURED_LATENCY = packed record
Trim3: Word;
Write3: Word;
Read3: Word;
Trim2: Word;
Write2: Word;
Read2: Word;
Trim1: Word;
Write1: Word;
Read1: Word;
Trim0: Word;
Write0: Word;
Read0: Word;
end;
LATENCY_STAMP_UNITS = packed record
_bitfield: Word;
end;
DEBUG_BIT_FIELD = packed record
_bitfield: Word;
end;
NVME_OCP_DEVICE_LATENCY_MONITOR_LOG = packed record
FeatureStatus: LATENCY_MONITOR_FEATURE_STATUS;
Reserved0: Byte;
ActiveBucketTimer: Word;
ActiveBucketTimerThreshold: Word;
ActiveThresholdA: Byte;
ActiveThresholdB: Byte;
ActiveThresholdC: Byte;
ActiveThresholdD: Byte;
ActiveLatencyConfig: ACTIVE_LATENCY_CONFIGURATION;
ActiveLatencyMinimumWindow: Byte;
Reserved1: array[0..18] of Byte;
ActiveBucketCounter0: BUCKET_COUNTER;
ActiveBucketCounter1: BUCKET_COUNTER;
ActiveBucketCounter2: BUCKET_COUNTER;
ActiveBucketCounter3: BUCKET_COUNTER;
ActiveLatencyStamp: LATENCY_STAMP;
ActiveMeasuredLatency: MEASURED_LATENCY;
ActiveLatencyStampUnits: LATENCY_STAMP_UNITS;
Reserved2: array[0..21] of Byte;
StaticBucketCounter0: BUCKET_COUNTER;
StaticBucketCounter1: BUCKET_COUNTER;
StaticBucketCounter2: BUCKET_COUNTER;
StaticBucketCounter3: BUCKET_COUNTER;
StaticLatencyStamp: LATENCY_STAMP;
StaticMeasuredLatency: MEASURED_LATENCY;
StaticLatencyStampUnits: LATENCY_STAMP_UNITS;
Reserved3: array[0..21] of Byte;
DebugLogTriggerEnable: DEBUG_BIT_FIELD;
DebugLogMeasuredLatency: Word;
DebugLogLatencyStamp: UInt64;
DebugLogPointer: Word;
DebugCounterTriggerSource: DEBUG_BIT_FIELD;
DebugLogStampUnits: _DebugLogStampUnits_e__Union;
Reserved4: array[0..28] of Byte;
LogPageVersionNumber: Word;
LogPageGUID: TGUID;
end;const LATENCY_MONITOR_FEATURE_STATUS = extern struct {
Anonymous: _Anonymous_e__Union,
};
const ACTIVE_LATENCY_CONFIGURATION = extern struct {
Anonymous: _Anonymous_e__Union,
};
const BUCKET_COUNTER = extern struct {
Reserved: u32,
Trim: u32,
Write: u32,
Read: u32,
};
const LATENCY_STAMP = extern struct {
Trim3: u64,
Write3: u64,
Read3: u64,
Trim2: u64,
Write2: u64,
Read2: u64,
Trim1: u64,
Write1: u64,
Read1: u64,
Trim0: u64,
Write0: u64,
Read0: u64,
};
const MEASURED_LATENCY = extern struct {
Trim3: u16,
Write3: u16,
Read3: u16,
Trim2: u16,
Write2: u16,
Read2: u16,
Trim1: u16,
Write1: u16,
Read1: u16,
Trim0: u16,
Write0: u16,
Read0: u16,
};
const LATENCY_STAMP_UNITS = extern struct {
_bitfield: u16,
};
const DEBUG_BIT_FIELD = extern struct {
_bitfield: u16,
};
const NVME_OCP_DEVICE_LATENCY_MONITOR_LOG = extern struct {
FeatureStatus: LATENCY_MONITOR_FEATURE_STATUS,
Reserved0: u8,
ActiveBucketTimer: u16,
ActiveBucketTimerThreshold: u16,
ActiveThresholdA: u8,
ActiveThresholdB: u8,
ActiveThresholdC: u8,
ActiveThresholdD: u8,
ActiveLatencyConfig: ACTIVE_LATENCY_CONFIGURATION,
ActiveLatencyMinimumWindow: u8,
Reserved1: [19]u8,
ActiveBucketCounter0: BUCKET_COUNTER,
ActiveBucketCounter1: BUCKET_COUNTER,
ActiveBucketCounter2: BUCKET_COUNTER,
ActiveBucketCounter3: BUCKET_COUNTER,
ActiveLatencyStamp: LATENCY_STAMP,
ActiveMeasuredLatency: MEASURED_LATENCY,
ActiveLatencyStampUnits: LATENCY_STAMP_UNITS,
Reserved2: [22]u8,
StaticBucketCounter0: BUCKET_COUNTER,
StaticBucketCounter1: BUCKET_COUNTER,
StaticBucketCounter2: BUCKET_COUNTER,
StaticBucketCounter3: BUCKET_COUNTER,
StaticLatencyStamp: LATENCY_STAMP,
StaticMeasuredLatency: MEASURED_LATENCY,
StaticLatencyStampUnits: LATENCY_STAMP_UNITS,
Reserved3: [22]u8,
DebugLogTriggerEnable: DEBUG_BIT_FIELD,
DebugLogMeasuredLatency: u16,
DebugLogLatencyStamp: u64,
DebugLogPointer: u16,
DebugCounterTriggerSource: DEBUG_BIT_FIELD,
DebugLogStampUnits: _DebugLogStampUnits_e__Union,
Reserved4: [29]u8,
LogPageVersionNumber: u16,
LogPageGUID: GUID,
};type
LATENCY_MONITOR_FEATURE_STATUS {.bycopy.} = object
Anonymous: _Anonymous_e__Union
ACTIVE_LATENCY_CONFIGURATION {.bycopy.} = object
Anonymous: _Anonymous_e__Union
BUCKET_COUNTER {.packed.} = object
Reserved: uint32
Trim: uint32
Write: uint32
Read: uint32
LATENCY_STAMP {.packed.} = object
Trim3: uint64
Write3: uint64
Read3: uint64
Trim2: uint64
Write2: uint64
Read2: uint64
Trim1: uint64
Write1: uint64
Read1: uint64
Trim0: uint64
Write0: uint64
Read0: uint64
MEASURED_LATENCY {.packed.} = object
Trim3: uint16
Write3: uint16
Read3: uint16
Trim2: uint16
Write2: uint16
Read2: uint16
Trim1: uint16
Write1: uint16
Read1: uint16
Trim0: uint16
Write0: uint16
Read0: uint16
LATENCY_STAMP_UNITS {.packed.} = object
_bitfield: uint16
DEBUG_BIT_FIELD {.packed.} = object
_bitfield: uint16
NVME_OCP_DEVICE_LATENCY_MONITOR_LOG {.packed.} = object
FeatureStatus: LATENCY_MONITOR_FEATURE_STATUS
Reserved0: uint8
ActiveBucketTimer: uint16
ActiveBucketTimerThreshold: uint16
ActiveThresholdA: uint8
ActiveThresholdB: uint8
ActiveThresholdC: uint8
ActiveThresholdD: uint8
ActiveLatencyConfig: ACTIVE_LATENCY_CONFIGURATION
ActiveLatencyMinimumWindow: uint8
Reserved1: array[19, uint8]
ActiveBucketCounter0: BUCKET_COUNTER
ActiveBucketCounter1: BUCKET_COUNTER
ActiveBucketCounter2: BUCKET_COUNTER
ActiveBucketCounter3: BUCKET_COUNTER
ActiveLatencyStamp: LATENCY_STAMP
ActiveMeasuredLatency: MEASURED_LATENCY
ActiveLatencyStampUnits: LATENCY_STAMP_UNITS
Reserved2: array[22, uint8]
StaticBucketCounter0: BUCKET_COUNTER
StaticBucketCounter1: BUCKET_COUNTER
StaticBucketCounter2: BUCKET_COUNTER
StaticBucketCounter3: BUCKET_COUNTER
StaticLatencyStamp: LATENCY_STAMP
StaticMeasuredLatency: MEASURED_LATENCY
StaticLatencyStampUnits: LATENCY_STAMP_UNITS
Reserved3: array[22, uint8]
DebugLogTriggerEnable: DEBUG_BIT_FIELD
DebugLogMeasuredLatency: uint16
DebugLogLatencyStamp: uint64
DebugLogPointer: uint16
DebugCounterTriggerSource: DEBUG_BIT_FIELD
DebugLogStampUnits: _DebugLogStampUnits_e__Union
Reserved4: array[29, uint8]
LogPageVersionNumber: uint16
LogPageGUID: GUIDstruct LATENCY_MONITOR_FEATURE_STATUS
{
_Anonymous_e__Union Anonymous;
}
struct ACTIVE_LATENCY_CONFIGURATION
{
_Anonymous_e__Union Anonymous;
}
align(1)
struct BUCKET_COUNTER
{
uint Reserved;
uint Trim;
uint Write;
uint Read;
}
align(1)
struct LATENCY_STAMP
{
ulong Trim3;
ulong Write3;
ulong Read3;
ulong Trim2;
ulong Write2;
ulong Read2;
ulong Trim1;
ulong Write1;
ulong Read1;
ulong Trim0;
ulong Write0;
ulong Read0;
}
align(1)
struct MEASURED_LATENCY
{
ushort Trim3;
ushort Write3;
ushort Read3;
ushort Trim2;
ushort Write2;
ushort Read2;
ushort Trim1;
ushort Write1;
ushort Read1;
ushort Trim0;
ushort Write0;
ushort Read0;
}
align(1)
struct LATENCY_STAMP_UNITS
{
ushort _bitfield;
}
align(1)
struct DEBUG_BIT_FIELD
{
ushort _bitfield;
}
align(1)
struct NVME_OCP_DEVICE_LATENCY_MONITOR_LOG
{
LATENCY_MONITOR_FEATURE_STATUS FeatureStatus;
ubyte Reserved0;
ushort ActiveBucketTimer;
ushort ActiveBucketTimerThreshold;
ubyte ActiveThresholdA;
ubyte ActiveThresholdB;
ubyte ActiveThresholdC;
ubyte ActiveThresholdD;
ACTIVE_LATENCY_CONFIGURATION ActiveLatencyConfig;
ubyte ActiveLatencyMinimumWindow;
ubyte[19] Reserved1;
BUCKET_COUNTER ActiveBucketCounter0;
BUCKET_COUNTER ActiveBucketCounter1;
BUCKET_COUNTER ActiveBucketCounter2;
BUCKET_COUNTER ActiveBucketCounter3;
LATENCY_STAMP ActiveLatencyStamp;
MEASURED_LATENCY ActiveMeasuredLatency;
LATENCY_STAMP_UNITS ActiveLatencyStampUnits;
ubyte[22] Reserved2;
BUCKET_COUNTER StaticBucketCounter0;
BUCKET_COUNTER StaticBucketCounter1;
BUCKET_COUNTER StaticBucketCounter2;
BUCKET_COUNTER StaticBucketCounter3;
LATENCY_STAMP StaticLatencyStamp;
MEASURED_LATENCY StaticMeasuredLatency;
LATENCY_STAMP_UNITS StaticLatencyStampUnits;
ubyte[22] Reserved3;
DEBUG_BIT_FIELD DebugLogTriggerEnable;
ushort DebugLogMeasuredLatency;
ulong DebugLogLatencyStamp;
ushort DebugLogPointer;
DEBUG_BIT_FIELD DebugCounterTriggerSource;
_DebugLogStampUnits_e__Union DebugLogStampUnits;
ubyte[29] Reserved4;
ushort LogPageVersionNumber;
GUID LogPageGUID;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; NVME_OCP_DEVICE_LATENCY_MONITOR_LOG サイズ: 520 バイト(x86)
dim st, 130 ; 4byte整数×130(構造体サイズ 520 / 4 切り上げ)
; FeatureStatus : LATENCY_MONITOR_FEATURE_STATUS (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; Reserved0 : BYTE (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; ActiveBucketTimer : WORD (+5, 2byte) wpoke st,5,値 / 値 = wpeek(st,5)
; ActiveBucketTimerThreshold : WORD (+7, 2byte) wpoke st,7,値 / 値 = wpeek(st,7)
; ActiveThresholdA : BYTE (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; ActiveThresholdB : BYTE (+10, 1byte) poke st,10,値 / 値 = peek(st,10)
; ActiveThresholdC : BYTE (+11, 1byte) poke st,11,値 / 値 = peek(st,11)
; ActiveThresholdD : BYTE (+12, 1byte) poke st,12,値 / 値 = peek(st,12)
; ActiveLatencyConfig : ACTIVE_LATENCY_CONFIGURATION (+13, 4byte) varptr(st)+13 を基点に操作(4byte:入れ子/配列)
; ActiveLatencyMinimumWindow : BYTE (+17, 1byte) poke st,17,値 / 値 = peek(st,17)
; Reserved1 : BYTE (+18, 19byte) varptr(st)+18 を基点に操作(19byte:入れ子/配列)
; ActiveBucketCounter0 : BUCKET_COUNTER (+37, 16byte) varptr(st)+37 を基点に操作(16byte:入れ子/配列)
; ActiveBucketCounter1 : BUCKET_COUNTER (+53, 16byte) varptr(st)+53 を基点に操作(16byte:入れ子/配列)
; ActiveBucketCounter2 : BUCKET_COUNTER (+69, 16byte) varptr(st)+69 を基点に操作(16byte:入れ子/配列)
; ActiveBucketCounter3 : BUCKET_COUNTER (+85, 16byte) varptr(st)+85 を基点に操作(16byte:入れ子/配列)
; ActiveLatencyStamp : LATENCY_STAMP (+101, 96byte) varptr(st)+101 を基点に操作(96byte:入れ子/配列)
; ActiveMeasuredLatency : MEASURED_LATENCY (+197, 24byte) varptr(st)+197 を基点に操作(24byte:入れ子/配列)
; ActiveLatencyStampUnits : LATENCY_STAMP_UNITS (+221, 2byte) varptr(st)+221 を基点に操作(2byte:入れ子/配列)
; Reserved2 : BYTE (+223, 22byte) varptr(st)+223 を基点に操作(22byte:入れ子/配列)
; StaticBucketCounter0 : BUCKET_COUNTER (+245, 16byte) varptr(st)+245 を基点に操作(16byte:入れ子/配列)
; StaticBucketCounter1 : BUCKET_COUNTER (+261, 16byte) varptr(st)+261 を基点に操作(16byte:入れ子/配列)
; StaticBucketCounter2 : BUCKET_COUNTER (+277, 16byte) varptr(st)+277 を基点に操作(16byte:入れ子/配列)
; StaticBucketCounter3 : BUCKET_COUNTER (+293, 16byte) varptr(st)+293 を基点に操作(16byte:入れ子/配列)
; StaticLatencyStamp : LATENCY_STAMP (+309, 96byte) varptr(st)+309 を基点に操作(96byte:入れ子/配列)
; StaticMeasuredLatency : MEASURED_LATENCY (+405, 24byte) varptr(st)+405 を基点に操作(24byte:入れ子/配列)
; StaticLatencyStampUnits : LATENCY_STAMP_UNITS (+429, 2byte) varptr(st)+429 を基点に操作(2byte:入れ子/配列)
; Reserved3 : BYTE (+431, 22byte) varptr(st)+431 を基点に操作(22byte:入れ子/配列)
; DebugLogTriggerEnable : DEBUG_BIT_FIELD (+453, 2byte) varptr(st)+453 を基点に操作(2byte:入れ子/配列)
; DebugLogMeasuredLatency : WORD (+455, 2byte) wpoke st,455,値 / 値 = wpeek(st,455)
; DebugLogLatencyStamp : ULONGLONG (+457, 8byte) qpoke st,457,値 / qpeek(st,457) ※IronHSPのみ。3.7/3.8は lpoke st,457,下位 : lpoke st,461,上位
; DebugLogPointer : WORD (+465, 2byte) wpoke st,465,値 / 値 = wpeek(st,465)
; DebugCounterTriggerSource : DEBUG_BIT_FIELD (+467, 2byte) varptr(st)+467 を基点に操作(2byte:入れ子/配列)
; DebugLogStampUnits : _DebugLogStampUnits_e__Union (+469, 4byte) varptr(st)+469 を基点に操作(4byte:入れ子/配列)
; Reserved4 : BYTE (+473, 29byte) varptr(st)+473 を基点に操作(29byte:入れ子/配列)
; LogPageVersionNumber : WORD (+502, 2byte) wpoke st,502,値 / 値 = wpeek(st,502)
; LogPageGUID : GUID (+504, 16byte) varptr(st)+504 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NVME_OCP_DEVICE_LATENCY_MONITOR_LOG サイズ: 532 バイト(x64)
dim st, 133 ; 4byte整数×133(構造体サイズ 532 / 4 切り上げ)
; FeatureStatus : LATENCY_MONITOR_FEATURE_STATUS (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; Reserved0 : BYTE (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; ActiveBucketTimer : WORD (+9, 2byte) wpoke st,9,値 / 値 = wpeek(st,9)
; ActiveBucketTimerThreshold : WORD (+11, 2byte) wpoke st,11,値 / 値 = wpeek(st,11)
; ActiveThresholdA : BYTE (+13, 1byte) poke st,13,値 / 値 = peek(st,13)
; ActiveThresholdB : BYTE (+14, 1byte) poke st,14,値 / 値 = peek(st,14)
; ActiveThresholdC : BYTE (+15, 1byte) poke st,15,値 / 値 = peek(st,15)
; ActiveThresholdD : BYTE (+16, 1byte) poke st,16,値 / 値 = peek(st,16)
; ActiveLatencyConfig : ACTIVE_LATENCY_CONFIGURATION (+17, 8byte) varptr(st)+17 を基点に操作(8byte:入れ子/配列)
; ActiveLatencyMinimumWindow : BYTE (+25, 1byte) poke st,25,値 / 値 = peek(st,25)
; Reserved1 : BYTE (+26, 19byte) varptr(st)+26 を基点に操作(19byte:入れ子/配列)
; ActiveBucketCounter0 : BUCKET_COUNTER (+45, 16byte) varptr(st)+45 を基点に操作(16byte:入れ子/配列)
; ActiveBucketCounter1 : BUCKET_COUNTER (+61, 16byte) varptr(st)+61 を基点に操作(16byte:入れ子/配列)
; ActiveBucketCounter2 : BUCKET_COUNTER (+77, 16byte) varptr(st)+77 を基点に操作(16byte:入れ子/配列)
; ActiveBucketCounter3 : BUCKET_COUNTER (+93, 16byte) varptr(st)+93 を基点に操作(16byte:入れ子/配列)
; ActiveLatencyStamp : LATENCY_STAMP (+109, 96byte) varptr(st)+109 を基点に操作(96byte:入れ子/配列)
; ActiveMeasuredLatency : MEASURED_LATENCY (+205, 24byte) varptr(st)+205 を基点に操作(24byte:入れ子/配列)
; ActiveLatencyStampUnits : LATENCY_STAMP_UNITS (+229, 2byte) varptr(st)+229 を基点に操作(2byte:入れ子/配列)
; Reserved2 : BYTE (+231, 22byte) varptr(st)+231 を基点に操作(22byte:入れ子/配列)
; StaticBucketCounter0 : BUCKET_COUNTER (+253, 16byte) varptr(st)+253 を基点に操作(16byte:入れ子/配列)
; StaticBucketCounter1 : BUCKET_COUNTER (+269, 16byte) varptr(st)+269 を基点に操作(16byte:入れ子/配列)
; StaticBucketCounter2 : BUCKET_COUNTER (+285, 16byte) varptr(st)+285 を基点に操作(16byte:入れ子/配列)
; StaticBucketCounter3 : BUCKET_COUNTER (+301, 16byte) varptr(st)+301 を基点に操作(16byte:入れ子/配列)
; StaticLatencyStamp : LATENCY_STAMP (+317, 96byte) varptr(st)+317 を基点に操作(96byte:入れ子/配列)
; StaticMeasuredLatency : MEASURED_LATENCY (+413, 24byte) varptr(st)+413 を基点に操作(24byte:入れ子/配列)
; StaticLatencyStampUnits : LATENCY_STAMP_UNITS (+437, 2byte) varptr(st)+437 を基点に操作(2byte:入れ子/配列)
; Reserved3 : BYTE (+439, 22byte) varptr(st)+439 を基点に操作(22byte:入れ子/配列)
; DebugLogTriggerEnable : DEBUG_BIT_FIELD (+461, 2byte) varptr(st)+461 を基点に操作(2byte:入れ子/配列)
; DebugLogMeasuredLatency : WORD (+463, 2byte) wpoke st,463,値 / 値 = wpeek(st,463)
; DebugLogLatencyStamp : ULONGLONG (+465, 8byte) qpoke st,465,値 / qpeek(st,465) ※IronHSPのみ。3.7/3.8は lpoke st,465,下位 : lpoke st,469,上位
; DebugLogPointer : WORD (+473, 2byte) wpoke st,473,値 / 値 = wpeek(st,473)
; DebugCounterTriggerSource : DEBUG_BIT_FIELD (+475, 2byte) varptr(st)+475 を基点に操作(2byte:入れ子/配列)
; DebugLogStampUnits : _DebugLogStampUnits_e__Union (+477, 8byte) varptr(st)+477 を基点に操作(8byte:入れ子/配列)
; Reserved4 : BYTE (+485, 29byte) varptr(st)+485 を基点に操作(29byte:入れ子/配列)
; LogPageVersionNumber : WORD (+514, 2byte) wpoke st,514,値 / 値 = wpeek(st,514)
; LogPageGUID : GUID (+516, 16byte) varptr(st)+516 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global LATENCY_MONITOR_FEATURE_STATUS
#field byte Anonymous 8
#endstruct
#defstruct global ACTIVE_LATENCY_CONFIGURATION
#field byte Anonymous 8
#endstruct
#defstruct global BUCKET_COUNTER, pack=1
#field int Reserved
#field int Trim
#field int Write
#field int Read
#endstruct
#defstruct global LATENCY_STAMP, pack=1
#field int64 Trim3
#field int64 Write3
#field int64 Read3
#field int64 Trim2
#field int64 Write2
#field int64 Read2
#field int64 Trim1
#field int64 Write1
#field int64 Read1
#field int64 Trim0
#field int64 Write0
#field int64 Read0
#endstruct
#defstruct global MEASURED_LATENCY, pack=1
#field short Trim3
#field short Write3
#field short Read3
#field short Trim2
#field short Write2
#field short Read2
#field short Trim1
#field short Write1
#field short Read1
#field short Trim0
#field short Write0
#field short Read0
#endstruct
#defstruct global LATENCY_STAMP_UNITS, pack=1
#field short _bitfield
#endstruct
#defstruct global DEBUG_BIT_FIELD, pack=1
#field short _bitfield
#endstruct
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global NVME_OCP_DEVICE_LATENCY_MONITOR_LOG, pack=1
#field LATENCY_MONITOR_FEATURE_STATUS FeatureStatus
#field byte Reserved0
#field short ActiveBucketTimer
#field short ActiveBucketTimerThreshold
#field byte ActiveThresholdA
#field byte ActiveThresholdB
#field byte ActiveThresholdC
#field byte ActiveThresholdD
#field ACTIVE_LATENCY_CONFIGURATION ActiveLatencyConfig
#field byte ActiveLatencyMinimumWindow
#field byte Reserved1 19
#field BUCKET_COUNTER ActiveBucketCounter0
#field BUCKET_COUNTER ActiveBucketCounter1
#field BUCKET_COUNTER ActiveBucketCounter2
#field BUCKET_COUNTER ActiveBucketCounter3
#field LATENCY_STAMP ActiveLatencyStamp
#field MEASURED_LATENCY ActiveMeasuredLatency
#field LATENCY_STAMP_UNITS ActiveLatencyStampUnits
#field byte Reserved2 22
#field BUCKET_COUNTER StaticBucketCounter0
#field BUCKET_COUNTER StaticBucketCounter1
#field BUCKET_COUNTER StaticBucketCounter2
#field BUCKET_COUNTER StaticBucketCounter3
#field LATENCY_STAMP StaticLatencyStamp
#field MEASURED_LATENCY StaticMeasuredLatency
#field LATENCY_STAMP_UNITS StaticLatencyStampUnits
#field byte Reserved3 22
#field DEBUG_BIT_FIELD DebugLogTriggerEnable
#field short DebugLogMeasuredLatency
#field int64 DebugLogLatencyStamp
#field short DebugLogPointer
#field DEBUG_BIT_FIELD DebugCounterTriggerSource
#field byte DebugLogStampUnits 8
#field byte Reserved4 29
#field short LogPageVersionNumber
#field GUID LogPageGUID
#endstruct
stdim st, NVME_OCP_DEVICE_LATENCY_MONITOR_LOG ; NSTRUCT 変数を確保
st->Reserved0 = 100
mes "Reserved0=" + st->Reserved0
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。