Win32 API 日本語リファレンス
ホームNetworkManagement.WiFi › DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX

DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX

構造体
サイズx64: 20 バイト / x86: 20 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
bEnableBOOLEAN1+0+0送信機能テストを有効にするかを示す真偽値。
bOpenLoopBOOLEAN1+1+1オープンループ送信を行うかを示す真偽値。
Dot11BandDOT11_BAND4+4+4テスト対象の周波数帯。
uChannelDWORD4+8+8テストに使用するチャネル番号。
uSetPowerLevelDWORD4+12+12設定する送信電力レベル。
ADCPowerLevelINT4+16+16ADCで測定された電力レベル。

各言語での定義

#include <windows.h>

// DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX  (x64 20 / x86 20 バイト)
typedef struct DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX {
    BOOLEAN bEnable;
    BOOLEAN bOpenLoop;
    DOT11_BAND Dot11Band;
    DWORD uChannel;
    DWORD uSetPowerLevel;
    INT ADCPowerLevel;
} DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX
{
    [MarshalAs(UnmanagedType.U1)] public bool bEnable;
    [MarshalAs(UnmanagedType.U1)] public bool bOpenLoop;
    public int Dot11Band;
    public uint uChannel;
    public uint uSetPowerLevel;
    public int ADCPowerLevel;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX
    <MarshalAs(UnmanagedType.U1)> Public bEnable As Boolean
    <MarshalAs(UnmanagedType.U1)> Public bOpenLoop As Boolean
    Public Dot11Band As Integer
    Public uChannel As UInteger
    Public uSetPowerLevel As UInteger
    Public ADCPowerLevel As Integer
End Structure
import ctypes
from ctypes import wintypes

class DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX(ctypes.Structure):
    _fields_ = [
        ("bEnable", ctypes.c_byte),
        ("bOpenLoop", ctypes.c_byte),
        ("Dot11Band", ctypes.c_int),
        ("uChannel", wintypes.DWORD),
        ("uSetPowerLevel", wintypes.DWORD),
        ("ADCPowerLevel", ctypes.c_int),
    ]
#[repr(C)]
pub struct DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX {
    pub bEnable: u8,
    pub bOpenLoop: u8,
    pub Dot11Band: i32,
    pub uChannel: u32,
    pub uSetPowerLevel: u32,
    pub ADCPowerLevel: i32,
}
import "golang.org/x/sys/windows"

type DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX struct {
	bEnable byte
	bOpenLoop byte
	Dot11Band int32
	uChannel uint32
	uSetPowerLevel uint32
	ADCPowerLevel int32
}
type
  DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX = record
    bEnable: ByteBool;
    bOpenLoop: ByteBool;
    Dot11Band: Integer;
    uChannel: DWORD;
    uSetPowerLevel: DWORD;
    ADCPowerLevel: Integer;
  end;
const DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX = extern struct {
    bEnable: u8,
    bOpenLoop: u8,
    Dot11Band: i32,
    uChannel: u32,
    uSetPowerLevel: u32,
    ADCPowerLevel: i32,
};
type
  DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX {.bycopy.} = object
    bEnable: uint8
    bOpenLoop: uint8
    Dot11Band: int32
    uChannel: uint32
    uSetPowerLevel: uint32
    ADCPowerLevel: int32
struct DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX
{
    ubyte bEnable;
    ubyte bOpenLoop;
    int Dot11Band;
    uint uChannel;
    uint uSetPowerLevel;
    int ADCPowerLevel;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX サイズ: 20 バイト(x64)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; bEnable : BOOLEAN (+0, 1byte)  poke st,0,値  /  値 = peek(st,0)
; bOpenLoop : BOOLEAN (+1, 1byte)  poke st,1,値  /  値 = peek(st,1)
; Dot11Band : DOT11_BAND (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; uChannel : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; uSetPowerLevel : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ADCPowerLevel : INT (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX
    #field bool1 bEnable
    #field bool1 bOpenLoop
    #field int Dot11Band
    #field int uChannel
    #field int uSetPowerLevel
    #field int ADCPowerLevel
#endstruct

stdim st, DOT11_MANUFACTURING_FUNCTIONAL_TEST_TX        ; NSTRUCT 変数を確保
st->bEnable = 100
mes "bEnable=" + st->bEnable