ホーム › NetworkManagement.WiFi › DOT11_LINK_QUALITY_ENTRY
DOT11_LINK_QUALITY_ENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| PeerMacAddr | BYTE | 6 | +0 | +0 | リンク品質を測定したピアの MAC アドレス。 |
| ucLinkQuality | BYTE | 1 | +6 | +6 | リンク品質を0~100で表す。 |
各言語での定義
#include <windows.h>
// DOT11_LINK_QUALITY_ENTRY (x64 7 / x86 7 バイト)
typedef struct DOT11_LINK_QUALITY_ENTRY {
BYTE PeerMacAddr[6];
BYTE ucLinkQuality;
} DOT11_LINK_QUALITY_ENTRY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_LINK_QUALITY_ENTRY
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] PeerMacAddr;
public byte ucLinkQuality;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_LINK_QUALITY_ENTRY
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=6)> Public PeerMacAddr() As Byte
Public ucLinkQuality As Byte
End Structureimport ctypes
from ctypes import wintypes
class DOT11_LINK_QUALITY_ENTRY(ctypes.Structure):
_fields_ = [
("PeerMacAddr", ctypes.c_ubyte * 6),
("ucLinkQuality", ctypes.c_ubyte),
]#[repr(C)]
pub struct DOT11_LINK_QUALITY_ENTRY {
pub PeerMacAddr: [u8; 6],
pub ucLinkQuality: u8,
}import "golang.org/x/sys/windows"
type DOT11_LINK_QUALITY_ENTRY struct {
PeerMacAddr [6]byte
ucLinkQuality byte
}type
DOT11_LINK_QUALITY_ENTRY = record
PeerMacAddr: array[0..5] of Byte;
ucLinkQuality: Byte;
end;const DOT11_LINK_QUALITY_ENTRY = extern struct {
PeerMacAddr: [6]u8,
ucLinkQuality: u8,
};type
DOT11_LINK_QUALITY_ENTRY {.bycopy.} = object
PeerMacAddr: array[6, uint8]
ucLinkQuality: uint8struct DOT11_LINK_QUALITY_ENTRY
{
ubyte[6] PeerMacAddr;
ubyte ucLinkQuality;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_LINK_QUALITY_ENTRY サイズ: 7 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 7 / 4 切り上げ)
; PeerMacAddr : BYTE (+0, 6byte) varptr(st)+0 を基点に操作(6byte:入れ子/配列)
; ucLinkQuality : BYTE (+6, 1byte) poke st,6,値 / 値 = peek(st,6)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_LINK_QUALITY_ENTRY
#field byte PeerMacAddr 6
#field byte ucLinkQuality
#endstruct
stdim st, DOT11_LINK_QUALITY_ENTRY ; NSTRUCT 変数を確保
st->ucLinkQuality = 100
mes "ucLinkQuality=" + st->ucLinkQuality