You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by js...@apache.org on 2024/08/01 12:36:11 UTC
(sis) branch geoapi-4.0 updated: Add libGSF panama bindings
This is an automated email from the ASF dual-hosted git repository.
jsorel pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new cee83890bc Add libGSF panama bindings
cee83890bc is described below
commit cee83890bcfa49671d606a53735e4511a020d2ac
Author: jsorel <jo...@geomatys.com>
AuthorDate: Thu Aug 1 14:35:33 2024 +0200
Add libGSF panama bindings
---
.../src/org.apache.sis.util/main/module-info.java | 1 +
.../main/org/apache/sis/storage/gsf/Attitude.java | 89 +
.../main/org/apache/sis/storage/gsf/Comment.java | 63 +
.../main/org/apache/sis/storage/gsf/DataID.java | 69 +
.../main/org/apache/sis/storage/gsf/GSF.java | 1786 ++++++++++++
.../apache/sis/storage/gsf/GSFRecordReader.java | 88 +
.../apache/sis/storage/gsf/HVNavigationError.java | 89 +
.../main/org/apache/sis/storage/gsf/Header.java | 49 +
.../main/org/apache/sis/storage/gsf/History.java | 105 +
.../apache/sis/storage/gsf/NavigationError.java | 96 +
.../main/org/apache/sis/storage/gsf/Position.java | 74 +
.../apache/sis/storage/gsf/PositionOffsets.java | 86 +
.../sis/storage/gsf/ProcessingParameters.java | 65 +
.../main/org/apache/sis/storage/gsf/Records.java | 146 +
.../apache/sis/storage/gsf/SBSensorSpecific.java | 110 +
.../main/org/apache/sis/storage/gsf/SVP.java | 90 +
.../org/apache/sis/storage/gsf/ScaleFactors.java | 72 +
.../main/org/apache/sis/storage/gsf/ScaleInfo.java | 85 +
.../apache/sis/storage/gsf/SensorParameters.java | 106 +
.../org/apache/sis/storage/gsf/SensorSpecific.java | 108 +
.../org/apache/sis/storage/gsf/SingleBeamPing.java | 216 ++
.../org/apache/sis/storage/gsf/StructClass.java | 219 ++
.../org/apache/sis/storage/gsf/SwathBathyPing.java | 354 +++
.../apache/sis/storage/gsf/SwathBathySummary.java | 94 +
.../main/org/apache/sis/storage/gsf/TimeSpec.java | 60 +
.../sis/storage/gsf/specific/BDBSpecific.java | 133 +
.../sis/storage/gsf/specific/CmpSassSpecific.java | 73 +
.../sis/storage/gsf/specific/DeltaTSpecific.java | 405 +++
.../sis/storage/gsf/specific/EM100Specific.java | 152 +
.../sis/storage/gsf/specific/EM121ASpecific.java | 454 +++
.../sis/storage/gsf/specific/EM12Specific.java | 356 +++
.../storage/gsf/specific/EM3ImagerySpecific.java | 488 ++++
.../sis/storage/gsf/specific/EM3RawSpecific.java | 875 ++++++
.../sis/storage/gsf/specific/EM3RawTxSector.java | 488 ++++
.../sis/storage/gsf/specific/EM3RunTime.java | 1313 +++++++++
.../sis/storage/gsf/specific/EM3Specific.java | 539 ++++
.../storage/gsf/specific/EM4ImagerySpecific.java | 670 +++++
.../sis/storage/gsf/specific/EM4Specific.java | 832 ++++++
.../sis/storage/gsf/specific/EM4TxSector.java | 533 ++++
.../sis/storage/gsf/specific/EM950Specific.java | 320 +++
.../sis/storage/gsf/specific/EMPUStatus.java | 356 +++
.../apache/sis/storage/gsf/specific/EMRunTime.java | 1531 ++++++++++
.../sis/storage/gsf/specific/EchotracSpecific.java | 184 ++
.../sis/storage/gsf/specific/ElacMkIISpecific.java | 364 +++
.../storage/gsf/specific/GeoSwathPlusSpecific.java | 1212 ++++++++
.../sis/storage/gsf/specific/KMALLExtraDet.java | 218 ++
.../storage/gsf/specific/KMALLImagerySpecific.java | 126 +
.../sis/storage/gsf/specific/KMALLSpecific.java | 988 +++++++
.../sis/storage/gsf/specific/KMALLTxSector.java | 670 +++++
.../gsf/specific/Klein5410BssImagerySpecific.java | 297 ++
.../storage/gsf/specific/Klein5410BssSpecific.java | 851 ++++++
.../sis/storage/gsf/specific/MGD77Specific.java | 320 +++
.../sis/storage/gsf/specific/NOSHDBSpecific.java | 140 +
.../gsf/specific/R2SonicImagerySpecific.java | 1355 +++++++++
.../sis/storage/gsf/specific/R2SonicSpecific.java | 1568 +++++++++++
.../gsf/specific/Reson7100ImagerySpecific.java | 173 ++
.../storage/gsf/specific/Reson7100Specific.java | 2267 +++++++++++++++
.../gsf/specific/Reson8100ImagerySpecific.java | 127 +
.../storage/gsf/specific/Reson8100Specific.java | 1301 +++++++++
.../gsf/specific/ResonTSeriesImagerySpecific.java | 173 ++
.../storage/gsf/specific/ResonTSeriesSpecific.java | 2923 ++++++++++++++++++++
.../sis/storage/gsf/specific/SBAmpSpecific.java | 320 +++
.../sis/storage/gsf/specific/SBBDBSpecific.java | 444 +++
.../storage/gsf/specific/SBEchotracSpecific.java | 309 +++
.../sis/storage/gsf/specific/SBMGD77Specific.java | 400 +++
.../sis/storage/gsf/specific/SBNOSHDBSpecific.java | 218 ++
.../storage/gsf/specific/SBNavisoundSpecific.java | 173 ++
.../storage/gsf/specific/SeaBat8101Specific.java | 850 ++++++
.../sis/storage/gsf/specific/SeaBatIISpecific.java | 490 ++++
.../sis/storage/gsf/specific/SeaBatSpecific.java | 320 +++
.../storage/gsf/specific/SeaBeam2112Specific.java | 524 ++++
.../sis/storage/gsf/specific/SeabeamSpecific.java | 94 +
.../sis/storage/gsf/specific/SeamapSpecific.java | 521 ++++
.../sis/storage/gsf/specific/TypeIIISpecific.java | 319 +++
74 files changed, 34077 insertions(+)
diff --git a/endorsed/src/org.apache.sis.util/main/module-info.java b/endorsed/src/org.apache.sis.util/main/module-info.java
index 8f3a98257b..150970c359 100644
--- a/endorsed/src/org.apache.sis.util/main/module-info.java
+++ b/endorsed/src/org.apache.sis.util/main/module-info.java
@@ -122,6 +122,7 @@ module org.apache.sis.util {
org.apache.sis.cql, // In the "incubator" sub-project.
org.apache.sis.portrayal.map, // In the "incubator" sub-project.
org.apache.sis.portrayal,
+ org.apache.sis.storage.gsf, // In the "incubator" sub-project.
org.apache.sis.cloud.aws,
org.apache.sis.console,
org.apache.sis.gui, // In the "optional" sub-project.
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Attitude.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Attitude.java
new file mode 100644
index 0000000000..e888dcdf73
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Attitude.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class Attitude extends StructClass {
+
+ private static final OfShort LAYOUT_NUM_MEASUREMENTS;
+ private static final AddressLayout LAYOUT_ATTITUDE_TIME;
+ private static final AddressLayout LAYOUT_PITCH;
+ private static final AddressLayout LAYOUT_ROLL;
+ private static final AddressLayout LAYOUT_HEAVE;
+ private static final AddressLayout LAYOUT_HEADING;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_NUM_MEASUREMENTS = GSF.C_SHORT.withName("num_measurements"),
+ MemoryLayout.paddingLayout(6),
+ LAYOUT_ATTITUDE_TIME = GSF.C_POINTER.withName("attitude_time"),
+ LAYOUT_PITCH = GSF.C_POINTER.withName("pitch"),
+ LAYOUT_ROLL = GSF.C_POINTER.withName("roll"),
+ LAYOUT_HEAVE = GSF.C_POINTER.withName("heave"),
+ LAYOUT_HEADING = GSF.C_POINTER.withName("heading")
+ ).withName("t_gsfAttitude");
+
+ public Attitude(MemorySegment struct) {
+ super(struct);
+ }
+
+ public Attitude(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+
+ public int getNumMeasurements() {
+ return struct.get(LAYOUT_NUM_MEASUREMENTS, 0);
+ }
+
+ public int[] getAttitudeTime() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_ATTITUDE_TIME, 8);
+ return getInts(resolvedAddress, 0, getNumMeasurements());
+ }
+
+ public double[] getPitch() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_PITCH, 16);
+ return getDoubles(resolvedAddress, 0, getNumMeasurements());
+ }
+
+ public double[] getRoll() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_ROLL, 24);
+ return getDoubles(resolvedAddress, 0, getNumMeasurements());
+ }
+
+ public double[] getHeave() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_HEAVE, 32);
+ return getDoubles(resolvedAddress, 0, getNumMeasurements());
+ }
+
+ public double[] getHeading() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_HEADING, 40);
+ return getDoubles(resolvedAddress, 0, getNumMeasurements());
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Comment.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Comment.java
new file mode 100644
index 0000000000..9c7b034659
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Comment.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class Comment extends StructClass{
+
+ private static final GroupLayout LAYOUT_COMMENT_TIME;
+ private static final OfInt LAYOUT_COMMENT_LENGTH;
+ private static final AddressLayout LAYOUT_COMMENT;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_COMMENT_TIME = TimeSpec.LAYOUT.withName("comment_time"),
+ LAYOUT_COMMENT_LENGTH = GSF.C_INT.withName("comment_length"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_COMMENT = GSF.C_POINTER.withName("comment")
+ ).withName("t_gsfComment");
+
+ public Comment(MemorySegment struct) {
+ super(struct);
+ }
+
+ public Comment(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public TimeSpec getCommentTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_COMMENT_TIME.byteSize()));
+ }
+
+ public int getCommentLength() {
+ return struct.get(LAYOUT_COMMENT_LENGTH, 16);
+ }
+
+ public String getComment() {
+ return struct.get(LAYOUT_COMMENT, 24).getString(0);
+ }
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/DataID.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/DataID.java
new file mode 100644
index 0000000000..d103a78986
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/DataID.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class DataID extends StructClass {
+
+ private static final OfInt LAYOUT_CHECKSUMFLAG;
+ private static final OfInt LAYOUT_RESERVED;
+ private static final OfInt LAYOUT_RECORDID;
+ private static final OfInt LAYOUT_RECORD_NUMBER;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_CHECKSUMFLAG = GSF.C_INT.withName("checksumFlag"),
+ LAYOUT_RESERVED = GSF.C_INT.withName("reserved"),
+ LAYOUT_RECORDID = GSF.C_INT.withName("recordID"),
+ LAYOUT_RECORD_NUMBER = GSF.C_INT.withName("record_number")
+ ).withName("t_gsfDataID");
+
+ public DataID(MemorySegment struct) {
+ super(struct);
+ }
+
+ public DataID(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public int getChecksumFlag() {
+ return struct.get(LAYOUT_CHECKSUMFLAG, 0);
+ }
+
+ public int getReserved() {
+ return struct.get(LAYOUT_RESERVED, 4);
+ }
+
+ public int getRecordId() {
+ return struct.get(LAYOUT_RECORDID, 8);
+ }
+
+ public int getRecordNumber() {
+ return struct.get(LAYOUT_RECORD_NUMBER, 12);
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/GSF.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/GSF.java
new file mode 100644
index 0000000000..e858a94f14
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/GSF.java
@@ -0,0 +1,1786 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.AddressLayout;
+import java.lang.foreign.Arena;
+import java.lang.foreign.FunctionDescriptor;
+import java.lang.foreign.Linker;
+import java.lang.foreign.MemoryLayout;
+import java.lang.foreign.MemorySegment;
+import java.lang.foreign.SymbolLookup;
+import java.lang.foreign.ValueLayout;
+import static java.lang.foreign.ValueLayout.JAVA_BYTE;
+import java.lang.invoke.MethodHandle;
+import java.util.Arrays;
+import java.util.stream.Collectors;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class GSF {
+
+ static final Arena LIBRARY_ARENA = Arena.ofAuto();
+ static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");
+
+ static void traceDowncall(String name, Object... args) {
+ String traceArgs = Arrays.stream(args)
+ .map(Object::toString)
+ .collect(Collectors.joining(", "));
+ System.out.printf("%s(%s)\n", name, traceArgs);
+ }
+
+ public static final ValueLayout.OfBoolean C_BOOL = ValueLayout.JAVA_BOOLEAN;
+ public static final ValueLayout.OfByte C_CHAR = ValueLayout.JAVA_BYTE;
+ public static final ValueLayout.OfShort C_SHORT = ValueLayout.JAVA_SHORT;
+ public static final ValueLayout.OfInt C_INT = ValueLayout.JAVA_INT;
+ public static final ValueLayout.OfLong C_LONG_LONG = ValueLayout.JAVA_LONG;
+ public static final ValueLayout.OfFloat C_FLOAT = ValueLayout.JAVA_FLOAT;
+ public static final ValueLayout.OfDouble C_DOUBLE = ValueLayout.JAVA_DOUBLE;
+ public static final AddressLayout C_POINTER = ValueLayout.ADDRESS
+ .withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, JAVA_BYTE));
+ public static final ValueLayout.OfLong C_LONG = ValueLayout.JAVA_LONG;
+
+ static final SymbolLookup SYMBOL_LOOKUP = SymbolLookup.loaderLookup()
+ .or(Linker.nativeLinker().defaultLookup());
+
+ public static final MemorySegment NULL = MemorySegment.ofAddress(0L);
+ public static final int EOF = -1;
+
+
+ static MemorySegment findOrThrow(String symbol) {
+ return SYMBOL_LOOKUP.find(symbol)
+ .orElseThrow(() -> new UnsatisfiedLinkError("unresolved symbol: " + symbol));
+ }
+
+ private static class gsfOpen {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfOpen");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfOpen(const char *filename, const int mode, int *handle)
+ * }
+ */
+ public static int gsfOpen(MemorySegment filename, int mode, MemorySegment handle) {
+ var mh$ = gsfOpen.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfOpen", filename, mode, handle);
+ }
+ return (int)mh$.invokeExact(filename, mode, handle);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfOpenBuffered {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfOpenBuffered");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfOpenBuffered(const char *filename, const int mode, int *handle, int buf_size)
+ * }
+ */
+ public static int gsfOpenBuffered(MemorySegment filename, int mode, MemorySegment handle, int buf_size) {
+ var mh$ = gsfOpenBuffered.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfOpenBuffered", filename, mode, handle, buf_size);
+ }
+ return (int)mh$.invokeExact(filename, mode, handle, buf_size);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfClose {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfClose");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfClose(const int handle)
+ * }
+ */
+ public static int gsfClose(int handle) {
+ var mh$ = gsfClose.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfClose", handle);
+ }
+ return (int)mh$.invokeExact(handle);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfSeek {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfSeek");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfSeek(int handle, int option)
+ * }
+ */
+ public static int gsfSeek(int handle, int option) {
+ var mh$ = gsfSeek.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfSeek", handle, option);
+ }
+ return (int)mh$.invokeExact(handle, option);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfRead {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER,
+ GSF.C_POINTER,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfRead");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfRead(int handle, int desiredRecord, gsfDataID *dataID, gsfRecords *rec, unsigned char *stream, int max_size)
+ * }
+ */
+ public static int gsfRead(int handle, int desiredRecord, MemorySegment dataID, MemorySegment rec, MemorySegment stream, int max_size) {
+ var mh$ = gsfRead.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfRead", handle, desiredRecord, dataID, rec, stream, max_size);
+ }
+ return (int)mh$.invokeExact(handle, desiredRecord, dataID, rec, stream, max_size);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfWrite {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfWrite");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfWrite(int handle, gsfDataID *id, gsfRecords *record)
+ * }
+ */
+ public static int gsfWrite(int handle, MemorySegment id, MemorySegment record_) {
+ var mh$ = gsfWrite.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfWrite", handle, id, record_);
+ }
+ return (int)mh$.invokeExact(handle, id, record_);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfLoadScaleFactor {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_INT,
+ GSF.C_CHAR,
+ GSF.C_DOUBLE,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfLoadScaleFactor");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfLoadScaleFactor(gsfScaleFactors *sf, unsigned int subrecordID, char c_flag, double precision, int offset)
+ * }
+ */
+ public static int gsfLoadScaleFactor(MemorySegment sf, int subrecordID, byte c_flag, double precision, int offset) {
+ var mh$ = gsfLoadScaleFactor.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfLoadScaleFactor", sf, subrecordID, c_flag, precision, offset);
+ }
+ return (int)mh$.invokeExact(sf, subrecordID, c_flag, precision, offset);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetScaleFactor {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetScaleFactor");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfGetScaleFactor(int handle, unsigned int subrecordID, unsigned char *c_flag, double *multiplier, double *offset)
+ * }
+ */
+ public static int gsfGetScaleFactor(int handle, int subrecordID, MemorySegment c_flag, MemorySegment multiplier, MemorySegment offset) {
+ var mh$ = gsfGetScaleFactor.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetScaleFactor", handle, subrecordID, c_flag, multiplier, offset);
+ }
+ return (int)mh$.invokeExact(handle, subrecordID, c_flag, multiplier, offset);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfFree {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfFree");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void gsfFree(gsfRecords *rec)
+ * }
+ */
+ public static void gsfFree(MemorySegment rec) {
+ var mh$ = gsfFree.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfFree", rec);
+ }
+ mh$.invokeExact(rec);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfPrintError {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfPrintError");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void gsfPrintError(FILE *fp)
+ * }
+ */
+ public static void gsfPrintError(MemorySegment fp) {
+ var mh$ = gsfPrintError.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfPrintError", fp);
+ }
+ mh$.invokeExact(fp);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfIntError {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfIntError");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfIntError()
+ * }
+ */
+ public static int gsfIntError() {
+ var mh$ = gsfIntError.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfIntError");
+ }
+ return (int)mh$.invokeExact();
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfStringError {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_POINTER );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfStringError");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * const char *gsfStringError()
+ * }
+ */
+ public static MemorySegment gsfStringError() {
+ var mh$ = gsfStringError.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfStringError");
+ }
+ return (MemorySegment)mh$.invokeExact();
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfIndexTime {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfIndexTime");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfIndexTime(int handle, int recordID, int record_number, time_t *sec, long *nsec)
+ * }
+ */
+ public static int gsfIndexTime(int handle, int recordID, int record_number, MemorySegment sec, MemorySegment nsec) {
+ var mh$ = gsfIndexTime.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfIndexTime", handle, recordID, record_number, sec, nsec);
+ }
+ return (int)mh$.invokeExact(handle, recordID, record_number, sec, nsec);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfPercent {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfPercent");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfPercent(int handle)
+ * }
+ */
+ public static int gsfPercent(int handle) {
+ var mh$ = gsfPercent.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfPercent", handle);
+ }
+ return (int)mh$.invokeExact(handle);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetNumberRecords {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetNumberRecords");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfGetNumberRecords(int handle, int desiredRecord)
+ * }
+ */
+ public static int gsfGetNumberRecords(int handle, int desiredRecord) {
+ var mh$ = gsfGetNumberRecords.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetNumberRecords", handle, desiredRecord);
+ }
+ return (int)mh$.invokeExact(handle, desiredRecord);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfCopyRecords {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfCopyRecords");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfCopyRecords(gsfRecords *target, const gsfRecords *source)
+ * }
+ */
+ public static int gsfCopyRecords(MemorySegment target, MemorySegment source) {
+ var mh$ = gsfCopyRecords.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfCopyRecords", target, source);
+ }
+ return (int)mh$.invokeExact(target, source);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfPutMBParams {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER,
+ GSF.C_INT,
+ GSF.C_INT
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfPutMBParams");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfPutMBParams(const gsfMBParams *p, gsfRecords *rec, int handle, int numArrays)
+ * }
+ */
+ public static int gsfPutMBParams(MemorySegment p, MemorySegment rec, int handle, int numArrays) {
+ var mh$ = gsfPutMBParams.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfPutMBParams", p, rec, handle, numArrays);
+ }
+ return (int)mh$.invokeExact(p, rec, handle, numArrays);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetMBParams {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetMBParams");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfGetMBParams(const gsfRecords *rec, gsfMBParams *p, int *numArrays)
+ * }
+ */
+ public static int gsfGetMBParams(MemorySegment rec, MemorySegment p, MemorySegment numArrays) {
+ var mh$ = gsfGetMBParams.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetMBParams", rec, p, numArrays);
+ }
+ return (int)mh$.invokeExact(rec, p, numArrays);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetSwathBathyBeamWidths {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetSwathBathyBeamWidths");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfGetSwathBathyBeamWidths(const gsfRecords *data, double *fore_aft, double *athwartship)
+ * }
+ */
+ public static int gsfGetSwathBathyBeamWidths(MemorySegment data, MemorySegment fore_aft, MemorySegment athwartship) {
+ var mh$ = gsfGetSwathBathyBeamWidths.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetSwathBathyBeamWidths", data, fore_aft, athwartship);
+ }
+ return (int)mh$.invokeExact(data, fore_aft, athwartship);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfIsStarboardPing {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfIsStarboardPing");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfIsStarboardPing(const gsfRecords *data)
+ * }
+ */
+ public static int gsfIsStarboardPing(MemorySegment data) {
+ var mh$ = gsfIsStarboardPing.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfIsStarboardPing", data);
+ }
+ return (int)mh$.invokeExact(data);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfLoadDepthScaleFactorAutoOffset {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_DOUBLE,
+ GSF.C_DOUBLE,
+ GSF.C_POINTER,
+ GSF.C_CHAR,
+ GSF.C_DOUBLE
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfLoadDepthScaleFactorAutoOffset");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfLoadDepthScaleFactorAutoOffset(gsfSwathBathyPing *ping, unsigned int subrecordID, int reset, double min_depth, double max_depth, double *last_corrector, char c_flag, double precision)
+ * }
+ */
+ public static int gsfLoadDepthScaleFactorAutoOffset(MemorySegment ping, int subrecordID, int reset, double min_depth, double max_depth, MemorySegment last_corrector, byte c_flag, double precision) {
+ var mh$ = gsfLoadDepthScaleFactorAutoOffset.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfLoadDepthScaleFactorAutoOffset", ping, subrecordID, reset, min_depth, max_depth, last_corrector, c_flag, precision);
+ }
+ return (int)mh$.invokeExact(ping, subrecordID, reset, min_depth, max_depth, last_corrector, c_flag, precision);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetSwathBathyArrayMinMax {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetSwathBathyArrayMinMax");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfGetSwathBathyArrayMinMax(const gsfSwathBathyPing *ping, unsigned int subrecordID, double *min_value, double *max_value)
+ * }
+ */
+ public static int gsfGetSwathBathyArrayMinMax(MemorySegment ping, int subrecordID, MemorySegment min_value, MemorySegment max_value) {
+ var mh$ = gsfGetSwathBathyArrayMinMax.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetSwathBathyArrayMinMax", ping, subrecordID, min_value, max_value);
+ }
+ return (int)mh$.invokeExact(ping, subrecordID, min_value, max_value);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetSonarTextName {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetSonarTextName");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * const char *gsfGetSonarTextName(const gsfSwathBathyPing *ping)
+ * }
+ */
+ public static MemorySegment gsfGetSonarTextName(MemorySegment ping) {
+ var mh$ = gsfGetSonarTextName.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetSonarTextName", ping);
+ }
+ return (MemorySegment)mh$.invokeExact(ping);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfFileSupportsRecalculateXYZ {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfFileSupportsRecalculateXYZ");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfFileSupportsRecalculateXYZ(int handle, int *status)
+ * }
+ */
+ public static int gsfFileSupportsRecalculateXYZ(int handle, MemorySegment status) {
+ var mh$ = gsfFileSupportsRecalculateXYZ.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfFileSupportsRecalculateXYZ", handle, status);
+ }
+ return (int)mh$.invokeExact(handle, status);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfFileSupportsRecalculateTPU {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfFileSupportsRecalculateTPU");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfFileSupportsRecalculateTPU(int handle, int *status)
+ * }
+ */
+ public static int gsfFileSupportsRecalculateTPU(int handle, MemorySegment status) {
+ var mh$ = gsfFileSupportsRecalculateTPU.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfFileSupportsRecalculateTPU", handle, status);
+ }
+ return (int)mh$.invokeExact(handle, status);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfFileSupportsRecalculateNominalDepth {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfFileSupportsRecalculateNominalDepth");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfFileSupportsRecalculateNominalDepth(int handle, int *status)
+ * }
+ */
+ public static int gsfFileSupportsRecalculateNominalDepth(int handle, MemorySegment status) {
+ var mh$ = gsfFileSupportsRecalculateNominalDepth.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfFileSupportsRecalculateNominalDepth", handle, status);
+ }
+ return (int)mh$.invokeExact(handle, status);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfFileContainsMBAmplitude {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfFileContainsMBAmplitude");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfFileContainsMBAmplitude(int handle, int *status)
+ * }
+ */
+ public static int gsfFileContainsMBAmplitude(int handle, MemorySegment status) {
+ var mh$ = gsfFileContainsMBAmplitude.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfFileContainsMBAmplitude", handle, status);
+ }
+ return (int)mh$.invokeExact(handle, status);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfFileContainsMBImagery {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfFileContainsMBImagery");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfFileContainsMBImagery(int handle, int *status)
+ * }
+ */
+ public static int gsfFileContainsMBImagery(int handle, MemorySegment status) {
+ var mh$ = gsfFileContainsMBImagery.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfFileContainsMBImagery", handle, status);
+ }
+ return (int)mh$.invokeExact(handle, status);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfIsNewSurveyLine {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_DOUBLE,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfIsNewSurveyLine");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfIsNewSurveyLine(int handle, const gsfRecords *rec, double azimuth_change, double *last_heading)
+ * }
+ */
+ public static int gsfIsNewSurveyLine(int handle, MemorySegment rec, double azimuth_change, MemorySegment last_heading) {
+ var mh$ = gsfIsNewSurveyLine.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfIsNewSurveyLine", handle, rec, azimuth_change, last_heading);
+ }
+ return (int)mh$.invokeExact(handle, rec, azimuth_change, last_heading);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfInitializeMBParams {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.ofVoid(GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfInitializeMBParams");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * void gsfInitializeMBParams(gsfMBParams *p)
+ * }
+ */
+ public static void gsfInitializeMBParams(MemorySegment p) {
+ var mh$ = gsfInitializeMBParams.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfInitializeMBParams", p);
+ }
+ mh$.invokeExact(p);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfStat {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_INT,
+ GSF.C_POINTER,
+ GSF.C_POINTER
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfStat");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * int gsfStat(const char *filename, long long *sz)
+ * }
+ */
+ public static int gsfStat(MemorySegment filename, MemorySegment sz) {
+ var mh$ = gsfStat.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfStat", filename, sz);
+ }
+ return (int)mh$.invokeExact(filename, sz);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetPositionDestination {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_POINTER,
+ Position.LAYOUT,
+ PositionOffsets.LAYOUT,
+ GSF.C_DOUBLE,
+ GSF.C_DOUBLE
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetPositionDestination");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * GSF_POSITION *gsfGetPositionDestination(GSF_POSITION gp, GSF_POSITION_OFFSETS offsets, double hdg, double dist_step)
+ * }
+ */
+ public static MemorySegment gsfGetPositionDestination(MemorySegment gp, MemorySegment offsets, double hdg, double dist_step) {
+ var mh$ = gsfGetPositionDestination.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetPositionDestination", gp, offsets, hdg, dist_step);
+ }
+ return (MemorySegment)mh$.invokeExact(gp, offsets, hdg, dist_step);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ private static class gsfGetPositionOffsets {
+ public static final FunctionDescriptor DESC = FunctionDescriptor.of(GSF.C_POINTER,
+ Position.LAYOUT,
+ Position.LAYOUT,
+ GSF.C_DOUBLE,
+ GSF.C_DOUBLE
+ );
+
+ public static final MemorySegment ADDR = GSF.findOrThrow("gsfGetPositionOffsets");
+
+ public static final MethodHandle HANDLE = Linker.nativeLinker().downcallHandle(ADDR, DESC);
+ }
+
+ /**
+ * {@snippet lang=c :
+ * GSF_POSITION_OFFSETS *gsfGetPositionOffsets(GSF_POSITION gp_from, GSF_POSITION gp_to, double hdg, double dist_step)
+ * }
+ */
+ public static MemorySegment gsfGetPositionOffsets(MemorySegment gp_from, MemorySegment gp_to, double hdg, double dist_step) {
+ var mh$ = gsfGetPositionOffsets.HANDLE;
+ try {
+ if (TRACE_DOWNCALLS) {
+ traceDowncall("gsfGetPositionOffsets", gp_from, gp_to, hdg, dist_step);
+ }
+ return (MemorySegment)mh$.invokeExact(gp_from, gp_to, hdg, dist_step);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ public static final int GSF_MAX_RECORD_SIZE = 524288;
+ public static final int GSF_MAX_OPEN_FILES = 4;
+ public static final int GSF_CREATE = 1;
+ public static final int GSF_READONLY = 2;
+ public static final int GSF_UPDATE = 3;
+ public static final int GSF_READONLY_INDEX = 4;
+ public static final int GSF_UPDATE_INDEX = 5;
+ public static final int GSF_APPEND = 6;
+ public static final int GSF_REWIND = 1;
+ public static final int GSF_END_OF_FILE = 2;
+ public static final int GSF_PREVIOUS_RECORD = 3;
+ public static final int GSF_SHORT_SIZE = 2;
+ public static final int GSF_LONG_SIZE = 4;
+ public static final int GSF_NEXT_RECORD = 0;
+ public static final int NUM_REC_TYPES = 13;
+ public static final int GSF_MAX_PING_ARRAY_SUBRECORDS = 30;
+ public static final int GSF_VERSION_SIZE = 12;
+ public static final int GSF_SEABAT_WIDE_MODE = 1;
+ public static final int GSF_SEABAT_9002 = 2;
+ public static final int GSF_SEABAT_STBD_HEAD = 4;
+ public static final int GSF_SEABAT_9003 = 8;
+ public static final int GSF_8101_WIDE_MODE = 1;
+ public static final int GSF_8101_TWO_HEADS = 2;
+ public static final int GSF_8101_STBD_HEAD = 4;
+ public static final int GSF_8101_AMPLITUDE = 8;
+ public static final int GSF_7100_PITCH_STAB = 1;
+ public static final int GSF_7100_ROLL_STAB = 1;
+ public static final int GSF_2112_SVP_CORRECTION = 1;
+ public static final int GSF_2112_LOW_FREQUENCY = 2;
+ public static final int GSF_2112_AUTO_DEPTH_GATE = 4;
+ public static final int GSF_2112_POOR_QUALITY = 1;
+ public static final int GSF_2112_DATA_SOURCE_WMT = 16;
+ public static final int GSF_MKII_LOW_FREQUENCY = 1;
+ public static final int GSF_MKII_SOURCE_MODE = 2;
+ public static final int GSF_MKII_SOURCE_POWER = 4;
+ public static final int GSF_MKII_STBD_HEAD = 8;
+ public static final int GSF_8100_WIDE_MODE = 1;
+ public static final int GSF_8100_TWO_HEADS = 2;
+ public static final int GSF_8100_STBD_HEAD = 4;
+ public static final int GSF_8100_AMPLITUDE = 8;
+ public static final int GSF_8100_PITCH_STAB = 16;
+ public static final int GSF_8100_ROLL_STAB = 32;
+ public static final int GSF_SB_MPP_SOURCE_UNKNOWN = 0;
+ public static final int GSF_SB_MPP_SOURCE_GPS_3S = 1;
+ public static final int GSF_SB_MPP_SOURCE_GPS_TASMAN = 2;
+ public static final int GSF_SB_MPP_SOURCE_DGPS_TRIMBLE = 3;
+ public static final int GSF_SB_MPP_SOURCE_DGPS_TASMAN = 4;
+ public static final int GSF_SB_MPP_SOURCE_DGPS_MAG = 5;
+ public static final int GSF_SB_MPP_SOURCE_RANGE_MFIX = 6;
+ public static final int GSF_SB_MPP_SOURCE_RANGE_TRIS = 7;
+ public static final int GSF_SB_MPP_SOURCE_RANGE_OTHER = 8;
+ public static final int GSF_MAX_EM4_SECTORS = 9;
+ public static final int GSF_MAX_EM3_SECTORS = 20;
+ public static final int GSF_MAX_KMALL_SECTORS = 9;
+ public static final int GSF_EM_WAVEFORM_CW = 0;
+ public static final int GSF_EM_WAVEFORM_FM_UP = 1;
+ public static final int GSF_EM_WAVEFORM_FM_DOWN = 2;
+ public static final int GSF_EM_MODE_VERY_SHALLOW = 0;
+ public static final int GSF_EM_MODE_SHALLOW = 1;
+ public static final int GSF_EM_MODE_MEDIUM = 2;
+ public static final int GSF_EM_MODE_DEEP = 3;
+ public static final int GSF_EM_MODE_VERY_DEEP = 4;
+ public static final int GSF_EM_MODE_EXTRA_DEEP = 5;
+ public static final int GSF_EM_MODE_MASK = 7;
+ public static final int GSF_EM_MODE_DS_OFF = 192;
+ public static final int GSF_EM_MODE_DS_FIXED = 64;
+ public static final int GSF_EM_MODE_DS_DYNAMIC = 128;
+ public static final int GSF_EM_VALID_1_PPS = 1;
+ public static final int GSF_EM_VALID_POSITION = 2;
+ public static final int GSF_EM_VALID_ATTITUDE = 4;
+ public static final int GSF_EM_VALID_CLOCK = 8;
+ public static final int GSF_EM_VALID_HEADING = 16;
+ public static final int GSF_EM_PU_ACTIVE = 32;
+ public static final int GSF_MAX_KMALL_EXTRA_CLASSES = 11;
+ public static final int GSF_MAX_KMALL_EXTRA_DETECT = 1024;
+ public static final int GSF_KMALL_MRZ = 1;
+ public static final int PORT_PING = 0;
+ public static final int STBD_PING = 1;
+ public static final int GSF_FIELD_SIZE_DEFAULT = 0;
+ public static final int GSF_FIELD_SIZE_ONE = 16;
+ public static final int GSF_FIELD_SIZE_TWO = 32;
+ public static final int GSF_FIELD_SIZE_FOUR = 64;
+ public static final int GSF_FIELD_SIZE_COUNT = 3;
+ public static final int GSF_DISABLE_COMPRESSION = 0;
+ public static final int GSF_ENABLE_COMPRESSION = 1;
+ public static final int GSF_MAX_PROCESSING_PARAMETERS = 128;
+ public static final int GSF_MAX_SENSOR_PARAMETERS = 128;
+ public static final int GSF_OPERATOR_LENGTH = 64;
+ public static final int GSF_HOST_NAME_LENGTH = 64;
+ public static final int GSF_MAX_OFFSETS = 2;
+ public static final int GSF_COMPENSATED = 1;
+ public static final int GSF_UNCOMPENSATED = 0;
+ public static final int GSF_TRUE_DEPTHS = 1;
+ public static final int GSF_DEPTHS_RE_1500_MS = 2;
+ public static final int GSF_DEPTH_CALC_UNKNOWN = 3;
+ public static final int GSF_TRUE = 1;
+ public static final int GSF_FALSE = 0;
+ public static final int GSF_NUMBER_PROCESSING_PARAMS = 49;
+ public static final int GSF_PLATFORM_TYPE_SURFACE_SHIP = 0;
+ public static final int GSF_PLATFORM_TYPE_AUV = 1;
+ public static final int GSF_PLATFORM_TYPE_ROTV = 2;
+ public static final int GSF_HORIZONTAL_PITCH_AXIS = 1;
+ public static final int GSF_ROTATED_PITCH_AXIS = 2;
+ public static final int GSF_H_DATUM_ADI = 1;
+ public static final int GSF_H_DATUM_ARF = 2;
+ public static final int GSF_H_DATUM_ARS = 3;
+ public static final int GSF_H_DATUM_AUA = 4;
+ public static final int GSF_H_DATUM_BAT = 5;
+ public static final int GSF_H_DATUM_BID = 6;
+ public static final int GSF_H_DATUM_BUR = 7;
+ public static final int GSF_H_DATUM_CAI = 8;
+ public static final int GSF_H_DATUM_CAM = 9;
+ public static final int GSF_H_DATUM_CAP = 10;
+ public static final int GSF_H_DATUM_CAA = 11;
+ public static final int GSF_H_DATUM_CHO = 12;
+ public static final int GSF_H_DATUM_CHU = 13;
+ public static final int GSF_H_DATUM_COA = 14;
+ public static final int GSF_H_DATUM_ENB = 15;
+ public static final int GSF_H_DATUM_EUR = 16;
+ public static final int GSF_H_DATUM_GDA = 17;
+ public static final int GSF_H_DATUM_GEO = 18;
+ public static final int GSF_H_DATUM_GHA = 19;
+ public static final int GSF_H_DATUM_GSB = 20;
+ public static final int GSF_H_DATUM_GSF = 21;
+ public static final int GSF_H_DATUM_GUA = 22;
+ public static final int GSF_H_DATUM_HEN = 23;
+ public static final int GSF_H_DATUM_HER = 24;
+ public static final int GSF_H_DATUM_HJO = 25;
+ public static final int GSF_H_DATUM_HTN = 26;
+ public static final int GSF_H_DATUM_IDA = 27;
+ public static final int GSF_H_DATUM_IND = 28;
+ public static final int GSF_H_DATUM_IRE = 29;
+ public static final int GSF_H_DATUM_KEA = 30;
+ public static final int GSF_H_DATUM_LIB = 31;
+ public static final int GSF_H_DATUM_LOC = 32;
+ public static final int GSF_H_DATUM_LUZ = 33;
+ public static final int GSF_H_DATUM_MER = 34;
+ public static final int GSF_H_DATUM_MET = 35;
+ public static final int GSF_H_DATUM_MOL = 36;
+ public static final int GSF_H_DATUM_NAN = 37;
+ public static final int GSF_H_DATUM_NAR = 38;
+ public static final int GSF_H_DATUM_NAS = 39;
+ public static final int GSF_H_DATUM_NIG = 40;
+ public static final int GSF_H_DATUM_OGB = 41;
+ public static final int GSF_H_DATUM_OHA = 42;
+ public static final int GSF_H_DATUM_OSI = 43;
+ public static final int GSF_H_DATUM_PLN = 44;
+ public static final int GSF_H_DATUM_PRP = 45;
+ public static final int GSF_H_DATUM_QUO = 46;
+ public static final int GSF_H_DATUM_SIB = 47;
+ public static final int GSF_H_DATUM_TAN = 48;
+ public static final int GSF_H_DATUM_TIL = 49;
+ public static final int GSF_H_DATUM_TOK = 50;
+ public static final int GSF_H_DATUM_UND = 51;
+ public static final int GSF_H_DATUM_VOI = 52;
+ public static final int GSF_H_DATUM_WGA = 53;
+ public static final int GSF_H_DATUM_WGB = 54;
+ public static final int GSF_H_DATUM_WGC = 55;
+ public static final int GSF_H_DATUM_WGD = 56;
+ public static final int GSF_H_DATUM_WGE = 57;
+ public static final int GSF_H_DATUM_WGS = 58;
+ public static final int GSF_H_DATUM_XXX = 59;
+ public static final int GSF_H_DATUM_YAC = 60;
+ public static final int GSF_V_DATUM_UNKNOWN = 1;
+ public static final int GSF_V_DATUM_MLLW = 2;
+ public static final int GSF_V_DATUM_MLW = 3;
+ public static final int GSF_V_DATUM_ALAT = 4;
+ public static final int GSF_V_DATUM_ESLW = 5;
+ public static final int GSF_V_DATUM_ISLW = 6;
+ public static final int GSF_V_DATUM_LAT = 7;
+ public static final int GSF_V_DATUM_LLW = 8;
+ public static final int GSF_V_DATUM_LNLW = 9;
+ public static final int GSF_V_DATUM_LWD = 10;
+ public static final int GSF_V_DATUM_MLHW = 11;
+ public static final int GSF_V_DATUM_MLLWS = 12;
+ public static final int GSF_V_DATUM_MLWN = 13;
+ public static final int GSF_V_DATUM_MSL = 14;
+ public static final int GSF_V_DATUM_ALLW = 15;
+ public static final int GSF_V_DATUM_LNT = 16;
+ public static final int GSF_V_DATUM_AMLWS = 17;
+ public static final int GSF_V_DATUM_AMLLW = 18;
+ public static final int GSF_V_DATUM_MLWS = 19;
+ public static final int GSF_V_DATUM_AMSL = 20;
+ public static final int GSF_V_DATUM_AMLW = 21;
+ public static final int GSF_V_DATUM_AISLW = 22;
+ public static final int GSF_V_DATUM_ALLWS = 23;
+ public static final int GSF_NORMAL = 0;
+
+ public static final int FLT_EVAL_METHOD = 0;
+ public static final int FLT_RADIX = 2;
+ public static final int FLT_MANT_DIG = 24;
+ public static final int DBL_MANT_DIG = 53;
+ public static final int LDBL_MANT_DIG = 64;
+ public static final int DECIMAL_DIG = 21;
+ public static final int FLT_DIG = 6;
+ public static final int DBL_DIG = 15;
+ public static final int LDBL_DIG = 18;
+ public static final int FLT_MIN_EXP = -125;
+ public static final int DBL_MIN_EXP = -1021;
+ public static final int LDBL_MIN_EXP = -16381;
+ public static final int FLT_MIN_10_EXP = -37;
+ public static final int DBL_MIN_10_EXP = -307;
+ public static final int LDBL_MIN_10_EXP = -4931;
+ public static final int FLT_MAX_EXP = 128;
+ public static final int DBL_MAX_EXP = 1024;
+ public static final int LDBL_MAX_EXP = 16384;
+ public static final int FLT_MAX_10_EXP = 38;
+ public static final int DBL_MAX_10_EXP = 308;
+ public static final int LDBL_MAX_10_EXP = 4932;
+ public static final float FLT_MAX = 3.4028234663852886E38f;
+ public static final double DBL_MAX = 1.7976931348623157E308d;
+ public static final float FLT_EPSILON = 1.1920928955078125E-7f;
+ public static final double DBL_EPSILON = 2.220446049250313E-16d;
+ public static final float FLT_MIN = 1.1754943508222875E-38f;
+ public static final double DBL_MIN = 2.2250738585072014E-308d;
+ public static final float FLT_TRUE_MIN = 1.401298464324817E-45f;
+ public static final double DBL_TRUE_MIN = 4.9E-324d;
+ public static final int FLT_DECIMAL_DIG = 9;
+ public static final int DBL_DECIMAL_DIG = 17;
+ public static final int LDBL_DECIMAL_DIG = 21;
+ public static final int FLT_HAS_SUBNORM = 1;
+ public static final int DBL_HAS_SUBNORM = 1;
+ public static final int LDBL_HAS_SUBNORM = 1;
+ public static final int LITTLE_ENDIAN = 1234;
+ public static final int BIG_ENDIAN = 4321;
+ public static final int PDP_ENDIAN = 3412;
+ public static final int BYTE_ORDER = 1234;
+ public static final long _SIGSET_NWORDS = 16;
+ public static final int __NFDBITS = 64;
+ public static final int FD_SETSIZE = 1024;
+ public static final int NFDBITS = 64;
+ public static final int __PTHREAD_RWLOCK_ELISION_EXTRA = 0;
+ /**
+ * {@snippet lang=c :
+ * #define GSF_MAJOR_VERSION "03"
+ * }
+ */
+ public static MemorySegment GSF_MAJOR_VERSION() {
+ class Holder {
+ static final MemorySegment GSF_MAJOR_VERSION
+ = GSF.LIBRARY_ARENA.allocateFrom("03");
+ }
+ return Holder.GSF_MAJOR_VERSION;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_MINOR_VERSION "09"
+ * }
+ */
+ public static MemorySegment GSF_MINOR_VERSION() {
+ class Holder {
+ static final MemorySegment GSF_MINOR_VERSION
+ = GSF.LIBRARY_ARENA.allocateFrom("09");
+ }
+ return Holder.GSF_MINOR_VERSION;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_VERSION "GSF-v03.09"
+ * }
+ */
+ public static MemorySegment GSF_VERSION() {
+ class Holder {
+ static final MemorySegment GSF_VERSION
+ = GSF.LIBRARY_ARENA.allocateFrom("GSF-v03.09");
+ }
+ return Holder.GSF_VERSION;
+ }
+ public static final int GSF_RECORD_HEADER = 1;
+ public static final int GSF_RECORD_SWATH_BATHYMETRY_PING = 2;
+ public static final int GSF_RECORD_SOUND_VELOCITY_PROFILE = 3;
+ public static final int GSF_RECORD_PROCESSING_PARAMETERS = 4;
+ public static final int GSF_RECORD_SENSOR_PARAMETERS = 5;
+ public static final int GSF_RECORD_COMMENT = 6;
+ public static final int GSF_RECORD_HISTORY = 7;
+ public static final int GSF_RECORD_NAVIGATION_ERROR = 8;
+ public static final int GSF_RECORD_SWATH_BATHY_SUMMARY = 9;
+ public static final int GSF_RECORD_SINGLE_BEAM_PING = 10;
+ public static final int GSF_RECORD_HV_NAVIGATION_ERROR = 11;
+ public static final int GSF_RECORD_ATTITUDE = 12;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_DEPTH_ARRAY = 1;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_ACROSS_TRACK_ARRAY = 2;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_ALONG_TRACK_ARRAY = 3;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_TRAVEL_TIME_ARRAY = 4;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_BEAM_ANGLE_ARRAY = 5;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_MEAN_CAL_AMPLITUDE_ARRAY = 6;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_MEAN_REL_AMPLITUDE_ARRAY = 7;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_ECHO_WIDTH_ARRAY = 8;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_QUALITY_FACTOR_ARRAY = 9;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RECEIVE_HEAVE_ARRAY = 10;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_DEPTH_ERROR_ARRAY = 11;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_ACROSS_TRACK_ERROR_ARRAY = 12;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_ALONG_TRACK_ERROR_ARRAY = 13;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_NOMINAL_DEPTH_ARRAY = 14;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_QUALITY_FLAGS_ARRAY = 15;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_BEAM_FLAGS_ARRAY = 16;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SIGNAL_TO_NOISE_ARRAY = 17;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_BEAM_ANGLE_FORWARD_ARRAY = 18;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_VERTICAL_ERROR_ARRAY = 19;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_HORIZONTAL_ERROR_ARRAY = 20;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_INTENSITY_SERIES_ARRAY = 21;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SECTOR_NUMBER_ARRAY = 22;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_DETECTION_INFO_ARRAY = 23;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_INCIDENT_BEAM_ADJ_ARRAY = 24;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SYSTEM_CLEANING_ARRAY = 25;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_DOPPLER_CORRECTION_ARRAY = 26;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SONAR_VERT_UNCERT_ARRAY = 27;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SONAR_HORZ_UNCERT_ARRAY = 28;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_DETECTION_WINDOW_ARRAY = 29;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_MEAN_ABS_COEF_ARRAY = 30;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_UNKNOWN = 0;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SCALE_FACTORS = 100;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SEABEAM_SPECIFIC = 102;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM12_SPECIFIC = 103;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM100_SPECIFIC = 104;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM950_SPECIFIC = 105;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM121A_SPECIFIC = 106;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM121_SPECIFIC = 107;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SASS_SPECIFIC = 108;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SEAMAP_SPECIFIC = 109;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SEABAT_SPECIFIC = 110;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM1000_SPECIFIC = 111;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_TYPEIII_SEABEAM_SPECIFIC = 112;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SB_AMP_SPECIFIC = 113;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SEABAT_II_SPECIFIC = 114;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SEABAT_8101_SPECIFIC = 115;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_SEABEAM_2112_SPECIFIC = 116;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_ELAC_MKII_SPECIFIC = 117;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3000_SPECIFIC = 118;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM1002_SPECIFIC = 119;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM300_SPECIFIC = 120;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_CMP_SASS_SPECIFIC = 121;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_8101_SPECIFIC = 122;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_8111_SPECIFIC = 123;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_8124_SPECIFIC = 124;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_8125_SPECIFIC = 125;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_8150_SPECIFIC = 126;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_8160_SPECIFIC = 127;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM120_SPECIFIC = 128;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3002_SPECIFIC = 129;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3000D_SPECIFIC = 130;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3002D_SPECIFIC = 131;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM121A_SIS_SPECIFIC = 132;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM710_SPECIFIC = 133;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM302_SPECIFIC = 134;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM122_SPECIFIC = 135;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_GEOSWATH_PLUS_SPECIFIC = 136;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_KLEIN_5410_BSS_SPECIFIC = 137;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_7125_SPECIFIC = 138;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM2000_SPECIFIC = 139;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM300_RAW_SPECIFIC = 140;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM1002_RAW_SPECIFIC = 141;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM2000_RAW_SPECIFIC = 142;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3000_RAW_SPECIFIC = 143;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM120_RAW_SPECIFIC = 144;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3002_RAW_SPECIFIC = 145;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3000D_RAW_SPECIFIC = 146;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM3002D_RAW_SPECIFIC = 147;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM121A_SIS_RAW_SPECIFIC = 148;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_EM2040_SPECIFIC = 149;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_DELTA_T_SPECIFIC = 150;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_R2SONIC_2022_SPECIFIC = 151;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_R2SONIC_2024_SPECIFIC = 152;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_R2SONIC_2020_SPECIFIC = 153;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_RESON_TSERIES_SPECIFIC = 155;
+ public static final int GSF_SWATH_BATHY_SUBRECORD_KMALL_SPECIFIC = 156;
+ public static final int GSF_SINGLE_BEAM_SUBRECORD_UNKNOWN = 0;
+ public static final int GSF_SINGLE_BEAM_SUBRECORD_ECHOTRAC_SPECIFIC = 201;
+ public static final int GSF_SINGLE_BEAM_SUBRECORD_BATHY2000_SPECIFIC = 202;
+ public static final int GSF_SINGLE_BEAM_SUBRECORD_MGD77_SPECIFIC = 203;
+ public static final int GSF_SINGLE_BEAM_SUBRECORD_BDB_SPECIFIC = 204;
+ public static final int GSF_SINGLE_BEAM_SUBRECORD_NOSHDB_SPECIFIC = 205;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_ECHOTRAC_SPECIFIC = 206;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_BATHY2000_SPECIFIC = 207;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_MGD77_SPECIFIC = 208;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_BDB_SPECIFIC = 209;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_NOSHDB_SPECIFIC = 210;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_PDD_SPECIFIC = 211;
+ public static final int GSF_SWATH_BATHY_SB_SUBRECORD_NAVISOUND_SPECIFIC = 212;
+ public static final double GSF_NULL_LATITUDE = 91.0d;
+ public static final double GSF_NULL_LONGITUDE = 181.0d;
+ public static final double GSF_NULL_HEADING = 361.0d;
+ public static final double GSF_NULL_COURSE = 361.0d;
+ public static final double GSF_NULL_SPEED = 99.0d;
+ public static final double GSF_NULL_PITCH = 99.0d;
+ public static final double GSF_NULL_ROLL = 99.0d;
+ public static final double GSF_NULL_HEAVE = 99.0d;
+ public static final double GSF_NULL_DRAFT = 0.0d;
+ public static final double GSF_NULL_DEPTH_CORRECTOR = 99.99d;
+ public static final double GSF_NULL_TIDE_CORRECTOR = 99.99d;
+ public static final double GSF_NULL_SOUND_SPEED_CORRECTION = 99.99d;
+ public static final double GSF_NULL_HORIZONTAL_ERROR = -1.0d;
+ public static final double GSF_NULL_VERTICAL_ERROR = -1.0d;
+ public static final double GSF_NULL_HEIGHT = 9999.99d;
+ public static final double GSF_NULL_SEP = 9999.99d;
+ public static final double GSF_NULL_SEP_UNCERTAINTY = 0.0d;
+ public static final double GSF_NULL_DEPTH = 0.0d;
+ public static final double GSF_NULL_ACROSS_TRACK = 0.0d;
+ public static final double GSF_NULL_ALONG_TRACK = 0.0d;
+ public static final double GSF_NULL_TRAVEL_TIME = 0.0d;
+ public static final double GSF_NULL_BEAM_ANGLE = 0.0d;
+ public static final double GSF_NULL_MC_AMPLITUDE = 0.0d;
+ public static final double GSF_NULL_MR_AMPLITUDE = 0.0d;
+ public static final double GSF_NULL_ECHO_WIDTH = 0.0d;
+ public static final double GSF_NULL_QUALITY_FACTOR = 0.0d;
+ public static final double GSF_NULL_RECEIVE_HEAVE = 0.0d;
+ public static final double GSF_NULL_DEPTH_ERROR = 0.0d;
+ public static final double GSF_NULL_ACROSS_TRACK_ERROR = 0.0d;
+ public static final double GSF_NULL_ALONG_TRACK_ERROR = 0.0d;
+ public static final double GSF_NULL_NAV_POS_ERROR = 0.0d;
+ public static final double GSF_BEAM_WIDTH_UNKNOWN = -1.0d;
+ public static final int GSF_GEOSWATH_PLUS_PORT_PING = 0;
+ public static final int GSF_GEOSWATH_PLUS_STBD_PING = 1;
+ public static final int GSF_IGNORE_PING = 1;
+ public static final int GSF_PING_USER_FLAG_01 = 2;
+ public static final int GSF_PING_USER_FLAG_02 = 4;
+ public static final int GSF_PING_USER_FLAG_03 = 8;
+ public static final int GSF_PING_USER_FLAG_04 = 16;
+ public static final int GSF_PING_USER_FLAG_05 = 32;
+ public static final int GSF_PING_USER_FLAG_06 = 64;
+ public static final int GSF_PING_USER_FLAG_07 = 128;
+ public static final int GSF_PING_USER_FLAG_08 = 256;
+ public static final int GSF_PING_USER_FLAG_09 = 512;
+ public static final int GSF_PING_USER_FLAG_10 = 1024;
+ public static final int GSF_PING_USER_FLAG_11 = 2048;
+ public static final int GSF_PING_USER_FLAG_12 = 4096;
+ public static final int GSF_PING_USER_FLAG_13 = 8192;
+ public static final int GSF_PING_USER_FLAG_14 = 16384;
+ public static final int GSF_PING_USER_FLAG_15 = 32768;
+ public static final int GSF_IGNORE_BEAM = 1;
+ public static final int GSF_BEAM_USER_FLAG_01 = 2;
+ public static final int GSF_BEAM_USER_FLAG_02 = 4;
+ public static final int GSF_BEAM_USER_FLAG_03 = 8;
+ public static final int GSF_BEAM_USER_FLAG_04 = 16;
+ public static final int GSF_BEAM_USER_FLAG_05 = 32;
+ public static final int GSF_BEAM_USER_FLAG_06 = 64;
+ public static final int GSF_BEAM_USER_FLAG_07 = 128;
+ public static final int GSF_INTENSITY_LINEAR = 1;
+ public static final int GSF_INTENSITY_CALIBRATED = 2;
+ public static final int GSF_INTENSITY_POWER = 4;
+ public static final int GSF_INTENSITY_GAIN = 8;
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_UNKN "UNKN"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_UNKN() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_UNKN
+ = GSF.LIBRARY_ARENA.allocateFrom("UNKN");
+ }
+ return Holder.GSF_POS_TYPE_UNKN;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_GPSU "GPSU"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_GPSU() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_GPSU
+ = GSF.LIBRARY_ARENA.allocateFrom("GPSU");
+ }
+ return Holder.GSF_POS_TYPE_GPSU;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PPSD "PPSD"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PPSD() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PPSD
+ = GSF.LIBRARY_ARENA.allocateFrom("PPSD");
+ }
+ return Holder.GSF_POS_TYPE_PPSD;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PPSK "PPSK"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PPSK() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PPSK
+ = GSF.LIBRARY_ARENA.allocateFrom("PPSK");
+ }
+ return Holder.GSF_POS_TYPE_PPSK;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PPSS "PPSS"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PPSS() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PPSS
+ = GSF.LIBRARY_ARENA.allocateFrom("PPSS");
+ }
+ return Holder.GSF_POS_TYPE_PPSS;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PPSG "PPSG"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PPSG() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PPSG
+ = GSF.LIBRARY_ARENA.allocateFrom("PPSG");
+ }
+ return Holder.GSF_POS_TYPE_PPSG;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_SPSD "SPSD"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_SPSD() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_SPSD
+ = GSF.LIBRARY_ARENA.allocateFrom("SPSD");
+ }
+ return Holder.GSF_POS_TYPE_SPSD;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_SPSK "SPSK"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_SPSK() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_SPSK
+ = GSF.LIBRARY_ARENA.allocateFrom("SPSK");
+ }
+ return Holder.GSF_POS_TYPE_SPSK;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_SPSS "SPSS"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_SPSS() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_SPSS
+ = GSF.LIBRARY_ARENA.allocateFrom("SPSS");
+ }
+ return Holder.GSF_POS_TYPE_SPSS;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_SPSG "SPSG"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_SPSG() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_SPSG
+ = GSF.LIBRARY_ARENA.allocateFrom("SPSG");
+ }
+ return Holder.GSF_POS_TYPE_SPSG;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_GPPP "GPPP"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_GPPP() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_GPPP
+ = GSF.LIBRARY_ARENA.allocateFrom("GPPP");
+ }
+ return Holder.GSF_POS_TYPE_GPPP;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GPS_POS_TYPE_GPPK "GPPK"
+ * }
+ */
+ public static MemorySegment GPS_POS_TYPE_GPPK() {
+ class Holder {
+ static final MemorySegment GPS_POS_TYPE_GPPK
+ = GSF.LIBRARY_ARENA.allocateFrom("GPPK");
+ }
+ return Holder.GPS_POS_TYPE_GPPK;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_INUA "INUA"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_INUA() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_INUA
+ = GSF.LIBRARY_ARENA.allocateFrom("INUA");
+ }
+ return Holder.GSF_POS_TYPE_INUA;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_INVA "INVA"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_INVA() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_INVA
+ = GSF.LIBRARY_ARENA.allocateFrom("INVA");
+ }
+ return Holder.GSF_POS_TYPE_INVA;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_INWA "INWA"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_INWA() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_INWA
+ = GSF.LIBRARY_ARENA.allocateFrom("INWA");
+ }
+ return Holder.GSF_POS_TYPE_INWA;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_LBLN "LBLN"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_LBLN() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_LBLN
+ = GSF.LIBRARY_ARENA.allocateFrom("LBLN");
+ }
+ return Holder.GSF_POS_TYPE_LBLN;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_USBL "USBL"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_USBL() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_USBL
+ = GSF.LIBRARY_ARENA.allocateFrom("USBL");
+ }
+ return Holder.GSF_POS_TYPE_USBL;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PIUA "PIUA"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PIUA() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PIUA
+ = GSF.LIBRARY_ARENA.allocateFrom("PIUA");
+ }
+ return Holder.GSF_POS_TYPE_PIUA;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PIVA "PIVA"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PIVA() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PIVA
+ = GSF.LIBRARY_ARENA.allocateFrom("PIVA");
+ }
+ return Holder.GSF_POS_TYPE_PIVA;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PIWA "PIWA"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PIWA() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PIWA
+ = GSF.LIBRARY_ARENA.allocateFrom("PIWA");
+ }
+ return Holder.GSF_POS_TYPE_PIWA;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PLBL "PLBL"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PLBL() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PLBL
+ = GSF.LIBRARY_ARENA.allocateFrom("PLBL");
+ }
+ return Holder.GSF_POS_TYPE_PLBL;
+ }
+ /**
+ * {@snippet lang=c :
+ * #define GSF_POS_TYPE_PSBL "PSBL"
+ * }
+ */
+ public static MemorySegment GSF_POS_TYPE_PSBL() {
+ class Holder {
+ static final MemorySegment GSF_POS_TYPE_PSBL
+ = GSF.LIBRARY_ARENA.allocateFrom("PSBL");
+ }
+ return Holder.GSF_POS_TYPE_PSBL;
+ }
+ public static final double GSF_UNKNOWN_PARAM_VALUE = 2.2250738585072014E-308d;
+ public static final int GSF_UNKNOWN_PARAM_INT = -99;
+ public static final int GSF_FOPEN_ERROR = -1;
+ public static final int GSF_UNRECOGNIZED_FILE = -2;
+ public static final int GSF_BAD_ACCESS_MODE = -3;
+ public static final int GSF_READ_ERROR = -4;
+ public static final int GSF_WRITE_ERROR = -5;
+ public static final int GSF_INSUFFICIENT_SIZE = -6;
+ public static final int GSF_RECORD_SIZE_ERROR = -7;
+ public static final int GSF_CHECKSUM_FAILURE = -8;
+ public static final int GSF_FILE_CLOSE_ERROR = -9;
+ public static final int GSF_TOO_MANY_ARRAY_SUBRECORDS = -10;
+ public static final int GSF_TOO_MANY_OPEN_FILES = -11;
+ public static final int GSF_MEMORY_ALLOCATION_FAILED = -12;
+ public static final int GSF_UNRECOGNIZED_RECORD_ID = -13;
+ public static final int GSF_STREAM_DECODE_FAILURE = -14;
+ public static final int GSF_BAD_SEEK_OPTION = -15;
+ public static final int GSF_FILE_SEEK_ERROR = -16;
+ public static final int GSF_UNRECOGNIZED_SENSOR_ID = -17;
+ public static final int GSF_UNRECOGNIZED_DATA_RECORD = -18;
+ public static final int GSF_UNRECOGNIZED_ARRAY_SUBRECORD_ID = -19;
+ public static final int GSF_UNRECOGNIZED_SUBRECORD_ID = -20;
+ public static final int GSF_ILLEGAL_SCALE_FACTOR_MULTIPLIER = -21;
+ public static final int GSF_CANNOT_REPRESENT_PRECISION = -22;
+ public static final int GSF_READ_TO_END_OF_FILE = -23;
+ public static final int GSF_BAD_FILE_HANDLE = -24;
+ public static final int GSF_HEADER_RECORD_DECODE_FAILED = -25;
+ public static final int GSF_MB_PING_RECORD_DECODE_FAILED = -26;
+ public static final int GSF_SVP_RECORD_DECODE_FAILED = -27;
+ public static final int GSF_PROCESS_PARAM_RECORD_DECODE_FAILED = -28;
+ public static final int GSF_SENSOR_PARAM_RECORD_DECODE_FAILED = -29;
+ public static final int GSF_COMMENT_RECORD_DECODE_FAILED = -30;
+ public static final int GSF_HISTORY_RECORD_DECODE_FAILED = -31;
+ public static final int GSF_NAV_ERROR_RECORD_DECODE_FAILED = -32;
+ public static final int GSF_HEADER_RECORD_ENCODE_FAILED = -25;
+ public static final int GSF_MB_PING_RECORD_ENCODE_FAILED = -26;
+ public static final int GSF_SVP_RECORD_ENCODE_FAILED = -27;
+ public static final int GSF_PROCESS_PARAM_RECORD_ENCODE_FAILED = -28;
+ public static final int GSF_SENSOR_PARAM_RECORD_ENCODE_FAILED = -29;
+ public static final int GSF_COMMENT_RECORD_ENCODE_FAILED = -30;
+ public static final int GSF_HISTORY_RECORD_ENCODE_FAILED = -31;
+ public static final int GSF_NAV_ERROR_RECORD_ENCODE_FAILED = -32;
+ public static final int GSF_SETVBUF_ERROR = -33;
+ public static final int GSF_FLUSH_ERROR = -34;
+ public static final int GSF_FILE_TELL_ERROR = -35;
+ public static final int GSF_INDEX_FILE_OPEN_ERROR = -36;
+ public static final int GSF_CORRUPT_INDEX_FILE_ERROR = -37;
+ public static final int GSF_SCALE_INDEX_CALLOC_ERROR = -38;
+ public static final int GSF_RECORD_TYPE_NOT_AVAILABLE = -39;
+ public static final int GSF_SUMMARY_RECORD_DECODE_FAILED = -40;
+ public static final int GSF_SUMMARY_RECORD_ENCODE_FAILED = -41;
+ public static final int GSF_INVALID_NUM_BEAMS = -42;
+ public static final int GSF_INVALID_RECORD_NUMBER = -43;
+ public static final int GSF_INDEX_FILE_READ_ERROR = -44;
+ public static final int GSF_PARAM_SIZE_FIXED = -45;
+ public static final int GSF_SINGLE_BEAM_ENCODE_FAILED = -46;
+ public static final int GSF_HV_NAV_ERROR_RECORD_ENCODE_FAILED = -47;
+ public static final int GSF_HV_NAV_ERROR_RECORD_DECODE_FAILED = -48;
+ public static final int GSF_ATTITUDE_RECORD_ENCODE_FAILED = -49;
+ public static final int GSF_ATTITUDE_RECORD_DECODE_FAILED = -50;
+ public static final int GSF_OPEN_TEMP_FILE_FAILED = -51;
+ public static final int GSF_PARTIAL_RECORD_AT_END_OF_FILE = -52;
+ public static final int GSF_QUALITY_FLAGS_DECODE_ERROR = -53;
+ public static final int GSF_COMPRESSION_UNSUPPORTED = -55;
+ public static final int GSF_COMPRESSION_FAILED = -56;
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/GSFRecordReader.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/GSFRecordReader.java
new file mode 100644
index 0000000000..d557a1229a
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/GSFRecordReader.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.Arena;
+import java.lang.foreign.MemorySegment;
+import java.lang.foreign.ValueLayout;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.util.Iterator;
+import java.util.Spliterator;
+import java.util.Spliterators;
+import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
+import org.apache.sis.storage.DataStoreException;
+import org.apache.sis.util.privy.AbstractIterator;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public class GSFRecordReader {
+
+ private final Path file;
+
+ public GSFRecordReader(Path file) {
+ this.file = file;
+ }
+
+ public Stream<Records> records() throws DataStoreException{
+
+ final Arena arena = Arena.ofShared();
+ final MemorySegment address = arena.allocateFrom(file.toFile().toString(), StandardCharsets.UTF_8);
+ final MemorySegment handle = arena.allocate(4);
+ final int error = GSF.gsfOpen(address, GSF.GSF_READONLY, handle);
+ if (error != 0) {
+ arena.close();
+ throw new DataStoreException("GSF open error " + GSF.gsfIntError());
+ }
+ final int handleId = handle.getAtIndex(ValueLayout.JAVA_INT, 0);
+
+ final Iterator ite = new AbstractIterator() {
+ @Override
+ public boolean hasNext() {
+ if (next != null) return true;
+ final DataID dataId = new DataID(arena);
+ final Records records = new Records(arena);
+ records.setDataId(dataId);
+ final int error = GSF.gsfRead(handleId, GSF.GSF_NEXT_RECORD, dataId.getMemorySegment(), records.getMemorySegment(), MemorySegment.NULL, 0);
+ if (error < 0) {
+ int errorCode = GSF.gsfIntError();
+ if (errorCode == GSF.GSF_READ_TO_END_OF_FILE) {
+ return false;
+ } else {
+ throw new RuntimeException(error + " GSF read error " + errorCode);
+ }
+ }
+ next = records;
+ return true;
+ }
+ };
+
+ final Spliterator<Records> spliterator = Spliterators.spliteratorUnknownSize(ite, Spliterator.ORDERED);
+ final Stream<Records> stream = StreamSupport.stream(spliterator, false);
+ return stream.onClose(new Runnable() {
+ @Override
+ public void run() {
+ GSF.gsfClose(handleId);
+ arena.close();
+ }
+ });
+ }
+
+}
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/HVNavigationError.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/HVNavigationError.java
new file mode 100644
index 0000000000..c99703bca0
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/HVNavigationError.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class HVNavigationError extends StructClass {
+
+ private static final GroupLayout LAYOUT_NAV_ERROR_TIME;
+ private static final OfInt LAYOUT_RECORD_ID;
+ private static final OfDouble LAYOUT_HORIZONTAL_ERROR;
+ private static final OfDouble LAYOUT_VERTICAL_ERROR;
+ private static final OfDouble LAYOUT_SEP_UNCERTAINTY;
+ private static final SequenceLayout LAYOUT_SPARE;
+ private static final AddressLayout LAYOUT_POSITION_TYPE;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_NAV_ERROR_TIME = TimeSpec.LAYOUT.withName("nav_error_time"),
+ LAYOUT_RECORD_ID = GSF.C_INT.withName("record_id"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_HORIZONTAL_ERROR = GSF.C_DOUBLE.withName("horizontal_error"),
+ LAYOUT_VERTICAL_ERROR = GSF.C_DOUBLE.withName("vertical_error"),
+ LAYOUT_SEP_UNCERTAINTY = GSF.C_DOUBLE.withName("SEP_uncertainty"),
+ LAYOUT_SPARE = MemoryLayout.sequenceLayout(2, GSF.C_CHAR).withName("spare"),
+ MemoryLayout.paddingLayout(6),
+ LAYOUT_POSITION_TYPE = GSF.C_POINTER.withName("position_type")
+ ).withName("t_gsfHVNavigationError");
+
+ public HVNavigationError(MemorySegment struct) {
+ super(struct);
+ }
+
+ public HVNavigationError(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public TimeSpec getNavErrorTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_NAV_ERROR_TIME.byteSize()));
+ }
+
+ public int getRecordId() {
+ return struct.get(LAYOUT_RECORD_ID, 16);
+ }
+
+ public double getHorizontalError() {
+ return struct.get(LAYOUT_HORIZONTAL_ERROR, 24);
+ }
+
+ public double getVerticalError() {
+ return struct.get(LAYOUT_VERTICAL_ERROR, 32);
+ }
+
+ public double getSEPUncertainty() {
+ return struct.get(LAYOUT_SEP_UNCERTAINTY, 40);
+ }
+
+ public byte[] getSpare() {
+ return getBytes(48, (int) LAYOUT_SPARE.byteSize());
+ }
+
+ public MemorySegment getPositionType() {
+ return struct.get(LAYOUT_POSITION_TYPE, 56);
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Header.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Header.java
new file mode 100644
index 0000000000..e675afbe24
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Header.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class Header extends StructClass {
+
+ private static final SequenceLayout LAYOUT_VERSION;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_VERSION = MemoryLayout.sequenceLayout(12, GSF.C_CHAR).withName("version")
+ ).withName("t_gsfHeader");
+
+ public Header(MemorySegment struct) {
+ super(struct);
+ }
+
+ public Header(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public String getVersion() {
+ return struct.asSlice(0, LAYOUT_VERSION.byteSize()).getString(0);
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/History.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/History.java
new file mode 100644
index 0000000000..3fbe26df88
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/History.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class History extends StructClass {
+
+ private static final GroupLayout LAYOUT_HISTORY_TIME;
+ private static final SequenceLayout LAYOUT_HOST_NAME;
+ private static final SequenceLayout LAYOUT_OPERATOR_NAME;
+ private static final AddressLayout LAYOUT_COMMAND_LINE;
+ private static final AddressLayout LAYOUT_COMMENT;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_HISTORY_TIME = TimeSpec.LAYOUT.withName("history_time"),
+ LAYOUT_HOST_NAME = MemoryLayout.sequenceLayout(65, GSF.C_CHAR).withName("host_name"),
+ LAYOUT_OPERATOR_NAME = MemoryLayout.sequenceLayout(65, GSF.C_CHAR).withName("operator_name"),
+ MemoryLayout.paddingLayout(6),
+ LAYOUT_COMMAND_LINE = GSF.C_POINTER.withName("command_line"),
+ LAYOUT_COMMENT = GSF.C_POINTER.withName("comment")
+ ).withName("t_gsfHistory");
+
+ public History(MemorySegment struct) {
+ super(struct);
+ }
+
+ public History(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * struct timespec history_time
+ * }
+ */
+ public TimeSpec getHistoryTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_HISTORY_TIME.byteSize()));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char host_name[65]
+ * }
+ */
+ public String getHostName() {
+ return new String(getBytes(16, 65));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char operator_name[65]
+ * }
+ */
+ public String getOperatorName() {
+ return new String(getBytes(81, 65));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char *command_line
+ * }
+ */
+ public MemorySegment getCommandLine(MemorySegment struct) {
+ return struct.get(LAYOUT_COMMAND_LINE, 152);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char *comment
+ * }
+ */
+ public MemorySegment comment(MemorySegment struct) {
+ return struct.get(LAYOUT_COMMENT, 160);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/NavigationError.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/NavigationError.java
new file mode 100644
index 0000000000..5a403b48b5
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/NavigationError.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class NavigationError extends StructClass {
+
+ private static final GroupLayout LAYOUT_NAV_ERROR_TIME;
+ private static final OfInt LAYOUT_RECORD_ID;
+ private static final OfDouble LAYOUT_LATITUDE_ERROR;
+ private static final OfDouble LAYOUT_LONGITUDE_ERROR;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_NAV_ERROR_TIME = TimeSpec.LAYOUT.withName("nav_error_time"),
+ LAYOUT_RECORD_ID = GSF.C_INT.withName("record_id"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_LATITUDE_ERROR = GSF.C_DOUBLE.withName("latitude_error"),
+ LAYOUT_LONGITUDE_ERROR = GSF.C_DOUBLE.withName("longitude_error")
+ ).withName("t_gsfNavigationError");
+
+ public NavigationError(MemorySegment struct) {
+ super(struct);
+ }
+
+ public NavigationError(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * struct timespec nav_error_time
+ * }
+ */
+ public TimeSpec getNavErrorTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_NAV_ERROR_TIME.byteSize()));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int record_id
+ * }
+ */
+ public int getRecordId() {
+ return struct.get(LAYOUT_RECORD_ID, 16);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double latitude_error
+ * }
+ */
+ public double getLatitudeError() {
+ return struct.get(LAYOUT_LATITUDE_ERROR, 24);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double longitude_error
+ * }
+ */
+ public double getLongitudeError() {
+ return struct.get(LAYOUT_LONGITUDE_ERROR, 32);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Position.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Position.java
new file mode 100644
index 0000000000..3a09c1c50b
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Position.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class Position extends StructClass {
+
+ public static final OfDouble LAYOUT_LON;
+ public static final OfDouble LAYOUT_LAT;
+ public static final OfDouble LAYOUT_Z;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_LON = GSF.C_DOUBLE.withName("lon"),
+ LAYOUT_LAT = GSF.C_DOUBLE.withName("lat"),
+ LAYOUT_Z = GSF.C_DOUBLE.withName("z")
+ ).withName("t_gsf_gp");
+
+ public Position(MemorySegment segment) {
+ super(segment);
+ }
+
+ public Position(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public double getLon() {
+ return struct.get(LAYOUT_LON, 0);
+ }
+
+ public void setLon(double fieldValue) {
+ struct.set(LAYOUT_LON, 0, fieldValue);
+ }
+
+ public double getLat() {
+ return struct.get(LAYOUT_LAT, 8);
+ }
+
+ public void setLat(double fieldValue) {
+ struct.set(LAYOUT_LAT, 8, fieldValue);
+ }
+
+ public double getZ() {
+ return struct.get(LAYOUT_Z, 16);
+ }
+
+ public void setZ(double fieldValue) {
+ struct.set(LAYOUT_Z, 16, fieldValue);
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/PositionOffsets.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/PositionOffsets.java
new file mode 100644
index 0000000000..9abeb15b51
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/PositionOffsets.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class PositionOffsets extends StructClass {
+
+ private static final OfDouble LAYOUT_X;
+ private static final OfDouble LAYOUT_Y;
+ private static final OfDouble LAYOUT_Z;
+ private static final long x$OFFSET = 0;
+ private static final long y$OFFSET = 8;
+ private static final long z$OFFSET = 16;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_X = GSF.C_DOUBLE.withName("x"),
+ LAYOUT_Y = GSF.C_DOUBLE.withName("y"),
+ LAYOUT_Z = GSF.C_DOUBLE.withName("z")
+ ).withName("t_gsf_pos_offsets");
+
+ public PositionOffsets(MemorySegment struct) {
+ super(struct);
+ }
+
+ public PositionOffsets(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double x
+ * }
+ */
+ public double getX() {
+ return struct.get(LAYOUT_X, x$OFFSET);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double y
+ * }
+ */
+ public double getY() {
+ return struct.get(LAYOUT_Y, y$OFFSET);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double z
+ * }
+ */
+ public double getZ() {
+ return struct.get(LAYOUT_Z, z$OFFSET);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ProcessingParameters.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ProcessingParameters.java
new file mode 100644
index 0000000000..07b106c77c
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ProcessingParameters.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class ProcessingParameters extends StructClass {
+
+ private static final GroupLayout LAYOUT_PARAM_TIME;
+ private static final OfInt LAYOUT_NUMBER_PARAMETERS;
+ private static final SequenceLayout LAYOUT_PARAM_SIZE;
+ private static final SequenceLayout LAYOUT_PARAM;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_PARAM_TIME = TimeSpec.LAYOUT.withName("param_time"),
+ LAYOUT_NUMBER_PARAMETERS = GSF.C_INT.withName("number_parameters"),
+ LAYOUT_PARAM_SIZE = MemoryLayout.sequenceLayout(128, GSF.C_SHORT).withName("param_size"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_PARAM = MemoryLayout.sequenceLayout(128, GSF.C_POINTER).withName("param")
+ ).withName("t_gsfProcessingParameters");
+
+ public ProcessingParameters(MemorySegment struct) {
+ super(struct);
+ }
+
+ public ProcessingParameters(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public TimeSpec getParamTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_PARAM_TIME.byteSize()));
+ }
+
+ public int getNumberParameters() {
+ return struct.get(LAYOUT_NUMBER_PARAMETERS, 16);
+ }
+
+ public short[] getParamSize() {
+ return getShorts(20, getNumberParameters());
+ }
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Records.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Records.java
new file mode 100644
index 0000000000..95c3663a75
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/Records.java
@@ -0,0 +1,146 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+import java.util.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class Records extends StructClass{
+
+ private static final GroupLayout LAYOUT_HEADER;
+ private static final GroupLayout LAYOUT_SUMMARY;
+ private static final GroupLayout LAYOUT_MB_PING;
+ private static final GroupLayout LAYOUT_SB_PING;
+ private static final GroupLayout LAYOUT_SVP;
+ private static final GroupLayout LAYOUT_PROCESS_PARAMETERS;
+ private static final GroupLayout LAYOUT_SENSOR_PARAMETERS;
+ private static final GroupLayout LAYOUT_COMMENT;
+ private static final GroupLayout LAYOUT_HISTORY;
+ private static final GroupLayout LAYOUT_NAV_ERROR;
+ private static final GroupLayout LAYOUT_HV_NAV_ERROR;
+ private static final GroupLayout LAYOUT_ATTITUDE;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_HEADER = Header.LAYOUT.withName("header"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_SUMMARY = SwathBathySummary.LAYOUT.withName("summary"),
+ LAYOUT_MB_PING = SwathBathyPing.LAYOUT.withName("mb_ping"),
+ LAYOUT_SB_PING = SingleBeamPing.LAYOUT.withName("sb_ping"),
+ LAYOUT_SVP = SVP.LAYOUT.withName("svp"),
+ LAYOUT_PROCESS_PARAMETERS = ProcessingParameters.LAYOUT.withName("process_parameters"),
+ LAYOUT_SENSOR_PARAMETERS = SensorParameters.LAYOUT.withName("sensor_parameters"),
+ LAYOUT_COMMENT = Comment.LAYOUT.withName("comment"),
+ LAYOUT_HISTORY = History.LAYOUT.withName("history"),
+ LAYOUT_NAV_ERROR = NavigationError.LAYOUT.withName("nav_error"),
+ LAYOUT_HV_NAV_ERROR = HVNavigationError.LAYOUT.withName("hv_nav_error"),
+ LAYOUT_ATTITUDE = Attitude.LAYOUT.withName("attitude")
+ ).withName("t_gsfRecords");
+
+ private DataID dataId;
+
+ public Records( MemorySegment struct) {
+ super(struct);
+ }
+
+ public Records(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ public DataID getDataId() {
+ return dataId;
+ }
+
+ public void setDataId(DataID dataId) {
+ this.dataId = dataId;
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public Header getHeader() {
+ return new Header(struct.asSlice(0, LAYOUT_HEADER.byteSize()));
+ }
+
+ public SwathBathySummary getSummary() {
+ return new SwathBathySummary(struct.asSlice(16, LAYOUT_SUMMARY.byteSize()));
+ }
+
+ public SwathBathyPing getMbPing() {
+ return new SwathBathyPing(struct.asSlice(96, LAYOUT_MB_PING.byteSize()));
+ }
+
+ public SingleBeamPing getSbPing() {
+ return new SingleBeamPing(struct.asSlice(3112, LAYOUT_SB_PING.byteSize()));
+ }
+
+ public SVP getSvp() {
+ return new SVP(struct.asSlice(3240, LAYOUT_SVP.byteSize()));
+ }
+
+ public ProcessingParameters getProcessParameters() {
+ return new ProcessingParameters(struct.asSlice(3312, LAYOUT_PROCESS_PARAMETERS.byteSize()));
+ }
+
+ public SensorParameters getSensorParameters() {
+ return new SensorParameters(struct.asSlice(4616, LAYOUT_SENSOR_PARAMETERS.byteSize()));
+ }
+
+ public Comment getComment() {
+ return new Comment(struct.asSlice(5920, LAYOUT_COMMENT.byteSize()));
+ }
+
+ public History getHistory() {
+ return new History(struct.asSlice(5952, LAYOUT_HISTORY.byteSize()));
+ }
+
+ public NavigationError getNavError() {
+ return new NavigationError(struct.asSlice(6120, LAYOUT_NAV_ERROR.byteSize()));
+ }
+
+ public HVNavigationError getHVNavError() {
+ return new HVNavigationError(struct.asSlice(6160, LAYOUT_HV_NAV_ERROR.byteSize()));
+ }
+
+ public Attitude getAttitude() {
+ return new Attitude(struct.asSlice(6224, LAYOUT_ATTITUDE.byteSize()));
+ }
+
+ @Override
+ public String toString() {
+ final long dataType = dataId.getRecordId() & 0b11111111111L;
+ final List<String> attributes = new ArrayList<>();
+ if (dataType == GSF.GSF_RECORD_HEADER) attributes.add("header : " + getHeader());
+ else if (dataType == GSF.GSF_RECORD_SWATH_BATHYMETRY_PING) attributes.add("mb_ping : " + getMbPing());
+ else if (dataType == GSF.GSF_RECORD_SOUND_VELOCITY_PROFILE) attributes.add("svp : " + getSvp());
+ else if (dataType == GSF.GSF_RECORD_PROCESSING_PARAMETERS) attributes.add("process_parameters : " + getProcessParameters());
+ else if (dataType == GSF.GSF_RECORD_SENSOR_PARAMETERS) attributes.add("sensor_parameters : " + getSensorParameters());
+ else if (dataType == GSF.GSF_RECORD_COMMENT) attributes.add("comment : " + getComment());
+ else if (dataType == GSF.GSF_RECORD_HISTORY) attributes.add("history : " + getHistory());
+ else if (dataType == GSF.GSF_RECORD_NAVIGATION_ERROR) attributes.add("nav_error : " + getNavError());
+ else if (dataType == GSF.GSF_RECORD_SWATH_BATHY_SUMMARY) attributes.add("summary : " + getSummary());
+ else if (dataType == GSF.GSF_RECORD_SINGLE_BEAM_PING) attributes.add("sb_ping : " + getSbPing());
+ else if (dataType == GSF.GSF_RECORD_HV_NAVIGATION_ERROR) attributes.add("hv_nav_error : " + getHVNavError());
+ else if (dataType == GSF.GSF_RECORD_ATTITUDE) attributes.add("attitude : " + getAttitude());
+ return toStringTree("Record", attributes);
+ }
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SBSensorSpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SBSensorSpecific.java
new file mode 100644
index 0000000000..bdd986f201
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SBSensorSpecific.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+import org.apache.sis.storage.gsf.specific.BDBSpecific;
+import org.apache.sis.storage.gsf.specific.EchotracSpecific;
+import org.apache.sis.storage.gsf.specific.MGD77Specific;
+import org.apache.sis.storage.gsf.specific.NOSHDBSpecific;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SBSensorSpecific extends StructClass {
+
+
+ private static final GroupLayout LAYOUT_GSFECHOTRACSPECIFIC;
+ private static final GroupLayout LAYOUT_GSFBATHY2000SPECIFIC;
+ private static final GroupLayout LAYOUT_GSFMGD77SPECIFIC;
+ private static final GroupLayout LAYOUT_GSFBDBSPECIFIC;
+ private static final GroupLayout LAYOUT_GSFNOSHDBSPECIFIC;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.unionLayout(
+ LAYOUT_GSFECHOTRACSPECIFIC = EchotracSpecific.LAYOUT.withName("gsfEchotracSpecific"),
+ LAYOUT_GSFBATHY2000SPECIFIC = EchotracSpecific.LAYOUT.withName("gsfBathy2000Specific"),
+ LAYOUT_GSFMGD77SPECIFIC = MGD77Specific.LAYOUT.withName("gsfMGD77Specific"),
+ LAYOUT_GSFBDBSPECIFIC = BDBSpecific.LAYOUT.withName("gsfBDBSpecific"),
+ LAYOUT_GSFNOSHDBSPECIFIC = NOSHDBSpecific.LAYOUT.withName("gsfNOSHDBSpecific")
+ ).withName("t_gsfSBSensorSpecific");
+
+ public SBSensorSpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SBSensorSpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfEchotracSpecific gsfEchotracSpecific
+ * }
+ */
+ public MemorySegment gsfEchotracSpecific() {
+ return struct.asSlice(0, LAYOUT_GSFECHOTRACSPECIFIC.byteSize());
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfEchotracSpecific gsfBathy2000Specific
+ * }
+ */
+ public MemorySegment gsfBathy2000Specific() {
+ return struct.asSlice(0, LAYOUT_GSFBATHY2000SPECIFIC.byteSize());
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfMGD77Specific gsfMGD77Specific
+ * }
+ */
+ public MemorySegment gsfMGD77Specific() {
+ return struct.asSlice(0, LAYOUT_GSFMGD77SPECIFIC.byteSize());
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfBDBSpecific gsfBDBSpecific
+ * }
+ */
+ public MemorySegment gsfBDBSpecific() {
+ return struct.asSlice(0, LAYOUT_GSFBDBSPECIFIC.byteSize());
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfNOSHDBSpecific gsfNOSHDBSpecific
+ * }
+ */
+ public MemorySegment gsfNOSHDBSpecific() {
+ return struct.asSlice(0, LAYOUT_GSFNOSHDBSPECIFIC.byteSize());
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SVP.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SVP.java
new file mode 100644
index 0000000000..0838e94b4a
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SVP.java
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SVP extends StructClass {
+
+ private static final GroupLayout OBSERVATION_TIMELAYOUT;
+ private static final GroupLayout APPLICATION_TIMELAYOUT;
+ private static final OfDouble LAYOUT_LATITUDE;
+ private static final OfDouble LAYOUT_LONGITUDE;
+ private static final OfInt LAYOUT_NUMBER_POINTS;
+ private static final AddressLayout LAYOUT_DEPTH;
+ private static final AddressLayout LAYOUT_SOUND_SPEED;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ OBSERVATION_TIMELAYOUT = TimeSpec.LAYOUT.withName("observation_time"),
+ APPLICATION_TIMELAYOUT = TimeSpec.LAYOUT.withName("application_time"),
+ LAYOUT_LATITUDE = GSF.C_DOUBLE.withName("latitude"),
+ LAYOUT_LONGITUDE = GSF.C_DOUBLE.withName("longitude"),
+ LAYOUT_NUMBER_POINTS = GSF.C_INT.withName("number_points"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_DEPTH = GSF.C_POINTER.withName("depth"),
+ LAYOUT_SOUND_SPEED = GSF.C_POINTER.withName("sound_speed")
+ ).withName("t_gsfSVP");
+
+ public SVP(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SVP(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public TimeSpec getObservationTime() {
+ return new TimeSpec(struct.asSlice(0, OBSERVATION_TIMELAYOUT.byteSize()));
+ }
+
+ public TimeSpec getApplicationTime() {
+ return new TimeSpec(struct.asSlice(16, APPLICATION_TIMELAYOUT.byteSize()));
+ }
+
+ public double getLatitude() {
+ return struct.get(LAYOUT_LATITUDE, 32);
+ }
+
+ public double getLongitude() {
+ return struct.get(LAYOUT_LONGITUDE, 40);
+ }
+
+ public int getNumberPoints() {
+ return struct.get(LAYOUT_NUMBER_POINTS, 48);
+ }
+
+ public double[] getDepth() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_DEPTH, 56);
+ return getDoubles(resolvedAddress, 0, getNumberPoints());
+ }
+
+ public double[] getSoundSpeed() {
+ final MemorySegment resolvedAddress = struct.get(LAYOUT_SOUND_SPEED, 64);
+ return getDoubles(resolvedAddress, 0, getNumberPoints());
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ScaleFactors.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ScaleFactors.java
new file mode 100644
index 0000000000..52d07fd544
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ScaleFactors.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class ScaleFactors extends StructClass{
+
+ private static final OfInt LAYOUT_NUMARRAYSUBRECORDS;
+ private static final SequenceLayout LAYOUT_SCALETABLE;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_NUMARRAYSUBRECORDS = GSF.C_INT.withName("numArraySubrecords"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_SCALETABLE = MemoryLayout.sequenceLayout(30, ScaleInfo.LAYOUT).withName("scaleTable")
+ ).withName("t_gsfScaleFactors");
+
+
+ public ScaleFactors(MemorySegment struct) {
+ super(struct);
+ }
+
+ public ScaleFactors(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int numArraySubrecords
+ * }
+ */
+ public int getNumArraySubrecords(){
+ return struct.get(LAYOUT_NUMARRAYSUBRECORDS, 0);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * gsfScaleInfo scaleTable[30]
+ * }
+ */
+ public ScaleInfo[] getScaleTables() {
+ return getObjects(8, 30, ScaleInfo.class);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ScaleInfo.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ScaleInfo.java
new file mode 100644
index 0000000000..1f533436ee
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/ScaleInfo.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class ScaleInfo extends StructClass {
+
+ private static final OfByte LAYOUT_COMPRESSIONFLAG;
+ private static final OfDouble LAYOUT_MULTIPLIER;
+ private static final OfDouble LAYOUT_OFFSET;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_COMPRESSIONFLAG = GSF.C_CHAR.withName("compressionFlag"),
+ MemoryLayout.paddingLayout(7),
+ LAYOUT_MULTIPLIER = GSF.C_DOUBLE.withName("multiplier"),
+ LAYOUT_OFFSET = GSF.C_DOUBLE.withName("offset")
+ ).withName("t_gsfScaleInfo");
+
+
+ public ScaleInfo(MemorySegment struct) {
+ super(struct);
+ }
+
+ public ScaleInfo(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char compressionFlag
+ * }
+ */
+ public byte getCompressionFlag() {
+ return struct.get(LAYOUT_COMPRESSIONFLAG, 0);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double multiplier
+ * }
+ */
+ public double getMultiplier() {
+ return struct.get(LAYOUT_MULTIPLIER, 8);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double offset
+ * }
+ */
+ public double getOffset() {
+ return struct.get(LAYOUT_OFFSET, 16);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SensorParameters.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SensorParameters.java
new file mode 100644
index 0000000000..21e2c69f1e
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SensorParameters.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SensorParameters extends StructClass {
+
+ private static final GroupLayout LAYOUT_PARAM_TIME;
+ private static final OfInt LAYOUT_NUMBER_PARAMETERS;
+ private static final SequenceLayout LAYOUT_PARAM_SIZE;
+ private static final SequenceLayout LAYOUT_PARAM;
+ private static final long param$OFFSET = 280;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_PARAM_TIME = TimeSpec.LAYOUT.withName("param_time"),
+ LAYOUT_NUMBER_PARAMETERS = GSF.C_INT.withName("number_parameters"),
+ LAYOUT_PARAM_SIZE = MemoryLayout.sequenceLayout(128, GSF.C_SHORT).withName("param_size"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_PARAM = MemoryLayout.sequenceLayout(128, GSF.C_POINTER).withName("param")
+ ).withName("t_gsfSensorParameters");
+
+ public SensorParameters(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SensorParameters(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * struct timespec param_time
+ * }
+ */
+ public TimeSpec getParamTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_PARAM_TIME.byteSize()));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int number_parameters
+ * }
+ */
+ public int getNumberParameters() {
+ return struct.get(LAYOUT_NUMBER_PARAMETERS, 16);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * short param_size[128]
+ * }
+ */
+ public short[] getParamSize() {
+ return getShorts(20, getNumberParameters());
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char *param[128]
+ * }
+ */
+ public String[] getParam() {
+ final short[] sizes = getParamSize();
+ final String[] params = new String[sizes.length];
+ final VarHandle handle = LAYOUT_PARAM.varHandle(sequenceElement());
+ for (int i = 0; i < sizes.length; i++) {
+ MemorySegment segment = (MemorySegment) handle.get(struct, 0L, i);
+ params[i] = segment.getString(0);
+ }
+ return params;
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SensorSpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SensorSpecific.java
new file mode 100644
index 0000000000..f3c7e7d54f
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SensorSpecific.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+import org.apache.sis.storage.gsf.specific.CmpSassSpecific;
+import org.apache.sis.storage.gsf.specific.DeltaTSpecific;
+import org.apache.sis.storage.gsf.specific.EM100Specific;
+import org.apache.sis.storage.gsf.specific.EM121ASpecific;
+import org.apache.sis.storage.gsf.specific.EM12Specific;
+import org.apache.sis.storage.gsf.specific.EM3RawSpecific;
+import org.apache.sis.storage.gsf.specific.EM3Specific;
+import org.apache.sis.storage.gsf.specific.EM4Specific;
+import org.apache.sis.storage.gsf.specific.EM950Specific;
+import org.apache.sis.storage.gsf.specific.ElacMkIISpecific;
+import org.apache.sis.storage.gsf.specific.GeoSwathPlusSpecific;
+import org.apache.sis.storage.gsf.specific.KMALLSpecific;
+import org.apache.sis.storage.gsf.specific.Klein5410BssSpecific;
+import org.apache.sis.storage.gsf.specific.R2SonicSpecific;
+import org.apache.sis.storage.gsf.specific.Reson7100Specific;
+import org.apache.sis.storage.gsf.specific.Reson8100Specific;
+import org.apache.sis.storage.gsf.specific.ResonTSeriesSpecific;
+import org.apache.sis.storage.gsf.specific.SBAmpSpecific;
+import org.apache.sis.storage.gsf.specific.SBBDBSpecific;
+import org.apache.sis.storage.gsf.specific.SBEchotracSpecific;
+import org.apache.sis.storage.gsf.specific.SBMGD77Specific;
+import org.apache.sis.storage.gsf.specific.SBNOSHDBSpecific;
+import org.apache.sis.storage.gsf.specific.SBNavisoundSpecific;
+import org.apache.sis.storage.gsf.specific.SeaBat8101Specific;
+import org.apache.sis.storage.gsf.specific.SeaBatIISpecific;
+import org.apache.sis.storage.gsf.specific.SeaBatSpecific;
+import org.apache.sis.storage.gsf.specific.SeaBeam2112Specific;
+import org.apache.sis.storage.gsf.specific.SeabeamSpecific;
+import org.apache.sis.storage.gsf.specific.SeamapSpecific;
+import org.apache.sis.storage.gsf.specific.TypeIIISpecific;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SensorSpecific extends StructClass{
+
+ public static final GroupLayout LAYOUT = MemoryLayout.unionLayout(
+ SeabeamSpecific.LAYOUT.withName("gsfSeaBeamSpecific"),
+ EM100Specific.LAYOUT.withName("gsfEM100Specific"),
+ EM121ASpecific.LAYOUT.withName("gsfEM121ASpecific"),
+ EM121ASpecific.LAYOUT.withName("gsfEM121Specific"),
+ SeaBatSpecific.LAYOUT.withName("gsfSeaBatSpecific"),
+ EM950Specific.LAYOUT.withName("gsfEM950Specific"),
+ EM950Specific.LAYOUT.withName("gsfEM1000Specific"),
+ SeamapSpecific.LAYOUT.withName("gsfSeamapSpecific"),
+ TypeIIISpecific.LAYOUT.withName("gsfTypeIIISeaBeamSpecific"),
+ TypeIIISpecific.LAYOUT.withName("gsfSASSSpecific"),
+ CmpSassSpecific.LAYOUT.withName("gsfCmpSassSpecific"),
+ SBAmpSpecific.LAYOUT.withName("gsfSBAmpSpecific"),
+ SeaBatIISpecific.LAYOUT.withName("gsfSeaBatIISpecific"),
+ SeaBat8101Specific.LAYOUT.withName("gsfSeaBat8101Specific"),
+ SeaBeam2112Specific.LAYOUT.withName("gsfSeaBeam2112Specific"),
+ ElacMkIISpecific.LAYOUT.withName("gsfElacMkIISpecific"),
+ EM3Specific.LAYOUT.withName("gsfEM3Specific"),
+ EM3RawSpecific.LAYOUT.withName("gsfEM3RawSpecific"),
+ Reson8100Specific.LAYOUT.withName("gsfReson8100Specific"),
+ Reson7100Specific.LAYOUT.withName("gsfReson7100Specific"),
+ ResonTSeriesSpecific.LAYOUT.withName("gsfResonTSeriesSpecific"),
+ EM4Specific.LAYOUT.withName("gsfEM4Specific"),
+ GeoSwathPlusSpecific.LAYOUT.withName("gsfGeoSwathPlusSpecific"),
+ Klein5410BssSpecific.LAYOUT.withName("gsfKlein5410BssSpecific"),
+ DeltaTSpecific.LAYOUT.withName("gsfDeltaTSpecific"),
+ EM12Specific.LAYOUT.withName("gsfEM12Specific"),
+ R2SonicSpecific.LAYOUT.withName("gsfR2SonicSpecific"),
+ KMALLSpecific.LAYOUT.withName("gsfKMALLSpecific"),
+ SBEchotracSpecific.LAYOUT.withName("gsfSBEchotracSpecific"),
+ SBEchotracSpecific.LAYOUT.withName("gsfSBBathy2000Specific"),
+ SBMGD77Specific.LAYOUT.withName("gsfSBMGD77Specific"),
+ SBBDBSpecific.LAYOUT.withName("gsfSBBDBSpecific"),
+ SBNOSHDBSpecific.LAYOUT.withName("gsfSBNOSHDBSpecific"),
+ SBEchotracSpecific.LAYOUT.withName("gsfSBPDDSpecific"),
+ SBNavisoundSpecific.LAYOUT.withName("gsfSBNavisoundSpecific")
+ ).withName("t_gsfSensorSpecific");
+
+ public SensorSpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SensorSpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SingleBeamPing.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SingleBeamPing.java
new file mode 100644
index 0000000000..79aed5d56d
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SingleBeamPing.java
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SingleBeamPing extends StructClass {
+
+ private static final GroupLayout LAYOUT_PING_TIME;
+ private static final OfDouble LAYOUT_LATITUDE;
+ private static final OfDouble LAYOUT_LONGITUDE;
+ private static final OfDouble LAYOUT_TIDE_CORRECTOR;
+ private static final OfDouble LAYOUT_DEPTH_CORRECTOR;
+ private static final OfDouble LAYOUT_HEADING;
+ private static final OfDouble LAYOUT_PITCH;
+ private static final OfDouble LAYOUT_ROLL;
+ private static final OfDouble LAYOUT_HEAVE;
+ private static final OfDouble LAYOUT_DEPTH;
+ private static final OfDouble LAYOUT_SOUND_SPEED_CORRECTION;
+ private static final OfShort LAYOUT_POSITIONING_SYSTEM_TYPE;
+ private static final OfInt LAYOUT_SENSOR_ID;
+ private static final GroupLayout LAYOUT_SENSOR_DATA;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_PING_TIME = TimeSpec.LAYOUT.withName("ping_time"),
+ LAYOUT_LATITUDE = GSF.C_DOUBLE.withName("latitude"),
+ LAYOUT_LONGITUDE = GSF.C_DOUBLE.withName("longitude"),
+ LAYOUT_TIDE_CORRECTOR = GSF.C_DOUBLE.withName("tide_corrector"),
+ LAYOUT_DEPTH_CORRECTOR = GSF.C_DOUBLE.withName("depth_corrector"),
+ LAYOUT_HEADING = GSF.C_DOUBLE.withName("heading"),
+ LAYOUT_PITCH = GSF.C_DOUBLE.withName("pitch"),
+ LAYOUT_ROLL = GSF.C_DOUBLE.withName("roll"),
+ LAYOUT_HEAVE = GSF.C_DOUBLE.withName("heave"),
+ LAYOUT_DEPTH = GSF.C_DOUBLE.withName("depth"),
+ LAYOUT_SOUND_SPEED_CORRECTION = GSF.C_DOUBLE.withName("sound_speed_correction"),
+ LAYOUT_POSITIONING_SYSTEM_TYPE = GSF.C_SHORT.withName("positioning_system_type"),
+ MemoryLayout.paddingLayout(2),
+ LAYOUT_SENSOR_ID = GSF.C_INT.withName("sensor_id"),
+ LAYOUT_SENSOR_DATA = SBSensorSpecific.LAYOUT.withName("sensor_data")
+ ).withName("t_gsfSingleBeamPing");
+
+ public SingleBeamPing(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SingleBeamPing(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * struct timespec ping_time
+ * }
+ */
+ public TimeSpec getPingTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_PING_TIME.byteSize()));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double latitude
+ * }
+ */
+ public double getLatitude() {
+ return struct.get(LAYOUT_LATITUDE, 16);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double longitude
+ * }
+ */
+ public double getLongitude() {
+ return struct.get(LAYOUT_LONGITUDE, 24);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double tide_corrector
+ * }
+ */
+ public double getTideCorrector() {
+ return struct.get(LAYOUT_TIDE_CORRECTOR, 32);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double depth_corrector
+ * }
+ */
+ public double getDepthCorrector() {
+ return struct.get(LAYOUT_DEPTH_CORRECTOR, 40);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double heading
+ * }
+ */
+ public double getHeading() {
+ return struct.get(LAYOUT_HEADING, 48);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double pitch
+ * }
+ */
+ public double getPitch() {
+ return struct.get(LAYOUT_PITCH, 56);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double roll
+ * }
+ */
+ public double getRoll() {
+ return struct.get(LAYOUT_ROLL, 64);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double heave
+ * }
+ */
+ public double getHeave() {
+ return struct.get(LAYOUT_HEAVE, 72);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double depth
+ * }
+ */
+ public double getDepth() {
+ return struct.get(LAYOUT_DEPTH, 80);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double sound_speed_correction
+ * }
+ */
+ public double getSoundSpeedCorrection() {
+ return struct.get(LAYOUT_SOUND_SPEED_CORRECTION, 88);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned short positioning_system_type
+ * }
+ */
+ public short getPositioningSystemType() {
+ return struct.get(LAYOUT_POSITIONING_SYSTEM_TYPE, 96);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int sensor_id
+ * }
+ */
+ public int getSensorId() {
+ return struct.get(LAYOUT_SENSOR_ID, 100);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * gsfSBSensorSpecific sensor_data
+ * }
+ */
+ public MemorySegment getSensorData() {
+ return struct.asSlice(104, LAYOUT_SENSOR_DATA.byteSize());
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/StructClass.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/StructClass.java
new file mode 100644
index 0000000000..bd0242df6f
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/StructClass.java
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.GroupLayout;
+import java.lang.foreign.MemoryLayout;
+import java.lang.foreign.MemorySegment;
+import java.lang.foreign.SegmentAllocator;
+import java.lang.foreign.StructLayout;
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.DoubleBuffer;
+import java.nio.IntBuffer;
+import java.nio.LongBuffer;
+import java.nio.ShortBuffer;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public abstract class StructClass {
+
+ protected final MemorySegment struct;
+
+ public StructClass(MemorySegment struct) {
+ this.struct = struct;
+ }
+
+ public StructClass(SegmentAllocator allocator) {
+ this.struct = allocator.allocate(getLayout());
+ }
+
+ protected abstract MemoryLayout getLayout();
+
+ public MemorySegment getMemorySegment() {
+ return struct;
+ }
+
+ @Override
+ public String toString() {
+ final Class<? extends StructClass> clazz = getClass();
+ final String name = clazz.getSimpleName();
+ final List<String> attributes = new ArrayList<>();
+
+ final MemoryLayout layout = getLayout();
+ if (layout instanceof StructLayout sl) {
+ for(MemoryLayout ml : sl.memberLayouts()) {
+ final String attName = ml.name().orElse(null);
+ if (attName != null) {
+ String result;
+ try {
+ Object value = clazz.getMethod("get" + toCamelCase(attName)).invoke(this);
+ if (value != null && value.getClass().isArray()) {
+ //pick the first 10 values
+ final int length = Array.getLength(value);
+ final StringBuilder sb = new StringBuilder("[");
+ for (int i = 0; i < 10 && i < length; i++) {
+ sb.append(Array.get(value, i));
+ sb.append(',');
+ }
+ sb.append("...]");
+ value = sb.toString();
+ }
+ result = String.valueOf(value);
+ } catch (NoSuchMethodException | SecurityException | IllegalAccessException | InvocationTargetException ex) {
+ result = "[Failed to get value]";
+ }
+ attributes.add(attName + " : " + result);
+ }
+ }
+ }
+
+ return toStringTree(name, attributes);
+ }
+
+ private static String toCamelCase(String str) {
+ final StringBuilder sb = new StringBuilder();
+ for (String s : str.split("_")) {
+ if (!s.isEmpty()) {
+ sb.append(Character.toUpperCase(s.charAt(0)));
+ sb.append(s.substring(1));
+ }
+ }
+ return sb.toString();
+ }
+
+ protected byte[] getBytes(int offset, int nb) {
+ return getBytes(struct, offset, nb);
+ }
+
+ protected static byte[] getBytes(MemorySegment segment, int offset, int nb) {
+ if (segment.address() == 0L) return null; //C null adress
+ final ByteBuffer db = segment.asSlice(offset, nb).asByteBuffer();
+ final byte[] dst = new byte[nb];
+ db.get(0, dst);
+ return dst;
+ }
+
+ protected short[] getShorts(int offset, int nb) {
+ return getShorts(struct, offset, nb);
+ }
+
+ protected static short[] getShorts(MemorySegment segment, int offset, int nb) {
+ if (segment.address() == 0L) return null; //C null adress
+ final ShortBuffer db = segment.asSlice(offset, nb*2).asByteBuffer().order(ByteOrder.LITTLE_ENDIAN).asShortBuffer();
+ final short[] dst = new short[nb];
+ db.get(0, dst);
+ return dst;
+ }
+
+ protected int[] getInts(int offset, int nb) {
+ return getInts(struct, offset, nb);
+ }
+
+ protected static int[] getInts(MemorySegment segment, int offset, int nb) {
+ if (segment.address() == 0L) return null; //C null adress
+ final IntBuffer db = segment.asSlice(offset, nb*2).asByteBuffer().order(ByteOrder.LITTLE_ENDIAN).asIntBuffer();
+ final int[] dst = new int[nb];
+ db.get(0, dst);
+ return dst;
+ }
+
+ protected long[] getLongs(int offset, int nb) {
+ return getLongs(struct, offset, nb);
+ }
+
+ protected static long[] getLongs(MemorySegment segment, int offset, int nb) {
+ if (segment.address() == 0L) return null; //C null adress
+ final LongBuffer db = segment.asSlice(offset, nb*2).asByteBuffer().order(ByteOrder.LITTLE_ENDIAN).asLongBuffer();
+ final long[] dst = new long[nb];
+ db.get(0, dst);
+ return dst;
+ }
+
+ protected double[] getDoubles(int offset, int nb) {
+ return getDoubles(struct, offset, nb);
+ }
+
+ protected static double[] getDoubles(MemorySegment segment, int offset, int nb) {
+ if (segment.address() == 0L) return null; //C null adress
+ final DoubleBuffer db = segment.asSlice(offset, nb*8).asByteBuffer().order(ByteOrder.LITTLE_ENDIAN).asDoubleBuffer();
+ final double[] dst = new double[nb];
+ db.get(0, dst);
+ return dst;
+ }
+
+ protected <T extends StructClass> T[] getObjects(int offset, int nb, Class<T> clazz) {
+ try {
+ final Constructor<T> constructor = clazz.getConstructor(MemorySegment.class);
+ final GroupLayout layout = (GroupLayout) clazz.getDeclaredField("LAYOUT").get(null);
+ final long byteSize = layout.byteSize();
+
+ final T[] table = (T[]) Array.newInstance(clazz, nb);
+ int off = offset;
+ for (int i = 0; i < nb; i++, off += byteSize) {
+ final MemorySegment segment = struct.asSlice(off, byteSize);
+ table[i] = constructor.newInstance(segment);
+ }
+ return table;
+ } catch (InstantiationException | NoSuchMethodException | NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException | InvocationTargetException ex) {
+ throw new IllegalStateException("Incorrect Struct class declaration", ex);
+ }
+ }
+
+ /**
+ * Returns a graphical representation of the specified objects. This representation can be
+ * printed to the {@linkplain System#out standard output stream} (for example) if it uses
+ * a monospaced font and supports unicode.
+ *
+ * @param root The root name of the tree to format.
+ * @param objects The objects to format as root children.
+ * @return A string representation of the tree.
+ */
+ protected static String toStringTree(String root, final Iterable<?> objects) {
+ final StringBuilder sb = new StringBuilder();
+ if (root != null) {
+ sb.append(root);
+ }
+ if (objects != null) {
+ final Iterator<?> ite = objects.iterator();
+ while (ite.hasNext()) {
+ sb.append('\n');
+ final Object next = ite.next();
+ final boolean last = !ite.hasNext();
+ sb.append(last ? "\u2514\u2500 " : "\u251C\u2500 ");
+
+ final String[] parts = String.valueOf(next).split("\n");
+ sb.append(parts[0]);
+ for (int k=1;k<parts.length;k++) {
+ sb.append('\n');
+ sb.append(last ? ' ' : '\u2502');
+ sb.append(" ");
+ sb.append(parts[k]);
+ }
+ }
+ }
+ return sb.toString();
+ }
+}
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SwathBathyPing.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SwathBathyPing.java
new file mode 100644
index 0000000000..939ce08cad
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SwathBathyPing.java
@@ -0,0 +1,354 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SwathBathyPing extends StructClass {
+
+ private static final GroupLayout LAYOUT_PING_TIME;
+ private static final OfDouble LAYOUT_LATITUDE;
+ private static final OfDouble LAYOUT_LONGITUDE;
+ private static final OfDouble LAYOUT_HEIGHT;
+ private static final OfDouble LAYOUT_SEP;
+ private static final OfShort LAYOUT_NUMBER_BEAMS;
+ private static final OfShort LAYOUT_CENTER_BEAM;
+ private static final OfShort LAYOUT_PING_FLAGS;
+ private static final OfShort LAYOUT_RESERVED;
+ private static final OfDouble LAYOUT_TIDE_CORRECTOR;
+ private static final OfDouble LAYOUT_GPS_TIDE_CORRECTOR;
+ private static final OfDouble LAYOUT_DEPTH_CORRECTOR;
+ private static final OfDouble LAYOUT_HEADING;
+ private static final OfDouble LAYOUT_PITCH;
+ private static final OfDouble LAYOUT_ROLL;
+ private static final OfDouble LAYOUT_HEAVE;
+ private static final OfDouble LAYOUT_COURSE;
+ private static final OfDouble LAYOUT_SPEED;
+ private static final GroupLayout LAYOUT_SCALEFACTORS;
+ private static final AddressLayout LAYOUT_DEPTH;
+ private static final AddressLayout LAYOUT_NOMINAL_DEPTH;
+ private static final AddressLayout LAYOUT_ACROSS_TRACK;
+ private static final AddressLayout LAYOUT_ALONG_TRACK;
+ private static final AddressLayout LAYOUT_TRAVEL_TIME;
+ private static final AddressLayout LAYOUT_BEAM_ANGLE;
+ private static final AddressLayout LAYOUT_MC_AMPLITUDE;
+ private static final AddressLayout LAYOUT_MR_AMPLITUDE;
+ private static final AddressLayout LAYOUT_ECHO_WIDTH;
+ private static final AddressLayout LAYOUT_QUALITY_FACTOR;
+ private static final AddressLayout LAYOUT_RECEIVE_HEAVE;
+ private static final AddressLayout LAYOUT_DEPTH_ERROR;
+ private static final AddressLayout LAYOUT_ACROSS_TRACK_ERROR;
+ private static final AddressLayout LAYOUT_ALONG_TRACK_ERROR;
+ private static final AddressLayout LAYOUT_QUALITY_FLAGS;
+ private static final AddressLayout LAYOUT_BEAM_FLAGS;
+ private static final AddressLayout LAYOUT_SIGNAL_TO_NOISE;
+ private static final AddressLayout LAYOUT_BEAM_ANGLE_FORWARD;
+ private static final AddressLayout LAYOUT_VERTICAL_ERROR;
+ private static final AddressLayout LAYOUT_HORIZONTAL_ERROR;
+ private static final AddressLayout LAYOUT_SECTOR_NUMBER;
+ private static final AddressLayout LAYOUT_DETECTION_INFO;
+ private static final AddressLayout LAYOUT_INCIDENT_BEAM_ADJ;
+ private static final AddressLayout LAYOUT_SYSTEM_CLEANING;
+ private static final AddressLayout LAYOUT_DOPPLER_CORR;
+ private static final AddressLayout LAYOUT_SONAR_VERT_UNCERT;
+ private static final AddressLayout LAYOUT_SONAR_HORZ_UNCERT;
+ private static final AddressLayout LAYOUT_DETECTION_WINDOW;
+ private static final AddressLayout LAYOUT_MEAN_ABS_COEFF;
+ private static final OfInt LAYOUT_SENSOR_ID;
+ private static final GroupLayout LAYOUT_SENSOR_DATA;
+ private static final AddressLayout LAYOUT_BRB_INTEN;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_PING_TIME = TimeSpec.LAYOUT.withName("ping_time"),
+ LAYOUT_LATITUDE = GSF.C_DOUBLE.withName("latitude"),
+ LAYOUT_LONGITUDE = GSF.C_DOUBLE.withName("longitude"),
+ LAYOUT_HEIGHT = GSF.C_DOUBLE.withName("height"),
+ LAYOUT_SEP = GSF.C_DOUBLE.withName("sep"),
+ LAYOUT_NUMBER_BEAMS = GSF.C_SHORT.withName("number_beams"),
+ LAYOUT_CENTER_BEAM = GSF.C_SHORT.withName("center_beam"),
+ LAYOUT_PING_FLAGS = GSF.C_SHORT.withName("ping_flags"),
+ LAYOUT_RESERVED = GSF.C_SHORT.withName("reserved"),
+ LAYOUT_TIDE_CORRECTOR = GSF.C_DOUBLE.withName("tide_corrector"),
+ LAYOUT_GPS_TIDE_CORRECTOR = GSF.C_DOUBLE.withName("gps_tide_corrector"),
+ LAYOUT_DEPTH_CORRECTOR = GSF.C_DOUBLE.withName("depth_corrector"),
+ LAYOUT_HEADING = GSF.C_DOUBLE.withName("heading"),
+ LAYOUT_PITCH = GSF.C_DOUBLE.withName("pitch"),
+ LAYOUT_ROLL = GSF.C_DOUBLE.withName("roll"),
+ LAYOUT_HEAVE = GSF.C_DOUBLE.withName("heave"),
+ LAYOUT_COURSE = GSF.C_DOUBLE.withName("course"),
+ LAYOUT_SPEED = GSF.C_DOUBLE.withName("speed"),
+ LAYOUT_SCALEFACTORS = ScaleFactors.LAYOUT.withName("scaleFactors"),
+ LAYOUT_DEPTH = GSF.C_POINTER.withName("depth"),
+ LAYOUT_NOMINAL_DEPTH = GSF.C_POINTER.withName("nominal_depth"),
+ LAYOUT_ACROSS_TRACK = GSF.C_POINTER.withName("across_track"),
+ LAYOUT_ALONG_TRACK = GSF.C_POINTER.withName("along_track"),
+ LAYOUT_TRAVEL_TIME = GSF.C_POINTER.withName("travel_time"),
+ LAYOUT_BEAM_ANGLE = GSF.C_POINTER.withName("beam_angle"),
+ LAYOUT_MC_AMPLITUDE = GSF.C_POINTER.withName("mc_amplitude"),
+ LAYOUT_MR_AMPLITUDE = GSF.C_POINTER.withName("mr_amplitude"),
+ LAYOUT_ECHO_WIDTH = GSF.C_POINTER.withName("echo_width"),
+ LAYOUT_QUALITY_FACTOR = GSF.C_POINTER.withName("quality_factor"),
+ LAYOUT_RECEIVE_HEAVE = GSF.C_POINTER.withName("receive_heave"),
+ LAYOUT_DEPTH_ERROR = GSF.C_POINTER.withName("depth_error"),
+ LAYOUT_ACROSS_TRACK_ERROR = GSF.C_POINTER.withName("across_track_error"),
+ LAYOUT_ALONG_TRACK_ERROR = GSF.C_POINTER.withName("along_track_error"),
+ LAYOUT_QUALITY_FLAGS = GSF.C_POINTER.withName("quality_flags"),
+ LAYOUT_BEAM_FLAGS = GSF.C_POINTER.withName("beam_flags"),
+ LAYOUT_SIGNAL_TO_NOISE = GSF.C_POINTER.withName("signal_to_noise"),
+ LAYOUT_BEAM_ANGLE_FORWARD = GSF.C_POINTER.withName("beam_angle_forward"),
+ LAYOUT_VERTICAL_ERROR = GSF.C_POINTER.withName("vertical_error"),
+ LAYOUT_HORIZONTAL_ERROR = GSF.C_POINTER.withName("horizontal_error"),
+ LAYOUT_SECTOR_NUMBER = GSF.C_POINTER.withName("sector_number"),
+ LAYOUT_DETECTION_INFO = GSF.C_POINTER.withName("detection_info"),
+ LAYOUT_INCIDENT_BEAM_ADJ = GSF.C_POINTER.withName("incident_beam_adj"),
+ LAYOUT_SYSTEM_CLEANING = GSF.C_POINTER.withName("system_cleaning"),
+ LAYOUT_DOPPLER_CORR = GSF.C_POINTER.withName("doppler_corr"),
+ LAYOUT_SONAR_VERT_UNCERT = GSF.C_POINTER.withName("sonar_vert_uncert"),
+ LAYOUT_SONAR_HORZ_UNCERT = GSF.C_POINTER.withName("sonar_horz_uncert"),
+ LAYOUT_DETECTION_WINDOW = GSF.C_POINTER.withName("detection_window"),
+ LAYOUT_MEAN_ABS_COEFF = GSF.C_POINTER.withName("mean_abs_coeff"),
+ LAYOUT_SENSOR_ID = GSF.C_INT.withName("sensor_id"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_SENSOR_DATA = SensorSpecific.LAYOUT.withName("sensor_data"),
+ LAYOUT_BRB_INTEN = GSF.C_POINTER.withName("brb_inten")
+ ).withName("t_gsfSwathBathyPing");
+
+ public SwathBathyPing(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SwathBathyPing(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public TimeSpec getPingTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_PING_TIME.byteSize()));
+ }
+
+ public double getLatitude() {
+ return struct.get(LAYOUT_LATITUDE, 16);
+ }
+
+ public double getLongitude() {
+ return struct.get(LAYOUT_LONGITUDE, 24);
+ }
+
+ public double getHeight() {
+ return struct.get(LAYOUT_HEIGHT, 32);
+ }
+
+ public double getSep() {
+ return struct.get(LAYOUT_SEP, 40);
+ }
+
+ public short getNumberBeams() {
+ return struct.get(LAYOUT_NUMBER_BEAMS, 48);
+ }
+
+ public short getCenterBeam() {
+ return struct.get(LAYOUT_CENTER_BEAM, 50);
+ }
+
+ public short getPingFlags() {
+ return struct.get(LAYOUT_PING_FLAGS, 52);
+ }
+
+ public short getReserved() {
+ return struct.get(LAYOUT_RESERVED, 54);
+ }
+
+ public double getTideCorrector() {
+ return struct.get(LAYOUT_TIDE_CORRECTOR, 56);
+ }
+
+ public double getGpsTildeCorrector() {
+ return struct.get(LAYOUT_GPS_TIDE_CORRECTOR, 64);
+ }
+
+ public double getDepthCorrector() {
+ return struct.get(LAYOUT_DEPTH_CORRECTOR, 72);
+ }
+
+ public double getHeading() {
+ return struct.get(LAYOUT_HEADING, 80);
+ }
+
+ public double getPitch() {
+ return struct.get(LAYOUT_PITCH, 88);
+ }
+
+ public double getRoll() {
+ return struct.get(LAYOUT_ROLL, 96);
+ }
+
+ public double getHeave() {
+ return struct.get(LAYOUT_HEAVE, 104);
+ }
+
+ public double getCourse() {
+ return struct.get(LAYOUT_COURSE, 112);
+ }
+
+ public double getSpeed() {
+ return struct.get(LAYOUT_SPEED, 120);
+ }
+
+ public ScaleFactors getScaleFactors() {
+ return new ScaleFactors(struct.asSlice(128, LAYOUT_SCALEFACTORS.byteSize()));
+ }
+
+ public double[] getDepth() {
+ return getDoubles(struct.get(LAYOUT_DEPTH, 856), 0, getNumberBeams());
+ }
+
+ public double[] getNominalDepth() {
+ return getDoubles(struct.get(LAYOUT_NOMINAL_DEPTH, 864), 0, getNumberBeams());
+ }
+
+ public double[] getAcrossTrack() {
+ return getDoubles(struct.get(LAYOUT_ACROSS_TRACK, 872), 0, getNumberBeams());
+ }
+
+ public double[] getAlongTrack() {
+ return getDoubles(struct.get(LAYOUT_ALONG_TRACK, 880), 0, getNumberBeams());
+ }
+
+ public double[] getTravelTime() {
+ return getDoubles(struct.get(LAYOUT_TRAVEL_TIME, 888), 0, getNumberBeams());
+ }
+
+ public double[] getBeamAngle() {
+ return getDoubles(struct.get(LAYOUT_BEAM_ANGLE, 896), 0, getNumberBeams());
+ }
+
+ public double[] getMcAmplitude() {
+ return getDoubles(struct.get(LAYOUT_MC_AMPLITUDE, 904), 0, getNumberBeams());
+ }
+
+ public double[] getMrAmplitude() {
+ return getDoubles(struct.get(LAYOUT_MR_AMPLITUDE, 912), 0, getNumberBeams());
+ }
+
+ public double[] getEchoWidth() {
+ return getDoubles(struct.get(LAYOUT_ECHO_WIDTH, 920), 0, getNumberBeams());
+ }
+
+ public double[] getQualityFactor() {
+ return getDoubles(struct.get(LAYOUT_QUALITY_FACTOR, 928), 0, getNumberBeams());
+ }
+
+ public double[] getReceiveHeave() {
+ return getDoubles(struct.get(LAYOUT_RECEIVE_HEAVE, 936), 0, getNumberBeams());
+ }
+
+ public double[] getDepthError() {
+ return getDoubles(struct.get(LAYOUT_DEPTH_ERROR, 944), 0, getNumberBeams());
+ }
+
+ public double[] getAcrossTrackError() {
+ return getDoubles(struct.get(LAYOUT_ACROSS_TRACK_ERROR, 952), 0, getNumberBeams());
+ }
+
+ public double[] getAlongTrackError() {
+ return getDoubles(struct.get(LAYOUT_ALONG_TRACK_ERROR, 960), 0, getNumberBeams());
+ }
+
+ public double[] getQualityFlags() {
+ return getDoubles(struct.get(LAYOUT_QUALITY_FLAGS, 968), 0, getNumberBeams());
+ }
+
+ public double[] getBeamFlags() {
+ return getDoubles(struct.get(LAYOUT_BEAM_FLAGS, 976), 0, getNumberBeams());
+ }
+
+ public double[] getSignalToNoise() {
+ return getDoubles(struct.get(LAYOUT_SIGNAL_TO_NOISE, 984), 0, getNumberBeams());
+ }
+
+ public double[] getBeamAngleForward() {
+ return getDoubles(struct.get(LAYOUT_BEAM_ANGLE_FORWARD, 992), 0, getNumberBeams());
+ }
+
+ public double[] getVerticalError() {
+ return getDoubles(struct.get(LAYOUT_VERTICAL_ERROR, 1000), 0, getNumberBeams());
+ }
+
+ public double[] getHorizontalError() {
+ return getDoubles(struct.get(LAYOUT_HORIZONTAL_ERROR, 1008), 0, getNumberBeams());
+ }
+
+ public double[] getSectorNumber() {
+ return getDoubles(struct.get(LAYOUT_SECTOR_NUMBER, 1016), 0, getNumberBeams());
+ }
+
+ public double[] getDetectionInfo() {
+ return getDoubles(struct.get(LAYOUT_DETECTION_INFO, 1024), 0, getNumberBeams());
+ }
+
+ public double[] getIncidentBeamAdj() {
+ return getDoubles(struct.get(LAYOUT_INCIDENT_BEAM_ADJ, 1032), 0, getNumberBeams());
+ }
+
+ public double[] getSystemCleaning() {
+ return getDoubles(struct.get(LAYOUT_SYSTEM_CLEANING, 1040), 0, getNumberBeams());
+ }
+
+ public double[] getDopplerCorr() {
+ return getDoubles(struct.get(LAYOUT_DOPPLER_CORR, 1048), 0, getNumberBeams());
+ }
+
+ public double[] getSonarVertUncert() {
+ return getDoubles(struct.get(LAYOUT_SONAR_VERT_UNCERT, 1056), 0, getNumberBeams());
+ }
+
+ public double[] getSonarHorzUncert() {
+ return getDoubles(struct.get(LAYOUT_SONAR_HORZ_UNCERT, 1064), 0, getNumberBeams());
+ }
+
+ public int[] getDetectionWindow() {
+ return getInts(struct.get(LAYOUT_DETECTION_WINDOW, 1072), 0, getNumberBeams());
+ }
+
+ public double[] getMeanAbsCoeff() {
+ return getDoubles(struct.get(LAYOUT_MEAN_ABS_COEFF, 1080), 0, getNumberBeams());
+ }
+
+ public int getSensorId() {
+ return struct.get(LAYOUT_SENSOR_ID, 1088);
+ }
+
+ //causes JVM to crash
+// public SensorSpecific getSensorData() {
+// return new SensorSpecific(struct.asSlice(1096, sensor_dataLAYOUT.byteSize()));
+// }
+
+ //causes JVM to crash
+// public MemorySegment getBrbInten() {
+// return struct.get(brb_intenLAYOUT, 3008);
+// }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SwathBathySummary.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SwathBathySummary.java
new file mode 100644
index 0000000000..bbed8e1f13
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/SwathBathySummary.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class SwathBathySummary extends StructClass{
+
+ private static final GroupLayout LAYOUT_START_TIME;
+ private static final GroupLayout LAYOUT_END_TIME;
+ private static final OfDouble LAYOUT_MIN_LATITUDE;
+ private static final OfDouble LAYOUT_MIN_LONGITUDE;
+ private static final OfDouble LAYOUT_MAX_LATITUDE;
+ private static final OfDouble LAYOUT_MAX_LONGITUDE;
+ private static final OfDouble LAYOUT_MIN_DEPTH;
+ private static final OfDouble LAYOUT_MAX_DEPTH;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_START_TIME = TimeSpec.LAYOUT.withName("start_time"),
+ LAYOUT_END_TIME = TimeSpec.LAYOUT.withName("end_time"),
+ LAYOUT_MIN_LATITUDE = GSF.C_DOUBLE.withName("min_latitude"),
+ LAYOUT_MIN_LONGITUDE = GSF.C_DOUBLE.withName("min_longitude"),
+ LAYOUT_MAX_LATITUDE = GSF.C_DOUBLE.withName("max_latitude"),
+ LAYOUT_MAX_LONGITUDE = GSF.C_DOUBLE.withName("max_longitude"),
+ LAYOUT_MIN_DEPTH = GSF.C_DOUBLE.withName("min_depth"),
+ LAYOUT_MAX_DEPTH = GSF.C_DOUBLE.withName("max_depth")
+ ).withName("t_gsfSwathBathySummary");
+
+ public SwathBathySummary(MemorySegment struct) {
+ super(struct);
+ }
+
+ public SwathBathySummary(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public TimeSpec getStartTime() {
+ return new TimeSpec(struct.asSlice(0, LAYOUT_START_TIME.byteSize()));
+ }
+
+ public TimeSpec getEndTime() {
+ return new TimeSpec(struct.asSlice(16, LAYOUT_END_TIME.byteSize()));
+ }
+
+ public double getMinLatitude() {
+ return struct.get(LAYOUT_MIN_LATITUDE, 32);
+ }
+
+ public double getMinLongitude() {
+ return struct.get(LAYOUT_MIN_LONGITUDE, 40);
+ }
+
+ public double getMaxLatitude() {
+ return struct.get(LAYOUT_MAX_LATITUDE, 48);
+ }
+
+ public double getMaxLongitude() {
+ return struct.get(LAYOUT_MAX_LONGITUDE, 56);
+ }
+
+ public double getMinDepth() {
+ return struct.get(LAYOUT_MIN_DEPTH, 64);
+ }
+
+ public double getMaxDepth() {
+ return struct.get(LAYOUT_MAX_DEPTH, 72);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/TimeSpec.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/TimeSpec.java
new file mode 100644
index 0000000000..c36e817bf9
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/TimeSpec.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf;
+
+import java.lang.foreign.GroupLayout;
+import java.lang.foreign.MemoryLayout;
+import java.lang.foreign.MemorySegment;
+import java.lang.foreign.SegmentAllocator;
+import java.lang.foreign.ValueLayout.OfLong;
+
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class TimeSpec extends StructClass{
+
+ private static final OfLong tv_secLAYOUT = GSF.C_LONG.withName("tv_sec");
+ private static final OfLong tv_nsecLAYOUT = GSF.C_LONG.withName("tv_nsec");
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ tv_secLAYOUT,
+ tv_nsecLAYOUT
+ ).withName("timespec");
+
+ public TimeSpec(MemorySegment struct) {
+ super(struct);
+ }
+
+ public TimeSpec(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ public long getTvSec() {
+ return struct.get(tv_secLAYOUT, 0L);
+ }
+
+ public long getTvNsec() {
+ return struct.get(tv_nsecLAYOUT, 8L);
+ }
+
+}
\ No newline at end of file
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/BDBSpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/BDBSpecific.java
new file mode 100644
index 0000000000..527b9c6d8d
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/BDBSpecific.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class BDBSpecific extends StructClass {
+
+ private static final OfInt LAYOUT_DOC_NO;
+ private static final OfByte LAYOUT_EVAL;
+ private static final OfByte LAYOUT_CLASSIFICATION;
+ private static final OfByte LAYOUT_TRACK_ADJ_FLAG;
+ private static final OfByte LAYOUT_SOURCE_FLAG;
+ private static final OfByte LAYOUT_PT_OR_TRACK_LN;
+ private static final OfByte LAYOUT_DATUM_FLAG;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_DOC_NO = GSF.C_INT.withName("doc_no"),
+ LAYOUT_EVAL = GSF.C_CHAR.withName("eval"),
+ LAYOUT_CLASSIFICATION = GSF.C_CHAR.withName("classification"),
+ LAYOUT_TRACK_ADJ_FLAG = GSF.C_CHAR.withName("track_adj_flag"),
+ LAYOUT_SOURCE_FLAG = GSF.C_CHAR.withName("source_flag"),
+ LAYOUT_PT_OR_TRACK_LN = GSF.C_CHAR.withName("pt_or_track_ln"),
+ LAYOUT_DATUM_FLAG = GSF.C_CHAR.withName("datum_flag"),
+ MemoryLayout.paddingLayout(2)
+ ).withName("t_gsfBDBSpecific");
+
+ public BDBSpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public BDBSpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int doc_no
+ * }
+ */
+ public int getDocNo() {
+ return struct.get(LAYOUT_DOC_NO, 0);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char eval
+ * }
+ */
+ public byte getEval() {
+ return struct.get(LAYOUT_EVAL, 4);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char classification
+ * }
+ */
+ public byte getClassification() {
+ return struct.get(LAYOUT_CLASSIFICATION, 5);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char track_adj_flag
+ * }
+ */
+ public byte getTrackAdjFlag() {
+ return struct.get(LAYOUT_TRACK_ADJ_FLAG, 6);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char source_flag
+ * }
+ */
+ public byte getSourceFlag() {
+ return struct.get(LAYOUT_SOURCE_FLAG, 7);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char pt_or_track_ln
+ * }
+ */
+ public byte getPtOrTrackln() {
+ return struct.get(LAYOUT_PT_OR_TRACK_LN, 8);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char datum_flag
+ * }
+ */
+ public byte getDatumFlag() {
+ return struct.get(LAYOUT_DATUM_FLAG, 9);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/CmpSassSpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/CmpSassSpecific.java
new file mode 100644
index 0000000000..2e713370ca
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/CmpSassSpecific.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class CmpSassSpecific extends StructClass {
+
+ private static final OfDouble LAYOUT_LFREQ;
+ private static final OfDouble LAYOUT_LNTENS;
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_LFREQ = GSF.C_DOUBLE.withName("lfreq"),
+ LAYOUT_LNTENS = GSF.C_DOUBLE.withName("lntens")
+ ).withName("t_gsfCmpSassSpecific");
+
+
+ public CmpSassSpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public CmpSassSpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double lfreq
+ * }
+ */
+ public double getLfreq() {
+ return struct.get(LAYOUT_LFREQ, 0);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double lntens
+ * }
+ */
+ public double getLntens() {
+ return struct.get(LAYOUT_LNTENS, 8);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/DeltaTSpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/DeltaTSpecific.java
new file mode 100644
index 0000000000..0638d5bffe
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/DeltaTSpecific.java
@@ -0,0 +1,405 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+import org.apache.sis.storage.gsf.TimeSpec;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class DeltaTSpecific extends StructClass {
+
+ private static final SequenceLayout LAYOUT_DECODE_FILE_TYPE;
+ private static final OfByte LAYOUT_VERSION;
+ private static final OfInt LAYOUT_PING_BYTE_SIZE;
+ private static final GroupLayout LAYOUT_INTERROGATION_TIME;
+ private static final OfInt LAYOUT_SAMPLES_PER_BEAM;
+ private static final OfDouble LAYOUT_SECTOR_SIZE;
+ private static final OfDouble LAYOUT_START_ANGLE;
+ private static final OfDouble LAYOUT_ANGLE_INCREMENT;
+ private static final OfInt LAYOUT_ACOUSTIC_RANGE;
+ private static final OfInt LAYOUT_ACOUSTIC_FREQUENCY;
+ private static final OfDouble LAYOUT_SOUND_VELOCITY;
+ private static final OfDouble LAYOUT_RANGE_RESOLUTION;
+ private static final OfDouble LAYOUT_PROFILE_TILT_ANGLE;
+ private static final OfDouble LAYOUT_REPETITION_RATE;
+ private static final OfLong LAYOUT_PING_NUMBER;
+ private static final OfByte LAYOUT_INTENSITY_FLAG;
+ private static final OfDouble LAYOUT_PING_LATENCY;
+ private static final OfDouble LAYOUT_DATA_LATENCY;
+ private static final OfByte LAYOUT_SAMPLE_RATE_FLAG;
+ private static final OfByte LAYOUT_OPTION_FLAGS;
+ private static final OfInt LAYOUT_NUM_PINGS_AVG;
+ private static final OfDouble LAYOUT_CENTER_PING_TIME_OFFSET;
+ private static final OfByte LAYOUT_USER_DEFINED_BYTE;
+ private static final OfDouble LAYOUT_ALTITUDE;
+ private static final OfByte LAYOUT_EXTERNAL_SENSOR_FLAGS;
+ private static final OfDouble LAYOUT_PULSE_LENGTH;
+ private static final OfDouble LAYOUT_FORE_AFT_BEAMWIDTH;
+ private static final OfDouble LAYOUT_ATHWARTSHIPS_BEAMWIDTH;
+ private static final SequenceLayout LAYOUT_SPARSE;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_DECODE_FILE_TYPE = MemoryLayout.sequenceLayout(4, GSF.C_CHAR).withName("decode_file_type"),
+ LAYOUT_VERSION = GSF.C_CHAR.withName("version"),
+ MemoryLayout.paddingLayout(3),
+ LAYOUT_PING_BYTE_SIZE = GSF.C_INT.withName("ping_byte_size"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_INTERROGATION_TIME = TimeSpec.LAYOUT.withName("interrogation_time"),
+ LAYOUT_SAMPLES_PER_BEAM = GSF.C_INT.withName("samples_per_beam"),
+ MemoryLayout.paddingLayout(4),
+ LAYOUT_SECTOR_SIZE = GSF.C_DOUBLE.withName("sector_size"),
+ LAYOUT_START_ANGLE = GSF.C_DOUBLE.withName("start_angle"),
+ LAYOUT_ANGLE_INCREMENT = GSF.C_DOUBLE.withName("angle_increment"),
+ LAYOUT_ACOUSTIC_RANGE = GSF.C_INT.withName("acoustic_range"),
+ LAYOUT_ACOUSTIC_FREQUENCY = GSF.C_INT.withName("acoustic_frequency"),
+ LAYOUT_SOUND_VELOCITY = GSF.C_DOUBLE.withName("sound_velocity"),
+ LAYOUT_RANGE_RESOLUTION = GSF.C_DOUBLE.withName("range_resolution"),
+ LAYOUT_PROFILE_TILT_ANGLE = GSF.C_DOUBLE.withName("profile_tilt_angle"),
+ LAYOUT_REPETITION_RATE = GSF.C_DOUBLE.withName("repetition_rate"),
+ LAYOUT_PING_NUMBER = GSF.C_LONG.withName("ping_number"),
+ LAYOUT_INTENSITY_FLAG = GSF.C_CHAR.withName("intensity_flag"),
+ MemoryLayout.paddingLayout(7),
+ LAYOUT_PING_LATENCY = GSF.C_DOUBLE.withName("ping_latency"),
+ LAYOUT_DATA_LATENCY = GSF.C_DOUBLE.withName("data_latency"),
+ LAYOUT_SAMPLE_RATE_FLAG = GSF.C_CHAR.withName("sample_rate_flag"),
+ LAYOUT_OPTION_FLAGS = GSF.C_CHAR.withName("option_flags"),
+ MemoryLayout.paddingLayout(2),
+ LAYOUT_NUM_PINGS_AVG = GSF.C_INT.withName("num_pings_avg"),
+ LAYOUT_CENTER_PING_TIME_OFFSET = GSF.C_DOUBLE.withName("center_ping_time_offset"),
+ LAYOUT_USER_DEFINED_BYTE = GSF.C_CHAR.withName("user_defined_byte"),
+ MemoryLayout.paddingLayout(7),
+ LAYOUT_ALTITUDE = GSF.C_DOUBLE.withName("altitude"),
+ LAYOUT_EXTERNAL_SENSOR_FLAGS = GSF.C_CHAR.withName("external_sensor_flags"),
+ MemoryLayout.paddingLayout(7),
+ LAYOUT_PULSE_LENGTH = GSF.C_DOUBLE.withName("pulse_length"),
+ LAYOUT_FORE_AFT_BEAMWIDTH = GSF.C_DOUBLE.withName("fore_aft_beamwidth"),
+ LAYOUT_ATHWARTSHIPS_BEAMWIDTH = GSF.C_DOUBLE.withName("athwartships_beamwidth"),
+ LAYOUT_SPARSE = MemoryLayout.sequenceLayout(32, GSF.C_CHAR).withName("spare")
+ ).withName("t_gsfDeltaTSpecific");
+
+ public DeltaTSpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public DeltaTSpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char decode_file_type[4]
+ * }
+ */
+ public String getDecodeFileType() {
+ return new String(getBytes(0, 4));
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char version
+ * }
+ */
+ public byte getVersion() {
+ return struct.get(LAYOUT_VERSION, 4);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_byte_size
+ * }
+ */
+ public int ping_byte_size() {
+ return struct.get(LAYOUT_PING_BYTE_SIZE, 8);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * struct timespec interrogation_time
+ * }
+ */
+ public MemorySegment getInterrogationTime() {
+ return struct.asSlice(16, LAYOUT_INTERROGATION_TIME.byteSize());
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int samples_per_beam
+ * }
+ */
+ public int getSamplesPerBeam() {
+ return struct.get(LAYOUT_SAMPLES_PER_BEAM, 32);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double sector_size
+ * }
+ */
+ public double getSectorSize() {
+ return struct.get(LAYOUT_SECTOR_SIZE, 40);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double start_angle
+ * }
+ */
+ public double getStartAngle() {
+ return struct.get(LAYOUT_START_ANGLE, 48);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double angle_increment
+ * }
+ */
+ public double getAngleIncrement() {
+ return struct.get(LAYOUT_ANGLE_INCREMENT, 56);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int acoustic_range
+ * }
+ */
+ public int getAcousticRange() {
+ return struct.get(LAYOUT_ACOUSTIC_RANGE, 64);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int acoustic_frequency
+ * }
+ */
+ public int getAcousticFrequency() {
+ return struct.get(LAYOUT_ACOUSTIC_FREQUENCY, 68);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double sound_velocity
+ * }
+ */
+ public double getSoundVelocity() {
+ return struct.get(LAYOUT_SOUND_VELOCITY, 72);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double range_resolution
+ * }
+ */
+ public double getRangeResolution() {
+ return struct.get(LAYOUT_RANGE_RESOLUTION, 80);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double profile_tilt_angle
+ * }
+ */
+ public double getProfileTiltAngle() {
+ return struct.get(LAYOUT_PROFILE_TILT_ANGLE, 88);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double repetition_rate
+ * }
+ */
+ public double getRepetitionRate() {
+ return struct.get(LAYOUT_REPETITION_RATE, 96);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned long ping_number
+ * }
+ */
+ public long getPingNumber() {
+ return struct.get(LAYOUT_PING_NUMBER, 104);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char intensity_flag
+ * }
+ */
+ public byte getIntensityFlag() {
+ return struct.get(LAYOUT_INTENSITY_FLAG, 112);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double ping_latency
+ * }
+ */
+ public double getPingLatency() {
+ return struct.get(LAYOUT_PING_LATENCY, 120);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double data_latency
+ * }
+ */
+ public double getDataLatency() {
+ return struct.get(LAYOUT_DATA_LATENCY, 128);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char sample_rate_flag
+ * }
+ */
+ public byte getSampleRateFlag() {
+ return struct.get(LAYOUT_SAMPLE_RATE_FLAG, 136);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char option_flags
+ * }
+ */
+ public byte getOptionFlags() {
+ return struct.get(LAYOUT_OPTION_FLAGS, 137);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int num_pings_avg
+ * }
+ */
+ public int getNumPingsAvg() {
+ return struct.get(LAYOUT_NUM_PINGS_AVG, 140);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double center_ping_time_offset
+ * }
+ */
+ public double getCenterPingTimeOffset() {
+ return struct.get(LAYOUT_CENTER_PING_TIME_OFFSET, 144);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char user_defined_byte
+ * }
+ */
+ public byte getUserDefinedByte() {
+ return struct.get(LAYOUT_USER_DEFINED_BYTE, 152);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double altitude
+ * }
+ */
+ public double getAltitude() {
+ return struct.get(LAYOUT_ALTITUDE, 160);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char external_sensor_flags
+ * }
+ */
+ public byte getExternalSensorFlags() {
+ return struct.get(LAYOUT_EXTERNAL_SENSOR_FLAGS, 168);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double pulse_length
+ * }
+ */
+ public double getPulseLength() {
+ return struct.get(LAYOUT_PULSE_LENGTH, 176);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double fore_aft_beamwidth
+ * }
+ */
+ public double getForeAftBeamwidth() {
+ return struct.get(LAYOUT_FORE_AFT_BEAMWIDTH, 184);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double athwartships_beamwidth
+ * }
+ */
+ public double getAthwartshipsBeamwidth() {
+ return struct.get(LAYOUT_ATHWARTSHIPS_BEAMWIDTH, 192);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public String getSpare() {
+ return new String(getBytes(200, 32));
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM100Specific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM100Specific.java
new file mode 100644
index 0000000000..8f50c7c057
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM100Specific.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM100Specific extends StructClass {
+
+ private static final OfDouble LAYOUT_SHIP_PITCH;
+ private static final OfDouble LAYOUT_TRANSDUCER_PITCH;
+ private static final OfInt LAYOUT_MODE;
+ private static final OfInt LAYOUT_POWER;
+ private static final OfInt LAYOUT_ATTENUATION;
+ private static final OfInt LAYOUT_TVG;
+ private static final OfInt LAYOUT_PULSE_LENGTH;
+ private static final OfInt LAYOUT_COUNTER;
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ LAYOUT_SHIP_PITCH = GSF.C_DOUBLE.withName("ship_pitch"),
+ LAYOUT_TRANSDUCER_PITCH = GSF.C_DOUBLE.withName("transducer_pitch"),
+ LAYOUT_MODE = GSF.C_INT.withName("mode"),
+ LAYOUT_POWER = GSF.C_INT.withName("power"),
+ LAYOUT_ATTENUATION = GSF.C_INT.withName("attenuation"),
+ LAYOUT_TVG = GSF.C_INT.withName("tvg"),
+ LAYOUT_PULSE_LENGTH = GSF.C_INT.withName("pulse_length"),
+ LAYOUT_COUNTER = GSF.C_INT.withName("counter")
+ ).withName("t_gsfEM100Specific");
+
+ public EM100Specific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM100Specific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ /**
+ * The layout of this struct
+ */
+ public static final GroupLayout layout() {
+ return LAYOUT;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double ship_pitch
+ * }
+ */
+ public double getShipPitch() {
+ return struct.get(LAYOUT_SHIP_PITCH, 0);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double transducer_pitch
+ * }
+ */
+ public double getTransducerPitch() {
+ return struct.get(LAYOUT_TRANSDUCER_PITCH, 8);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public int getMode() {
+ return struct.get(LAYOUT_MODE, 16);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int power
+ * }
+ */
+ public int getPower() {
+ return struct.get(LAYOUT_POWER, 20);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int attenuation
+ * }
+ */
+ public int getAttenuation() {
+ return struct.get(LAYOUT_ATTENUATION, 24);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int tvg
+ * }
+ */
+ public int getTvg() {
+ return struct.get(LAYOUT_TVG, 28);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int pulse_length
+ * }
+ */
+ public int getPulseLength() {
+ return struct.get(LAYOUT_PULSE_LENGTH, 32);
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int counter
+ * }
+ */
+ public int getCounter() {
+ return struct.get(LAYOUT_COUNTER, 36);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM121ASpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM121ASpecific.java
new file mode 100644
index 0000000000..64c191ee2d
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM121ASpecific.java
@@ -0,0 +1,454 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM121ASpecific extends StructClass {
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_INT.withName("ping_number"),
+ GSF.C_INT.withName("mode"),
+ GSF.C_INT.withName("valid_beams"),
+ GSF.C_INT.withName("pulse_length"),
+ GSF.C_INT.withName("beam_width"),
+ GSF.C_INT.withName("tx_power"),
+ GSF.C_INT.withName("tx_status"),
+ GSF.C_INT.withName("rx_status"),
+ GSF.C_DOUBLE.withName("surface_velocity")
+ ).withName("t_gsfEM121ASpecific");
+
+ public EM121ASpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM121ASpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfInt ping_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("ping_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final OfInt ping_numberLAYOUT() {
+ return ping_numberLAYOUT;
+ }
+
+ private static final long ping_number$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final long ping_number$offset() {
+ return ping_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static int ping_number(MemorySegment struct) {
+ return struct.get(ping_numberLAYOUT, ping_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static void ping_number(MemorySegment struct, int fieldValue) {
+ struct.set(ping_numberLAYOUT, ping_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt modeLAYOUT = (OfInt)LAYOUT.select(groupElement("mode"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static final OfInt modeLAYOUT() {
+ return modeLAYOUT;
+ }
+
+ private static final long mode$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static final long mode$offset() {
+ return mode$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static int mode(MemorySegment struct) {
+ return struct.get(modeLAYOUT, mode$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static void mode(MemorySegment struct, int fieldValue) {
+ struct.set(modeLAYOUT, mode$OFFSET, fieldValue);
+ }
+
+ private static final OfInt valid_beamsLAYOUT = (OfInt)LAYOUT.select(groupElement("valid_beams"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static final OfInt valid_beamsLAYOUT() {
+ return valid_beamsLAYOUT;
+ }
+
+ private static final long valid_beams$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static final long valid_beams$offset() {
+ return valid_beams$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static int valid_beams(MemorySegment struct) {
+ return struct.get(valid_beamsLAYOUT, valid_beams$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static void valid_beams(MemorySegment struct, int fieldValue) {
+ struct.set(valid_beamsLAYOUT, valid_beams$OFFSET, fieldValue);
+ }
+
+ private static final OfInt pulse_lengthLAYOUT = (OfInt)LAYOUT.select(groupElement("pulse_length"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int pulse_length
+ * }
+ */
+ public static final OfInt pulse_lengthLAYOUT() {
+ return pulse_lengthLAYOUT;
+ }
+
+ private static final long pulse_length$OFFSET = 12;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int pulse_length
+ * }
+ */
+ public static final long pulse_length$offset() {
+ return pulse_length$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int pulse_length
+ * }
+ */
+ public static int pulse_length(MemorySegment struct) {
+ return struct.get(pulse_lengthLAYOUT, pulse_length$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int pulse_length
+ * }
+ */
+ public static void pulse_length(MemorySegment struct, int fieldValue) {
+ struct.set(pulse_lengthLAYOUT, pulse_length$OFFSET, fieldValue);
+ }
+
+ private static final OfInt beam_widthLAYOUT = (OfInt)LAYOUT.select(groupElement("beam_width"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int beam_width
+ * }
+ */
+ public static final OfInt beam_widthLAYOUT() {
+ return beam_widthLAYOUT;
+ }
+
+ private static final long beam_width$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int beam_width
+ * }
+ */
+ public static final long beam_width$offset() {
+ return beam_width$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int beam_width
+ * }
+ */
+ public static int beam_width(MemorySegment struct) {
+ return struct.get(beam_widthLAYOUT, beam_width$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int beam_width
+ * }
+ */
+ public static void beam_width(MemorySegment struct, int fieldValue) {
+ struct.set(beam_widthLAYOUT, beam_width$OFFSET, fieldValue);
+ }
+
+ private static final OfInt tx_powerLAYOUT = (OfInt)LAYOUT.select(groupElement("tx_power"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int tx_power
+ * }
+ */
+ public static final OfInt tx_powerLAYOUT() {
+ return tx_powerLAYOUT;
+ }
+
+ private static final long tx_power$OFFSET = 20;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int tx_power
+ * }
+ */
+ public static final long tx_power$offset() {
+ return tx_power$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int tx_power
+ * }
+ */
+ public static int tx_power(MemorySegment struct) {
+ return struct.get(tx_powerLAYOUT, tx_power$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int tx_power
+ * }
+ */
+ public static void tx_power(MemorySegment struct, int fieldValue) {
+ struct.set(tx_powerLAYOUT, tx_power$OFFSET, fieldValue);
+ }
+
+ private static final OfInt tx_statusLAYOUT = (OfInt)LAYOUT.select(groupElement("tx_status"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int tx_status
+ * }
+ */
+ public static final OfInt tx_statusLAYOUT() {
+ return tx_statusLAYOUT;
+ }
+
+ private static final long tx_status$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int tx_status
+ * }
+ */
+ public static final long tx_status$offset() {
+ return tx_status$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int tx_status
+ * }
+ */
+ public static int tx_status(MemorySegment struct) {
+ return struct.get(tx_statusLAYOUT, tx_status$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int tx_status
+ * }
+ */
+ public static void tx_status(MemorySegment struct, int fieldValue) {
+ struct.set(tx_statusLAYOUT, tx_status$OFFSET, fieldValue);
+ }
+
+ private static final OfInt rx_statusLAYOUT = (OfInt)LAYOUT.select(groupElement("rx_status"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int rx_status
+ * }
+ */
+ public static final OfInt rx_statusLAYOUT() {
+ return rx_statusLAYOUT;
+ }
+
+ private static final long rx_status$OFFSET = 28;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int rx_status
+ * }
+ */
+ public static final long rx_status$offset() {
+ return rx_status$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int rx_status
+ * }
+ */
+ public static int rx_status(MemorySegment struct) {
+ return struct.get(rx_statusLAYOUT, rx_status$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int rx_status
+ * }
+ */
+ public static void rx_status(MemorySegment struct, int fieldValue) {
+ struct.set(rx_statusLAYOUT, rx_status$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble surface_velocityLAYOUT = (OfDouble)LAYOUT.select(groupElement("surface_velocity"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static final OfDouble surface_velocityLAYOUT() {
+ return surface_velocityLAYOUT;
+ }
+
+ private static final long surface_velocity$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static final long surface_velocity$offset() {
+ return surface_velocity$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static double surface_velocity(MemorySegment struct) {
+ return struct.get(surface_velocityLAYOUT, surface_velocity$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static void surface_velocity(MemorySegment struct, double fieldValue) {
+ struct.set(surface_velocityLAYOUT, surface_velocity$OFFSET, fieldValue);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM12Specific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM12Specific.java
new file mode 100644
index 0000000000..7524e0691f
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM12Specific.java
@@ -0,0 +1,356 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM12Specific extends StructClass {
+
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_INT.withName("ping_number"),
+ GSF.C_INT.withName("resolution"),
+ GSF.C_INT.withName("ping_quality"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("sound_velocity"),
+ GSF.C_INT.withName("mode"),
+ MemoryLayout.sequenceLayout(32, GSF.C_CHAR).withName("spare"),
+ MemoryLayout.paddingLayout(4)
+ ).withName("t_gsfEM12Specific");
+
+ public EM12Specific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM12Specific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfInt ping_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("ping_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final OfInt ping_numberLAYOUT() {
+ return ping_numberLAYOUT;
+ }
+
+ private static final long ping_number$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final long ping_number$offset() {
+ return ping_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static int ping_number(MemorySegment struct) {
+ return struct.get(ping_numberLAYOUT, ping_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static void ping_number(MemorySegment struct, int fieldValue) {
+ struct.set(ping_numberLAYOUT, ping_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt resolutionLAYOUT = (OfInt)LAYOUT.select(groupElement("resolution"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int resolution
+ * }
+ */
+ public static final OfInt resolutionLAYOUT() {
+ return resolutionLAYOUT;
+ }
+
+ private static final long resolution$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int resolution
+ * }
+ */
+ public static final long resolution$offset() {
+ return resolution$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int resolution
+ * }
+ */
+ public static int resolution(MemorySegment struct) {
+ return struct.get(resolutionLAYOUT, resolution$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int resolution
+ * }
+ */
+ public static void resolution(MemorySegment struct, int fieldValue) {
+ struct.set(resolutionLAYOUT, resolution$OFFSET, fieldValue);
+ }
+
+ private static final OfInt ping_qualityLAYOUT = (OfInt)LAYOUT.select(groupElement("ping_quality"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ping_quality
+ * }
+ */
+ public static final OfInt ping_qualityLAYOUT() {
+ return ping_qualityLAYOUT;
+ }
+
+ private static final long ping_quality$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ping_quality
+ * }
+ */
+ public static final long ping_quality$offset() {
+ return ping_quality$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_quality
+ * }
+ */
+ public static int ping_quality(MemorySegment struct) {
+ return struct.get(ping_qualityLAYOUT, ping_quality$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ping_quality
+ * }
+ */
+ public static void ping_quality(MemorySegment struct, int fieldValue) {
+ struct.set(ping_qualityLAYOUT, ping_quality$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble sound_velocityLAYOUT = (OfDouble)LAYOUT.select(groupElement("sound_velocity"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double sound_velocity
+ * }
+ */
+ public static final OfDouble sound_velocityLAYOUT() {
+ return sound_velocityLAYOUT;
+ }
+
+ private static final long sound_velocity$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double sound_velocity
+ * }
+ */
+ public static final long sound_velocity$offset() {
+ return sound_velocity$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double sound_velocity
+ * }
+ */
+ public static double sound_velocity(MemorySegment struct) {
+ return struct.get(sound_velocityLAYOUT, sound_velocity$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double sound_velocity
+ * }
+ */
+ public static void sound_velocity(MemorySegment struct, double fieldValue) {
+ struct.set(sound_velocityLAYOUT, sound_velocity$OFFSET, fieldValue);
+ }
+
+ private static final OfInt modeLAYOUT = (OfInt)LAYOUT.select(groupElement("mode"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static final OfInt modeLAYOUT() {
+ return modeLAYOUT;
+ }
+
+ private static final long mode$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static final long mode$offset() {
+ return mode$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static int mode(MemorySegment struct) {
+ return struct.get(modeLAYOUT, mode$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static void mode(MemorySegment struct, int fieldValue) {
+ struct.set(modeLAYOUT, mode$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout spareLAYOUT = (SequenceLayout)LAYOUT.select(groupElement("spare"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static final SequenceLayout spareLAYOUT() {
+ return spareLAYOUT;
+ }
+
+ private static final long spare$OFFSET = 28;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static final long spare$offset() {
+ return spare$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static MemorySegment spare(MemorySegment struct) {
+ return struct.asSlice(spare$OFFSET, spareLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static void spare(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, spare$OFFSET, spareLAYOUT.byteSize());
+ }
+
+ private static long[] spare$DIMS = { 32 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static long[] spare$dimensions() {
+ return spare$DIMS;
+ }
+ private static final VarHandle spare$ELEM_HANDLE = spareLAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static byte spare(MemorySegment struct, long index0) {
+ return (byte)spare$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[32]
+ * }
+ */
+ public static void spare(MemorySegment struct, long index0, byte fieldValue) {
+ spare$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3ImagerySpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3ImagerySpecific.java
new file mode 100644
index 0000000000..eaea3ca8c9
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3ImagerySpecific.java
@@ -0,0 +1,488 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM3ImagerySpecific extends StructClass {
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_SHORT.withName("range_norm"),
+ GSF.C_SHORT.withName("start_tvg_ramp"),
+ GSF.C_SHORT.withName("stop_tvg_ramp"),
+ GSF.C_CHAR.withName("bsn"),
+ GSF.C_CHAR.withName("bso"),
+ GSF.C_DOUBLE.withName("mean_absorption"),
+ GSF.C_SHORT.withName("offset"),
+ GSF.C_SHORT.withName("scale"),
+ MemoryLayout.sequenceLayout(4, GSF.C_CHAR).withName("spare")
+ ).withName("t_gsfEM3ImagerySpecific");
+
+ public EM3ImagerySpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM3ImagerySpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfShort range_normLAYOUT = (OfShort)LAYOUT.select(groupElement("range_norm"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned short range_norm
+ * }
+ */
+ public static final OfShort range_normLAYOUT() {
+ return range_normLAYOUT;
+ }
+
+ private static final long range_norm$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned short range_norm
+ * }
+ */
+ public static final long range_norm$offset() {
+ return range_norm$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned short range_norm
+ * }
+ */
+ public static short range_norm(MemorySegment struct) {
+ return struct.get(range_normLAYOUT, range_norm$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned short range_norm
+ * }
+ */
+ public static void range_norm(MemorySegment struct, short fieldValue) {
+ struct.set(range_normLAYOUT, range_norm$OFFSET, fieldValue);
+ }
+
+ private static final OfShort start_tvg_rampLAYOUT = (OfShort)LAYOUT.select(groupElement("start_tvg_ramp"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned short start_tvg_ramp
+ * }
+ */
+ public static final OfShort start_tvg_rampLAYOUT() {
+ return start_tvg_rampLAYOUT;
+ }
+
+ private static final long start_tvg_ramp$OFFSET = 2;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned short start_tvg_ramp
+ * }
+ */
+ public static final long start_tvg_ramp$offset() {
+ return start_tvg_ramp$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned short start_tvg_ramp
+ * }
+ */
+ public static short start_tvg_ramp(MemorySegment struct) {
+ return struct.get(start_tvg_rampLAYOUT, start_tvg_ramp$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned short start_tvg_ramp
+ * }
+ */
+ public static void start_tvg_ramp(MemorySegment struct, short fieldValue) {
+ struct.set(start_tvg_rampLAYOUT, start_tvg_ramp$OFFSET, fieldValue);
+ }
+
+ private static final OfShort stop_tvg_rampLAYOUT = (OfShort)LAYOUT.select(groupElement("stop_tvg_ramp"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned short stop_tvg_ramp
+ * }
+ */
+ public static final OfShort stop_tvg_rampLAYOUT() {
+ return stop_tvg_rampLAYOUT;
+ }
+
+ private static final long stop_tvg_ramp$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned short stop_tvg_ramp
+ * }
+ */
+ public static final long stop_tvg_ramp$offset() {
+ return stop_tvg_ramp$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned short stop_tvg_ramp
+ * }
+ */
+ public static short stop_tvg_ramp(MemorySegment struct) {
+ return struct.get(stop_tvg_rampLAYOUT, stop_tvg_ramp$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned short stop_tvg_ramp
+ * }
+ */
+ public static void stop_tvg_ramp(MemorySegment struct, short fieldValue) {
+ struct.set(stop_tvg_rampLAYOUT, stop_tvg_ramp$OFFSET, fieldValue);
+ }
+
+ private static final OfByte bsnLAYOUT = (OfByte)LAYOUT.select(groupElement("bsn"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char bsn
+ * }
+ */
+ public static final OfByte bsnLAYOUT() {
+ return bsnLAYOUT;
+ }
+
+ private static final long bsn$OFFSET = 6;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char bsn
+ * }
+ */
+ public static final long bsn$offset() {
+ return bsn$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char bsn
+ * }
+ */
+ public static byte bsn(MemorySegment struct) {
+ return struct.get(bsnLAYOUT, bsn$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char bsn
+ * }
+ */
+ public static void bsn(MemorySegment struct, byte fieldValue) {
+ struct.set(bsnLAYOUT, bsn$OFFSET, fieldValue);
+ }
+
+ private static final OfByte bsoLAYOUT = (OfByte)LAYOUT.select(groupElement("bso"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * char bso
+ * }
+ */
+ public static final OfByte bsoLAYOUT() {
+ return bsoLAYOUT;
+ }
+
+ private static final long bso$OFFSET = 7;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * char bso
+ * }
+ */
+ public static final long bso$offset() {
+ return bso$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * char bso
+ * }
+ */
+ public static byte bso(MemorySegment struct) {
+ return struct.get(bsoLAYOUT, bso$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * char bso
+ * }
+ */
+ public static void bso(MemorySegment struct, byte fieldValue) {
+ struct.set(bsoLAYOUT, bso$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble mean_absorptionLAYOUT = (OfDouble)LAYOUT.select(groupElement("mean_absorption"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double mean_absorption
+ * }
+ */
+ public static final OfDouble mean_absorptionLAYOUT() {
+ return mean_absorptionLAYOUT;
+ }
+
+ private static final long mean_absorption$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double mean_absorption
+ * }
+ */
+ public static final long mean_absorption$offset() {
+ return mean_absorption$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double mean_absorption
+ * }
+ */
+ public static double mean_absorption(MemorySegment struct) {
+ return struct.get(mean_absorptionLAYOUT, mean_absorption$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double mean_absorption
+ * }
+ */
+ public static void mean_absorption(MemorySegment struct, double fieldValue) {
+ struct.set(mean_absorptionLAYOUT, mean_absorption$OFFSET, fieldValue);
+ }
+
+ private static final OfShort offsetLAYOUT = (OfShort)LAYOUT.select(groupElement("offset"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * short offset
+ * }
+ */
+ public static final OfShort offsetLAYOUT() {
+ return offsetLAYOUT;
+ }
+
+ private static final long offset$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * short offset
+ * }
+ */
+ public static final long offset$offset() {
+ return offset$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * short offset
+ * }
+ */
+ public static short offset(MemorySegment struct) {
+ return struct.get(offsetLAYOUT, offset$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * short offset
+ * }
+ */
+ public static void offset(MemorySegment struct, short fieldValue) {
+ struct.set(offsetLAYOUT, offset$OFFSET, fieldValue);
+ }
+
+ private static final OfShort scaleLAYOUT = (OfShort)LAYOUT.select(groupElement("scale"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * short scale
+ * }
+ */
+ public static final OfShort scaleLAYOUT() {
+ return scaleLAYOUT;
+ }
+
+ private static final long scale$OFFSET = 18;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * short scale
+ * }
+ */
+ public static final long scale$offset() {
+ return scale$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * short scale
+ * }
+ */
+ public static short scale(MemorySegment struct) {
+ return struct.get(scaleLAYOUT, scale$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * short scale
+ * }
+ */
+ public static void scale(MemorySegment struct, short fieldValue) {
+ struct.set(scaleLAYOUT, scale$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout spareLAYOUT = (SequenceLayout)LAYOUT.select(groupElement("spare"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static final SequenceLayout spareLAYOUT() {
+ return spareLAYOUT;
+ }
+
+ private static final long spare$OFFSET = 20;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static final long spare$offset() {
+ return spare$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static MemorySegment spare(MemorySegment struct) {
+ return struct.asSlice(spare$OFFSET, spareLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static void spare(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, spare$OFFSET, spareLAYOUT.byteSize());
+ }
+
+ private static long[] spare$DIMS = { 4 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static long[] spare$dimensions() {
+ return spare$DIMS;
+ }
+ private static final VarHandle spare$ELEM_HANDLE = spareLAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static byte spare(MemorySegment struct, long index0) {
+ return (byte)spare$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[4]
+ * }
+ */
+ public static void spare(MemorySegment struct, long index0, byte fieldValue) {
+ spare$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RawSpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RawSpecific.java
new file mode 100644
index 0000000000..44a02b76c0
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RawSpecific.java
@@ -0,0 +1,875 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM3RawSpecific extends StructClass {
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_INT.withName("model_number"),
+ GSF.C_INT.withName("ping_counter"),
+ GSF.C_INT.withName("serial_number"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("surface_velocity"),
+ GSF.C_DOUBLE.withName("transducer_depth"),
+ GSF.C_INT.withName("valid_detections"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("sampling_frequency"),
+ GSF.C_DOUBLE.withName("vehicle_depth"),
+ GSF.C_DOUBLE.withName("depth_difference"),
+ GSF.C_INT.withName("offset_multiplier"),
+ MemoryLayout.sequenceLayout(16, GSF.C_CHAR).withName("spare_1"),
+ GSF.C_INT.withName("transmit_sectors"),
+ MemoryLayout.sequenceLayout(20, EM3RawTxSector.LAYOUT).withName("sector"),
+ MemoryLayout.sequenceLayout(16, GSF.C_CHAR).withName("spare_2"),
+ EMRunTime.LAYOUT.withName("run_time"),
+ EMPUStatus.LAYOUT.withName("pu_status")
+ ).withName("t_gsfEM3RawSpecific");
+
+ public EM3RawSpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM3RawSpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfInt model_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("model_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static final OfInt model_numberLAYOUT() {
+ return model_numberLAYOUT;
+ }
+
+ private static final long model_number$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static final long model_number$offset() {
+ return model_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static int model_number(MemorySegment struct) {
+ return struct.get(model_numberLAYOUT, model_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static void model_number(MemorySegment struct, int fieldValue) {
+ struct.set(model_numberLAYOUT, model_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt ping_counterLAYOUT = (OfInt)LAYOUT.select(groupElement("ping_counter"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ping_counter
+ * }
+ */
+ public static final OfInt ping_counterLAYOUT() {
+ return ping_counterLAYOUT;
+ }
+
+ private static final long ping_counter$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ping_counter
+ * }
+ */
+ public static final long ping_counter$offset() {
+ return ping_counter$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_counter
+ * }
+ */
+ public static int ping_counter(MemorySegment struct) {
+ return struct.get(ping_counterLAYOUT, ping_counter$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ping_counter
+ * }
+ */
+ public static void ping_counter(MemorySegment struct, int fieldValue) {
+ struct.set(ping_counterLAYOUT, ping_counter$OFFSET, fieldValue);
+ }
+
+ private static final OfInt serial_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("serial_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static final OfInt serial_numberLAYOUT() {
+ return serial_numberLAYOUT;
+ }
+
+ private static final long serial_number$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static final long serial_number$offset() {
+ return serial_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static int serial_number(MemorySegment struct) {
+ return struct.get(serial_numberLAYOUT, serial_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static void serial_number(MemorySegment struct, int fieldValue) {
+ struct.set(serial_numberLAYOUT, serial_number$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble surface_velocityLAYOUT = (OfDouble)LAYOUT.select(groupElement("surface_velocity"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static final OfDouble surface_velocityLAYOUT() {
+ return surface_velocityLAYOUT;
+ }
+
+ private static final long surface_velocity$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static final long surface_velocity$offset() {
+ return surface_velocity$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static double surface_velocity(MemorySegment struct) {
+ return struct.get(surface_velocityLAYOUT, surface_velocity$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static void surface_velocity(MemorySegment struct, double fieldValue) {
+ struct.set(surface_velocityLAYOUT, surface_velocity$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble transducer_depthLAYOUT = (OfDouble)LAYOUT.select(groupElement("transducer_depth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static final OfDouble transducer_depthLAYOUT() {
+ return transducer_depthLAYOUT;
+ }
+
+ private static final long transducer_depth$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static final long transducer_depth$offset() {
+ return transducer_depth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static double transducer_depth(MemorySegment struct) {
+ return struct.get(transducer_depthLAYOUT, transducer_depth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static void transducer_depth(MemorySegment struct, double fieldValue) {
+ struct.set(transducer_depthLAYOUT, transducer_depth$OFFSET, fieldValue);
+ }
+
+ private static final OfInt valid_detectionsLAYOUT = (OfInt)LAYOUT.select(groupElement("valid_detections"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int valid_detections
+ * }
+ */
+ public static final OfInt valid_detectionsLAYOUT() {
+ return valid_detectionsLAYOUT;
+ }
+
+ private static final long valid_detections$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int valid_detections
+ * }
+ */
+ public static final long valid_detections$offset() {
+ return valid_detections$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int valid_detections
+ * }
+ */
+ public static int valid_detections(MemorySegment struct) {
+ return struct.get(valid_detectionsLAYOUT, valid_detections$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int valid_detections
+ * }
+ */
+ public static void valid_detections(MemorySegment struct, int fieldValue) {
+ struct.set(valid_detectionsLAYOUT, valid_detections$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble sampling_frequencyLAYOUT = (OfDouble)LAYOUT.select(groupElement("sampling_frequency"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double sampling_frequency
+ * }
+ */
+ public static final OfDouble sampling_frequencyLAYOUT() {
+ return sampling_frequencyLAYOUT;
+ }
+
+ private static final long sampling_frequency$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double sampling_frequency
+ * }
+ */
+ public static final long sampling_frequency$offset() {
+ return sampling_frequency$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double sampling_frequency
+ * }
+ */
+ public static double sampling_frequency(MemorySegment struct) {
+ return struct.get(sampling_frequencyLAYOUT, sampling_frequency$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double sampling_frequency
+ * }
+ */
+ public static void sampling_frequency(MemorySegment struct, double fieldValue) {
+ struct.set(sampling_frequencyLAYOUT, sampling_frequency$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble vehicle_depthLAYOUT = (OfDouble)LAYOUT.select(groupElement("vehicle_depth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double vehicle_depth
+ * }
+ */
+ public static final OfDouble vehicle_depthLAYOUT() {
+ return vehicle_depthLAYOUT;
+ }
+
+ private static final long vehicle_depth$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double vehicle_depth
+ * }
+ */
+ public static final long vehicle_depth$offset() {
+ return vehicle_depth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double vehicle_depth
+ * }
+ */
+ public static double vehicle_depth(MemorySegment struct) {
+ return struct.get(vehicle_depthLAYOUT, vehicle_depth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double vehicle_depth
+ * }
+ */
+ public static void vehicle_depth(MemorySegment struct, double fieldValue) {
+ struct.set(vehicle_depthLAYOUT, vehicle_depth$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble depth_differenceLAYOUT = (OfDouble)LAYOUT.select(groupElement("depth_difference"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static final OfDouble depth_differenceLAYOUT() {
+ return depth_differenceLAYOUT;
+ }
+
+ private static final long depth_difference$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static final long depth_difference$offset() {
+ return depth_difference$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static double depth_difference(MemorySegment struct) {
+ return struct.get(depth_differenceLAYOUT, depth_difference$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static void depth_difference(MemorySegment struct, double fieldValue) {
+ struct.set(depth_differenceLAYOUT, depth_difference$OFFSET, fieldValue);
+ }
+
+ private static final OfInt offset_multiplierLAYOUT = (OfInt)LAYOUT.select(groupElement("offset_multiplier"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static final OfInt offset_multiplierLAYOUT() {
+ return offset_multiplierLAYOUT;
+ }
+
+ private static final long offset_multiplier$OFFSET = 64;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static final long offset_multiplier$offset() {
+ return offset_multiplier$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static int offset_multiplier(MemorySegment struct) {
+ return struct.get(offset_multiplierLAYOUT, offset_multiplier$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static void offset_multiplier(MemorySegment struct, int fieldValue) {
+ struct.set(offset_multiplierLAYOUT, offset_multiplier$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout spare_1LAYOUT = (SequenceLayout)LAYOUT.select(groupElement("spare_1"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static final SequenceLayout spare_1LAYOUT() {
+ return spare_1LAYOUT;
+ }
+
+ private static final long spare_1$OFFSET = 68;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static final long spare_1$offset() {
+ return spare_1$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static MemorySegment spare_1(MemorySegment struct) {
+ return struct.asSlice(spare_1$OFFSET, spare_1LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static void spare_1(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, spare_1$OFFSET, spare_1LAYOUT.byteSize());
+ }
+
+ private static long[] spare_1$DIMS = { 16 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static long[] spare_1$dimensions() {
+ return spare_1$DIMS;
+ }
+ private static final VarHandle spare_1$ELEM_HANDLE = spare_1LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static byte spare_1(MemorySegment struct, long index0) {
+ return (byte)spare_1$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_1[16]
+ * }
+ */
+ public static void spare_1(MemorySegment struct, long index0, byte fieldValue) {
+ spare_1$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ private static final OfInt transmit_sectorsLAYOUT = (OfInt)LAYOUT.select(groupElement("transmit_sectors"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int transmit_sectors
+ * }
+ */
+ public static final OfInt transmit_sectorsLAYOUT() {
+ return transmit_sectorsLAYOUT;
+ }
+
+ private static final long transmit_sectors$OFFSET = 84;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int transmit_sectors
+ * }
+ */
+ public static final long transmit_sectors$offset() {
+ return transmit_sectors$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int transmit_sectors
+ * }
+ */
+ public static int transmit_sectors(MemorySegment struct) {
+ return struct.get(transmit_sectorsLAYOUT, transmit_sectors$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int transmit_sectors
+ * }
+ */
+ public static void transmit_sectors(MemorySegment struct, int fieldValue) {
+ struct.set(transmit_sectorsLAYOUT, transmit_sectors$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout sectorLAYOUT = (SequenceLayout)LAYOUT.select(groupElement("sector"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static final SequenceLayout sectorLAYOUT() {
+ return sectorLAYOUT;
+ }
+
+ private static final long sector$OFFSET = 88;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static final long sector$offset() {
+ return sector$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static MemorySegment sector(MemorySegment struct) {
+ return struct.asSlice(sector$OFFSET, sectorLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static void sector(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, sector$OFFSET, sectorLAYOUT.byteSize());
+ }
+
+ private static long[] sector$DIMS = { 20 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static long[] sector$dimensions() {
+ return sector$DIMS;
+ }
+ private static final MethodHandle sector$ELEM_HANDLE = sectorLAYOUT.sliceHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static MemorySegment sector(MemorySegment struct, long index0) {
+ try {
+ return (MemorySegment)sector$ELEM_HANDLE.invokeExact(struct, 0L, index0);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * t_gsfEM3RawTxSector sector[20]
+ * }
+ */
+ public static void sector(MemorySegment struct, long index0, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, sector(struct, index0), 0L, EM3RawTxSector.LAYOUT.byteSize());
+ }
+
+ private static final SequenceLayout spare_2LAYOUT = (SequenceLayout)LAYOUT.select(groupElement("spare_2"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static final SequenceLayout spare_2LAYOUT() {
+ return spare_2LAYOUT;
+ }
+
+ private static final long spare_2$OFFSET = 1528;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static final long spare_2$offset() {
+ return spare_2$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static MemorySegment spare_2(MemorySegment struct) {
+ return struct.asSlice(spare_2$OFFSET, spare_2LAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static void spare_2(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, spare_2$OFFSET, spare_2LAYOUT.byteSize());
+ }
+
+ private static long[] spare_2$DIMS = { 16 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static long[] spare_2$dimensions() {
+ return spare_2$DIMS;
+ }
+ private static final VarHandle spare_2$ELEM_HANDLE = spare_2LAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static byte spare_2(MemorySegment struct, long index0) {
+ return (byte)spare_2$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare_2[16]
+ * }
+ */
+ public static void spare_2(MemorySegment struct, long index0, byte fieldValue) {
+ spare_2$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+ private static final GroupLayout run_timeLAYOUT = (GroupLayout)LAYOUT.select(groupElement("run_time"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * t_gsfEMRunTime run_time
+ * }
+ */
+ public static final GroupLayout run_timeLAYOUT() {
+ return run_timeLAYOUT;
+ }
+
+ private static final long run_time$OFFSET = 1544;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * t_gsfEMRunTime run_time
+ * }
+ */
+ public static final long run_time$offset() {
+ return run_time$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfEMRunTime run_time
+ * }
+ */
+ public static MemorySegment run_time(MemorySegment struct) {
+ return struct.asSlice(run_time$OFFSET, run_timeLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * t_gsfEMRunTime run_time
+ * }
+ */
+ public static void run_time(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, run_time$OFFSET, run_timeLAYOUT.byteSize());
+ }
+
+ private static final GroupLayout pu_statusLAYOUT = (GroupLayout)LAYOUT.select(groupElement("pu_status"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * t_gsfEMPUStatus pu_status
+ * }
+ */
+ public static final GroupLayout pu_statusLAYOUT() {
+ return pu_statusLAYOUT;
+ }
+
+ private static final long pu_status$OFFSET = 1744;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * t_gsfEMPUStatus pu_status
+ * }
+ */
+ public static final long pu_status$offset() {
+ return pu_status$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * t_gsfEMPUStatus pu_status
+ * }
+ */
+ public static MemorySegment pu_status(MemorySegment struct) {
+ return struct.asSlice(pu_status$OFFSET, pu_statusLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * t_gsfEMPUStatus pu_status
+ * }
+ */
+ public static void pu_status(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, pu_status$OFFSET, pu_statusLAYOUT.byteSize());
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RawTxSector.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RawTxSector.java
new file mode 100644
index 0000000000..2de4bb5868
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RawTxSector.java
@@ -0,0 +1,488 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM3RawTxSector extends StructClass {
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_DOUBLE.withName("tilt_angle"),
+ GSF.C_DOUBLE.withName("focus_range"),
+ GSF.C_DOUBLE.withName("signal_length"),
+ GSF.C_DOUBLE.withName("transmit_delay"),
+ GSF.C_DOUBLE.withName("center_frequency"),
+ GSF.C_INT.withName("waveform_id"),
+ GSF.C_INT.withName("sector_number"),
+ GSF.C_DOUBLE.withName("signal_bandwidth"),
+ MemoryLayout.sequenceLayout(16, GSF.C_CHAR).withName("spare")
+ ).withName("t_gsfEM3RawTxSector");
+
+ public EM3RawTxSector(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM3RawTxSector(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfDouble tilt_angleLAYOUT = (OfDouble)LAYOUT.select(groupElement("tilt_angle"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double tilt_angle
+ * }
+ */
+ public static final OfDouble tilt_angleLAYOUT() {
+ return tilt_angleLAYOUT;
+ }
+
+ private static final long tilt_angle$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double tilt_angle
+ * }
+ */
+ public static final long tilt_angle$offset() {
+ return tilt_angle$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double tilt_angle
+ * }
+ */
+ public static double tilt_angle(MemorySegment struct) {
+ return struct.get(tilt_angleLAYOUT, tilt_angle$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double tilt_angle
+ * }
+ */
+ public static void tilt_angle(MemorySegment struct, double fieldValue) {
+ struct.set(tilt_angleLAYOUT, tilt_angle$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble focus_rangeLAYOUT = (OfDouble)LAYOUT.select(groupElement("focus_range"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double focus_range
+ * }
+ */
+ public static final OfDouble focus_rangeLAYOUT() {
+ return focus_rangeLAYOUT;
+ }
+
+ private static final long focus_range$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double focus_range
+ * }
+ */
+ public static final long focus_range$offset() {
+ return focus_range$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double focus_range
+ * }
+ */
+ public static double focus_range(MemorySegment struct) {
+ return struct.get(focus_rangeLAYOUT, focus_range$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double focus_range
+ * }
+ */
+ public static void focus_range(MemorySegment struct, double fieldValue) {
+ struct.set(focus_rangeLAYOUT, focus_range$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble signal_lengthLAYOUT = (OfDouble)LAYOUT.select(groupElement("signal_length"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double signal_length
+ * }
+ */
+ public static final OfDouble signal_lengthLAYOUT() {
+ return signal_lengthLAYOUT;
+ }
+
+ private static final long signal_length$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double signal_length
+ * }
+ */
+ public static final long signal_length$offset() {
+ return signal_length$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double signal_length
+ * }
+ */
+ public static double signal_length(MemorySegment struct) {
+ return struct.get(signal_lengthLAYOUT, signal_length$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double signal_length
+ * }
+ */
+ public static void signal_length(MemorySegment struct, double fieldValue) {
+ struct.set(signal_lengthLAYOUT, signal_length$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble transmit_delayLAYOUT = (OfDouble)LAYOUT.select(groupElement("transmit_delay"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double transmit_delay
+ * }
+ */
+ public static final OfDouble transmit_delayLAYOUT() {
+ return transmit_delayLAYOUT;
+ }
+
+ private static final long transmit_delay$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double transmit_delay
+ * }
+ */
+ public static final long transmit_delay$offset() {
+ return transmit_delay$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double transmit_delay
+ * }
+ */
+ public static double transmit_delay(MemorySegment struct) {
+ return struct.get(transmit_delayLAYOUT, transmit_delay$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double transmit_delay
+ * }
+ */
+ public static void transmit_delay(MemorySegment struct, double fieldValue) {
+ struct.set(transmit_delayLAYOUT, transmit_delay$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble center_frequencyLAYOUT = (OfDouble)LAYOUT.select(groupElement("center_frequency"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double center_frequency
+ * }
+ */
+ public static final OfDouble center_frequencyLAYOUT() {
+ return center_frequencyLAYOUT;
+ }
+
+ private static final long center_frequency$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double center_frequency
+ * }
+ */
+ public static final long center_frequency$offset() {
+ return center_frequency$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double center_frequency
+ * }
+ */
+ public static double center_frequency(MemorySegment struct) {
+ return struct.get(center_frequencyLAYOUT, center_frequency$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double center_frequency
+ * }
+ */
+ public static void center_frequency(MemorySegment struct, double fieldValue) {
+ struct.set(center_frequencyLAYOUT, center_frequency$OFFSET, fieldValue);
+ }
+
+ private static final OfInt waveform_idLAYOUT = (OfInt)LAYOUT.select(groupElement("waveform_id"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int waveform_id
+ * }
+ */
+ public static final OfInt waveform_idLAYOUT() {
+ return waveform_idLAYOUT;
+ }
+
+ private static final long waveform_id$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int waveform_id
+ * }
+ */
+ public static final long waveform_id$offset() {
+ return waveform_id$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int waveform_id
+ * }
+ */
+ public static int waveform_id(MemorySegment struct) {
+ return struct.get(waveform_idLAYOUT, waveform_id$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int waveform_id
+ * }
+ */
+ public static void waveform_id(MemorySegment struct, int fieldValue) {
+ struct.set(waveform_idLAYOUT, waveform_id$OFFSET, fieldValue);
+ }
+
+ private static final OfInt sector_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("sector_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int sector_number
+ * }
+ */
+ public static final OfInt sector_numberLAYOUT() {
+ return sector_numberLAYOUT;
+ }
+
+ private static final long sector_number$OFFSET = 44;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int sector_number
+ * }
+ */
+ public static final long sector_number$offset() {
+ return sector_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int sector_number
+ * }
+ */
+ public static int sector_number(MemorySegment struct) {
+ return struct.get(sector_numberLAYOUT, sector_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int sector_number
+ * }
+ */
+ public static void sector_number(MemorySegment struct, int fieldValue) {
+ struct.set(sector_numberLAYOUT, sector_number$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble signal_bandwidthLAYOUT = (OfDouble)LAYOUT.select(groupElement("signal_bandwidth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double signal_bandwidth
+ * }
+ */
+ public static final OfDouble signal_bandwidthLAYOUT() {
+ return signal_bandwidthLAYOUT;
+ }
+
+ private static final long signal_bandwidth$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double signal_bandwidth
+ * }
+ */
+ public static final long signal_bandwidth$offset() {
+ return signal_bandwidth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double signal_bandwidth
+ * }
+ */
+ public static double signal_bandwidth(MemorySegment struct) {
+ return struct.get(signal_bandwidthLAYOUT, signal_bandwidth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double signal_bandwidth
+ * }
+ */
+ public static void signal_bandwidth(MemorySegment struct, double fieldValue) {
+ struct.set(signal_bandwidthLAYOUT, signal_bandwidth$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout spareLAYOUT = (SequenceLayout)LAYOUT.select(groupElement("spare"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static final SequenceLayout spareLAYOUT() {
+ return spareLAYOUT;
+ }
+
+ private static final long spare$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static final long spare$offset() {
+ return spare$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static MemorySegment spare(MemorySegment struct) {
+ return struct.asSlice(spare$OFFSET, spareLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static void spare(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, spare$OFFSET, spareLAYOUT.byteSize());
+ }
+
+ private static long[] spare$DIMS = { 16 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static long[] spare$dimensions() {
+ return spare$DIMS;
+ }
+ private static final VarHandle spare$ELEM_HANDLE = spareLAYOUT.varHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static byte spare(MemorySegment struct, long index0) {
+ return (byte)spare$ELEM_HANDLE.get(struct, 0L, index0);
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * unsigned char spare[16]
+ * }
+ */
+ public static void spare(MemorySegment struct, long index0, byte fieldValue) {
+ spare$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RunTime.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RunTime.java
new file mode 100644
index 0000000000..f374d18a8c
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3RunTime.java
@@ -0,0 +1,1313 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+import org.apache.sis.storage.gsf.TimeSpec;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM3RunTime extends StructClass {
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_INT.withName("model_number"),
+ MemoryLayout.paddingLayout(4),
+ TimeSpec.LAYOUT.withName("dg_time"),
+ GSF.C_INT.withName("ping_number"),
+ GSF.C_INT.withName("serial_number"),
+ GSF.C_INT.withName("system_status"),
+ GSF.C_INT.withName("mode"),
+ GSF.C_INT.withName("filter_id"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("min_depth"),
+ GSF.C_DOUBLE.withName("max_depth"),
+ GSF.C_DOUBLE.withName("absorption"),
+ GSF.C_DOUBLE.withName("pulse_length"),
+ GSF.C_DOUBLE.withName("transmit_beam_width"),
+ GSF.C_INT.withName("power_reduction"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("receive_beam_width"),
+ GSF.C_INT.withName("receive_bandwidth"),
+ GSF.C_INT.withName("receive_gain"),
+ GSF.C_INT.withName("cross_over_angle"),
+ GSF.C_INT.withName("ssv_source"),
+ GSF.C_INT.withName("swath_width"),
+ GSF.C_INT.withName("beam_spacing"),
+ GSF.C_INT.withName("coverage_sector"),
+ GSF.C_INT.withName("stabilization"),
+ GSF.C_INT.withName("port_swath_width"),
+ GSF.C_INT.withName("stbd_swath_width"),
+ GSF.C_INT.withName("port_coverage_sector"),
+ GSF.C_INT.withName("stbd_coverage_sector"),
+ GSF.C_INT.withName("hilo_freq_absorp_ratio"),
+ GSF.C_INT.withName("spare1")
+ ).withName("t_gsfEM3RunTime");
+
+ public EM3RunTime(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM3RunTime(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfInt model_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("model_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static final OfInt model_numberLAYOUT() {
+ return model_numberLAYOUT;
+ }
+
+ private static final long model_number$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static final long model_number$offset() {
+ return model_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static int model_number(MemorySegment struct) {
+ return struct.get(model_numberLAYOUT, model_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static void model_number(MemorySegment struct, int fieldValue) {
+ struct.set(model_numberLAYOUT, model_number$OFFSET, fieldValue);
+ }
+
+ private static final GroupLayout dg_timeLAYOUT = (GroupLayout)LAYOUT.select(groupElement("dg_time"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * struct timespec dg_time
+ * }
+ */
+ public static final GroupLayout dg_timeLAYOUT() {
+ return dg_timeLAYOUT;
+ }
+
+ private static final long dg_time$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * struct timespec dg_time
+ * }
+ */
+ public static final long dg_time$offset() {
+ return dg_time$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * struct timespec dg_time
+ * }
+ */
+ public static MemorySegment dg_time(MemorySegment struct) {
+ return struct.asSlice(dg_time$OFFSET, dg_timeLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * struct timespec dg_time
+ * }
+ */
+ public static void dg_time(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, dg_time$OFFSET, dg_timeLAYOUT.byteSize());
+ }
+
+ private static final OfInt ping_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("ping_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final OfInt ping_numberLAYOUT() {
+ return ping_numberLAYOUT;
+ }
+
+ private static final long ping_number$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final long ping_number$offset() {
+ return ping_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static int ping_number(MemorySegment struct) {
+ return struct.get(ping_numberLAYOUT, ping_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static void ping_number(MemorySegment struct, int fieldValue) {
+ struct.set(ping_numberLAYOUT, ping_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt serial_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("serial_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static final OfInt serial_numberLAYOUT() {
+ return serial_numberLAYOUT;
+ }
+
+ private static final long serial_number$OFFSET = 28;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static final long serial_number$offset() {
+ return serial_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static int serial_number(MemorySegment struct) {
+ return struct.get(serial_numberLAYOUT, serial_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static void serial_number(MemorySegment struct, int fieldValue) {
+ struct.set(serial_numberLAYOUT, serial_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt system_statusLAYOUT = (OfInt)LAYOUT.select(groupElement("system_status"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int system_status
+ * }
+ */
+ public static final OfInt system_statusLAYOUT() {
+ return system_statusLAYOUT;
+ }
+
+ private static final long system_status$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int system_status
+ * }
+ */
+ public static final long system_status$offset() {
+ return system_status$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int system_status
+ * }
+ */
+ public static int system_status(MemorySegment struct) {
+ return struct.get(system_statusLAYOUT, system_status$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int system_status
+ * }
+ */
+ public static void system_status(MemorySegment struct, int fieldValue) {
+ struct.set(system_statusLAYOUT, system_status$OFFSET, fieldValue);
+ }
+
+ private static final OfInt modeLAYOUT = (OfInt)LAYOUT.select(groupElement("mode"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static final OfInt modeLAYOUT() {
+ return modeLAYOUT;
+ }
+
+ private static final long mode$OFFSET = 36;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static final long mode$offset() {
+ return mode$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static int mode(MemorySegment struct) {
+ return struct.get(modeLAYOUT, mode$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int mode
+ * }
+ */
+ public static void mode(MemorySegment struct, int fieldValue) {
+ struct.set(modeLAYOUT, mode$OFFSET, fieldValue);
+ }
+
+ private static final OfInt filter_idLAYOUT = (OfInt)LAYOUT.select(groupElement("filter_id"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int filter_id
+ * }
+ */
+ public static final OfInt filter_idLAYOUT() {
+ return filter_idLAYOUT;
+ }
+
+ private static final long filter_id$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int filter_id
+ * }
+ */
+ public static final long filter_id$offset() {
+ return filter_id$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int filter_id
+ * }
+ */
+ public static int filter_id(MemorySegment struct) {
+ return struct.get(filter_idLAYOUT, filter_id$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int filter_id
+ * }
+ */
+ public static void filter_id(MemorySegment struct, int fieldValue) {
+ struct.set(filter_idLAYOUT, filter_id$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble min_depthLAYOUT = (OfDouble)LAYOUT.select(groupElement("min_depth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double min_depth
+ * }
+ */
+ public static final OfDouble min_depthLAYOUT() {
+ return min_depthLAYOUT;
+ }
+
+ private static final long min_depth$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double min_depth
+ * }
+ */
+ public static final long min_depth$offset() {
+ return min_depth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double min_depth
+ * }
+ */
+ public static double min_depth(MemorySegment struct) {
+ return struct.get(min_depthLAYOUT, min_depth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double min_depth
+ * }
+ */
+ public static void min_depth(MemorySegment struct, double fieldValue) {
+ struct.set(min_depthLAYOUT, min_depth$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble max_depthLAYOUT = (OfDouble)LAYOUT.select(groupElement("max_depth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double max_depth
+ * }
+ */
+ public static final OfDouble max_depthLAYOUT() {
+ return max_depthLAYOUT;
+ }
+
+ private static final long max_depth$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double max_depth
+ * }
+ */
+ public static final long max_depth$offset() {
+ return max_depth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double max_depth
+ * }
+ */
+ public static double max_depth(MemorySegment struct) {
+ return struct.get(max_depthLAYOUT, max_depth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double max_depth
+ * }
+ */
+ public static void max_depth(MemorySegment struct, double fieldValue) {
+ struct.set(max_depthLAYOUT, max_depth$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble absorptionLAYOUT = (OfDouble)LAYOUT.select(groupElement("absorption"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double absorption
+ * }
+ */
+ public static final OfDouble absorptionLAYOUT() {
+ return absorptionLAYOUT;
+ }
+
+ private static final long absorption$OFFSET = 64;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double absorption
+ * }
+ */
+ public static final long absorption$offset() {
+ return absorption$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double absorption
+ * }
+ */
+ public static double absorption(MemorySegment struct) {
+ return struct.get(absorptionLAYOUT, absorption$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double absorption
+ * }
+ */
+ public static void absorption(MemorySegment struct, double fieldValue) {
+ struct.set(absorptionLAYOUT, absorption$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble pulse_lengthLAYOUT = (OfDouble)LAYOUT.select(groupElement("pulse_length"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double pulse_length
+ * }
+ */
+ public static final OfDouble pulse_lengthLAYOUT() {
+ return pulse_lengthLAYOUT;
+ }
+
+ private static final long pulse_length$OFFSET = 72;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double pulse_length
+ * }
+ */
+ public static final long pulse_length$offset() {
+ return pulse_length$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double pulse_length
+ * }
+ */
+ public static double pulse_length(MemorySegment struct) {
+ return struct.get(pulse_lengthLAYOUT, pulse_length$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double pulse_length
+ * }
+ */
+ public static void pulse_length(MemorySegment struct, double fieldValue) {
+ struct.set(pulse_lengthLAYOUT, pulse_length$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble transmit_beam_widthLAYOUT = (OfDouble)LAYOUT.select(groupElement("transmit_beam_width"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double transmit_beam_width
+ * }
+ */
+ public static final OfDouble transmit_beam_widthLAYOUT() {
+ return transmit_beam_widthLAYOUT;
+ }
+
+ private static final long transmit_beam_width$OFFSET = 80;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double transmit_beam_width
+ * }
+ */
+ public static final long transmit_beam_width$offset() {
+ return transmit_beam_width$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double transmit_beam_width
+ * }
+ */
+ public static double transmit_beam_width(MemorySegment struct) {
+ return struct.get(transmit_beam_widthLAYOUT, transmit_beam_width$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double transmit_beam_width
+ * }
+ */
+ public static void transmit_beam_width(MemorySegment struct, double fieldValue) {
+ struct.set(transmit_beam_widthLAYOUT, transmit_beam_width$OFFSET, fieldValue);
+ }
+
+ private static final OfInt power_reductionLAYOUT = (OfInt)LAYOUT.select(groupElement("power_reduction"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int power_reduction
+ * }
+ */
+ public static final OfInt power_reductionLAYOUT() {
+ return power_reductionLAYOUT;
+ }
+
+ private static final long power_reduction$OFFSET = 88;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int power_reduction
+ * }
+ */
+ public static final long power_reduction$offset() {
+ return power_reduction$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int power_reduction
+ * }
+ */
+ public static int power_reduction(MemorySegment struct) {
+ return struct.get(power_reductionLAYOUT, power_reduction$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int power_reduction
+ * }
+ */
+ public static void power_reduction(MemorySegment struct, int fieldValue) {
+ struct.set(power_reductionLAYOUT, power_reduction$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble receive_beam_widthLAYOUT = (OfDouble)LAYOUT.select(groupElement("receive_beam_width"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double receive_beam_width
+ * }
+ */
+ public static final OfDouble receive_beam_widthLAYOUT() {
+ return receive_beam_widthLAYOUT;
+ }
+
+ private static final long receive_beam_width$OFFSET = 96;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double receive_beam_width
+ * }
+ */
+ public static final long receive_beam_width$offset() {
+ return receive_beam_width$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double receive_beam_width
+ * }
+ */
+ public static double receive_beam_width(MemorySegment struct) {
+ return struct.get(receive_beam_widthLAYOUT, receive_beam_width$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double receive_beam_width
+ * }
+ */
+ public static void receive_beam_width(MemorySegment struct, double fieldValue) {
+ struct.set(receive_beam_widthLAYOUT, receive_beam_width$OFFSET, fieldValue);
+ }
+
+ private static final OfInt receive_bandwidthLAYOUT = (OfInt)LAYOUT.select(groupElement("receive_bandwidth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int receive_bandwidth
+ * }
+ */
+ public static final OfInt receive_bandwidthLAYOUT() {
+ return receive_bandwidthLAYOUT;
+ }
+
+ private static final long receive_bandwidth$OFFSET = 104;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int receive_bandwidth
+ * }
+ */
+ public static final long receive_bandwidth$offset() {
+ return receive_bandwidth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int receive_bandwidth
+ * }
+ */
+ public static int receive_bandwidth(MemorySegment struct) {
+ return struct.get(receive_bandwidthLAYOUT, receive_bandwidth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int receive_bandwidth
+ * }
+ */
+ public static void receive_bandwidth(MemorySegment struct, int fieldValue) {
+ struct.set(receive_bandwidthLAYOUT, receive_bandwidth$OFFSET, fieldValue);
+ }
+
+ private static final OfInt receive_gainLAYOUT = (OfInt)LAYOUT.select(groupElement("receive_gain"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int receive_gain
+ * }
+ */
+ public static final OfInt receive_gainLAYOUT() {
+ return receive_gainLAYOUT;
+ }
+
+ private static final long receive_gain$OFFSET = 108;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int receive_gain
+ * }
+ */
+ public static final long receive_gain$offset() {
+ return receive_gain$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int receive_gain
+ * }
+ */
+ public static int receive_gain(MemorySegment struct) {
+ return struct.get(receive_gainLAYOUT, receive_gain$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int receive_gain
+ * }
+ */
+ public static void receive_gain(MemorySegment struct, int fieldValue) {
+ struct.set(receive_gainLAYOUT, receive_gain$OFFSET, fieldValue);
+ }
+
+ private static final OfInt cross_over_angleLAYOUT = (OfInt)LAYOUT.select(groupElement("cross_over_angle"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int cross_over_angle
+ * }
+ */
+ public static final OfInt cross_over_angleLAYOUT() {
+ return cross_over_angleLAYOUT;
+ }
+
+ private static final long cross_over_angle$OFFSET = 112;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int cross_over_angle
+ * }
+ */
+ public static final long cross_over_angle$offset() {
+ return cross_over_angle$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int cross_over_angle
+ * }
+ */
+ public static int cross_over_angle(MemorySegment struct) {
+ return struct.get(cross_over_angleLAYOUT, cross_over_angle$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int cross_over_angle
+ * }
+ */
+ public static void cross_over_angle(MemorySegment struct, int fieldValue) {
+ struct.set(cross_over_angleLAYOUT, cross_over_angle$OFFSET, fieldValue);
+ }
+
+ private static final OfInt ssv_sourceLAYOUT = (OfInt)LAYOUT.select(groupElement("ssv_source"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ssv_source
+ * }
+ */
+ public static final OfInt ssv_sourceLAYOUT() {
+ return ssv_sourceLAYOUT;
+ }
+
+ private static final long ssv_source$OFFSET = 116;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ssv_source
+ * }
+ */
+ public static final long ssv_source$offset() {
+ return ssv_source$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ssv_source
+ * }
+ */
+ public static int ssv_source(MemorySegment struct) {
+ return struct.get(ssv_sourceLAYOUT, ssv_source$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ssv_source
+ * }
+ */
+ public static void ssv_source(MemorySegment struct, int fieldValue) {
+ struct.set(ssv_sourceLAYOUT, ssv_source$OFFSET, fieldValue);
+ }
+
+ private static final OfInt swath_widthLAYOUT = (OfInt)LAYOUT.select(groupElement("swath_width"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int swath_width
+ * }
+ */
+ public static final OfInt swath_widthLAYOUT() {
+ return swath_widthLAYOUT;
+ }
+
+ private static final long swath_width$OFFSET = 120;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int swath_width
+ * }
+ */
+ public static final long swath_width$offset() {
+ return swath_width$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int swath_width
+ * }
+ */
+ public static int swath_width(MemorySegment struct) {
+ return struct.get(swath_widthLAYOUT, swath_width$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int swath_width
+ * }
+ */
+ public static void swath_width(MemorySegment struct, int fieldValue) {
+ struct.set(swath_widthLAYOUT, swath_width$OFFSET, fieldValue);
+ }
+
+ private static final OfInt beam_spacingLAYOUT = (OfInt)LAYOUT.select(groupElement("beam_spacing"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int beam_spacing
+ * }
+ */
+ public static final OfInt beam_spacingLAYOUT() {
+ return beam_spacingLAYOUT;
+ }
+
+ private static final long beam_spacing$OFFSET = 124;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int beam_spacing
+ * }
+ */
+ public static final long beam_spacing$offset() {
+ return beam_spacing$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int beam_spacing
+ * }
+ */
+ public static int beam_spacing(MemorySegment struct) {
+ return struct.get(beam_spacingLAYOUT, beam_spacing$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int beam_spacing
+ * }
+ */
+ public static void beam_spacing(MemorySegment struct, int fieldValue) {
+ struct.set(beam_spacingLAYOUT, beam_spacing$OFFSET, fieldValue);
+ }
+
+ private static final OfInt coverage_sectorLAYOUT = (OfInt)LAYOUT.select(groupElement("coverage_sector"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int coverage_sector
+ * }
+ */
+ public static final OfInt coverage_sectorLAYOUT() {
+ return coverage_sectorLAYOUT;
+ }
+
+ private static final long coverage_sector$OFFSET = 128;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int coverage_sector
+ * }
+ */
+ public static final long coverage_sector$offset() {
+ return coverage_sector$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int coverage_sector
+ * }
+ */
+ public static int coverage_sector(MemorySegment struct) {
+ return struct.get(coverage_sectorLAYOUT, coverage_sector$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int coverage_sector
+ * }
+ */
+ public static void coverage_sector(MemorySegment struct, int fieldValue) {
+ struct.set(coverage_sectorLAYOUT, coverage_sector$OFFSET, fieldValue);
+ }
+
+ private static final OfInt stabilizationLAYOUT = (OfInt)LAYOUT.select(groupElement("stabilization"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int stabilization
+ * }
+ */
+ public static final OfInt stabilizationLAYOUT() {
+ return stabilizationLAYOUT;
+ }
+
+ private static final long stabilization$OFFSET = 132;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int stabilization
+ * }
+ */
+ public static final long stabilization$offset() {
+ return stabilization$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int stabilization
+ * }
+ */
+ public static int stabilization(MemorySegment struct) {
+ return struct.get(stabilizationLAYOUT, stabilization$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int stabilization
+ * }
+ */
+ public static void stabilization(MemorySegment struct, int fieldValue) {
+ struct.set(stabilizationLAYOUT, stabilization$OFFSET, fieldValue);
+ }
+
+ private static final OfInt port_swath_widthLAYOUT = (OfInt)LAYOUT.select(groupElement("port_swath_width"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int port_swath_width
+ * }
+ */
+ public static final OfInt port_swath_widthLAYOUT() {
+ return port_swath_widthLAYOUT;
+ }
+
+ private static final long port_swath_width$OFFSET = 136;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int port_swath_width
+ * }
+ */
+ public static final long port_swath_width$offset() {
+ return port_swath_width$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int port_swath_width
+ * }
+ */
+ public static int port_swath_width(MemorySegment struct) {
+ return struct.get(port_swath_widthLAYOUT, port_swath_width$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int port_swath_width
+ * }
+ */
+ public static void port_swath_width(MemorySegment struct, int fieldValue) {
+ struct.set(port_swath_widthLAYOUT, port_swath_width$OFFSET, fieldValue);
+ }
+
+ private static final OfInt stbd_swath_widthLAYOUT = (OfInt)LAYOUT.select(groupElement("stbd_swath_width"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int stbd_swath_width
+ * }
+ */
+ public static final OfInt stbd_swath_widthLAYOUT() {
+ return stbd_swath_widthLAYOUT;
+ }
+
+ private static final long stbd_swath_width$OFFSET = 140;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int stbd_swath_width
+ * }
+ */
+ public static final long stbd_swath_width$offset() {
+ return stbd_swath_width$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int stbd_swath_width
+ * }
+ */
+ public static int stbd_swath_width(MemorySegment struct) {
+ return struct.get(stbd_swath_widthLAYOUT, stbd_swath_width$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int stbd_swath_width
+ * }
+ */
+ public static void stbd_swath_width(MemorySegment struct, int fieldValue) {
+ struct.set(stbd_swath_widthLAYOUT, stbd_swath_width$OFFSET, fieldValue);
+ }
+
+ private static final OfInt port_coverage_sectorLAYOUT = (OfInt)LAYOUT.select(groupElement("port_coverage_sector"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int port_coverage_sector
+ * }
+ */
+ public static final OfInt port_coverage_sectorLAYOUT() {
+ return port_coverage_sectorLAYOUT;
+ }
+
+ private static final long port_coverage_sector$OFFSET = 144;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int port_coverage_sector
+ * }
+ */
+ public static final long port_coverage_sector$offset() {
+ return port_coverage_sector$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int port_coverage_sector
+ * }
+ */
+ public static int port_coverage_sector(MemorySegment struct) {
+ return struct.get(port_coverage_sectorLAYOUT, port_coverage_sector$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int port_coverage_sector
+ * }
+ */
+ public static void port_coverage_sector(MemorySegment struct, int fieldValue) {
+ struct.set(port_coverage_sectorLAYOUT, port_coverage_sector$OFFSET, fieldValue);
+ }
+
+ private static final OfInt stbd_coverage_sectorLAYOUT = (OfInt)LAYOUT.select(groupElement("stbd_coverage_sector"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int stbd_coverage_sector
+ * }
+ */
+ public static final OfInt stbd_coverage_sectorLAYOUT() {
+ return stbd_coverage_sectorLAYOUT;
+ }
+
+ private static final long stbd_coverage_sector$OFFSET = 148;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int stbd_coverage_sector
+ * }
+ */
+ public static final long stbd_coverage_sector$offset() {
+ return stbd_coverage_sector$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int stbd_coverage_sector
+ * }
+ */
+ public static int stbd_coverage_sector(MemorySegment struct) {
+ return struct.get(stbd_coverage_sectorLAYOUT, stbd_coverage_sector$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int stbd_coverage_sector
+ * }
+ */
+ public static void stbd_coverage_sector(MemorySegment struct, int fieldValue) {
+ struct.set(stbd_coverage_sectorLAYOUT, stbd_coverage_sector$OFFSET, fieldValue);
+ }
+
+ private static final OfInt hilo_freq_absorp_ratioLAYOUT = (OfInt)LAYOUT.select(groupElement("hilo_freq_absorp_ratio"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int hilo_freq_absorp_ratio
+ * }
+ */
+ public static final OfInt hilo_freq_absorp_ratioLAYOUT() {
+ return hilo_freq_absorp_ratioLAYOUT;
+ }
+
+ private static final long hilo_freq_absorp_ratio$OFFSET = 152;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int hilo_freq_absorp_ratio
+ * }
+ */
+ public static final long hilo_freq_absorp_ratio$offset() {
+ return hilo_freq_absorp_ratio$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int hilo_freq_absorp_ratio
+ * }
+ */
+ public static int hilo_freq_absorp_ratio(MemorySegment struct) {
+ return struct.get(hilo_freq_absorp_ratioLAYOUT, hilo_freq_absorp_ratio$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int hilo_freq_absorp_ratio
+ * }
+ */
+ public static void hilo_freq_absorp_ratio(MemorySegment struct, int fieldValue) {
+ struct.set(hilo_freq_absorp_ratioLAYOUT, hilo_freq_absorp_ratio$OFFSET, fieldValue);
+ }
+
+ private static final OfInt spare1LAYOUT = (OfInt)LAYOUT.select(groupElement("spare1"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int spare1
+ * }
+ */
+ public static final OfInt spare1LAYOUT() {
+ return spare1LAYOUT;
+ }
+
+ private static final long spare1$OFFSET = 156;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int spare1
+ * }
+ */
+ public static final long spare1$offset() {
+ return spare1$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int spare1
+ * }
+ */
+ public static int spare1(MemorySegment struct) {
+ return struct.get(spare1LAYOUT, spare1$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int spare1
+ * }
+ */
+ public static void spare1(MemorySegment struct, int fieldValue) {
+ struct.set(spare1LAYOUT, spare1$OFFSET, fieldValue);
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3Specific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3Specific.java
new file mode 100644
index 0000000000..8dbe25d55d
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM3Specific.java
@@ -0,0 +1,539 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM3Specific extends StructClass {
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_INT.withName("model_number"),
+ GSF.C_INT.withName("ping_number"),
+ GSF.C_INT.withName("serial_number"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("surface_velocity"),
+ GSF.C_DOUBLE.withName("transducer_depth"),
+ GSF.C_INT.withName("valid_beams"),
+ GSF.C_INT.withName("sample_rate"),
+ GSF.C_DOUBLE.withName("depth_difference"),
+ GSF.C_INT.withName("offset_multiplier"),
+ MemoryLayout.paddingLayout(4),
+ MemoryLayout.sequenceLayout(2, EM3RunTime.LAYOUT).withName("run_time")
+ ).withName("t_gsfEM3Specific");
+
+ public EM3Specific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM3Specific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfInt model_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("model_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static final OfInt model_numberLAYOUT() {
+ return model_numberLAYOUT;
+ }
+
+ private static final long model_number$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static final long model_number$offset() {
+ return model_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static int model_number(MemorySegment struct) {
+ return struct.get(model_numberLAYOUT, model_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int model_number
+ * }
+ */
+ public static void model_number(MemorySegment struct, int fieldValue) {
+ struct.set(model_numberLAYOUT, model_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt ping_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("ping_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final OfInt ping_numberLAYOUT() {
+ return ping_numberLAYOUT;
+ }
+
+ private static final long ping_number$OFFSET = 4;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static final long ping_number$offset() {
+ return ping_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static int ping_number(MemorySegment struct) {
+ return struct.get(ping_numberLAYOUT, ping_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int ping_number
+ * }
+ */
+ public static void ping_number(MemorySegment struct, int fieldValue) {
+ struct.set(ping_numberLAYOUT, ping_number$OFFSET, fieldValue);
+ }
+
+ private static final OfInt serial_numberLAYOUT = (OfInt)LAYOUT.select(groupElement("serial_number"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static final OfInt serial_numberLAYOUT() {
+ return serial_numberLAYOUT;
+ }
+
+ private static final long serial_number$OFFSET = 8;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static final long serial_number$offset() {
+ return serial_number$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static int serial_number(MemorySegment struct) {
+ return struct.get(serial_numberLAYOUT, serial_number$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int serial_number
+ * }
+ */
+ public static void serial_number(MemorySegment struct, int fieldValue) {
+ struct.set(serial_numberLAYOUT, serial_number$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble surface_velocityLAYOUT = (OfDouble)LAYOUT.select(groupElement("surface_velocity"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static final OfDouble surface_velocityLAYOUT() {
+ return surface_velocityLAYOUT;
+ }
+
+ private static final long surface_velocity$OFFSET = 16;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static final long surface_velocity$offset() {
+ return surface_velocity$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static double surface_velocity(MemorySegment struct) {
+ return struct.get(surface_velocityLAYOUT, surface_velocity$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double surface_velocity
+ * }
+ */
+ public static void surface_velocity(MemorySegment struct, double fieldValue) {
+ struct.set(surface_velocityLAYOUT, surface_velocity$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble transducer_depthLAYOUT = (OfDouble)LAYOUT.select(groupElement("transducer_depth"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static final OfDouble transducer_depthLAYOUT() {
+ return transducer_depthLAYOUT;
+ }
+
+ private static final long transducer_depth$OFFSET = 24;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static final long transducer_depth$offset() {
+ return transducer_depth$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static double transducer_depth(MemorySegment struct) {
+ return struct.get(transducer_depthLAYOUT, transducer_depth$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double transducer_depth
+ * }
+ */
+ public static void transducer_depth(MemorySegment struct, double fieldValue) {
+ struct.set(transducer_depthLAYOUT, transducer_depth$OFFSET, fieldValue);
+ }
+
+ private static final OfInt valid_beamsLAYOUT = (OfInt)LAYOUT.select(groupElement("valid_beams"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static final OfInt valid_beamsLAYOUT() {
+ return valid_beamsLAYOUT;
+ }
+
+ private static final long valid_beams$OFFSET = 32;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static final long valid_beams$offset() {
+ return valid_beams$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static int valid_beams(MemorySegment struct) {
+ return struct.get(valid_beamsLAYOUT, valid_beams$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int valid_beams
+ * }
+ */
+ public static void valid_beams(MemorySegment struct, int fieldValue) {
+ struct.set(valid_beamsLAYOUT, valid_beams$OFFSET, fieldValue);
+ }
+
+ private static final OfInt sample_rateLAYOUT = (OfInt)LAYOUT.select(groupElement("sample_rate"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int sample_rate
+ * }
+ */
+ public static final OfInt sample_rateLAYOUT() {
+ return sample_rateLAYOUT;
+ }
+
+ private static final long sample_rate$OFFSET = 36;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int sample_rate
+ * }
+ */
+ public static final long sample_rate$offset() {
+ return sample_rate$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int sample_rate
+ * }
+ */
+ public static int sample_rate(MemorySegment struct) {
+ return struct.get(sample_rateLAYOUT, sample_rate$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int sample_rate
+ * }
+ */
+ public static void sample_rate(MemorySegment struct, int fieldValue) {
+ struct.set(sample_rateLAYOUT, sample_rate$OFFSET, fieldValue);
+ }
+
+ private static final OfDouble depth_differenceLAYOUT = (OfDouble)LAYOUT.select(groupElement("depth_difference"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static final OfDouble depth_differenceLAYOUT() {
+ return depth_differenceLAYOUT;
+ }
+
+ private static final long depth_difference$OFFSET = 40;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static final long depth_difference$offset() {
+ return depth_difference$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static double depth_difference(MemorySegment struct) {
+ return struct.get(depth_differenceLAYOUT, depth_difference$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * double depth_difference
+ * }
+ */
+ public static void depth_difference(MemorySegment struct, double fieldValue) {
+ struct.set(depth_differenceLAYOUT, depth_difference$OFFSET, fieldValue);
+ }
+
+ private static final OfInt offset_multiplierLAYOUT = (OfInt)LAYOUT.select(groupElement("offset_multiplier"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static final OfInt offset_multiplierLAYOUT() {
+ return offset_multiplierLAYOUT;
+ }
+
+ private static final long offset_multiplier$OFFSET = 48;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static final long offset_multiplier$offset() {
+ return offset_multiplier$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static int offset_multiplier(MemorySegment struct) {
+ return struct.get(offset_multiplierLAYOUT, offset_multiplier$OFFSET);
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * int offset_multiplier
+ * }
+ */
+ public static void offset_multiplier(MemorySegment struct, int fieldValue) {
+ struct.set(offset_multiplierLAYOUT, offset_multiplier$OFFSET, fieldValue);
+ }
+
+ private static final SequenceLayout run_timeLAYOUT = (SequenceLayout)LAYOUT.select(groupElement("run_time"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static final SequenceLayout run_timeLAYOUT() {
+ return run_timeLAYOUT;
+ }
+
+ private static final long run_time$OFFSET = 56;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static final long run_time$offset() {
+ return run_time$OFFSET;
+ }
+
+ /**
+ * Getter for field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static MemorySegment run_time(MemorySegment struct) {
+ return struct.asSlice(run_time$OFFSET, run_timeLAYOUT.byteSize());
+ }
+
+ /**
+ * Setter for field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static void run_time(MemorySegment struct, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, struct, run_time$OFFSET, run_timeLAYOUT.byteSize());
+ }
+
+ private static long[] run_time$DIMS = { 2 };
+
+ /**
+ * Dimensions for array field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static long[] run_time$dimensions() {
+ return run_time$DIMS;
+ }
+ private static final MethodHandle run_time$ELEM_HANDLE = run_timeLAYOUT.sliceHandle(sequenceElement());
+
+ /**
+ * Indexed getter for field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static MemorySegment run_time(MemorySegment struct, long index0) {
+ try {
+ return (MemorySegment)run_time$ELEM_HANDLE.invokeExact(struct, 0L, index0);
+ } catch (Throwable ex$) {
+ throw new AssertionError("should not reach here", ex$);
+ }
+ }
+
+ /**
+ * Indexed setter for field:
+ * {@snippet lang=c :
+ * gsfEM3RunTime run_time[2]
+ * }
+ */
+ public static void run_time(MemorySegment struct, long index0, MemorySegment fieldValue) {
+ MemorySegment.copy(fieldValue, 0L, run_time(struct, index0), 0L, EM3RunTime.LAYOUT.byteSize());
+ }
+
+}
+
diff --git a/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM4ImagerySpecific.java b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM4ImagerySpecific.java
new file mode 100644
index 0000000000..94ca66fa1d
--- /dev/null
+++ b/incubator/src/org.apache.sis.storage.gsf/main/org/apache/sis/storage/gsf/specific/EM4ImagerySpecific.java
@@ -0,0 +1,670 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sis.storage.gsf.specific;
+
+import java.lang.invoke.*;
+import java.lang.foreign.*;
+
+import static java.lang.foreign.ValueLayout.*;
+import static java.lang.foreign.MemoryLayout.PathElement.*;
+import org.apache.sis.storage.gsf.GSF;
+import org.apache.sis.storage.gsf.StructClass;
+
+/**
+ *
+ * @author Johann Sorel (Geomatys)
+ */
+public final class EM4ImagerySpecific extends StructClass {
+
+
+ public static final GroupLayout LAYOUT = MemoryLayout.structLayout(
+ GSF.C_DOUBLE.withName("sampling_frequency"),
+ GSF.C_DOUBLE.withName("mean_absorption"),
+ GSF.C_DOUBLE.withName("tx_pulse_length"),
+ GSF.C_INT.withName("range_norm"),
+ GSF.C_INT.withName("start_tvg_ramp"),
+ GSF.C_INT.withName("stop_tvg_ramp"),
+ MemoryLayout.paddingLayout(4),
+ GSF.C_DOUBLE.withName("bsn"),
+ GSF.C_DOUBLE.withName("bso"),
+ GSF.C_DOUBLE.withName("tx_beam_width"),
+ GSF.C_DOUBLE.withName("tvg_cross_over"),
+ GSF.C_SHORT.withName("offset"),
+ GSF.C_SHORT.withName("scale"),
+ MemoryLayout.sequenceLayout(20, GSF.C_CHAR).withName("spare")
+ ).withName("t_gsfEM4ImagerySpecific");
+
+ public EM4ImagerySpecific(MemorySegment struct) {
+ super(struct);
+ }
+
+ public EM4ImagerySpecific(SegmentAllocator allocator) {
+ super(allocator);
+ }
+
+ @Override
+ protected MemoryLayout getLayout() {
+ return LAYOUT;
+ }
+
+ private static final OfDouble sampling_frequencyLAYOUT = (OfDouble)LAYOUT.select(groupElement("sampling_frequency"));
+
+ /**
+ * Layout for field:
+ * {@snippet lang=c :
+ * double sampling_frequency
+ * }
+ */
+ public static final OfDouble sampling_frequencyLAYOUT() {
+ return sampling_frequencyLAYOUT;
+ }
+
+ private static final long sampling_frequency$OFFSET = 0;
+
+ /**
+ * Offset for field:
+ * {@snippet lang=c :
+ * double sampling_frequency
... 24622 lines suppressed ...