Skip to content

Commit

Permalink
Update name to up-transport-vsomeip
Browse files Browse the repository at this point in the history
  • Loading branch information
PLeVasseur committed Jun 13, 2024
1 parent ce12f2f commit 43ce45b
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ exclude = [
]
keywords = ["uProtocol", "SDK", "vsomeip", "SOMEIP"]
license = "Apache-2.0"
name = "up-client-vsomeip-rust"
name = "up-transport-vsomeip"
readme = "README.md"
repository = "https://github.com/eclipse-uprotocol/up-client-vsomeip-rust"
rust-version = "1.72"
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ impl RegistrationType {
}
}

pub struct UPClientVsomeip {
pub struct UPTransportVsomeip {
// we're going to be using this for error messages, so suppress this warning for now
#[allow(dead_code)]
authority_name: AuthorityName,
Expand All @@ -142,7 +142,7 @@ pub struct UPClientVsomeip {
tx_to_event_loop: Sender<TransportCommand>,
}

impl UPClientVsomeip {
impl UPTransportVsomeip {
pub fn new_with_config(
authority_name: &AuthorityName,
ue_id: UeId,
Expand Down
6 changes: 3 additions & 3 deletions src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use crate::{
ClientId, ReqId, RequestId, SessionId, UP_CLIENT_VSOMEIP_FN_TAG_INITIALIZE_NEW_APP_INTERNAL,
UP_CLIENT_VSOMEIP_FN_TAG_SEND_INTERNAL, UP_CLIENT_VSOMEIP_FN_TAG_UNREGISTER_LISTENER_INTERNAL,
};
use crate::{RegistrationType, UPClientVsomeip};
use crate::{RegistrationType, UPTransportVsomeip};
use crate::{
TransportCommand, UP_CLIENT_VSOMEIP_FN_TAG_REGISTER_LISTENER_INTERNAL, UP_CLIENT_VSOMEIP_TAG,
};
Expand Down Expand Up @@ -132,7 +132,7 @@ async fn send_to_inner_with_status(
}

#[async_trait]
impl UTransport for UPClientVsomeip {
impl UTransport for UPTransportVsomeip {
async fn send(&self, message: UMessage) -> Result<(), UStatus> {
trace!("Sending message: {:?}", message);

Expand Down Expand Up @@ -378,7 +378,7 @@ impl UTransport for UPClientVsomeip {
}
}

impl UPClientVsomeip {
impl UPTransportVsomeip {
async fn register_for_returning_response_if_point_to_point_listener_and_sending_request(
&self,
message: &UMessage,
Expand Down
10 changes: 5 additions & 5 deletions tests/client_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::time::Duration;
use tokio::time::Instant;
use up_client_vsomeip_rust::UPClientVsomeip;
use up_rust::{UCode, UListener, UMessage, UMessageBuilder, UStatus, UTransport, UUri};
use up_transport_vsomeip::UPTransportVsomeip;

pub struct ResponseListener {
received_response: AtomicUsize,
Expand Down Expand Up @@ -48,13 +48,13 @@ impl UListener for ResponseListener {
}
}
pub struct RequestListener {
client: Arc<UPClientVsomeip>,
client: Arc<UPTransportVsomeip>,
received_request: AtomicUsize,
}

impl RequestListener {
#[allow(clippy::new_without_default)]
pub fn new(client: Arc<UPClientVsomeip>) -> Self {
pub fn new(client: Arc<UPTransportVsomeip>) -> Self {
Self {
client,
received_request: AtomicUsize::new(0),
Expand Down Expand Up @@ -123,7 +123,7 @@ async fn client_service() {
let client_config = canonicalize(client_config).ok();
println!("client_config: {client_config:?}");

let client_res = UPClientVsomeip::new_with_config(
let client_res = UPTransportVsomeip::new_with_config(
&client_authority_name.to_string(),
streamer_ue_id,
&client_config.unwrap(),
Expand Down Expand Up @@ -171,7 +171,7 @@ async fn client_service() {
let service_config = canonicalize(service_config).ok();
println!("service_config: {service_config:?}");

let service_res = UPClientVsomeip::new_with_config(
let service_res = UPTransportVsomeip::new_with_config(
&service_authority_name.to_string(),
streamer_ue_id,
&service_config.unwrap(),
Expand Down
16 changes: 8 additions & 8 deletions tests/point_to_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,23 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::time::Duration;
use tokio::time::Instant;
use up_client_vsomeip_rust::UPClientVsomeip;
use up_rust::UMessageType::UMESSAGE_TYPE_UNSPECIFIED;
use up_rust::{
UCode, UListener, UMessage, UMessageBuilder, UMessageType, UStatus, UTransport, UUri,
};
use up_transport_vsomeip::UPTransportVsomeip;

const TEST_SLACK: usize = 1;

pub struct PointToPointListener {
client: Arc<UPClientVsomeip>,
client: Arc<UPTransportVsomeip>,
received_request: AtomicUsize,
received_response: AtomicUsize,
}

impl PointToPointListener {
#[allow(clippy::new_without_default)]
pub fn new(client: Arc<UPClientVsomeip>) -> Self {
pub fn new(client: Arc<UPTransportVsomeip>) -> Self {
Self {
client,
received_request: AtomicUsize::new(0),
Expand Down Expand Up @@ -129,13 +129,13 @@ impl UListener for ResponseListener {
}

pub struct RequestListener {
client: Arc<UPClientVsomeip>,
client: Arc<UPTransportVsomeip>,
received_request: AtomicUsize,
}

impl RequestListener {
#[allow(clippy::new_without_default)]
pub fn new(client: Arc<UPClientVsomeip>) -> Self {
pub fn new(client: Arc<UPTransportVsomeip>) -> Self {
Self {
client,
received_request: AtomicUsize::new(0),
Expand Down Expand Up @@ -211,7 +211,7 @@ async fn point_to_point() {
let abs_vsomeip_config_path = canonicalize(vsomeip_config_path).ok();
info!("abs_vsomeip_config_path: {abs_vsomeip_config_path:?}");

let point_to_point_client_res = UPClientVsomeip::new_with_config(
let point_to_point_client_res = UPTransportVsomeip::new_with_config(
&service_authority_name.to_string(),
streamer_ue_id,
&abs_vsomeip_config_path.unwrap(),
Expand Down Expand Up @@ -285,7 +285,7 @@ async fn point_to_point() {
let client_config = canonicalize(client_config).ok();
info!("client_config: {client_config:?}");

let client_res = UPClientVsomeip::new_with_config(
let client_res = UPTransportVsomeip::new_with_config(
&client_authority_name.to_string(),
streamer_ue_id,
&client_config.unwrap(),
Expand Down Expand Up @@ -319,7 +319,7 @@ async fn point_to_point() {
let service_config = canonicalize(service_config).ok();
info!("service_config: {service_config:?}");

let service_res = UPClientVsomeip::new_with_config(
let service_res = UPTransportVsomeip::new_with_config(
&service_authority_name.to_string(),
streamer_ue_id,
&service_config.unwrap(),
Expand Down
6 changes: 3 additions & 3 deletions tests/publisher_subscriber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::time::Duration;
use tokio::time::Instant;
use up_client_vsomeip_rust::UPClientVsomeip;
use up_rust::{UListener, UMessage, UMessageBuilder, UStatus, UTransport, UUri};
use up_transport_vsomeip::UPTransportVsomeip;

pub struct SubscriberListener {
received_publish: AtomicUsize,
Expand Down Expand Up @@ -65,7 +65,7 @@ async fn publisher_subscriber() {
..Default::default()
};

let subscriber_res = UPClientVsomeip::new(&authority_name.to_string(), subscriber_ue_id);
let subscriber_res = UPTransportVsomeip::new(&authority_name.to_string(), subscriber_ue_id);

let Ok(subscriber) = subscriber_res else {
panic!("Unable to establish subscriber");
Expand All @@ -86,7 +86,7 @@ async fn publisher_subscriber() {

tokio::time::sleep(Duration::from_millis(1000)).await;

let publisher_res = UPClientVsomeip::new(&authority_name.to_string(), ue_id);
let publisher_res = UPTransportVsomeip::new(&authority_name.to_string(), ue_id);

let Ok(publisher) = publisher_res else {
panic!("Unable to establish publisher");
Expand Down
22 changes: 11 additions & 11 deletions tests/upclient_vsomeip.rs → tests/register_unregister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
********************************************************************************/

pub mod test_lib;
use up_client_vsomeip_rust::UPClientVsomeip;
use up_transport_vsomeip::UPTransportVsomeip;

#[cfg(test)]
mod tests {
use crate::test_lib::PrintingListener;
use crate::{test_lib, UPClientVsomeip};
use crate::{test_lib, UPTransportVsomeip};
use log::{error, trace};
use std::path::Path;
use std::sync::Arc;
Expand All @@ -29,7 +29,7 @@ mod tests {
fn test_constructing_client() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10);
let client = UPTransportVsomeip::new(&"foo".to_string(), 10);

thread::sleep(Duration::from_millis(100));

Expand All @@ -40,7 +40,7 @@ mod tests {
async fn test_registering_publish() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10).unwrap();
let client = UPTransportVsomeip::new(&"foo".to_string(), 10).unwrap();

let source_filter = UUri {
authority_name: "foo".to_string(),
Expand Down Expand Up @@ -81,7 +81,7 @@ mod tests {
async fn test_registering_unregistering_publish() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10).unwrap();
let client = UPTransportVsomeip::new(&"foo".to_string(), 10).unwrap();

let source_filter = UUri {
authority_name: "foo".to_string(),
Expand Down Expand Up @@ -123,7 +123,7 @@ mod tests {
async fn test_registering_request() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10).unwrap();
let client = UPTransportVsomeip::new(&"foo".to_string(), 10).unwrap();

let source_filter = UUri {
authority_name: "foo".to_string(),
Expand Down Expand Up @@ -160,7 +160,7 @@ mod tests {
async fn test_registering_unregistering_request() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10).unwrap();
let client = UPTransportVsomeip::new(&"foo".to_string(), 10).unwrap();

let source_filter = UUri {
authority_name: "foo".to_string(),
Expand Down Expand Up @@ -209,7 +209,7 @@ mod tests {
async fn test_registering_response() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10).unwrap();
let client = UPTransportVsomeip::new(&"foo".to_string(), 10).unwrap();

let source_filter = UUri {
authority_name: "foo".to_string(),
Expand Down Expand Up @@ -246,7 +246,7 @@ mod tests {
async fn test_registering_unregistering_response() {
test_lib::before_test();

let client = UPClientVsomeip::new(&"foo".to_string(), 10).unwrap();
let client = UPTransportVsomeip::new(&"foo".to_string(), 10).unwrap();

let source_filter = UUri {
authority_name: "foo".to_string(),
Expand Down Expand Up @@ -297,7 +297,7 @@ mod tests {
async fn test_registering_all_point_to_point() {
test_lib::before_test();

let client = UPClientVsomeip::new_with_config(
let client = UPTransportVsomeip::new_with_config(
&"baz".to_string(),
10,
Path::new("vsomeip_configs/example_ustreamer.json"),
Expand Down Expand Up @@ -339,7 +339,7 @@ mod tests {
async fn test_registering_unregistering_all_point_to_point() {
test_lib::before_test();

let client = UPClientVsomeip::new_with_config(
let client = UPTransportVsomeip::new_with_config(
&"foo".to_string(),
10,
Path::new("vsomeip_configs/example_ustreamer_2.json"),
Expand Down
2 changes: 1 addition & 1 deletion vsomeip-proc-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ proc-macro = true
proc-macro2 = "1.0"
quote = "1.0"
rayon = "1.10.0"
syn = { version = "2.0.66", features = ["full", "visit-mut"] }
syn = { version = "2.0.53", features = ["full", "visit-mut"] }

0 comments on commit 43ce45b

Please sign in to comment.