Interfaces

From SweepMe! Wiki
Jump to navigation Jump to search

Interfaces allow to communicate with SweepMe! remotely. It is a Pro Features. There are several interfaces implemented which can be found via menu "Tools" -> "Interfaces".


Commands

  • run -> start a measurement, returns "Ok"
  • pause -> pause a measurement, returns "Ok"
  • is_running -> returns True or False
  • is_paused -> returns True or False
  • hello -> prints "Hello" to the Debug widget and returns "hello" (can be used to test the service)
  • get_parameters -> returns a list of available parameters (compare with widget Parameters)
  • get_value -> accepts one argument, returns the value of the parameter
  • get_values -> accepts multiple arguments, returns the values of the parameters
  • get_status -> returns a json-based string containing a status information
  • get_version -> returns the SweepMe! version
  • print -> accepts an argument that is printed in the Debug widget, returns "Ok"
  • debug -> accepts an argument that is shown as debug message in the Debug widget, returns "Ok"

Command and possible arguments are separated by space.

COM port

Connect to a computer via a COM port by sending messages over a RS-232 serial connection to another computer.

HTTP server

TCPIP

Use a raw socket connection to send commands via Ethernet/LAN/TCPIP. Use localhost to run your script or application on the same computer at which SweepMe! runs.

Web socket