Forums

problem in C-MEX S-Function

Started by Nihal Ahmad July 12, 2002
Hi all,

I have one problem in C-MEX S-Function, which is as follows
In my c-program I have one function named try_info(&bs, &fr_ps), which
I want to call in mdlOutputs( ).
where bs and fr_ps are the structures, which I am passing as an input
arguments.
structure bs contains 10 different data types and fr_ps contains 7
different data types.
After using these data in the mdlOutputs( ), I want to send these data
at the Output port.
I have one method ie. split the complete structure like bs.x, bs.y, bs.z....etc
and pass as input arguments like try_info(bs.x, bs.y, bs.z, =
&fr_ps). Then send these data individually to the Output port using
macro *y0 = ssGetOutputPortRealSignal( ).
But problem is that using this method we need so many Output ports.
So, I want to send all these data through one Output port ie. I want to
pass complete structure through one Output port.
Is this possible in the Simulink? If yes.
How do we do that?
Pl. help me out?
********************************************************************************\
*********