Skip to content

Commit

Permalink
fix crate new name
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-cavalcanti committed Oct 20, 2023
1 parent 250ec58 commit 17f5cbc
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 23 deletions.
6 changes: 4 additions & 2 deletions examples/get_simulation_time.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use zmq_remote_api::{sim::Sim, RemoteAPIError, RemoteApiClientParams};
use coppeliasim_zmq_remote_api::{
sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams,
};

/*
Example based on Example.cpp
Expand All @@ -8,7 +10,7 @@ fn main() -> Result<(), RemoteAPIError> {
// use the env variable RUST_LOG="trace" or RUST_LOG="debug" to observe the zmq communication
env_logger::init();

let client = zmq_remote_api::RemoteApiClient::new(RemoteApiClientParams {
let client = RemoteApiClient::new(RemoteApiClientParams {
host: "localhost".to_string(),
..RemoteApiClientParams::default()
})?;
Expand Down
11 changes: 6 additions & 5 deletions examples/low_level_call.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use zmq_remote_api::{
RawRequest, RemoteAPIError, RemoteApiClientInterface, RemoteApiClientParams, ZmqRequest,
use coppeliasim_zmq_remote_api::{
RawRequest, RemoteAPIError, RemoteApiClient, RemoteApiClientInterface, RemoteApiClientParams,
ZmqRequest,
};

use ciborium::cbor;
Expand All @@ -8,7 +9,7 @@ fn main() -> Result<(), RemoteAPIError> {
// use the env variable RUST_LOG="trace" or RUST_LOG="debug" to observe the zmq communication
env_logger::init();

let client = zmq_remote_api::RemoteApiClient::new(RemoteApiClientParams {
let client = RemoteApiClient::new(RemoteApiClientParams {
host: "localhost".to_string(),
..RemoteApiClientParams::default()
})?;
Expand All @@ -17,8 +18,8 @@ fn main() -> Result<(), RemoteAPIError> {
uuid: client.get_uuid(),
func: "sim.getStringSignal".to_string(),
args: vec![cbor!("testSignal").unwrap()],
ver: zmq_remote_api::VERSION,
lang: zmq_remote_api::LANG.into(),
ver: coppeliasim_zmq_remote_api::VERSION,
lang: coppeliasim_zmq_remote_api::LANG.into(),
args_l: 1,
};

Expand Down
4 changes: 3 additions & 1 deletion examples/p_controller.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use std::f64::consts::PI;

use zmq_remote_api::{sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams};
use coppeliasim_zmq_remote_api::{
sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams,
};

/*
Expand Down
6 changes: 4 additions & 2 deletions examples/send_ik_movement_sequence_mov.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use zmq_remote_api::serde_json::json;
use zmq_remote_api::{sim, sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams};
use coppeliasim_zmq_remote_api::serde_json::json;
use coppeliasim_zmq_remote_api::{
sim, sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams,
};
/*
Example based on sendIkMovementSequence-mov.py
Expand Down
6 changes: 4 additions & 2 deletions examples/send_ik_movement_sequence_pts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use zmq_remote_api::serde_json::json;
use zmq_remote_api::{sim, sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams};
use coppeliasim_zmq_remote_api::serde_json::json;
use coppeliasim_zmq_remote_api::{
sim, sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams,
};

/*
Example based on sendIkMovementSequence-pts.py
Expand Down
8 changes: 4 additions & 4 deletions examples/sim_ik_example.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use serde_json::json;
use zmq_remote_api::{
use coppeliasim_zmq_remote_api::{
sim,
sim::{Sim, SimIK},
RemoteAPIError, RemoteApiClientInterface, RemoteApiClientParams,
RemoteAPIError, RemoteApiClient, RemoteApiClientInterface, RemoteApiClientParams,
};
use serde_json::json;

/*
#
Expand All @@ -21,7 +21,7 @@ fn main() -> Result<(), RemoteAPIError> {

println!("Program started");

let client = zmq_remote_api::RemoteApiClient::new(RemoteApiClientParams {
let client = RemoteApiClient::new(RemoteApiClientParams {
host: "localhost".to_string(),
..RemoteApiClientParams::default()
})?;
Expand Down
6 changes: 4 additions & 2 deletions examples/simple_test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use zmq_remote_api::{sim, sim::Sim, RemoteAPIError, RemoteApiClientParams};
use coppeliasim_zmq_remote_api::{
sim, sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams,
};
/*
Example based on SimpleTest.py
Expand All @@ -21,7 +23,7 @@ fn main() -> Result<(), RemoteAPIError> {

println!("Program started");

let mut client = zmq_remote_api::RemoteApiClient::new(RemoteApiClientParams {
let mut client = RemoteApiClient::new(RemoteApiClientParams {
host: "localhost".to_string(),
..RemoteApiClientParams::default()
})?;
Expand Down
4 changes: 3 additions & 1 deletion examples/synchronous_image_transmission.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use zmq_remote_api::{sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams};
use coppeliasim_zmq_remote_api::{
sim::Sim, RemoteAPIError, RemoteApiClient, RemoteApiClientParams,
};

/* Based on synchronousImageTransmission.cpp example
*
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
//! ## Get started
//!
//! ```
//! use zmq_remote_api::{sim, sim::Sim, RemoteAPIError, RemoteApiClientParams};
//! use coppeliasim_zmq_remote_api::{sim, sim::Sim, RemoteAPIError, RemoteApiClientParams,RemoteApiClient};
//!
//! fn main() -> Result<(), RemoteAPIError> {
//! let client = zmq_remote_api::RemoteApiClient::new(RemoteApiClientParams::default())?;
//! let client = RemoteApiClient::new(RemoteApiClientParams::default())?;
//!
//! Ok(())
//! }
Expand Down
4 changes: 2 additions & 2 deletions src/remote_api_client/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const ZMQ_RECV_FLAG_NONE: i32 = 0;
/// BY default port:23000
/// # Example:
/// ```
/// use zmq_remote_api::{RemoteApiClient,RemoteApiClientParams};
/// use coppeliasim_zmq_remote_api::{RemoteApiClient,RemoteApiClientParams};
/// let client = RemoteApiClient::new(RemoteApiClientParams::default()).unwrap();
/// ```
pub struct RemoteApiClient {
Expand All @@ -34,7 +34,7 @@ impl RemoteApiClient {
port = params.rpc_port
);

log::debug!("connecting on rpc_address: {} ", rpc_address,);
log::debug!("connecting on rpc_address: {rpc_address} ");

let context = zmq::Context::new();

Expand Down

0 comments on commit 17f5cbc

Please sign in to comment.