zerodds-rtc 1.0.0-rc.6

OMG RTC 1.0 (formal/2008-04-04) — Lightweight Robotic Technology Component (Local PSM §6.3): ReturnCode_t, LifeCycle-State-Machine, ExecutionContext, Periodic/Stimulus/Mode-Profiles, Resource-Introspection. no_std + alloc.
Documentation

zerodds-rtc

License: Apache-2.0 docs.rs

OMG RTC 1.0 (formal/2008-04-04) — Robotic Technology Component. Lightweight RTC + ExecutionContext + lifecycle state machine + Periodic/Stimulus/Mode profiles + resource introspection. Local PSM (§6.3) compliant; no_std + alloc, forbid(unsafe_code). Safety classification: STANDARD.

Spec mapping

Spec Section
OMG RTC 1.0 §5.2.1 ReturnCode_t
OMG RTC 1.0 §5.2.2.2 LightweightRTObject
OMG RTC 1.0 §5.2.2.3 LifeCycle
OMG RTC 1.0 §5.2.2.4 Component-Action-Trait
OMG RTC 1.0 §5.2.2.5 / §5.2.2.6 ExecutionContext
OMG RTC 1.0 §5.2.2.7 ExecutionKind
OMG RTC 1.0 §5.3 Execution-Semantics (Periodic/Stimulus/Modes)
OMG RTC 1.0 §5.4 Resource Data Model
OMG RTC 1.0 §6.3 Local PSM

What's included

  • return_codeReturnCode with all 6 status codes plus is_ok() / into_result() helpers.
  • lifecycleLifeCycleState, ExecutionKind, ComponentAction trait + state-machine enforcement.
  • objectLightweightRtObject, ExecutionContextHandle.
  • executionExecutionContext, ExecutionContextOperations trait.
  • semanticsDataFlowComponentAction (Periodic), FsmComponentAction (Stimulus), MultiModeComponentAction + ModeOfOperation (Modes).
  • resourceIntrospection, ComponentProfile, PortProfile, ConnectorProfile, PortDirection, ProfileId.

What's not covered

  • CORBA PSM (§6.5) — requires a CORBA ORB; ZeroDDS has none.
  • Lightweight CCM PSM (§6.4) — requires an LwCCM container; see crates/ccm/, which provides the IDL-equivalent transformation but no container.
  • §5.4 discovery/wire aspect — partial: the resource data model is in the crate, the discovery wire aspect is not.

Example

use zerodds_rtc::ReturnCode;

// Spec §5.2.1.1: ReturnCode::Ok is the only OK code.
assert!(ReturnCode::Ok.is_ok());
assert!(!ReturnCode::PreconditionNotMet.is_ok());
assert_eq!(ReturnCode::Ok.into_result(), Ok(()));

Tests

cargo test -p zerodds-rtc

See also