ホーム › Networking.WinSock › ATM_BROADBAND_BEARER_CAPABILITY_IE
ATM_BROADBAND_BEARER_CAPABILITY_IE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| BearerClass | BYTE | 1 | +0 | +0 | ベアラクラス(A/C/X等)を示す。 |
| TrafficType | BYTE | 1 | +1 | +1 | トラフィック種別(CBR/VBR等)を示す。 |
| TimingRequirements | BYTE | 1 | +2 | +2 | 送受信端点間のタイミング要件を示す。 |
| ClippingSusceptability | BYTE | 1 | +3 | +3 | クリッピング(欠落)許容度を示す。 |
| UserPlaneConnectionConfig | BYTE | 1 | +4 | +4 | ユーザープレーンの接続構成(ポイント間/マルチポイント)を示す。 |
各言語での定義
#include <windows.h>
// ATM_BROADBAND_BEARER_CAPABILITY_IE (x64 5 / x86 5 バイト)
typedef struct ATM_BROADBAND_BEARER_CAPABILITY_IE {
BYTE BearerClass;
BYTE TrafficType;
BYTE TimingRequirements;
BYTE ClippingSusceptability;
BYTE UserPlaneConnectionConfig;
} ATM_BROADBAND_BEARER_CAPABILITY_IE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ATM_BROADBAND_BEARER_CAPABILITY_IE
{
public byte BearerClass;
public byte TrafficType;
public byte TimingRequirements;
public byte ClippingSusceptability;
public byte UserPlaneConnectionConfig;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ATM_BROADBAND_BEARER_CAPABILITY_IE
Public BearerClass As Byte
Public TrafficType As Byte
Public TimingRequirements As Byte
Public ClippingSusceptability As Byte
Public UserPlaneConnectionConfig As Byte
End Structureimport ctypes
from ctypes import wintypes
class ATM_BROADBAND_BEARER_CAPABILITY_IE(ctypes.Structure):
_fields_ = [
("BearerClass", ctypes.c_ubyte),
("TrafficType", ctypes.c_ubyte),
("TimingRequirements", ctypes.c_ubyte),
("ClippingSusceptability", ctypes.c_ubyte),
("UserPlaneConnectionConfig", ctypes.c_ubyte),
]#[repr(C)]
pub struct ATM_BROADBAND_BEARER_CAPABILITY_IE {
pub BearerClass: u8,
pub TrafficType: u8,
pub TimingRequirements: u8,
pub ClippingSusceptability: u8,
pub UserPlaneConnectionConfig: u8,
}import "golang.org/x/sys/windows"
type ATM_BROADBAND_BEARER_CAPABILITY_IE struct {
BearerClass byte
TrafficType byte
TimingRequirements byte
ClippingSusceptability byte
UserPlaneConnectionConfig byte
}type
ATM_BROADBAND_BEARER_CAPABILITY_IE = record
BearerClass: Byte;
TrafficType: Byte;
TimingRequirements: Byte;
ClippingSusceptability: Byte;
UserPlaneConnectionConfig: Byte;
end;const ATM_BROADBAND_BEARER_CAPABILITY_IE = extern struct {
BearerClass: u8,
TrafficType: u8,
TimingRequirements: u8,
ClippingSusceptability: u8,
UserPlaneConnectionConfig: u8,
};type
ATM_BROADBAND_BEARER_CAPABILITY_IE {.bycopy.} = object
BearerClass: uint8
TrafficType: uint8
TimingRequirements: uint8
ClippingSusceptability: uint8
UserPlaneConnectionConfig: uint8struct ATM_BROADBAND_BEARER_CAPABILITY_IE
{
ubyte BearerClass;
ubyte TrafficType;
ubyte TimingRequirements;
ubyte ClippingSusceptability;
ubyte UserPlaneConnectionConfig;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ATM_BROADBAND_BEARER_CAPABILITY_IE サイズ: 5 バイト(x64)
dim st, 2 ; 4byte整数×2(構造体サイズ 5 / 4 切り上げ)
; BearerClass : BYTE (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; TrafficType : BYTE (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; TimingRequirements : BYTE (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; ClippingSusceptability : BYTE (+3, 1byte) poke st,3,値 / 値 = peek(st,3)
; UserPlaneConnectionConfig : BYTE (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ATM_BROADBAND_BEARER_CAPABILITY_IE
#field byte BearerClass
#field byte TrafficType
#field byte TimingRequirements
#field byte ClippingSusceptability
#field byte UserPlaneConnectionConfig
#endstruct
stdim st, ATM_BROADBAND_BEARER_CAPABILITY_IE ; NSTRUCT 変数を確保
st->BearerClass = 100
mes "BearerClass=" + st->BearerClass