Crate coppeliasim_zmq_remote_api

Crate coppeliasim_zmq_remote_api 

Source
Expand description

§ZMQ Remote API for CoppeliaSim, Rust implementation

The ZMQ Remote API requires the ZMQ plugin.

the Current Plugins support is

Make sure that you are using the same version of the Client and CoppeliaSim, see the branchs of the repository rust_zmqRemoteApi

§Get started

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

fn main() -> Result<(), RemoteAPIError> {
 let  client = RemoteApiClient::new(RemoteApiClientParams::default())?;

  Ok(())
}

Or See an example in examples

Re-exports§

pub use serde_json;

Modules§

sim
All the Supported Plugins is insite this module Current only the Remote API and SimIK is Supported

Structs§

ErrorResponse
When an Error occurs in the simulation, the sever will send an ErrorResponse
FunctionResponse
When an Callback is passed or the server wants to the client wait, then a FunctionResponse is Returned
ObjectResponse
When the server sends data to client, like a object handle id, or the value of any sensors the server will send ObjectResponse
RemoteAPIError
RemoteAPIError will be retured if the client was unable to send our receive messages
RemoteApiClient
The ZEROMQ Socket Connection BY default host:“localhost” BY default port:23000
RemoteApiClientParams
The Socket connection Parameters, in most of the cases the default is Okay to use If the simulation is running in another pc, make sure the ip is correct
ZmqRequest
The Request Prototol is defined here: PROTOCOL

Enums§

ZmqResponse
Coppeleia’s server can return 3 kinds of reponse: An error: ErrorResponse The Function Response: FunctionResponse An Object: ObjectResponse More information see the PROTOCOL

Constants§

LANG
VERSION

Traits§

RawRequest
should return the request in by bytes The bytes is cbor encoted data
RemoteApiClientInterface
THe implementation of the PROTOCOL This trait forces a socket connection to implement the PROTOCOL The Sim, SimIK, rely on this trait