-
-
Notifications
You must be signed in to change notification settings - Fork 415
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pluggable monitor #982
Pluggable monitor #982
Conversation
|
builds are at the bottom of this page, let me know if you can't see them |
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
…into pluggable-monitor # Conflicts: # arduino-ide-extension/package.json # arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx # arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-dialog.tsx # arduino-ide-extension/src/browser/serial/monitor/monitor-widget.tsx # arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-input.tsx # arduino-ide-extension/src/node/arduino-ide-backend-module.ts
@ubidefeo - I'm running it now on my Linux desktop machine. Seems to be working pretty well. I'm happy to see it's handling Teensy 4.0 maximum speed printing pretty well, with 2 processes each using about 70% of a CPU core, and 4 others adding up to about 55%. |
Overall speed of more than half a million lines/sec is also quite good. |
Running a Teensy 4.0 overclocked to 912 MHz, and the pluggable monitor is managing 785000 lines/sec. Very respectable speed. I have some rough edges to fix in my package's uploading utility. Looks like the IDE has some minor serial monitor bugs, probably unrelated to pluggable monitor. |
…monitor # Conflicts: # arduino-ide-extension/package.json # arduino-ide-extension/src/browser/arduino-ide-frontend-module.ts # arduino-ide-extension/src/browser/dialogs/firmware-uploader/firmware-uploader-dialog.tsx # arduino-ide-extension/src/browser/serial/monitor/monitor-widget.tsx # arduino-ide-extension/src/browser/serial/monitor/serial-monitor-send-input.tsx # arduino-ide-extension/src/browser/theia/core/shell-layout-restorer.ts # arduino-ide-extension/src/node/arduino-ide-backend-module.ts
Thank you, @PaulStoffregen |
Motivation
The main reason for this PR is to use the latest "pluggable monitor" gRPC APIs #769. But in order to use the new APIs, we needed to refactor all the Serial Monitor architecture. All this work allowed us to solve a number of issues that weren't impossible or too expensive to solve before the change, and we also took advantage of this effort to implement a more solid architecture.
This PR solves:
Change description
The architecture has been redesigned like this:

Call Stack / Event Flow when opening Serial monitor or Plotter
Numbers correspond to those in the diagram above.
monitor-widget
orplotter-frontend-contribution
) from the IDE;monitor-widget
orplotter-frontend-contribution
invokes.startMonitor()
method onmonitor-manager-proxy-client-impl
from.onBeforeAttach()
or.startPlotter()
, respectively;monitor-manager-proxy-client-impl.startMonitor()
invokes.startMonitor()
method onmonitor-manager-proxy-impl
;monitor-manager-proxy-impl.startMonitor()
invokes.startMonitor()
method onmonitor-manager
;monitor-manager
creates amonitor-service
frommonitor-service-factory
if not existing, injectingmonitor-settings-provider-impl
andweb-socket-provider-impl
;monitor-manager
invokes.start()
method on created/existingmonitor-service
;monitor-service.start()
method is returned to themonitor-manager-proxy-impl
when it's duplex connection is successfully connected (if no error);monitor-manager-proxy-impl
invokes.connect()
on themonitor-manager-proxy-client-impl
if value returned frommonitor-service.start()
method isStatus.OK
orStatus.ALREADY_CONNECTED
;monitor-service
;Reviewer checklist