11-06-2015 04:10 PM
Is there a way to change out the network stream type for a control?
For example, lets say I want to use a different type def for the above control.
11-07-2015 01:49 PM
The Typedef for the Endpoint is set by the process of creating the Endpoint (the "data type" input).
Bob Schor
11-09-2015 11:46 AM
So there's no way to switch typedefs after it's been created?
11-09-2015 11:49 AM
I'm pretty sure that is correct -- creating a Network Stream EndPoint requires the TypeDef at creation time, similar to creating a Queue requires a TypeDef. Once a Queue of I32s, for example, has been created, you cannot convert it to a Queue of Doubles ...
Bob Schor
11-09-2015 11:50 AM
Ah, you can, however, make the TypeDef a Variant ...
BS
11-09-2015 01:03 PM
@Bob_Schor wrote:
I'm pretty sure that is correct -- creating a Network Stream EndPoint requires the TypeDef at creation time, similar to creating a Queue requires a TypeDef. Once a Queue of I32s, for example, has been created, you cannot convert it to a Queue of Doubles ...
Bob Schor
You can drop a double control into a queue control to change the type.
11-09-2015 10:02 PM
@Oligarlicky wrote:
@Bob_Schor wrote:
I'm pretty sure that is correct -- creating a Network Stream EndPoint requires the TypeDef at creation time, similar to creating a Queue requires a TypeDef. Once a Queue of I32s, for example, has been created, you cannot convert it to a Queue of Doubles ...
Bob Schor
You can drop a double control into a queue control to change the type.
You can create a Queue (or a Network EndPoint) of different types, but once created, you need to leave it that way -- you cannot modify it mid-program.
BS
11-09-2015 10:25 PM
Are you talking about edit time? Then yes, it's easy. Wire a constant of whatever data type you want into the "data type" input. That determines the data type of the stream.
If you mean during runtime, you'll need to take Bob's advice and use a Variant or a String and then use the variant and (un)flatten to string functions to get different data types through the stream.
11-10-2015 12:00 PM - edited 11-10-2015 12:02 PM
@natasftw wrote:
Are you talking about edit time? Then yes, it's easy. Wire a constant of whatever data type you want into the "data type" input. That determines the data type of the stream.
If you mean during runtime, you'll need to take Bob's advice and use a Variant or a String and then use the variant and (un)flatten to string functions to get different data types through the stream.
None of the above. I'm not trying to change the data type riding on the wire using the polymorphism of create network stream, I have an exisiting control/indicator I'm trying to modify similar to how you'd modify the type of a queue control. I made an idea exchange describing what I want to do.
11-10-2015 12:58 PM
Ah, now I understand. That's definitely "not necessary", since you will always get the correct Control/Indicator type from the output of the Create Network Stream (when you wire the "Type" input appropriately). I must confess that I'd never created a "flexible Queue Control" the way you indicated (not the least because many of my Queues depend on a User-defined Type), but instead created them after I'd defined the Queue and could right-click the Queue output terminal and say "Create Control".
Bob Schor