A forum for Spin users
You are not logged in.
Pages: 1
Is there a fundamental reason why Spin doesn't let the user send an array of structures in a message? I am somewhat surprised, as arrays are declared statically and therefore it seems to me that it shouldn't be too hard to handle by the compiler.
Are there any workarounds?
Right now the only thing I can see is to make a static array of the datatype containing my struct array, and pass along an index into this array in my message instead of the actual datatype. This seems like it would have a huge state-space blow-up; I was thinking that if I create exactly the objects I need and pass them as messages, I could avoid this blow-up as well as allowing me to be more dynamic than the static array (in that I'd create/initialize the values of my object as I need them, instead of already having everything in the array).
Offline
Pages: 1