Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions CLA/CLA_Zenzen_IoT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# OMG DDS INTEROPERABILITY REPOSITORY - CONTRIBUTOR LICENSE AGREEMENT

**This Contributor License Agreement ("Agreement") specifies the terms under which the individual or corporate entity specified in the signature block below (“You”) agree to make intellectual property contributions to the OMG DDS Interoperability Repository. BY SIGNING BELOW YOU ARE AGREEING TO BE BOUND BY THE TERMS OF THIS AGREEMENT. If You are signing this Agreement in Your capacity as an employee, THEN YOUR EMPLOYER AND YOU ARE BOTH BOUND BY THIS AGREEMENT.**

1. Definitions

1. "OMG DDS Interoperability Repository" (or “Repository”) means the Git repository [https://github.com/omg-dds/dds-rtps](https://github.com/omg-dds/dds-rtps).

2. "Moderator" means an entity or individual responsible for authorizing changes to the Repository.

3. "Submit" (or “Submitted”) means any submission, including source code, binaries, code, pull requests, issue reports, comments, etc., made to the Moderators for inclusion in the Repository either through the Git repository interface or through electronic file transfer.

4. A "Contribution" is any original work of authorship, including any modifications or additions to an existing work, that You Submit to the DDS Interoperability Repository.

5. A "User" is anyone who accesses the Repository.

2. Allowable Contribution Representations

1. You represent that You have the necessary rights to the Contribution(s) to meet the obligations of this Agreement. If You are employed, Your employer has authorized Contribution(s) under this Agreement.

2. You represent that you have no knowledge of third-party intellectual property rights that are likely to be infringed by the Contribution(s). You represent that you have no knowledge that such infringement or any allegation of misappropriation of intellectual property rights is likely to be claimed or has already been claimed.

3. License

You grant Moderators a perpetual, worldwide, non-exclusive, assignable, paid-up license to publish, display, and redistribute the Contribution as part of the Repository. You also license to Moderators under the same terms any other intellectual property rights required to publish, display, and redistribute the Contributions as part of the Repository. You further grant all Users of the Repository a license to the Contribution under the terms of the [OMG DDS Interoperability Testing License](../LICENSE.md) included in the Repository. Moderators are under no obligation to publish Contributions.

4. No Warranty, Consequential Damages. Limited Liability

Other than explicitly stated herein, You provide the Contribution(s) "as is" with no warranty nor claims of fitness to any purpose. Neither party shall be liable for consequential or special damages of any kind. Other than for breach of warranty or representations herein, the liability of either party to the other shall be limited to $1000.

5. General

1. If You are an agency of the United States Government, then this Agreement will be governed by the United States federal common law. Otherwise, this Agreement will be governed by the laws of the State of California except with regard to its choice of law rules.

2. A party may assign this Agreement to an entity acquiring essentially all of the party’s relevant business.

6. Electronic Signatures

"Electronic Signature" means any electronic sound, symbol, or process attached to or logically associated with a record and executed and adopted by a party with the intent to sign such record.

Each party agrees that the Electronic Signatures, whether digital or encrypted, of the parties included in this Agreement are intended to authenticate this writing and to have the same force and effect as manual signatures.


IN WITNESS WHEREOF, You, intending to be legally bound, have executed this Agreement or caused Your employer’s proper and duly authorized officer to execute and deliver this Agreement, for good and valuable consideration, the sufficiency of which is hereby acknowledged, as of the day and year first written below.

**For:**

Entity Name: Zenzen IoT

Address: 28 Laurelhill Place, Stirling, FK8 2JJ, United Kingdom

("**You**")

**By:**

Name: Timothy Simpson

Title: Founder

Date: May 21st, 2026
21 changes: 17 additions & 4 deletions interoperability_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,21 @@ def stop_process(child_process, timeout=30, poll_interval=0.2):

return return_value

def drain_process_output(child_process, timeout=0.1):
"""Drain pending output from a pexpect child so its pty cannot fill."""
try:
child_process.expect([pexpect.EOF, pexpect.TIMEOUT], timeout=timeout)
except (pexpect.EOF, pexpect.TIMEOUT):
pass

def wait_for_events_and_drain(child_process, events, timeout=0.1):
"""Wait for multiprocessing events while continuing to drain child output."""
while not all(element.is_set() for element in events):
if child_process.isalive():
drain_process_output(child_process, timeout)
else:
time.sleep(timeout)

def run_subscriber_shape_main(
name_executable: str,
parameters: str,
Expand Down Expand Up @@ -212,8 +227,7 @@ def run_subscriber_shape_main(
subscriber_finished.set() # set subscriber as finished
log_message(f'Subscriber {subscriber_index}: Waiting for Publishers to '
'finish', verbosity)
for element in publishers_finished:
element.wait() # wait for all publishers to finish
wait_for_events_and_drain(child_sub, publishers_finished)
# Stop process
if not stop_process(child_sub):
log_message(f'Subscriber {subscriber_index} process did not exit '
Expand Down Expand Up @@ -401,8 +415,7 @@ def run_publisher_shape_main(

log_message(f'Publisher {publisher_index}: Waiting for Subscribers to finish',
verbosity)
for element in subscribers_finished:
element.wait() # wait for all subscribers to finish
wait_for_events_and_drain(child_pub, subscribers_finished)
publisher_finished.set() # set publisher as finished
# Stop process
if not stop_process(child_pub):
Expand Down
93 changes: 93 additions & 0 deletions srcZig/dds.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
//! Zig DDS shim — interface contract for srcZig/shape_main.zig.
//!
//! shape_main.zig imports a module named "dds". Any Zig DDS vendor that
//! wants to participate in the dds-rtps interoperability test suite provides
//! their own implementation of this module and wires it up as the "dds"
//! dependency in their build.zig.
//!
//! ZenzenDDS's implementation lives in zenzen-zig/dds_impl.zig.
//!
//! ── Required exports ──────────────────────────────────────────────────────
//!
//! pub const DDS = ...;
//! Re-export of the vendor's standard DDS type package. Must expose the
//! standard DCPS entity handles and QoS/Status types used by shape_main:
//! DomainParticipant, Publisher, Subscriber, Topic, ContentFilteredTopic,
//! TopicDescription, DataWriter, DataReader, DataWriterQos, DataReaderQos,
//! PublisherQos, SubscriberQos, DataWriterListener, DataReaderListener,
//! StatusMask, and the status constants (OFFERED_INCOMPATIBLE_QOS_STATUS,
//! etc.).
//!
//! pub const Participant = struct { ... };
//! Opaque vendor state that bundles transport, discovery, and factory.
//! shape_main calls createParticipant / destroyParticipant and then
//! calls toDDS() to get the standard DomainParticipant handle for use
//! with the standard vtable API.
//!
//! pub fn createParticipant(alloc: std.mem.Allocator, domain_id: u32) !*Participant;
//! pub fn destroyParticipant(p: *Participant) void;
//!
//! pub fn topicName(topic: DDS.Topic) []const u8;
//! Returns the topic name string from a DDS.Topic handle.
//!
//! ── DataWriter extras (not in the standard DCPS vtable) ───────────────
//!
//! pub const WriteKind = enum { alive, dispose, unregister };
//!
//! pub fn writeRaw(dw: DDS.DataWriter, kind: WriteKind,
//! key_hash: [16]u8, data: []const u8) !void;
//! Write a pre-serialized CDR payload. The vendor stamps the source
//! timestamp internally (always "now") matching the behaviour of the
//! standard typed write() call in C/C++/Rust shape_main implementations.
//!
//! pub fn writerMatchedCount(dw: DDS.DataWriter) usize;
//! pub fn writerNotifyDeadline(dw: DDS.DataWriter) void;
//!
//! ── DataReader extras ─────────────────────────────────────────────────
//!
//! pub const TakenSample = struct {
//! data: []u8,
//! alloc: std.mem.Allocator,
//! pub fn deinit(self: TakenSample) void,
//! };
//!
//! pub fn takeRaw(dr: DDS.DataReader) ?TakenSample;
//! Returns the next pending sample, or null if the queue is empty.
//! Caller must call sample.deinit() when done.
//!
//! pub fn readerMatchedCount(dr: DDS.DataReader) usize;
//! pub fn readerNotifyDeadline(dr: DDS.DataReader) void;
//!
//! ── ContentFilteredTopic evaluation ──────────────────────────────────
//!
//! pub const FilterValue = union(enum) {
//! string: []const u8,
//! int: i64,
//! float: f64,
//! };
//!
//! pub const FieldAccessor = struct {
//! ctx: *anyopaque,
//! get: *const fn (ctx: *anyopaque, field: []const u8) ?FilterValue,
//! };
//!
//! pub fn cftMatchSample(cft: DDS.ContentFilteredTopic, acc: FieldAccessor) bool;
//! pub fn cftTopicDescription(cft: DDS.ContentFilteredTopic) DDS.TopicDescription;
//!
//! ── TypeSupport (type schema registration) ────────────────────────────
//!
//! pub const TypeSupport = struct {
//! compute_key_hash: *const fn (payload: []const u8) [16]u8,
//! };
//!
//! pub fn registerTypeSupport(dp: DDS.DomainParticipant,
//! type_name: []const u8,
//! ts: TypeSupport) void;
//! Register a key-hash computation callback for a named type. Call
//! before creating DataReaders for that type so that received changes
//! whose inline-QoS omits a key_hash can have one computed from the
//! CDR payload. `payload` passed to compute_key_hash includes the
//! 4-byte CDR encapsulation header.

// This file is documentation only. shape_main.zig imports the module
// named "dds" which is provided by the vendor's build.zig, not this file.
9 changes: 9 additions & 0 deletions srcZig/shape.idl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@appendable
struct ShapeType {
@key
string<128> color;
int32 x;
int32 y;
int32 shapesize;
sequence<uint8> additional_payload_size;
};
Loading