04-27-2021 02:36 PM
Hey Bob,
I have been away for a while and wanted to ask you a bit about how you implement Network Streams.
Typically when using NSVs we have a housekeeping loop that gets the most updated data and passes it to the faster speed loops through Local Variables.
So the above picture is the housekeeping loop, and the loops below this handle all of the work.
If you are using a network stream and you have to handle all these different types of data crossing over from Host to RT, how do you do that? Do you cluster it all? Do you have a stream per each set of controls?
Thanks!
04-28-2021 10:25 AM
I use the TCP/IP API instead of Network Streams, but the concepts here are the same. What I do is write a string containing 1) the message ID (typically a string stating what the value is) and 2) the flattened data (use Flatten To String for most data types, strings don't need flattened). If using a string for the ID, use some type of delimiter, typically a colon, to separate the id from the data and use Match Pattern to get the two values. You can then use a case structure on the ID string to process each id as needed.