ホーム › NetworkManagement.WiFi › DOT11_WME_AC_PARAMETERS
DOT11_WME_AC_PARAMETERS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ucAccessCategoryIndex | BYTE | 1 | +0 | +0 | アクセスカテゴリ(AC)のインデックスを表す。 |
| ucAIFSN | BYTE | 1 | +1 | +1 | 調停フレーム間隔番号(AIFSN)を表す。 |
| ucECWmin | BYTE | 1 | +2 | +2 | コンテンションウィンドウ最小値の指数表現を表す。 |
| ucECWmax | BYTE | 1 | +3 | +3 | コンテンションウィンドウ最大値の指数表現を表す。 |
| usTXOPLimit | WORD | 2 | +4 | +4 | 送信機会(TXOP)の上限を表す。 |
各言語での定義
#include <windows.h>
// DOT11_WME_AC_PARAMETERS (x64 6 / x86 6 バイト)
typedef struct DOT11_WME_AC_PARAMETERS {
BYTE ucAccessCategoryIndex;
BYTE ucAIFSN;
BYTE ucECWmin;
BYTE ucECWmax;
WORD usTXOPLimit;
} DOT11_WME_AC_PARAMETERS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_WME_AC_PARAMETERS
{
public byte ucAccessCategoryIndex;
public byte ucAIFSN;
public byte ucECWmin;
public byte ucECWmax;
public ushort usTXOPLimit;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_WME_AC_PARAMETERS
Public ucAccessCategoryIndex As Byte
Public ucAIFSN As Byte
Public ucECWmin As Byte
Public ucECWmax As Byte
Public usTXOPLimit As UShort
End Structureimport ctypes
from ctypes import wintypes
class DOT11_WME_AC_PARAMETERS(ctypes.Structure):
_fields_ = [
("ucAccessCategoryIndex", ctypes.c_ubyte),
("ucAIFSN", ctypes.c_ubyte),
("ucECWmin", ctypes.c_ubyte),
("ucECWmax", ctypes.c_ubyte),
("usTXOPLimit", ctypes.c_ushort),
]#[repr(C)]
pub struct DOT11_WME_AC_PARAMETERS {
pub ucAccessCategoryIndex: u8,
pub ucAIFSN: u8,
pub ucECWmin: u8,
pub ucECWmax: u8,
pub usTXOPLimit: u16,
}import "golang.org/x/sys/windows"
type DOT11_WME_AC_PARAMETERS struct {
ucAccessCategoryIndex byte
ucAIFSN byte
ucECWmin byte
ucECWmax byte
usTXOPLimit uint16
}type
DOT11_WME_AC_PARAMETERS = record
ucAccessCategoryIndex: Byte;
ucAIFSN: Byte;
ucECWmin: Byte;
ucECWmax: Byte;
usTXOPLimit: Word;
end;const DOT11_WME_AC_PARAMETERS = extern struct {
ucAccessCategoryIndex: u8,
ucAIFSN: u8,
ucECWmin: u8,
ucECWmax: u8,
usTXOPLimit: u16,
};type
DOT11_WME_AC_PARAMETERS {.bycopy.} = object
ucAccessCategoryIndex: uint8
ucAIFSN: uint8
ucECWmin: uint8
ucECWmax: uint8
usTXOPLimit: uint16struct DOT11_WME_AC_PARAMETERS
{
ubyte ucAccessCategoryIndex;
ubyte ucAIFSN;
ubyte ucECWmin;
ubyte ucECWmax;
ushort usTXOPLimit;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_WME_AC_PARAMETERS サイズ: 6 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 6 / 4 切り上げ)
; ucAccessCategoryIndex : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; ucAIFSN : BYTE (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; ucECWmin : BYTE (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; ucECWmax : BYTE (+3, 1byte) poke st,3,値 / 値 = peek(st,3)
; usTXOPLimit : WORD (+4, 2byte) wpoke st,4,値 / 値 = wpeek(st,4)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_WME_AC_PARAMETERS
#field byte ucAccessCategoryIndex
#field byte ucAIFSN
#field byte ucECWmin
#field byte ucECWmax
#field short usTXOPLimit
#endstruct
stdim st, DOT11_WME_AC_PARAMETERS ; NSTRUCT 変数を確保
st->ucAccessCategoryIndex = 100
mes "ucAccessCategoryIndex=" + st->ucAccessCategoryIndex