Skip to content

Tiled and Websocket listeners and publishers #12

@dylanmcreynolds

Description

@dylanmcreynolds

As we have developed arroyopy features in other projects, I think we should consider moving a few listeners and publishers into the main arroyopy.

Tiled

Both the XPS and SAS experiments have needs for a frame publisher to publish to Tiled. Currently, one lives in the Latent Space Explorer repo. This version is fairly specific the LSE. I think we should maybe move most of that code here into arraoypy. The LSE version has a lot of custom code for deciding where in tiled to put each frame. I propose the following:

  1. In arroyopy, a generic TiledFramePublisher class. But it contains an overridable _get_tiled_path() method.
  2. In LSE, we have a class that overrides the arroyopy class:
class LSETiledFramePublisher(TiledFramePublisher):
  
  def _get_tiled_path(message: FrameMessage) -> Tuple[List[str], str]:
       """ Do some calculation on where in tiled to put this frame
             Return is a Tuple of location and slicing information 
       """

The return value is a little awkward, maybe we create a class that defines the path segments and enough information to patch an existing array with the new frame.

WebSocket

In LSE, there's a web socket listener

In XPS, there's a web socket publisher

Both of these probably can be generically added to arroyopy here, with minimal overrided code in the specific projects.

@xiaoyachong @taxe10

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions