Skip to main content

Crate zerodds_rtc

Crate zerodds_rtc 

Source
Expand description

OMG RTC 1.0 — Robotic Technology Component.

Crate zerodds-rtc. Safety classification: STANDARD. Spec formal/2008-04-04 (docs/standards/cache/omg/rtc-1.0.pdf).

§Scope

Implemented are: lightweight RTC, execution semantics (periodic / stimulus response / modes), local PSM (§5.2 + §5.3 + §6.3) as a Rust library. The local PSM is explicitly “Components on same network node, direct object refs without CORBA-mediated middleware” (spec §1.3 point 1, p. 2) and thus ZeroDDS-conformant.

§What is 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.
  • Introspection §5.4 Resource Data Model — partial: the data model is in the crate, the discovery/wire aspect is not.

§Modules

  • return_codeReturnCode_t (spec §5.2.1).
  • lifecycleLifeCycleState, ExecutionKind, ComponentAction trait + state-machine enforcement (spec §5.2.2.3 / §5.2.2.7 / §5.2.2.4).
  • objectLightweightRTObject model (spec §5.2.2.2) + ExecutionContextHandle_t (spec §5.2.2.8).
  • executionExecutionContext + ExecutionContextOperations (spec §5.2.2.5 / §5.2.2.6).
  • semantics — execution-kind profiles (periodic/stimulus/modes, spec §5.3).

§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(()));

Re-exports§

pub use execution::ExecutionContext;
pub use execution::ExecutionContextOperations;
pub use lifecycle::ComponentAction;
pub use lifecycle::ExecutionKind;
pub use lifecycle::LifeCycleState;
pub use object::ExecutionContextHandle;
pub use object::LightweightRtObject;
pub use resource::ComponentProfile;
pub use resource::ConnectorProfile;
pub use resource::Introspection;
pub use resource::PortDirection;
pub use resource::PortProfile;
pub use resource::ProfileId;
pub use return_code::ReturnCode;
pub use semantics::DataFlowComponentAction;
pub use semantics::FsmComponentAction;
pub use semantics::ModeOfOperation;
pub use semantics::MultiModeComponentAction;

Modules§

execution
ExecutionContext + ExecutionContextOperations — Spec §5.2.2.5 / §5.2.2.6.
lifecycle
Lifecycle model — spec §5.2.2.3 / §5.2.2.4 / §5.2.2.7.
object
LightweightRTObject + State-Machine — Spec §5.2.2.2.
resource
OMG RTC 1.0 §5.4 Resource Data Model + Introspection Interfaces.
return_code
ReturnCode_t — Spec §5.2.1.
semantics
Execution-Semantics-Profile — Spec §5.3.