Hi all,
I'd like to copy data at C-Script-input-ports to MyFunctions.c code.
Since this is a boring job, I need to do very often, I decided to write a helper to do so.
This helper need to access "SignalInput()" macro, which seems to be defined in "Output function code" section only.
How to access this in a helper-function as descripted below?
Some pseudo code:
<code declarations>
#define <MyFunctions.c>
#define <copyInputsToMyFunctionsHelper.c>
</code declarations>
The file copyInputsToMyFunctionsHelper.c consists of:
void coypData(int port, MyFunctions::DataStruct* data){
int i = 0;
data->element = SignalInput(port, i++);
......
}
<Output function code>
copyData(0, &datastructA);
copyData(1, &datastructB);
......
// calc. something with datastructA...
// assign to SignalOutport( port, index)
</Output function code>
Thank You!
Marcel