1#![cfg_attr(not(feature = "std"), no_std)]
23#![forbid(unsafe_code)]
24#![warn(missing_docs)]
25
26#[cfg(feature = "alloc")]
27extern crate alloc;
28
29pub mod cidl;
30pub mod cif;
31pub mod component_def;
32pub mod context;
33pub mod dynamic_api;
34pub mod home;
35pub mod orb_extensions;
36pub mod port;
37
38#[cfg(feature = "std")]
39pub mod container;
40#[cfg(all(feature = "std", feature = "cos-event"))]
41pub mod cos_event_bridge;
42#[cfg(feature = "std")]
43pub mod lifecycle;
44#[cfg(feature = "std")]
45pub mod orb_core;
46#[cfg(feature = "std")]
47pub mod pss;
48#[cfg(feature = "std")]
49pub mod time_psm;
50#[cfg(feature = "std")]
51pub mod timer;
52
53pub use cidl::{Composition, HomeExecutor, StorageHome, StorageType};
54pub use cif::{ComponentExecutor, ExecutorLocator, KeyedExecutor, SessionExecutor};
55pub use component_def::{
56 AttributeDef, ComponentDef, EventSinkDef, EventSourceDef, FacetDef, ReceptacleDef,
57};
58pub use context::ComponentContext;
59pub use home::{HomeDef, HomeFinder};
60pub use port::{ConnectionId, EventStream, PortRegistry};
61
62#[cfg(feature = "std")]
63pub use container::{Container, ContainerError, ContainerType, LifecycleState};
64#[cfg(all(feature = "std", feature = "cos-event"))]
65pub use cos_event_bridge::EventChannelTimerCallback;
66#[cfg(feature = "std")]
67pub use timer::{TimerEventService, TimerHandle, TimerKind};
68
69pub mod conformance {
77 pub const CCM_CONFORMANCE_BASIC_LEVEL: &str = "OMG-CCM-4.0:Basic";
81
82 pub const CCM_CONFORMANCE_BASIC_LEVEL_JAVA: &str = "OMG-CCM-4.0:BasicJava";
85
86 pub const LIGHTWEIGHT_CCM_LEVEL: &str = "OMG-CCM-4.0:Lightweight";
88
89 pub const LWCCM_RESTRICTIONS_ENFORCED: &str = "OMG-CCM-4.0:LwCCM-Restrictions";
91
92 pub const LWCCM_FILTER_ACTIVE: &str = "OMG-CCM-4.0:LwCCM-Filter";
95
96 pub const CORBA_PART3_6_13_CCM_CONFORMANCE: &str = "OMG-CORBA-3.3-P3:6.13-CCM-Conformance";
103
104 pub const CORBA_PART3_7_GENERIC_INTERACTION: &str = "OMG-CORBA-3.3-P3:7-Generic-Interaction";
108
109 pub const CORBA_PART3_14_LIGHTWEIGHT_CCM_PROFILE: &str = "OMG-CORBA-3.3-P3:14-LwCCM-Profile";
113
114 pub const CORBA_PART2_10_6_CSIV2_LEVEL_0: &str = "OMG-CORBA-3.3-P2:10.6-CSIv2-L0";
119 pub const CORBA_PART2_10_6_CSIV2_LEVEL_1: &str = "OMG-CORBA-3.3-P2:10.6-CSIv2-L1";
121 pub const CORBA_PART2_10_6_CSIV2_LEVEL_2: &str = "OMG-CORBA-3.3-P2:10.6-CSIv2-L2";
123
124 pub const CCM_OPTIONAL_EXTENDED_LEVEL: &str = "OMG-CCM-4.0:Optional-Extended";
133
134 pub const CCM_ORB_VENDOR_STUB: &str = "OMG-CCM-4.0:ORB-Vendor-Stub";
138}
139
140#[cfg(test)]
141mod conformance_tests {
142 use super::conformance::*;
143
144 #[test]
145 fn ccm_conformance_basic_level_marker_matches_spec() {
146 assert_eq!(CCM_CONFORMANCE_BASIC_LEVEL, "OMG-CCM-4.0:Basic");
147 }
148
149 #[test]
150 fn ccm_conformance_basic_level_java_marker_matches_spec() {
151 assert_eq!(CCM_CONFORMANCE_BASIC_LEVEL_JAVA, "OMG-CCM-4.0:BasicJava");
152 }
153
154 #[test]
155 fn lightweight_ccm_level_marker_matches_spec() {
156 assert_eq!(LIGHTWEIGHT_CCM_LEVEL, "OMG-CCM-4.0:Lightweight");
157 }
158
159 #[test]
160 fn lwccm_restrictions_marker_matches_spec() {
161 assert_eq!(
162 LWCCM_RESTRICTIONS_ENFORCED,
163 "OMG-CCM-4.0:LwCCM-Restrictions"
164 );
165 }
166
167 #[test]
168 fn lwccm_filter_marker_matches_spec() {
169 assert_eq!(LWCCM_FILTER_ACTIVE, "OMG-CCM-4.0:LwCCM-Filter");
170 }
171
172 #[test]
173 fn all_markers_are_distinct() {
174 let markers = [
175 CCM_CONFORMANCE_BASIC_LEVEL,
176 CCM_CONFORMANCE_BASIC_LEVEL_JAVA,
177 LIGHTWEIGHT_CCM_LEVEL,
178 LWCCM_RESTRICTIONS_ENFORCED,
179 LWCCM_FILTER_ACTIVE,
180 CORBA_PART3_6_13_CCM_CONFORMANCE,
181 CORBA_PART3_7_GENERIC_INTERACTION,
182 CORBA_PART3_14_LIGHTWEIGHT_CCM_PROFILE,
183 CORBA_PART2_10_6_CSIV2_LEVEL_0,
184 CORBA_PART2_10_6_CSIV2_LEVEL_1,
185 CORBA_PART2_10_6_CSIV2_LEVEL_2,
186 ];
187 let mut seen = std::collections::HashSet::new();
188 for m in markers {
189 assert!(seen.insert(m), "duplicate marker: {m}");
190 }
191 }
192
193 #[test]
194 fn corba_part3_6_13_marker_namespace() {
195 assert!(CORBA_PART3_6_13_CCM_CONFORMANCE.starts_with("OMG-CORBA-3.3-P3:"));
196 }
197
198 #[test]
199 fn corba_part3_7_marker_namespace() {
200 assert!(CORBA_PART3_7_GENERIC_INTERACTION.starts_with("OMG-CORBA-3.3-P3:"));
201 }
202
203 #[test]
204 fn corba_part3_14_marker_namespace() {
205 assert!(CORBA_PART3_14_LIGHTWEIGHT_CCM_PROFILE.starts_with("OMG-CORBA-3.3-P3:"));
206 }
207
208 #[test]
209 fn csiv2_level_markers_match_spec() {
210 assert_eq!(
211 CORBA_PART2_10_6_CSIV2_LEVEL_0,
212 "OMG-CORBA-3.3-P2:10.6-CSIv2-L0"
213 );
214 assert_eq!(
215 CORBA_PART2_10_6_CSIV2_LEVEL_1,
216 "OMG-CORBA-3.3-P2:10.6-CSIv2-L1"
217 );
218 assert_eq!(
219 CORBA_PART2_10_6_CSIV2_LEVEL_2,
220 "OMG-CORBA-3.3-P2:10.6-CSIv2-L2"
221 );
222 }
223}