Advertisement
Guest User

Untitled

a guest
Mar 28th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. static void mdlInitializeSizes(SimStruct *S)
  2. {
  3. ssSetNumSFcnParams(S, 0);
  4. if (ssGetNumSFcnParams(S) != ssGetSFcnParamsCount(S)) {
  5. return; /* Parameter mismatch will be reported by Simulink */
  6. }
  7.  
  8. if (!ssSetNumInputPorts(S, 1)) return;
  9. ssSetInputPortWidth(S, 0, 1);
  10. ssSetInputPortDataType(S, 0, SS_DOUBLE);
  11. ssSetInputPortDirectFeedThrough(S, 0, 1);
  12.  
  13. /* specify the sim state compliance to be same as a built-in block */
  14. //ssSetSimStateCompliance(S, HAS_NO_SIM_STATE);
  15.  
  16. ssSetOptions(S,
  17. SS_OPTION_DISALLOW_CONSTANT_SAMPLE_TIME |
  18. SS_OPTION_WORKS_WITH_CODE_REUSE |
  19. SS_OPTION_USE_TLC_WITH_ACCELERATOR);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement