Main Content

ssQuerySimulinkFunction

Determine if function name is declared as a Simulink Function.

Syntax

int_T ssQuerySimulinkFunction(SimStruct *S, char *scopedFcnName, SSSimulinkFunctionQueryType queryType)

Arguments

S

SimStruct representing an S-Function block.

scopedFucnName

Name of a Simulink Function.

queryType

Enumerated type SSSimulinkFunctionQueryType with a one permissible value SS_SIMULINK_FUNCTION_QUERY_IS_DECLARED.

Returns

Either an int_T (1 or 0) or boolean_T (true or false) value.

Description

if(ssQuerySimulinkFunction(S, "timestwo",SS_SIMULINK_FUNCTION_QUERY_IS_DECLARED)) {
   return "timestwo";

Languages

C, C++

Example

The model sfcndemo_simulinkfunction_getset is an S-function example that models an object with get and set methods using two scoped Simulink Functions.

Introduced in R2018a