Skip to content

SoundMatt/go-RCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-RCP

A Go library implementing the Remote Control Protocol (RCP) for zonal control in automotive systems.

RCP connects a high-performance central computer to distributed Ethernet-based zone controllers, keeping application logic centralised while remote zones provide access to local I/O, sensors, CAN/LIN gateways, and actuators.

CI DCO Go Reference

Packages

Package Description
. Core interfaces: Controller, Registry, Command, Response, Status, Zone
mock In-process mock controller and registry — zero dependencies, default for unit tests

Install

go get github.com/SoundMatt/go-RCP

Quick start

import (
    rcp "github.com/SoundMatt/go-RCP"
    "github.com/SoundMatt/go-RCP/mock"
)

reg := mock.NewRegistry()
defer reg.Close()

ctrl, _ := reg.Lookup(rcp.ZoneFrontLeft)

cmd := &rcp.Command{
    ID:       1,
    Zone:     rcp.ZoneFrontLeft,
    Type:     rcp.CmdSet,
    Priority: rcp.PriorityNormal,
    Payload:  []byte(`{"actuator":"indicator","state":"on"}`),
}

resp, err := ctrl.Send(context.Background(), cmd)
if err != nil {
    log.Fatal(err)
}
fmt.Println(resp.Status) // OK

Zones

Constant Value Description
ZoneFrontLeft 1 Front-left zone controller
ZoneFrontRight 2 Front-right zone controller
ZoneRearLeft 3 Rear-left zone controller
ZoneRearRight 4 Rear-right zone controller
ZoneCentral 5 Central zone controller

Command types

Constant Value Description
CmdNoop 0 No-op / keepalive
CmdSet 1 Set an output or actuator state
CmdGet 2 Query current state
CmdReset 3 Reset zone controller
CmdWatchdog 4 Watchdog kick

Docker quickstart

docker compose -f docker/docker-compose.yml up --build

Starts a controller and two zone controller containers communicating over a bridge network.

Safety

go-RCP targets deployment in automotive safety-critical environments.

  • Safety standard: ISO 26262 ASIL-B / IEC 61508 SIL-2
  • Security standard: IEC 62443 SL-2
  • go-FuSa static analysis runs in CI on every PR
  • All requirements are traced to tests in .fusa-reqs.json
  • HARA, FMEA, safety case, and SBOM are regenerated on every release

See SAFETY_PLAN.md, SECURITY.md, and INCIDENT-RESPONSE.md.

License

Mozilla Public License v2.0. Copyright © Matt Jones.

About

go-RCP is a centralized control-plane service that enables a high-performance computer to command and monitor distributed Ethernet-connected endpoints. It supports zonal architectures by keeping application logic centralized while remote devices provide access to local I/O, sensors, and interfaces.

Resources

License

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors