Shunyaya Symbolic Mathematical Hardware – Interop: Adapters, Transport & Timekeeping (10.4–10.6)

10.4 — Adapters and shims (systems you likely use)
ROS 2 (robots).
Message types (IDL sketch):

# ROS 2 IDL (sketch)
module ssmh {
  struct SSMHScalar { double m; double a; string band; builtin_interfaces/Time stamp; };
  struct KPI { string name; SSMHScalar value; string site; string unit; };
};

Node shim (wrap legacy floats into (m,a); keep m classical):

# Pseudocode
def on_float64(msg):
    m = msg.data
    a = infer_alignment_from_meta(...)         # domain-specific
    band = band_of(a)                          # A++..A--
    pub.publish({"name":kp, "value":{"m":m,"a":a,"band":band}})

AUTOSAR (Classic/Adaptive). Add a to SW-C port interfaces; map SSMS verbs to runnables s_add/s_mul/...; keep m path unchanged.
IEC 61131-3 PLCs (ST/FBD). Provide blocks SSMH_Mul, SSMH_Div, SSMH_SumUW; log (m,a) to historian.
SCADA / OPC UA. Paired nodes: Tag:m, Tag:a, Tag:band; put bands under a Quality/Confidence folder.
Kafka / Pulsar (streams). Topic per KPI family; key by unit_id; value JSON/Avro with (m,a,band,knobs_hash,build_id,...).
Time-series DBs. Metric pairs kpi_m{...} and kpi_a{...}; optional kpi_band{...} as enum label.


10.5 — Transport and schema contracts
JSON schema (minimal).

{
  "type": "object",
  "required": ["ts","kpi","m","a","band","knobs_hash","build_id"],
  "properties": {
    "ts": { "type": "string", "format": "date-time" },
    "kpi": { "type": "string" },
    "m": { "type": "number" },
    "a": { "type": "number", "minimum": -0.999999, "maximum": 0.999999 },
    "band": { "type": "string", "enum": ["A++","A+","A0","A-","A--"] },
    "knobs_hash": { "type": "string" },
    "build_id": { "type": "string" },
    "site_id": { "type": "string" },
    "unit_id": { "type": "string" },
    "note": { "type": "string" }
  }
}

gRPC IDL (sketch).

message Pair { double m = 1; double a = 2; string band = 3; }
message KpiPoint {
  string kpi = 1; Pair value = 2; int64 ts_unix_ms = 3;
  string knobs_hash = 4; string build_id = 5;
  string site_id = 6; string unit_id = 7; string note = 8;
}
service SSMH {
  rpc PutKpi(stream KpiPoint) returns (Ack);
  rpc GetManifest(google.protobuf.Empty) returns (Manifest);
}

10.6 — Timekeeping, ordering, and backfills
Clocking. Emit both wall time ts and a monotonic seq per source.
Ordering. Treat ingestion order as non-authoritative; use seq and daily anchors.
Backfills. Recompute (m,a) with identical knobs; {U,W} guarantees batch == stream == shuffled for the lane.
Timezone. Persist in UTC; render locally in UIs.
Clamp-first safety. Always a := clamp(a, -1+eps_a, +1-eps_a) before any atanh; re-clamp after any tanh.
Fuse rule. Maintain exact {U,W} and flush a_out := tanh(U/max(W, eps_w)).


Navigation
Back: Shunyaya Symbolic Mathematical Hardware – Interop: SSMS Ports, Stamp & Domain Patterns (10.1–10.3)
Next: Shunyaya Symbolic Mathematical Hardware – Interop: Governance, QA & Minimal UI Wiring (10.7–10.10)


Directory of Pages
SSMH – Table of Contents