2 Commits

Author SHA1 Message Date
71ae225972 Version 1.1.1 2026-03-18 17:33:03 +01:00
3855e478c0 Allow Field to specify its own data 2026-03-18 17:32:53 +01:00
2 changed files with 2 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
{ {
"name": "@hamradio/packet", "name": "@hamradio/packet",
"type": "module", "type": "module",
"version": "1.1.0", "version": "1.1.1",
"description": "Low level packet parsing library (for radio protocols)", "description": "Low level packet parsing library (for radio protocols)",
"keywords": [ "keywords": [
"HAM radio", "HAM radio",

View File

@@ -120,6 +120,7 @@ export interface Segment {
export interface Field { export interface Field {
type: FieldType; type: FieldType;
name: string; name: string;
data?: ArrayBuffer; // Optional raw data for the field (if needed for parsing / serialization)
value?: unknown; // Optional value for the field (used for serialization or as a default value) value?: unknown; // Optional value for the field (used for serialization or as a default value)
bits?: BitField[]; // Optional array of bit field definitions (for BITS type) bits?: BitField[]; // Optional array of bit field definitions (for BITS type)
length?: number; // Optional length for array types (e.g., BYTES, WORDS) length?: number; // Optional length for array types (e.g., BYTES, WORDS)