The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.