Grasshoppoer Component dev using Serial port

I have been developing my own GH component recently.
I want to make it to transmit data which received by serial port continuously, but SolveInstance( ) and component run only once so the data transmission is executed once.
Is it appropriate method that I can use? How to make the component with Serial Port?

You’ll need to call ExpireSolution(true) on your component to trigger the next iteration and run your component again.

You’ll need to build in some sort of pumping logic though as ut is entirely possible that the data from the serial port is coming in at a faster rate than you can process it with consecutive solutions. If there’s a new data point every 15ms but it takes 20ms on average to complete a solution, then you either need to skip certain data or combine them into aggregates.