Skip to content

Draft: Add server for remote control interface

TopTortoise requested to merge lklemmer/surfer:draw_api into main

This adds a server for a remote control interface to Surfer (current working name is waveform viewer control protocol, WCP).

A draft for WCP and a client can be found here.

Idea: The idea behind WCP is, that external tools can connect to Surfer and send commands in the form of JSON objects to add/remove variables, make annotations, or move the view around. WCP is not properly specified yet, this MR only adds a few simple commands as a proof of concept. Generally, we think WCP could be useful for other EDA tools, and thus don't want to tie it to Surfer too much. We want to use this MR as a basis for a discussion about which commands should be included and other related questions, and are happy to receive ideas and feedback on WCP here.

Current Implementation: Currently, Surfer starts a WCP server that clients can connect and send commands to. The server just receives the messages and hands them over to the WCP handler in the main Surfer thread over a channel. The handler works pretty similar to Surfers message handling system. In some cases, the handler can reuse Surfer messages, but not always, since they do not return results. However, many WCP commands should return results (e.g., the ID of an added variable) and thus we have to do some things separately.

Edited by Lucas Kl

Merge request reports