| Customize Help
| Save Settings

MfuncCall



Function Map
Synopsis
Execute the slave function.
Syntax
MIL_INT MfuncCall(
MIL_ID ContextFuncId //in
)
Description

This function executes the slave function of the user-defined MIL function on the target system. The target system is determined by the values of the user-defined MIL function parameters, registered in the master function. (For more information, see the Master/slave dynamics on a remote system section of Chapter 53: The MIL function development module.) Call MfuncCall() from the master function of the user-defined MIL function. Note that you must call MfuncCall() from the same thread as MfuncAlloc() and MfuncFree(). If tracing and error reporting are enabled, the tracing and error messages will be reported to screen. You can control the error handling and tracing behavior as you would with other MIL functions, using MappControl().

Note that if a MIL_ID parameter was registered in the master function with MfuncParamMilId(), the validity of that identifier will be checked during the execution of MfuncCall(). If the identifier is not valid, the slave function is not executed.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameter
ContextFuncId

Specifies the identifier of the user-defined MIL function.

The slave function executed using MfuncCall() must be declared as follows:

void MFTYPE SlaveFunction(
MIL_ID ContextFuncId
)

Parameters
ContextFuncId

Specifies the identifier of the user-defined MIL function that references this slave function. This is the identifier returned by the MfuncAlloc() function.

Return value
The returned value is M_NULL if an error occurred; otherwise, not null.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.