ホーム › Devices.Geolocation › GNSS_AGNSS_INJECTBLOB
GNSS_AGNSS_INJECTBLOB
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Size | DWORD | 4 | +0 | +0 | この構造体のバイトサイズ。 |
| Version | DWORD | 4 | +4 | +4 | 構造体のバージョン番号。 |
| BlobOui | DWORD | 4 | +8 | +8 | BLOB提供元を識別するOUI(組織固有識別子)。 |
| BlobVersion | DWORD | 4 | +12 | +12 | BLOBデータのバージョン番号。 |
| AgnssFormat | DWORD | 4 | +16 | +16 | AGNSSデータの形式を示す識別値。 |
| BlobSize | DWORD | 4 | +20 | +20 | BlobDataの有効バイトサイズ。 |
| BlobData | BYTE | 1 | +24 | +24 | 注入するAGNSS支援データ本体の可変長バイト配列。 |
各言語での定義
#include <windows.h>
// GNSS_AGNSS_INJECTBLOB (x64 28 / x86 28 バイト)
typedef struct GNSS_AGNSS_INJECTBLOB {
DWORD Size;
DWORD Version;
DWORD BlobOui;
DWORD BlobVersion;
DWORD AgnssFormat;
DWORD BlobSize;
BYTE BlobData[1];
} GNSS_AGNSS_INJECTBLOB;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct GNSS_AGNSS_INJECTBLOB
{
public uint Size;
public uint Version;
public uint BlobOui;
public uint BlobVersion;
public uint AgnssFormat;
public uint BlobSize;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] BlobData;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure GNSS_AGNSS_INJECTBLOB
Public Size As UInteger
Public Version As UInteger
Public BlobOui As UInteger
Public BlobVersion As UInteger
Public AgnssFormat As UInteger
Public BlobSize As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public BlobData() As Byte
End Structureimport ctypes
from ctypes import wintypes
class GNSS_AGNSS_INJECTBLOB(ctypes.Structure):
_fields_ = [
("Size", wintypes.DWORD),
("Version", wintypes.DWORD),
("BlobOui", wintypes.DWORD),
("BlobVersion", wintypes.DWORD),
("AgnssFormat", wintypes.DWORD),
("BlobSize", wintypes.DWORD),
("BlobData", ctypes.c_ubyte * 1),
]#[repr(C)]
pub struct GNSS_AGNSS_INJECTBLOB {
pub Size: u32,
pub Version: u32,
pub BlobOui: u32,
pub BlobVersion: u32,
pub AgnssFormat: u32,
pub BlobSize: u32,
pub BlobData: [u8; 1],
}import "golang.org/x/sys/windows"
type GNSS_AGNSS_INJECTBLOB struct {
Size uint32
Version uint32
BlobOui uint32
BlobVersion uint32
AgnssFormat uint32
BlobSize uint32
BlobData [1]byte
}type
GNSS_AGNSS_INJECTBLOB = record
Size: DWORD;
Version: DWORD;
BlobOui: DWORD;
BlobVersion: DWORD;
AgnssFormat: DWORD;
BlobSize: DWORD;
BlobData: array[0..0] of Byte;
end;const GNSS_AGNSS_INJECTBLOB = extern struct {
Size: u32,
Version: u32,
BlobOui: u32,
BlobVersion: u32,
AgnssFormat: u32,
BlobSize: u32,
BlobData: [1]u8,
};type
GNSS_AGNSS_INJECTBLOB {.bycopy.} = object
Size: uint32
Version: uint32
BlobOui: uint32
BlobVersion: uint32
AgnssFormat: uint32
BlobSize: uint32
BlobData: array[1, uint8]struct GNSS_AGNSS_INJECTBLOB
{
uint Size;
uint Version;
uint BlobOui;
uint BlobVersion;
uint AgnssFormat;
uint BlobSize;
ubyte[1] BlobData;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; GNSS_AGNSS_INJECTBLOB サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; Size : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Version : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; BlobOui : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; BlobVersion : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; AgnssFormat : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; BlobSize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; BlobData : BYTE (+24, 1byte) varptr(st)+24 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global GNSS_AGNSS_INJECTBLOB
#field int Size
#field int Version
#field int BlobOui
#field int BlobVersion
#field int AgnssFormat
#field int BlobSize
#field byte BlobData 1
#endstruct
stdim st, GNSS_AGNSS_INJECTBLOB ; NSTRUCT 変数を確保
st->Size = 100
mes "Size=" + st->Size