Receive data from method of iOS app
Simulink Support Package for Apple iOS Devices / Advanced
The FromApp block receives data from 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 configure the Method
name, Data type, and Data size (N)
parameters to match those of the method.
For example, consider a method,
-(int*)FromAppFcn: (void), that returns
three data elements each time it runs, and the data type of the elements is
int32. In this case, set these parameter values.
Method name to
Data size to
Data type to
The method in the Apple iOS app must return a data type that this block can accept.
During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.
Data — Data returned by method
Data returned by the method specified in the Method name parameter, returned as numeric array.
Size — Size of data returned by method
Size of the data returned by the method specified in the Method name parameter, returned as numeric scalar.
Method name — Name of method
'FromAppFcn' (default) | character array
Specify the name of a method in the
of Apple iOS app.
Data type — Data type elements returned by method
uint8 (default) |
Select the data type of the elements returned by the method specified in the Method name parameter.
Data size (N) — Number of data elements returned by method
1 (default) | nonnegative scalar
Specify the number of data elements the method returns to the block each time it runs.
Sample time — Sample time
0.1 (default) | nonnegative scalar
Specify how often the block reads the method in the Apple iOS app in seconds.
Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.
Introduced in R2015a