zerodds-dlrl

Layer 7 — Profiles. DDS Data Local Reconstruction Layer (DLRL), DDS 1.4 §2.2 and Annex B.

DLRL is an optional DDS profile: an object-centric cache on top of DCPS with identity tracking, relationship resolution and transactional updates (§2.1.3). zerodds-dlrl provides these parts as an in-memory model; object state is held as bytes. The crate does not depend on zerodds-dcps. Its only dependency is portable-atomic, which supplies the 64-bit atomics for the cache sequence counter and the transaction ids on targets without them (e.g. thumbv7em). It is the only DLRL runtime in the repository; it targets Rust.

  • object_cache — ObjectCache keyed by ObjectId (topic name and CDR-encoded DCPS key); object states New, Modified, Deleted, Committed with a version counter; WeakObjectRef, which resolves to nothing once the object is removed; commit_all/rollback_all.
  • transaction — Transaction: begin takes a snapshot of the object versions, commit returns OptimisticConflict if an object changed since begin, rollback discards the changes; ConsistencyLevel.
  • relationship — RelationshipResolver: RelationshipKind Reference/Composition, Direction Mono/Bi, CascadeMode None/Update/Delete/All, cascade targets for update and delete.
  • subscription — HomeFactory with HomeListeners registered per topic, ObjectListeners registered per object, SubscriptionRegistry; ObjectChangeKind Created/Modified/Deleted.
  • query — Query with topic, state, filter, order and limit, executed against an ObjectCache.
  • pragma — parse_pragma for #pragma DCPS_DATA_TYPE, DCPS_DATA_KEY and DCPS_DLRL_RELATION.
  • metamodel — the DLRL metamodel of DDS 1.2 §8: the ObjectRoot trait, class metamodel with mapping information, entity classes and exception types. The source describes this module as a stub layer.

Spec anchors

  • OMG DDS 1.4 §2.1.3, §2.2, §B.2 (Cache), §B.3 (HomeFactory, listeners), §B.4.1 (pragmas), §B.5 (relationships), §B.6 (ObjectRoot; §B.6.4 weak references), §B.7 (query), §B.7.4 (transactions).
  • OMG DDS 1.2 §8 (DLRL metamodel; §8.1.3–§8.1.6).
  • Coverage: dlrl-1.2.

Consumers

  • zerodds-dlrl-codegen (pragma types; default features off).
  • zerodds-idlc (DlrlPragma and parse_pragma for idlc dlrl).

Features

  • std (default) — enables alloc; adds std::error::Error for TransactionError, QueryError and ParsePragmaError.
  • alloc — no further effect; the crate uses alloc in every configuration.

Status

  • #![no_std] with alloc.
  • forbid(unsafe_code).
  • Library only, no binaries.
  • 66 test functions in the source (src/).

zerodds-dlrl

Layer 7 — Profile. DDS Data Local Reconstruction Layer (DLRL), DDS 1.4 §2.2 und Annex B.

DLRL ist ein optionales DDS-Profil: ein objektorientierter Cache über DCPS mit Identitätsverfolgung, Auflösung von Beziehungen und transaktionalen Änderungen (§2.1.3). zerodds-dlrl stellt diese Teile als Modell im Speicher bereit; der Objektzustand wird als Bytes gehalten. Das Crate hängt nicht von zerodds-dcps ab. Seine einzige Abhängigkeit ist portable-atomic, das auf Zielen ohne atomare 64-Bit-Operationen (z. B. thumbv7em) diese für den Sequenzzähler des Caches und die Transaktions-IDs bereitstellt. Es ist die einzige DLRL-Laufzeit im Repository; sie ist für Rust bestimmt.

  • object_cache — ObjectCache, adressiert über ObjectId (Name des Topics und CDR-kodierter DCPS-Schlüssel); Objektzustände New, Modified, Deleted, Committed mit Versionszähler; WeakObjectRef, das nach dem Entfernen des Objekts ins Leere zeigt; commit_all/rollback_all.
  • transaction — Transaction: begin hält die Objektversionen fest, commit liefert OptimisticConflict, wenn sich ein Objekt seit begin geändert hat, rollback verwirft die Änderungen; ConsistencyLevel.
  • relationship — RelationshipResolver: RelationshipKind Reference/Composition, Direction Mono/Bi, CascadeMode None/Update/Delete/All, Kaskadenziele für Änderung und Löschung.
  • subscription — HomeFactory mit Listenern vom Typ HomeListener je Topic und vom Typ ObjectListener je Objekt, SubscriptionRegistry; ObjectChangeKind Created/Modified/Deleted.
  • query — Query mit Topic, Zustand, Filter, Sortierung und Begrenzung, ausgeführt gegen einen ObjectCache.
  • pragma — parse_pragma für #pragma DCPS_DATA_TYPE, DCPS_DATA_KEY und DCPS_DLRL_RELATION.
  • metamodel — das DLRL-Metamodell aus DDS 1.2 §8: das Trait ObjectRoot, Klassen-Metamodell mit Abbildungsinformation, Entitätsklassen und Ausnahmetypen. Der Quelltext bezeichnet dieses Modul als Platzhalterschicht (stub layer).

Spec-Anker

  • OMG DDS 1.4 §2.1.3, §2.2, §B.2 (Cache), §B.3 (HomeFactory, Listener), §B.4.1 (Pragmas), §B.5 (Beziehungen), §B.6 (ObjectRoot; §B.6.4 schwache Referenzen), §B.7 (Abfragen), §B.7.4 (Transaktionen).
  • OMG DDS 1.2 §8 (DLRL-Metamodell; §8.1.3–§8.1.6).
  • Abdeckung: dlrl-1.2.

Konsumenten

  • zerodds-dlrl-codegen (Pragma-Typen; Default-Features abgeschaltet).
  • zerodds-idlc (DlrlPragma und parse_pragma für idlc dlrl).

Features

  • std (Standard) — aktiviert alloc; ergänzt std::error::Error für TransactionError, QueryError und ParsePragmaError.
  • alloc — keine weitere Wirkung; das Crate nutzt alloc in jeder Konfiguration.

Status

  • #![no_std] mit alloc.
  • forbid(unsafe_code).
  • Nur Bibliothek, keine Binaries.
  • 66 Testfunktionen im Quelltext (src/).