diff --git a/Cargo.lock b/Cargo.lock index c41bb22..f6444e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,6 +170,19 @@ dependencies = [ "ncomm-update-clients-and-servers", ] +[[package]] +name = "ncomm" +version = "1.0.0" +dependencies = [ + "ncomm-clients-and-servers", + "ncomm-core", + "ncomm-executors", + "ncomm-nodes", + "ncomm-publishers-and-subscribers", + "ncomm-update-clients-and-servers", + "ncomm-utils", +] + [[package]] name = "ncomm-clients-and-servers" version = "1.0.0" @@ -194,6 +207,10 @@ dependencies = [ "threadpool", ] +[[package]] +name = "ncomm-nodes" +version = "1.0.0" + [[package]] name = "ncomm-publishers-and-subscribers" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index fda109a..8c982a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,23 +1,27 @@ [workspace] members = [ + "ncomm", "ncomm-core", "ncomm-utils", "ncomm-executors", "ncomm-publishers-and-subscribers", "ncomm-clients-and-servers", "ncomm-update-clients-and-servers", + "ncomm-nodes", "examples/minimal-client-server", "examples/minimal-update-client-server", "examples/minimal-publisher-subscriber", ] default-members = [ + "ncomm", "ncomm-core", "ncomm-utils", "ncomm-executors", "ncomm-publishers-and-subscribers", "ncomm-clients-and-servers", "ncomm-update-clients-and-servers", + "ncomm-nodes", ] resolver = "2" @@ -36,12 +40,14 @@ categories = ["science::robotics"] [workspace.dependencies] # NComm +ncomm = { path = "ncomm", version = "1.0.0" } ncomm-core = { path = "ncomm-core", version = "1.0.0" } ncomm-utils = { path = "ncomm-utils", version = "1.0.0" } ncomm-executors = { path = "ncomm-executors", version = "1.0.0" } ncomm-publishers-and-subscribers = { path = "ncomm-publishers-and-subscribers", version = "1.0.0" } ncomm-clients-and-servers = { path = "ncomm-clients-and-servers", version = "1.0.0" } ncomm-update-clients-and-servers = { path = "ncomm-update-clients-and-servers", version = "1.0.0" } +ncomm-nodes = { path = "ncomm-nodes", version = "1.0.0" } # Outside Dependencies crossbeam = "0.8.4" diff --git a/README.md b/README.md index d18aa9a..294a9a5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# NCOMM +# NComm ## Description -ncomm is an in-progress Rust-Native Node-Based Communication system for use in robotics, IOT, etc... \ No newline at end of file +NComm is an in-progress Rust-Native Node-Based Communication system for use in robotics, IOT, etc... \ No newline at end of file diff --git a/ncomm-clients-and-servers/src/udp.rs b/ncomm-clients-and-servers/src/udp.rs index 0930a76..5ce08af 100644 --- a/ncomm-clients-and-servers/src/udp.rs +++ b/ncomm-clients-and-servers/src/udp.rs @@ -70,7 +70,7 @@ impl Client for UdpClient { /// Check the UDP socket for incoming Datagrams. /// /// Note: Incoming data will be in the form: - /// [request[0], request[1], ..., request[-1], response[0], response[1], ...] + /// \[request\[0\], request\[1\], ..., request\[-1\], response\[0\], response\[1\], ...\] fn poll_for_responses(&mut self) -> Vec> { let mut responses = Vec::new(); diff --git a/ncomm-core/README.md b/ncomm-core/README.md index 102304b..273af79 100644 --- a/ncomm-core/README.md +++ b/ncomm-core/README.md @@ -2,4 +2,4 @@ ## Description -NComm core is a collection of traits that define common types used by the ncomm robotics framework. \ No newline at end of file +NComm core is a collection of traits that define common types used by the NComm robotics framework. \ No newline at end of file diff --git a/ncomm-nodes/Cargo.toml b/ncomm-nodes/Cargo.toml new file mode 100644 index 0000000..c029060 --- /dev/null +++ b/ncomm-nodes/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "ncomm-nodes" +description = "A collection of common Nodes for use in NComm projects" +version.workspace = true +edition.workspace = true +license.workspace = true +keywords.workspace = true +homepage.workspace = true +repository.workspace = true +readme.workspace = true +authors.workspace = true +categories.workspace = true + +[dependencies] diff --git a/ncomm-nodes/src/lib.rs b/ncomm-nodes/src/lib.rs new file mode 100644 index 0000000..b93cf3f --- /dev/null +++ b/ncomm-nodes/src/lib.rs @@ -0,0 +1,14 @@ +pub fn add(left: u64, right: u64) -> u64 { + left + right +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn it_works() { + let result = add(2, 2); + assert_eq!(result, 4); + } +} diff --git a/ncomm/Cargo.toml b/ncomm/Cargo.toml new file mode 100644 index 0000000..cafd467 --- /dev/null +++ b/ncomm/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "ncomm" +description = "NComm Robotics Framework" +version.workspace = true +edition.workspace = true +license.workspace = true +keywords.workspace = true +homepage.workspace = true +repository.workspace = true +readme.workspace = true +authors.workspace = true +categories.workspace = true + +[dependencies] +ncomm-core = { workspace = true } +ncomm-utils = { workspace = true } +ncomm-executors = { workspace = true } +ncomm-publishers-and-subscribers = { workspace = true } +ncomm-clients-and-servers = { workspace = true } +ncomm-update-clients-and-servers = { workspace = true } +ncomm-nodes = { workspace = true } \ No newline at end of file diff --git a/ncomm/src/lib.rs b/ncomm/src/lib.rs new file mode 100644 index 0000000..a71b567 --- /dev/null +++ b/ncomm/src/lib.rs @@ -0,0 +1,20 @@ +//! +//! NComm +//! + +pub mod prelude; + +/// NComm Core Traits +pub use ncomm_core as core; +/// NComm Utility Functionality and Traits +pub use ncomm_utils as utils; +/// NComm Executors +pub use ncomm_executors as executors; +/// NComm Publishers and Subscribers +pub use ncomm_publishers_and_subscribers as pubsubs; +/// NComm Clients and Servers +pub use ncomm_clients_and_servers as client_servers; +/// NComm Update Clients and Servers +pub use ncomm_update_clients_and_servers as update_client_servers; +/// Common NComm Nodes +pub use ncomm_nodes as nodes; diff --git a/ncomm/src/prelude.rs b/ncomm/src/prelude.rs new file mode 100644 index 0000000..fcb810b --- /dev/null +++ b/ncomm/src/prelude.rs @@ -0,0 +1,6 @@ +//! +//! Re-export of NComm traits to make working with +//! NComm a bit easier +//! + +pub use ncomm_core::*; \ No newline at end of file