How to get an array of a struct in a custom defined struct #1246
Unanswered
MatthewBoss96
asked this question in
Q&A
Replies: 1 comment 11 replies
-
async def CustomArray(self, server, idx:int, name:str) -> Struct:
return await new_struct(server, idx, name, [
new_struct_field("Test1", ua.VariantType.Double, description="Test"),
new_struct_field("Test2", ua.VariantType.Double, description="Test")
])
async def Test(self, server, idx:int, name:str) -> Struct:
self.array, _ = await self.CustomArray(self.server, self.idx, "CustomArray")
await new_struct(server, idx, name, [
new_struct_field("String", ua.VariantType.String, description="String Test"),
new_struct_field("Array", self.array, description="Array Test", array=True),
]) |
Beta Was this translation helpful? Give feedback.
11 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goodmorning,
How to get an array of a struct in a custom defined struct?
As a test case I have:
But this results in
Also if I change
new_struct_field("Array", [self.array], description="Array Test")
to
new_struct_field("Array", self.array, description="Array Test")
, I get the same error?Beta Was this translation helpful? Give feedback.
All reactions