Replies: 2 comments 2 replies
-
@nsulmol Can you post an example function in Igor accepting structs which you want to call? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I don't know if I'm allowed to share the code of the function itself, as it is developed by the company who sells us the associated hardware. However the function takes as input a WMSetVariableAction reference STRUCT. This STRUCT has been created via the SetVariable operation, linked to a particular UI element. So the STRUCT of interest is not application-specific, if that is your question. Would that answer the question? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It turns out that the 'recommended' way I should be interfacing with Igor (for my specific purposes) would involve me calling functions that take STRUCT references as input. Because of this, I thought it would be worth investigating the difficulty of doing such a thing.
From looking at the Igor XOP documentation and the ZeroMQ-XOP, I have not been able to come up with a way to do this generically. From what I understand, STRUCTs are local to (and have the lifetime of) the function in which they were declared, so there are no universal STRUCTs. (XOP Manual 8, page 109). Additionally, there is no generic way to go from a structure name in string format to an instance of the actual structure in C: you would need to manually maintain a dictionary/map, where you define all mappings from STRUCT string to STRUCT for your specific application.
I figured I would post this here in case someone else has thought about supporting STRUCTs 'generically', and had ideas on how it could be done that I've missed.
Thanks,
nsulmol
Beta Was this translation helpful? Give feedback.
All reactions