Ansys Scade - how to set values of inputs and/or convert pointers

jeremy_rutman
jeremy_rutman Member Posts: 1 ✭✭

I'm trying to convert some C code into an Ansys Scade model.
I have a number of C functions that set values of their inputs (by means of pointers). I’d like to implement these functions in Scade, the question being how exactly to do that.
If I have it right there are no global variables in Scade. So to do this I can’t think of any other way than to set the value in question as an output, and then use that output wherever it is subsequently needed.

The function in question is along the lines of:

//C code
void initMyList( UCHAR *NPtr,  UCHAR *myListPtr)
{
  *NPtr = 0;
  memset(myListPtr, 0, ListLength);
}

Where ListLength is a global constant which of course Scade has no problem with.
The trouble is setting the values of the inputs NPtr and myListPtr .
If I set those in a node or function operator and use them as outputs then I’ll have to figure out any other place they are used and when , which in this case may be quite an undertaking.
Is there any other way to approach this, such as some way to use global variables in Scade?

Tagged:

Answers