Main Content

FromApp

Receive data from method of iOS app

  • FromApp block

Libraries:
Simulink Support Package for Apple iOS Devices / Advanced

Description

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 FromAppFcn

  • Data size to 3

  • Data type to int32

The method in the Apple iOS app must return a data type that this block can accept.

Note

During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.

Ports

Output

expand all

Data returned by the method specified in the Method name parameter, returned as numeric array.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

Size of the data returned by the method specified in the Method name parameter, returned as numeric scalar.

Data Types: double

Parameters

expand all

Specify the name of a method in the InfoViewController.mm class of Apple iOS app.

Select the data type of the elements returned by the method specified in the Method name parameter.

Specify the number of data elements the method returns to the block each time it runs.

Specify how often the block reads the method in the Apple iOS app in seconds.

Note

Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.

Version History

Introduced in R2015a

See Also