Technical topic: Interface View streamer

From TASTE
Revision as of 08:06, 16 March 2023 by Gschwann (talk | contribs) (Created page with "== Introduction == The InterfaceView streamer is part of SpaceCreator. Start command is: $ spacecreator.AppImage --ivstreaming It then listens on port 34633. The port can be...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

The InterfaceView streamer is part of SpaceCreator. Start command is:

$ spacecreator.AppImage --ivstreaming

It then listens on port 34633. The port can be changes using the -p commandline option.

All interaction is done using it's WebSocket interface.


WebSocket API

Documentation can be found here as well: [1]

Every Command is send using JSON data.

JSON structure:

{
    "CommandType": "command",
    "Parameters": {
        "parameter1": "value",
        "parameter2": "value",
        "parameter3": "value",
       ...
    }
}

Loading a file

This is for showing an InterfaceView file.

"CommandType": "Load",
"Parameters": {
    "filename": "value" // Filename with full path to the file
}

Highlight a function

Highlight a function, by drawing a bold frame.

"CommandType": "HighlightFunction",
"Parameters": {
    "name": "value" // Name of the function to show highlighted
}

Show a function as normal

Draws a function as it is after loading the file.

"CommandType": "UnHighlightFunction",
"Parameters": {
    "name": "value" // Name of the function to show un-highlighted
}

Highlights a connection

Highlight a connection, by drawing a bold line.

"CommandType": "HighlightConnection",
"Parameters": {
    "fromFunction": "value", // Name of the source function
    "toFunction": "value", // Name of the target function
    "riName": "value" // Name of the interface
}

Show a connection as normal

Draws a connection as it is after loading the file.

"CommandType": "HighlightConnection",
"Parameters": {
    "fromFunction": "value", // Name of the source function
    "toFunction": "value", // Name of the target function
    "riName": "value" // Name of the interface
}