Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 1 | // Plotter for the C++ in-process plotter. |
Philipp Schrader | 548aedf | 2023-02-17 20:09:13 -0800 | [diff] [blame] | 2 | import {Configuration} from '../../../aos/configuration_generated'; |
| 3 | import {Connection} from '../../../aos/network/www/proxy'; |
| 4 | import {plotData} from '../plot_data_utils'; |
Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 5 | |
| 6 | const rootDiv = document.createElement('div'); |
Austin Schuh | 6eb83e6 | 2022-07-19 15:40:30 -0700 | [diff] [blame] | 7 | rootDiv.classList.add('aos_cpp_plot'); |
Austin Schuh | aa3b086 | 2022-07-15 14:38:41 -0700 | [diff] [blame] | 8 | document.body.appendChild(rootDiv); |
| 9 | |
| 10 | const conn = new Connection(); |
| 11 | conn.connect(); |
| 12 | |
| 13 | conn.addConfigHandler((config: Configuration) => { |
| 14 | plotData(conn, rootDiv); |
| 15 | }); |