extmodeWaitForHostRequest - Wait for request from development computer to start or stop external mode
simulation - MATLAB ([original](https://in.mathworks.com/help/rtw/ref/extmodewaitforhostrequest.html)) ([raw](?raw))
Main Content
Wait for request from development computer to start or stop external mode simulation
Syntax
Description
[errorCode](#d126e37261) = extmodeWaitForHostRequest([timeoutInMicroseconds](#d126e37233));
waits for a start or stop request from the development computer and times out when the timeout value is reached.
Use this function with other external mode functions to enable communication between Simulink® and the target application during an external mode simulation. Use the function during initialization because the function is a blocking function.
Examples
Set Up External Mode Communication
For a pseudo-code example that shows how you can provide external mode communication by using the function with related functions, seeExternal Mode Abstraction Layer.
Input Arguments
Specifies the timeout value. If the value is set toEXTMODE_WAIT_FOREVER
, the function waits indefinitely. If '-w'
is not extracted byextmodeParseArgs()
, the function has no effect.
Output Arguments
Error code, returned as an extmodeErrorCode_T
enumeration with one of these values:
EXTMODE_SUCCESS
(0) –– No error detected.EXTMODE_INV_ARG
(-1) –– Arguments invalid.EXTMODE_TIMEOUT_ERROR
(-100) –– External mode timeout error detected.
Version History
Introduced in R2018a