target.Emulator Class
Namespace: target
Description
Use a target.Emulator
object to provide MATLAB® with data about your target emulator, for example, emulator launch method, and
emulated hardware information.
To create a target.Emulator
object, use the
target.create
function.
Properties
Name of the target.Emulator
object, which
target.get
uses as an identifier in data retrieval.
Attributes:
GetAccess | public |
SetAccess | public |
target.Board
object that provides hardware board details.
Attributes:
GetAccess | public |
SetAccess | public |
Object that provides descriptions of supported tools for starting emulator application on your development computer.
Attributes:
GetAccess | public |
SetAccess | public |
Examples
This example shows how to use a target.Emulator
object to set up target connectivity.
Create a board object to use with the emulator.
emulatorBoard = target.create("Board", ... Name="ARM Cortex-A Emulator-Based Test Board");
Create a target.Emulator
object and associate it with the emulated target board.
emulatorTarget = target.create("Emulator", ... Name="Example Emulator Target"); emulatorTarget.Target = emulatorBoard;
Create a target.HostProcessExecutionTool
object.
hostProcLaunchTool = target.create("HostProcessExecutionTool"); hostProcLaunchTool.Name = "Emulator Host Process Execution Tool";
Create a target.Command
object. Set the String
property of the object to the command for starting the emulator.
emulatorCommand = target.create("Command", ... String="pathToEmulatorApplication");
Specify the arguments of the command object as the configuration options for opening the emulator from command line.
emulatorCommand.Arguments = [ "-flag1","value1", ... "-flag2","value2", ... "-flagN","valueN"];
Specify the start command of the target.HostProcessExecutionTool
object as the emulator command, and specify the launch tool of the emulator object as the host process execution tool.
hostProcLaunchTool.StartCommand = emulatorCommand; emulatorTarget.LaunchTool = hostProcLaunchTool;
Create a target.TargetConnection
object to specify a connection between the host machine and the emulated target.
emulatorConnection = target.create( "TargetConnection", ... Name = "Emulator Connection", ... Target = emulatorBoard, ... CommunicationType = "TCPChannel", ... IPAddress = "localhost", ... Port = "17725");
Make board, connection, and emulator objects persist across MATLAB sessions.
addedObjs = target.add([emulatorBoard , emulatorConnection , emulatorTarget],UserInstall=true);
target.add summary: Objects added to internal database, which will persist across MATLAB sessions: target.Board "ARM Cortex-A Emulator-Based Test Board" target.Emulator "Example Emulator Target" target.HostProcessExecutionTool "Emulator Host Process Execution Tool" target.TCPChannel "Emulator Connection TCPChannel" target.TargetConnection "Emulator Connection" 1 object not added because they already exist.
emulatorBoard
is the target.Board
object that describes the emulated target board. emulatorConnection
is the target.TargetConnection
object that specifies the connection between Simulink and your target hardware, emulatorTarget
.
To select the emulator for the model, set the HardwareBoard
configuration parameter to the board name. For example:
set_param(model,HardwareBoard=board.Name);
You can now run PIL or external mode simulations on the emulator. For more information, see:
To remove the added target objects, enter:
target.remove(addedObjs);
target.remove summary: Objects removed from internal database: target.Board "ARM Cortex-A Emulator-Based Test Board" target.Emulator "Example Emulator Target" target.HostProcessExecutionTool "Emulator Host Process Execution Tool" target.TCPChannel "Emulator Connection TCPChannel" target.TargetConnection "Emulator Connection"
Version History
Introduced in R2023b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)