Skip to content

Commit

Permalink
Define server event
Browse files Browse the repository at this point in the history
  • Loading branch information
kjy5 committed Jul 9, 2024
1 parent 4adcc12 commit a8ea5f1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ephys_link/back_end/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ async def platform_event_handler(self, event: str, *args: tuple[Any]) -> str:
self._platform_handler.set_inside_brain, SetInsideBrainRequest, event, args
)
case "stop":
request_data = args[1]
if request_data:
return await self._platform_handler.stop(str(request_data))
return self._malformed_request_response(event, request_data)
case "stop_all":
return await self._platform_handler.stop_all()
case _:
self._console.error_print(f"Unknown event: {event}.")
Expand Down

0 comments on commit a8ea5f1

Please sign in to comment.