CoppeliaSim 4.3.0 User Manual - CoppeliaSim 4.3.0 使用者手冊

  • Home
    • Site Map
    • reveal
    • blog
  • welcome
  • userInterface
    • pagesAndViews
    • coordinateDialog
    • positionDialog
    • orientationDialog
    • objectMovement
    • positionOrientationTransformation
    • settings
    • shortcuts
  • scenesAndModels
    • scenes
    • models
    • modelDialog
  • environment
    • environmentPropertiesDialog
    • textureDialog
  • entities
    • collections
    • objects
      • sceneObjectPropertiesDialog
      • commonPropertiesDialog
    • collidableObjects
    • measurableObjects
    • detectableObjects
    • viewableObjects
    • convexHull
    • layerSelectionDialog
      • cameras
      • cameraPropertiesDialog
      • lights
      • lightPropertiesDialog
      • shapes
      • shapeReferenceFrames
      • primitiveShapes
      • convexDecomposition
      • shapeProperties
      • shapeDynamicsProperties
      • shapeDynamicEngineProperties
      • geometryDialog
      • shapeEditModes
      • triangleEditMode
      • vertexEditMode
      • edgeEditMode
      • groupedShapeEditMode
      • joints
      • jointModes
      • jointProperties
      • jointDynamicsProperties
      • jointDynamicEngineProperties
      • dummies
      • dummyPropertiesDialog
      • graphs
      • graphPropertiesDialog
      • proximitySensors
      • proximitySensorDescription
      • proximitySensorPropertiesDialog
      • proximitySensorVolumeDialog
      • proximitySensorDetectionParameterDialog
      • visionSensors
      • visionSensorDescription
      • visionSensorPropertiesDialog
      • forceSensors
      • forceSensorPropertiesDialog
      • octrees
      • octreePropertiesDialog
      • pointClouds
      • pointCloudPropertiesDialog
    • paths
  • functionality
    • geometricCalculations
    • collisionDetection
    • distanceCalculation
      • geometricPlugin
      • simGeom API
      • coppeliaGeometricRoutines
      • CoppeliaGeometricRoutinesAPI
    • IGLPluginAPIreference
    • kinematics
    • basicsOnIkGroupsAndIkElements
    • solvingIkAndFk
      • kinematicsPlugin
      • simIKAPI
      • coppeliaKinematicsRoutines
      • CoppeliaKinematicsRoutinesAPI
    • dynamicsModule
    • designingDynamicSimulations
      • dynamicsDialog
      • dynamicsEngineDialog
    • dataVisualizationAndOutput
    • externalFrontEnd
    • dataTransformation
    • meansOfCommunication
      • remoteApiOverview
      • zmqRemoteApiOverview
      • wsRemoteApiOverview
      • rosInterfaces
      • rosInterf
      • ROSPluginAPIreference
      • ros2Interface
      • ROS2PluginAPIreference
    • ZMQPluginAPIreference
    • WSPluginAPIreference
    • pathsAndTrajectories
    • pathAndMotionPlanningModules
    • OMPLPluginAPIreference
    • syntheticVision
    • IMPluginAPIreference
    • simVisionAPI
    • customUIPlugin
    • UIPluginAPIreference
    • simUI-widgets
    • QMLPluginAPIreference
    • importExport
    • xmlFormat
      • urdfPlugin
      • APIFunctions
      • sdfPlugin
      • SDFPluginAPIreference
    • aviRecorder
    • AssimpPluginAPIreference
    • GLTFPluginAPIreference
      • commandLine
      • LuaCmdPluginAPIreference
      • miscellaneousFunctionality
      • SurfRecPluginAPIreference
      • ICPPluginAPIreference
      • SubprocessPluginAPIreference
  • writingCode
    • scripts
      • embeddedScripts
      • simulationScripts
      • mainScript
      • childScripts
      • customizationScripts
      • scriptProperties
      • scriptEditor
    • addOns
    • sandboxScript
    • scriptExecution
    • threadedAndNonThreadedCode
      • callbackFunctions
      • dynCallbackFunctions
      • jointCallbackFunctions
      • contactCallbackFunction
      • visionCallbackFunctions
      • triggerCallbackFunctions
      • userConfigCallbackFunctions
    • luaPythonDifferences
    • luaCrashCourse
    • plugins
    • mainClientApplication
    • accessingSceneObjects
    • explicitHandling
    • apisOverview
      • apiFunctions
      • apiConstants
      • objectParameterIDs
  • simulation
    • simulationPropertiesDialog
  • tutorials
    • bubbleRobTutorial
    • buildingAModelTutorial
    • lineFollowingBubbleRobTutorial
    • inverseKinematicsTutorial
    • externalControllerTutorial
    • pluginTutorial
    • robotLanguageIntegrationTutorial
    • rosTutorial
      • ros1Tutorial
      • ros2Tutorial
    • compilingCoppeliaSim
ZMQPluginAPIreference << Previous Next >> pathsAndTrajectories

WSPluginAPIreference

WS Plugin API reference

WebSocket plugin.

simWS.send
simWS.setCloseHandler
simWS.setFailHandler
simWS.setHTTPHandler
simWS.setMessageHandler
simWS.setOpenHandler
simWS.start
simWS.stop

simWS.send
Description Send data over the socket.
Lua synopsis simWS.send(string serverHandle, string connectionHandle, string data, int opcode=sim_ws_opcode_text)
Lua parameters
serverHandle (string):
connectionHandle (string):
data (string):
opcode (int, default: sim_ws_opcode_text):
Lua return values
Python synopsis simWS.send(string serverHandle, string connectionHandle, string data, int opcode=sim_ws_opcode_text)
See also


simWS.setCloseHandler
Description The close handler is called once for every successfully established connection after it is no longer capable of sending or receiving new messages.
Lua synopsis simWS.setCloseHandler(string serverHandle, string callbackFn)
Lua parameters
serverHandle (string):
callbackFn (string):
Lua return values
Python synopsis simWS.setCloseHandler(string serverHandle, string callbackFn)
See also


simWS.setFailHandler
Description The fail handler is called once for every unsuccessful WebSocket connection attempt. Either the fail handler or the open handler will be called for each WebSocket connection attempt. HTTP Connections that did not attempt to upgrade the connection to the WebSocket protocol will trigger the http handler instead of fail/open.
Lua synopsis simWS.setFailHandler(string serverHandle, string callbackFn)
Lua parameters
serverHandle (string):
callbackFn (string):
Lua return values
Python synopsis simWS.setFailHandler(string serverHandle, string callbackFn)
See also


simWS.setHTTPHandler
Description The http handler is called when an HTTP connection is made that does not attempt to upgrade the connection to the WebSocket protocol. This allows to deliver error pages and static files such as the base HTML and JavaScript for an otherwise single page WebSocket application. Note: The HTTP handler is appropriate only for low volume HTTP traffic. If you expect to serve high volumes of HTTP traffic a dedicated HTTP web server is strongly recommended.
Lua synopsis simWS.setHTTPHandler(string serverHandle, string callbackFn)
Lua parameters
serverHandle (string):
callbackFn (string):
Lua return values
Python synopsis simWS.setHTTPHandler(string serverHandle, string callbackFn)
See also


simWS.setMessageHandler
Description The message handler is called after a new message has been received.
Lua synopsis simWS.setMessageHandler(string serverHandle, string callbackFn)
Lua parameters
serverHandle (string):
callbackFn (string):
Lua return values
Python synopsis simWS.setMessageHandler(string serverHandle, string callbackFn)
See also


simWS.setOpenHandler
Description The open handler is called once for every successful WebSocket connection attempt. Either the fail handler or the open handler will be called for each WebSocket connection attempt. HTTP Connections that did not attempt to upgrade the connection to the WebSocket protocol will trigger the http handler instead of fail/open.
Lua synopsis simWS.setOpenHandler(string serverHandle, string callbackFn)
Lua parameters
serverHandle (string):
callbackFn (string):
Lua return values
Python synopsis simWS.setOpenHandler(string serverHandle, string callbackFn)
See also


simWS.start
Description Set up endpoint for listening on a port, and starts the server's async connection acceptance loop.
Lua synopsis string serverHandle=simWS.start(int listenPort)
Lua parameters
listenPort (int):
Lua return values
serverHandle (string):
Python synopsis string serverHandle=simWS.start(int listenPort)
See also


simWS.stop
Description Stop and destroy the server.
Lua synopsis simWS.stop(string serverHandle)
Lua parameters
serverHandle (string):
Lua return values
Python synopsis simWS.stop(string serverHandle)
See also



Constants

Constants used in the various functions. Refer to each constant using enumName.constantName, i.e. simUI.curve_type.xy for xy constant in simUI.curve_type enum.


simWS.opcode
continuation
text
binary


Script functions

Script functions are used to call some lua code from the plugin side (tipically used for event handlers).


openCallback
Description
Lua synopsis simWS.openCallback(string serverHandle, string connectionHandle)
Lua parameters
serverHandle (string):
connectionHandle (string):
Lua return values -
Python synopsis simWS.openCallback(string serverHandle, string connectionHandle)
See also


failCallback
Description
Lua synopsis simWS.failCallback(string serverHandle, string connectionHandle)
Lua parameters
serverHandle (string):
connectionHandle (string):
Lua return values -
Python synopsis simWS.failCallback(string serverHandle, string connectionHandle)
See also


closeCallback
Description
Lua synopsis simWS.closeCallback(string serverHandle, string connectionHandle)
Lua parameters
serverHandle (string):
connectionHandle (string):
Lua return values -
Python synopsis simWS.closeCallback(string serverHandle, string connectionHandle)
See also


messageCallback
Description
Lua synopsis simWS.messageCallback(string serverHandle, string connectionHandle, string data)
Lua parameters
serverHandle (string):
connectionHandle (string):
data (string):
Lua return values -
Python synopsis simWS.messageCallback(string serverHandle, string connectionHandle, string data)
See also


httpCallback
Description
Lua synopsis int status, string data=simWS.httpCallback(string serverHandle, string connectionHandle, string resource, string data)
Lua parameters
serverHandle (string):
connectionHandle (string):
resource (string):
data (string):
Lua return values
status (int):
data (string):
Python synopsis int status, string data=simWS.httpCallback(string serverHandle, string connectionHandle, string resource, string data)
See also

, , , ,
ZMQPluginAPIreference << Previous Next >> pathsAndTrajectories

Copyright © All rights reserved | This template is made with by Colorlib