Skip to content

UURLabShmRpcTransport

Shared-memory implementation of the bridge's RPC transport.

Owns two SHM regions per session: req.shm -- bridge writes msgpack request, UE reads. rep.shm -- UE writes msgpack reply, bridge reads. Bridge-owned UObject (NOT a UActorComponent). Co-exists with UURLabZmqRpcTransport; clients pick which transport to talk to. Scope: manager-required ops only. SHM is the latency-optimised inner-loop transport (1 kHz controller channels). Editor-only ops (import_xml, spawn_actor, list_actors, etc.) get a wrong_transport: use_zmq reply via the base class's AcceptsEditorOps()=false short-circuit. The bridge-side client auto-routes editor ops to ZMQ; nothing needs to be re-tried.

Attribute Value
Kind Class
UE Macro UCLASS
Inherits UURLabRpcTransport

Properties

Public Properties

Property Type Description
BufferStride int32 Per-buffer slot size. Step replies are tiny (~few KB) but the
SessionId FString Optional explicit session id (defaults to "live"; mirrors the
PollIntervalUs int32 How long the worker thread waits between sequence checks

BufferStride

Per-buffer slot size. Step replies are tiny (~few KB) but the

  • Type: int32
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: URLab|SHM

SessionId

Optional explicit session id (defaults to "live"; mirrors the

  • Type: FString
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: URLab|SHM

PollIntervalUs

How long the worker thread waits between sequence checks

  • Type: int32
  • Editor: ✏️ EditAnywhere
  • Blueprint: 🔵 ReadWrite
  • Category: URLab|SHM

Private Properties

Property Type Description
ReqReadyEvent void* Named-event handles for kernel-wakeup signalling. Bridge calls

ReqReadyEvent

Named-event handles for kernel-wakeup signalling. Bridge calls

  • Type: void*

Functions

Public Functions

General

Function Returns Description
AcceptsEditorOps() bool SHM scope narrowing: editor ops never reach the dispatcher on
GetReqPath() FString Resolved on-disk paths (set after TransportInit).
SetOwningBridge() void Bridge that owns this transport. Set once at construction by the
TransportInit() bool Bind sockets / mmap regions / start the worker thread. Returns
TransportShutdown() void Stop the worker thread, release handles. Idempotent.
GetTransportName() FString Human-readable transport name for logs ("zmq" / "shm" / future
ProcessRequestBytes() bool Shared request handler. Concrete transports call this from their
ResolveDispatcher() FURLabRpcDispatcher* Resolve the live dispatcher. Always goes through the owning
AcceptsEditorOps

SHM scope narrowing: editor ops never reach the dispatcher on

  • Signature: AcceptsEditorOps()
  • Returns: bool
GetReqPath

Resolved on-disk paths (set after TransportInit).

  • Signature: GetReqPath()
  • Returns: FString
SetOwningBridge

Bridge that owns this transport. Set once at construction by the

TransportInit

Bind sockets / mmap regions / start the worker thread. Returns

  • Signature: TransportInit()
  • Returns: bool
TransportShutdown

Stop the worker thread, release handles. Idempotent.

  • Signature: TransportShutdown()
GetTransportName

Human-readable transport name for logs ("zmq" / "shm" / future

  • Signature: GetTransportName()
  • Returns: FString
ProcessRequestBytes

Shared request handler. Concrete transports call this from their

  • Signature: ProcessRequestBytes(const TArray<uint8>& InBytes, TArray<uint8>& OutReplyBytes)
  • Returns: bool
ResolveDispatcher

Resolve the live dispatcher. Always goes through the owning

Private Functions

General

Function Returns Description
RunPollLoop() void Worker-thread loop: wait for a request (event or poll), dispatch,
RunPollLoop

Worker-thread loop: wait for a request (event or poll), dispatch,

  • Signature: RunPollLoop()