ホーム › NetworkManagement.IpHelper › INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES
INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| PtpV2OverUdpIPv4EventMessageReceive | BOOLEAN | 1 | +0 | +0 | IPv4 UDP上のPTPv2イベントメッセージ受信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv4AllMessageReceive | BOOLEAN | 1 | +1 | +1 | IPv4 UDP上のPTPv2全メッセージ受信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv4EventMessageTransmit | BOOLEAN | 1 | +2 | +2 | IPv4 UDP上のPTPv2イベントメッセージ送信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv4AllMessageTransmit | BOOLEAN | 1 | +3 | +3 | IPv4 UDP上のPTPv2全メッセージ送信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv6EventMessageReceive | BOOLEAN | 1 | +4 | +4 | IPv6 UDP上のPTPv2イベントメッセージ受信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv6AllMessageReceive | BOOLEAN | 1 | +5 | +5 | IPv6 UDP上のPTPv2全メッセージ受信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv6EventMessageTransmit | BOOLEAN | 1 | +6 | +6 | IPv6 UDP上のPTPv2イベントメッセージ送信のハードウェアタイムスタンプ対応を示す。 |
| PtpV2OverUdpIPv6AllMessageTransmit | BOOLEAN | 1 | +7 | +7 | IPv6 UDP上のPTPv2全メッセージ送信のハードウェアタイムスタンプ対応を示す。 |
| AllReceive | BOOLEAN | 1 | +8 | +8 | 全受信パケットのハードウェアタイムスタンプに対応するかを示すブール値である。 |
| AllTransmit | BOOLEAN | 1 | +9 | +9 | 全送信パケットのハードウェアタイムスタンプに対応するかを示すブール値である。 |
| TaggedTransmit | BOOLEAN | 1 | +10 | +10 | タグ付き送信パケットのハードウェアタイムスタンプに対応するかを示すブール値である。 |
各言語での定義
#include <windows.h>
// INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES (x64 11 / x86 11 バイト)
typedef struct INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES {
BOOLEAN PtpV2OverUdpIPv4EventMessageReceive;
BOOLEAN PtpV2OverUdpIPv4AllMessageReceive;
BOOLEAN PtpV2OverUdpIPv4EventMessageTransmit;
BOOLEAN PtpV2OverUdpIPv4AllMessageTransmit;
BOOLEAN PtpV2OverUdpIPv6EventMessageReceive;
BOOLEAN PtpV2OverUdpIPv6AllMessageReceive;
BOOLEAN PtpV2OverUdpIPv6EventMessageTransmit;
BOOLEAN PtpV2OverUdpIPv6AllMessageTransmit;
BOOLEAN AllReceive;
BOOLEAN AllTransmit;
BOOLEAN TaggedTransmit;
} INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES
{
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv4EventMessageReceive;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv4AllMessageReceive;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv4EventMessageTransmit;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv4AllMessageTransmit;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv6EventMessageReceive;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv6AllMessageReceive;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv6EventMessageTransmit;
[MarshalAs(UnmanagedType.U1)] public bool PtpV2OverUdpIPv6AllMessageTransmit;
[MarshalAs(UnmanagedType.U1)] public bool AllReceive;
[MarshalAs(UnmanagedType.U1)] public bool AllTransmit;
[MarshalAs(UnmanagedType.U1)] public bool TaggedTransmit;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv4EventMessageReceive As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv4AllMessageReceive As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv4EventMessageTransmit As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv4AllMessageTransmit As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv6EventMessageReceive As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv6AllMessageReceive As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv6EventMessageTransmit As Boolean
<MarshalAs(UnmanagedType.U1)> Public PtpV2OverUdpIPv6AllMessageTransmit As Boolean
<MarshalAs(UnmanagedType.U1)> Public AllReceive As Boolean
<MarshalAs(UnmanagedType.U1)> Public AllTransmit As Boolean
<MarshalAs(UnmanagedType.U1)> Public TaggedTransmit As Boolean
End Structureimport ctypes
from ctypes import wintypes
class INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES(ctypes.Structure):
_fields_ = [
("PtpV2OverUdpIPv4EventMessageReceive", ctypes.c_byte),
("PtpV2OverUdpIPv4AllMessageReceive", ctypes.c_byte),
("PtpV2OverUdpIPv4EventMessageTransmit", ctypes.c_byte),
("PtpV2OverUdpIPv4AllMessageTransmit", ctypes.c_byte),
("PtpV2OverUdpIPv6EventMessageReceive", ctypes.c_byte),
("PtpV2OverUdpIPv6AllMessageReceive", ctypes.c_byte),
("PtpV2OverUdpIPv6EventMessageTransmit", ctypes.c_byte),
("PtpV2OverUdpIPv6AllMessageTransmit", ctypes.c_byte),
("AllReceive", ctypes.c_byte),
("AllTransmit", ctypes.c_byte),
("TaggedTransmit", ctypes.c_byte),
]#[repr(C)]
pub struct INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES {
pub PtpV2OverUdpIPv4EventMessageReceive: u8,
pub PtpV2OverUdpIPv4AllMessageReceive: u8,
pub PtpV2OverUdpIPv4EventMessageTransmit: u8,
pub PtpV2OverUdpIPv4AllMessageTransmit: u8,
pub PtpV2OverUdpIPv6EventMessageReceive: u8,
pub PtpV2OverUdpIPv6AllMessageReceive: u8,
pub PtpV2OverUdpIPv6EventMessageTransmit: u8,
pub PtpV2OverUdpIPv6AllMessageTransmit: u8,
pub AllReceive: u8,
pub AllTransmit: u8,
pub TaggedTransmit: u8,
}import "golang.org/x/sys/windows"
type INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES struct {
PtpV2OverUdpIPv4EventMessageReceive byte
PtpV2OverUdpIPv4AllMessageReceive byte
PtpV2OverUdpIPv4EventMessageTransmit byte
PtpV2OverUdpIPv4AllMessageTransmit byte
PtpV2OverUdpIPv6EventMessageReceive byte
PtpV2OverUdpIPv6AllMessageReceive byte
PtpV2OverUdpIPv6EventMessageTransmit byte
PtpV2OverUdpIPv6AllMessageTransmit byte
AllReceive byte
AllTransmit byte
TaggedTransmit byte
}type
INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES = record
PtpV2OverUdpIPv4EventMessageReceive: ByteBool;
PtpV2OverUdpIPv4AllMessageReceive: ByteBool;
PtpV2OverUdpIPv4EventMessageTransmit: ByteBool;
PtpV2OverUdpIPv4AllMessageTransmit: ByteBool;
PtpV2OverUdpIPv6EventMessageReceive: ByteBool;
PtpV2OverUdpIPv6AllMessageReceive: ByteBool;
PtpV2OverUdpIPv6EventMessageTransmit: ByteBool;
PtpV2OverUdpIPv6AllMessageTransmit: ByteBool;
AllReceive: ByteBool;
AllTransmit: ByteBool;
TaggedTransmit: ByteBool;
end;const INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES = extern struct {
PtpV2OverUdpIPv4EventMessageReceive: u8,
PtpV2OverUdpIPv4AllMessageReceive: u8,
PtpV2OverUdpIPv4EventMessageTransmit: u8,
PtpV2OverUdpIPv4AllMessageTransmit: u8,
PtpV2OverUdpIPv6EventMessageReceive: u8,
PtpV2OverUdpIPv6AllMessageReceive: u8,
PtpV2OverUdpIPv6EventMessageTransmit: u8,
PtpV2OverUdpIPv6AllMessageTransmit: u8,
AllReceive: u8,
AllTransmit: u8,
TaggedTransmit: u8,
};type
INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES {.bycopy.} = object
PtpV2OverUdpIPv4EventMessageReceive: uint8
PtpV2OverUdpIPv4AllMessageReceive: uint8
PtpV2OverUdpIPv4EventMessageTransmit: uint8
PtpV2OverUdpIPv4AllMessageTransmit: uint8
PtpV2OverUdpIPv6EventMessageReceive: uint8
PtpV2OverUdpIPv6AllMessageReceive: uint8
PtpV2OverUdpIPv6EventMessageTransmit: uint8
PtpV2OverUdpIPv6AllMessageTransmit: uint8
AllReceive: uint8
AllTransmit: uint8
TaggedTransmit: uint8struct INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES
{
ubyte PtpV2OverUdpIPv4EventMessageReceive;
ubyte PtpV2OverUdpIPv4AllMessageReceive;
ubyte PtpV2OverUdpIPv4EventMessageTransmit;
ubyte PtpV2OverUdpIPv4AllMessageTransmit;
ubyte PtpV2OverUdpIPv6EventMessageReceive;
ubyte PtpV2OverUdpIPv6AllMessageReceive;
ubyte PtpV2OverUdpIPv6EventMessageTransmit;
ubyte PtpV2OverUdpIPv6AllMessageTransmit;
ubyte AllReceive;
ubyte AllTransmit;
ubyte TaggedTransmit;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES サイズ: 11 バイト(x64)
dim st, 3 ; 4byte整数×3(構造体サイズ 11 / 4 切り上げ)
; PtpV2OverUdpIPv4EventMessageReceive : BOOLEAN (+0, 1byte) poke st,0,値 / 値 = peek(st,0)
; PtpV2OverUdpIPv4AllMessageReceive : BOOLEAN (+1, 1byte) poke st,1,値 / 値 = peek(st,1)
; PtpV2OverUdpIPv4EventMessageTransmit : BOOLEAN (+2, 1byte) poke st,2,値 / 値 = peek(st,2)
; PtpV2OverUdpIPv4AllMessageTransmit : BOOLEAN (+3, 1byte) poke st,3,値 / 値 = peek(st,3)
; PtpV2OverUdpIPv6EventMessageReceive : BOOLEAN (+4, 1byte) poke st,4,値 / 値 = peek(st,4)
; PtpV2OverUdpIPv6AllMessageReceive : BOOLEAN (+5, 1byte) poke st,5,値 / 値 = peek(st,5)
; PtpV2OverUdpIPv6EventMessageTransmit : BOOLEAN (+6, 1byte) poke st,6,値 / 値 = peek(st,6)
; PtpV2OverUdpIPv6AllMessageTransmit : BOOLEAN (+7, 1byte) poke st,7,値 / 値 = peek(st,7)
; AllReceive : BOOLEAN (+8, 1byte) poke st,8,値 / 値 = peek(st,8)
; AllTransmit : BOOLEAN (+9, 1byte) poke st,9,値 / 値 = peek(st,9)
; TaggedTransmit : BOOLEAN (+10, 1byte) poke st,10,値 / 値 = peek(st,10)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES
#field bool1 PtpV2OverUdpIPv4EventMessageReceive
#field bool1 PtpV2OverUdpIPv4AllMessageReceive
#field bool1 PtpV2OverUdpIPv4EventMessageTransmit
#field bool1 PtpV2OverUdpIPv4AllMessageTransmit
#field bool1 PtpV2OverUdpIPv6EventMessageReceive
#field bool1 PtpV2OverUdpIPv6AllMessageReceive
#field bool1 PtpV2OverUdpIPv6EventMessageTransmit
#field bool1 PtpV2OverUdpIPv6AllMessageTransmit
#field bool1 AllReceive
#field bool1 AllTransmit
#field bool1 TaggedTransmit
#endstruct
stdim st, INTERFACE_HARDWARE_TIMESTAMP_CAPABILITIES ; NSTRUCT 変数を確保
st->PtpV2OverUdpIPv4EventMessageReceive = 100
mes "PtpV2OverUdpIPv4EventMessageReceive=" + st->PtpV2OverUdpIPv4EventMessageReceive