/** * Classifies how an SDL action verb interacts with the surrounding * system. Mirrors the C# Packet.Ax25.Sdl.ActionKind enum and the kind * groups in spec-sdl/actions.yaml. */ export type ActionKind = "signal_upper" | "signal_lower" | "processing" | "subroutine" | "internal_out"; export type { Ax25ActionVerb } from "./ax25-action-verb.g.js"; import type { Ax25ActionVerb } from "./ax25-action-verb.g.js"; export type { Ax25Guard } from "./ax25-guard.g.js"; import type { Ax25Guard } from "./ax25-guard.g.js"; export type { Ax25Event } from "./ax25-event.g.js"; import type { Ax25Event } from "./ax25-event.g.js"; /** * One conjunct of a guard: a typed Ax25Guard atom plus whether it is * negated. A guard holds when every term holds; an empty guard array * means the transition is unguarded (always fires). Carrying the atom as * the generated Ax25Guard union member (not a raw string) lets a guard * evaluator bind every atom exhaustively — a renamed or typo'd atom is a * compile error, not an unbound-identifier throw at runtime. */ export interface GuardTerm { readonly atom: Ax25Guard; readonly negate: boolean; } /** Identifies which figure of which specification a page was transcribed from. */ export interface SdlSource { readonly spec: string; readonly figure: string; /** Empty when no URL recorded. */ readonly url: string; } /** * One verb + kind pair along a transition or subroutine path. The * verb is the canonical spelling from spec-sdl/actions.yaml; aliases * are normalised at codegen time. */ export interface ActionStep { readonly verb: Ax25ActionVerb; readonly kind: ActionKind; } /** * Records a loop_while construct as a slice over the flat actions * list. start/length describe the body; predicate is the continue * condition (already negated where the figure's continuing edge is the * decision's No branch — the negation is carried by the GuardTerm). * testAtEnd selects the loop topology: false = test-at-head (while; body * may run zero times), true = test-at-tail (do-while; body runs at least * once). */ export interface LoopRange { readonly start: number; readonly length: number; readonly predicate: GuardTerm; readonly testAtEnd: boolean; } /** * One citation supporting a transition or subroutine path. source is * "spec_prose" or the key of a pinned_refs entry. Spec-prose * citations populate cite/quote; code citations populate * path/function/line. */ export interface ImplementationReference { readonly source: string; readonly cite: string; readonly quote: string; readonly path: string; readonly function: string; /** 0 = no line citation. */ readonly line: number; readonly note: string; } /** One SDL transition column on a state-machine page. */ export interface TransitionSpec { readonly id: string; readonly from: string; readonly on: Ax25Event; /** Conjunction of guard terms; empty when unguarded. */ readonly guard: readonly GuardTerm[]; readonly actions: readonly ActionStep[]; readonly next: string; readonly notes: string; readonly references: readonly ImplementationReference[]; readonly loops: readonly LoopRange[]; } /** * One path through a subroutine. Unlike a TransitionSpec there is no * incoming event or destination state. */ export interface SubroutinePath { readonly id: string; /** Conjunction of guard terms; empty when unguarded. */ readonly guard: readonly GuardTerm[]; readonly actions: readonly ActionStep[]; readonly notes: string; readonly references: readonly ImplementationReference[]; readonly loops: readonly LoopRange[]; } /** One subroutine on a subroutine page. */ export interface SubroutineSpec { readonly name: string; readonly paths: readonly SubroutinePath[]; readonly notes: string; readonly references: readonly ImplementationReference[]; } /** One generated state-machine page (figc4.1 / 4.2 / 4.3 / 4.4 / 4.6 etc.). */ export interface StatePage { readonly machine: string; readonly state: string; readonly source: SdlSource; readonly transitions: readonly TransitionSpec[]; } /** One generated subroutine page (figc4.7). */ export interface SubroutinesPage { readonly machine: string; readonly source: SdlSource; readonly subroutines: readonly SubroutineSpec[]; } //# sourceMappingURL=types.d.ts.map