-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iox-#5 Add RouDiEnvironment for testing
- Loading branch information
1 parent
d0813f9
commit 8602ced
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ extern crate cpp; | |
|
||
mod error; | ||
mod runtime; | ||
mod testing; | ||
|
||
pub mod introspection; | ||
pub mod pb; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: © Contributors to the iceoryx-rs project | ||
// SPDX-FileContributor: Mathias Kraus | ||
|
||
mod roudi_environment_ffi; | ||
|
||
// re-exports | ||
pub (crate) use roudi_environment_ffi::RouDiEnvironment; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-FileCopyrightText: © Contributors to the iceoryx-rs project | ||
// SPDX-FileContributor: Mathias Kraus | ||
|
||
cpp! {{ | ||
#include "iceoryx_posh/testing/roudi_environment/roudi_environment.hpp" | ||
|
||
using iox::roudi::RouDiEnvironment; | ||
}} | ||
|
||
cpp_class!(pub unsafe struct RouDiEnvironment as "RouDiEnvironment"); | ||
|
||
impl RouDiEnvironment { | ||
pub(crate) fn new() -> Box<Self> { | ||
unsafe { | ||
let raw = cpp!([] -> *mut RouDiEnvironment as "RouDiEnvironment*" | ||
{ | ||
return new RouDiEnvironment(); | ||
}); | ||
|
||
Box::from_raw(raw) | ||
} | ||
} | ||
} |