stlehmann / pyads

Python wrapper for TwinCAT ADS
MIT License
254 stars 94 forks source link

Docs: Mention read/write of arrays of structures #287

Open stlehmann opened 2 years ago

stlehmann commented 2 years ago

Until now we can only read/write arrays of simple types or single structure variables. Reading/Writing an array of a defined structure would be a great enhancement

stlehmann commented 2 years ago

This is already implemented.

chrisbeardy commented 2 years ago

I was just about to cpmmemt on this saying this was already possible, maybe we should add to the docs how to do it?

EDIT: actually i think this is documented enough in the function itself when you look at the parameters.

stlehmann commented 2 years ago

[{key: value for key, value in item} for item in sequence["items"]]

Yes, that is how I found it. I was just looking at these docs before and there is no hint to it. When looking at the implementation I saw that it is already there. I'll reopen the issue and rename it so it adresses the docs.