diff --git a/examples/rust/event/notifier.rs b/examples/rust/event/notifier.rs index 2488cad77..2936fe284 100644 --- a/examples/rust/event/notifier.rs +++ b/examples/rust/event/notifier.rs @@ -22,13 +22,14 @@ fn main() -> Result<(), Box> { .service_builder("MyEventName".try_into()?) .event() .open_or_create()?; + let max_event_id = event.static_config().event_id_max_value(); let notifier = event.notifier_builder().create()?; let mut counter: usize = 0; while let NodeEvent::Tick = node.wait(CYCLE_TIME) { counter += 1; - notifier.notify_with_custom_event_id(EventId::new(counter))?; + notifier.notify_with_custom_event_id(EventId::new(counter % max_event_id))?; println!("Trigger event with id {} ...", counter); } diff --git a/iceoryx2-ffi/ffi/src/api/node_builder.rs b/iceoryx2-ffi/ffi/src/api/node_builder.rs index 1699e26e2..7cb3c6e77 100644 --- a/iceoryx2-ffi/ffi/src/api/node_builder.rs +++ b/iceoryx2-ffi/ffi/src/api/node_builder.rs @@ -47,7 +47,7 @@ impl IntoCInt for NodeCreationFailure { #[repr(C)] #[repr(align(8))] // alignment of NodeBuilder pub struct iox2_node_builder_storage_internal_t { - internal: [u8; 18960], // magic number obtained with size_of::() + internal: [u8; 3568], // magic number obtained with size_of::() } #[repr(C)] diff --git a/iceoryx2-pal/configuration/src/lib.rs b/iceoryx2-pal/configuration/src/lib.rs index 3ac2d0e84..2fccc2bbd 100644 --- a/iceoryx2-pal/configuration/src/lib.rs +++ b/iceoryx2-pal/configuration/src/lib.rs @@ -20,7 +20,9 @@ pub mod settings { pub const PATH_SEPARATOR: u8 = b'/'; pub const ROOT: &[u8] = b"/"; pub const FILENAME_LENGTH: usize = 255; - pub const PATH_LENGTH: usize = 4096; + // it is actually 4096 but to be more compatible with windows and also safe some stack the number + // is reduced to 255 + pub const PATH_LENGTH: usize = 255; #[cfg(not(target_os = "macos"))] pub const AT_LEAST_TIMING_VARIANCE: f32 = 0.25; #[cfg(target_os = "macos")]