Hi everyone,
Frist time posting in the dev forum so please be kind!
I’m trying create a C# component that streams data from an external source at random intervals, and I’ve had success implementing a basic internal timer with @Dani_Abalde’s help in this forum post: Internalize Timer in C# - Simple Counter
The data I’m trying to stream is bunch of repetitive strings from an external source (4 different strings in total such as up, down, left, right), and I want to update the component only when the external stream sends a new string. Currently I’m able to stream the data I want successfully with the timer I’ve implemented, however I’ve noticed a problem in the logic I’m going for: the timer refreshes the component constantly, which then refreshes the output, which then recomputes any components connected to my output. My aim isn’t to replicate a timer component, but instead to update to any data fired from the external data stream.
What I want to arrive at is a solution that only updates the component when a new piece of data is received from the external source.
So my question is: Is it possible to somehow have an internal timer that doesn’t refresh the component, but can refresh an internal function?
I’ve attached a stripped back version of this without the streaming here:
internalTimer help.gh (6.0 KB)