Skip to content

Commit

Permalink
Create ncomm (assembly crate) and ncomm-nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
N8BWert committed Sep 6, 2024
1 parent d7b19b1 commit 5850c28
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 4 deletions.
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NCOMM
# NComm

## Description

ncomm is an in-progress Rust-Native Node-Based Communication system for use in robotics, IOT, etc...
NComm is an in-progress Rust-Native Node-Based Communication system for use in robotics, IOT, etc...
2 changes: 1 addition & 1 deletion ncomm-clients-and-servers/src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl<Req: Packable, Res: Packable> Client for UdpClient<Req, Res> {
/// 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<Result<(Self::Request, Self::Response), Self::Error>> {
let mut responses = Vec::new();

Expand Down
2 changes: 1 addition & 1 deletion ncomm-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

## Description

NComm core is a collection of traits that define common types used by the ncomm robotics framework.
NComm core is a collection of traits that define common types used by the NComm robotics framework.
14 changes: 14 additions & 0 deletions ncomm-nodes/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
14 changes: 14 additions & 0 deletions ncomm-nodes/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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);
}
}
21 changes: 21 additions & 0 deletions ncomm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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 }
20 changes: 20 additions & 0 deletions ncomm/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 6 additions & 0 deletions ncomm/src/prelude.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//!
//! Re-export of NComm traits to make working with
//! NComm a bit easier
//!

pub use ncomm_core::*;

0 comments on commit 5850c28

Please sign in to comment.