Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: S-functions in C, ssGetmdlBlockInfo
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Bernd Heiming

Posts: 4
Registered: 12/7/04
S-functions in C, ssGetmdlBlockInfo
Posted: Jul 22, 1996 3:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Hi all,

I write my own s-functions in C and I would like to use the
ssGetmdlBlockInfo makro. But whatever I try, it does not work.
For my c-file I use a template called SFUNTMPL from .../matlab_4.2/simulink/src
It is on a SUN Sparc 20 under SunOs 4.1.3,
here a short example, which does not work:


static void mdlTerminate(SimStruct *S)
{
SimStruct *root;
ModelBlockInfo *info;
ModelBlockInfo * (*functionpointer)();

root = ssGetRootSS(S);
functionpointer = ssGetmdlBlockInfo(root);

info = *functionpointer;

printf("Hello World: %i", info[0].n_outputs);
}


Where is my mistake ??


Thanks in advance

Bernd Heiming
Technical University Hamburg-Harburg
Institute of Control Engineering
email: heiming@tu-harburg.d400.de





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.