-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is an ArrayPort the appropriate solution here? #237
Comments
An array inPort would make sense if several components were connected to the same component and data processing would be somehow different depending on array index. It seems to me that what you are trying to do is just sending a sequence of strings to be processed independently. In this case it's just
where An As for WirePattern, it doesn't have any specific support for addressable ports, i.e. it deals with ports regardless of array index. |
Thanks for the insight. I actually want to perform an operation on the array as a whole. A contrived example would be something like this: Take multiple |
So, it actually looks like:
Is it important that all 0...N names should arrive at TASKS port for Receiver to do something with the array? |
@paulyoung This may be a starting point for that requirement: http://noflojs.org/component/noflo-adapters-PacketsToArray/ I cannot say whether PacketsToArray is up-to-date with the latest changes, but its worth the look. |
@hayesmg |
I see what you're saying @trustmaster. The connect/send/disconnect of upstream ports invalidates the use of that component. |
@trustmaster yes, that's correct. |
@paulyoung then either an |
An I may be getting confused with the history of NoFlo. Is the old way to use |
@paulyoung yep, ArrayPort is the old port API and addressable is the new, post-0.5 port API. It is still an "array port" in FBP terminology, though |
I have one component which sends a string on its
NAME
out port, and another component which accepts an array on itsTASKS
in port.What would be the best way to take several
NAME
strings and send them toTASKS
? Is the correct way to approach this by using an ArrayPort?I believe I can do that by changing the
datatype
ofTASKS
fromarray
tostring
, settingaddressable
totrue
, and doing the following in my graph:If so, that leaves me with the following questions:
The text was updated successfully, but these errors were encountered: