Skip to main content

Module field_section

Module field_section 

Source
Expand description

FIEL v0 field descriptors and optional raster sample payloads.

encode_field_section writes a declaration-only payload (12-byte header, 32-byte descriptors). encode_field_section_with_rasters also appends grid metadata (16 bytes) and little-endian f32 samples, with descriptor sample offsets locating them inside the same payload. Both existing APIs use the current version-zero schema; raster support is not a new format version.

decode_field_section reads declarations; decode_field_raster_samples resolves the selected raster. Envelope, range, codec and domain validation are separate obligations. A successful declaration read does not establish scientific accuracy, meaningful units or authentication of sample data.

Preserve field names, unit hashes, support/representation and sample bytes. Do not infer that a FIEL unit hash and a MID2 registry identifier are equivalent without a qualified mapping. See the typed payload companion in docs/manuals/standards/10d-typed-field-payloads.md for coexistence contracts.

Structs§

ContinuousRasterField
A continuous environmental raster layer with raw sample data for encoding.
FieldDescriptor
A single field descriptor — one entry in the Field section’s ontology table.
FieldEntry
A field entry to encode into the Field section.
FieldInspection
FieldInspectionLimits
FieldSectionHeader
Header for the Field section.
RasterGridMetadata
Header preceding raw sample payload for a grid field descriptor.

Enums§

FieldInspectionError
FieldRepresentationKind
Field representation — how the field is stored.
FieldSectionError
Errors from the Field section encoder/decoder.
FieldSupportKind
Field support — where the field is defined.
FieldTypeKind
Field type kind — what values the field holds.

Constants§

FIELD_DESCRIPTOR_SIZE
Size of one FieldDescriptor in bytes.
FIELD_SECTION_HEADER_SIZE
Size of the FieldSectionHeader in bytes (u32 + u16 + u16 + u32 = 12).
FIELD_SECTION_MAGIC
Magic bytes for the Field section: “FIEL” in little-endian.
FIELD_SECTION_VERSION
Current version of the Field section encoding.
MAX_FIELDS_PER_SECTION
Maximum fields per section (limited by u16 field_count).
RASTER_GRID_METADATA_SIZE

Functions§

decode_field_raster_samples
Read continuous raster grid samples corresponding to a decoded descriptor.
decode_field_section
Decode a .10d Field section from bytes.
encode_field_section
Encode a list of field entries into a .10d Field section.
encode_field_section_with_rasters
Encode a set of continuous raster fields (including sample payloads) into a .10d Field section.
field_section_size
Compute the byte size needed to encode the given number of fields.
inspect_field_section
Supports the existing declaration-only schema and contiguous scalar/region/ grid samples emitted by encode_field_section_with_rasters. Declared units are retained, not authenticated. Unknown sample schemas, gaps, aliases, tails, reserved metadata, invalid enums/shape and nonfinite samples fail closed. Unaligned input follows the same LE path. No output is mutated on error.