This PR fixes two things that I've found not working at all.
First, a statically sized array, while being shown correctly in the UI, always contained zeroes when the service was called. This was due to missing handling of array slot_types which in turn required generation of the correct expression names.
Second, filling in a dynamically sized array was not possible (afaik), and always resulted in exceptions thrown in the serialization process due to Python's dicts not supporting access by dot (.), by default.
I've added a small class called Map, which implements access by dot. This class was not written by be, but rather taken from the supplied stackoverflow link, tell me, if that would be a licensing problem.
To easily test my changes, I've written up a small test application which provides a service with arrays and outputs its content upon being called. See --> here
Potential problem
A dynamically sized array would be written, for the UI, like this [{'data1': 1, 'data2': 2}, {'data1': 5, 'data2': 6}]. If you forget to specify one dict key, present in the message definition, you get the previously mentioned serialization exception again. There needs to be some sort of default initialization of all message members in the dict, but I'm unsure how do it.
This PR fixes two things that I've found not working at all.
I've added a small class called Map, which implements access by dot. This class was not written by be, but rather taken from the supplied stackoverflow link, tell me, if that would be a licensing problem.
To easily test my changes, I've written up a small test application which provides a service with arrays and outputs its content upon being called. See --> here
Potential problem A dynamically sized array would be written, for the UI, like this
[{'data1': 1, 'data2': 2}, {'data1': 5, 'data2': 6}]
. If you forget to specify one dict key, present in the message definition, you get the previously mentioned serialization exception again. There needs to be some sort of default initialization of all message members in the dict, but I'm unsure how do it.