Skip to content

SoundMatt/RELAY

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RELAY

Real-time Embedded Link Abstraction Yoke

RELAY is the shared specification and library for the SoundMatt embedded network protocol ecosystem. CAN, DDS, LIN, MQTT, RCP, and SOME/IP implementations in Go, Rust, and C++ build against RELAY to share canonical types, interface contracts, error semantics, and a common application API.

CI Go Reference


Protocol coverage

Protocol Go C++ Rust
CAN go-CAN
DDS go-DDS
LIN go-LIN
MQTT go-MQTT
RCP go-RCP cpp-RCP
SOME/IP go-SOMEIP

Specification

Full specification: spec/relay-spec.md
Machine-readable version: spec/version.json
Change history: spec/CHANGELOG.md

Current: v0.1 (draft)

Install

go get github.com/SoundMatt/RELAY@latest

Usage

import relay "github.com/SoundMatt/RELAY"

// All protocol adapters satisfy relay.Node
var node relay.Node = can.Adapt(bus)

// Send — identical regardless of underlying protocol
err := node.Send(ctx, relay.Message{
    Protocol: relay.CAN,
    ID:       "256",      // CAN frame 0x100; DDS topic; MQTT topic; RCP zone…
    Payload:  data,
})

// Subscribe
ch, err := node.Subscribe(
    relay.WithChannelDepth(128),
    relay.WithBackPressure(relay.DropOldest),
)
for msg := range ch {
    fmt.Printf("%s %s %x\n", msg.Protocol, msg.ID, msg.Payload)
}

// Request/response (RCP, SOME/IP)
if caller, ok := node.(relay.Caller); ok {
    resp, err := caller.Call(ctx, relay.Message{
        Protocol: relay.RCP,
        ID:       "FrontLeft",
        Payload:  data,
    })
}

CLI

relay version [--format text|json]

Conformance

relay conform <binary>

(available from v0.5)

Roadmap

See ROADMAP.md.

Contributing

Sign-off required on every commit (DCO):

git commit -s -m "feat: description"

License

Mozilla Public License 2.0 — see LICENSE.

About

Real-time Embedded Link Abstraction Yoke — shared spec and library for embedded network protocols (CAN, DDS, LIN, MQTT, RCP, SOME/IP)

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors