Send data to method of app
Simulink Support Package for Apple iOS Devices / Advanced
The ToApp block sends data to a method defined in the
InfoViewController.mm class of an Apple iOS app. After code generation is
completed, you can modify the generated code to make use of the data given as input to this
block and call a method.
For example, if the block input is
int32(ones(3,1)) and the method name
ToAppFcn, then the expected method in the Apple iOS app code
-(void) ToAppFcn: (int*) inData
inDatais an integer vector of three elements.
During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Port_1 — Data to send to a method
Data to send to a method in an Apple iOS app, specified as a numeric vector. This data is received as input by the method specified in the Method name parameter.
Method name — Name of a method in the Apple iOS app
'ToAppFcn' (default) | character vector
Specify the name of a method in the Apple iOS app. This method must accept the data type of the input data given to the block.
Introduced in R2015a