Target Object Properties
slrealtime Target object properties for configuration and status
Using these properties, you can configure the Target object
and observe target computer status.
Configuration
The TargetOptions property holds a
TargetOptions structure that includes fields
restApiServerPort, supportHttps,
sslCertificateFilePath, sslPrivateKeyFilePath,
and useNetrc. To view the TargetOptions, in the
MATLAB Command Window, type:
tg.TargetOptions
ans =
TargetOptions with properties:
restApiServerPort: 8080
supportHttps: 0
sslCertificateFilePath: ''
sslPrivateKeyFilePath: ''
useNetrc: 1For information about using the restApiServerPort,
supportHttps, sslCertificateFilePath, and
sslPrivateKeyFilePath, see setupTLSCertificate. The useNetrc value indicates
whether to enable (true) or disable (false) using the .netrc file for
authentication. When disabled, the .netrc file is deleted from the
target computer. When enabled, the .netrc file is created or updated
on the next connect or update to the target computer.
The Instruments property holds an Instruments
structure that includes fields ForSDI, ForMATLAB,
and ForFileLog. To view the Instruments, in the
MATLAB Command Window, type:
tg.Instruments
Instruments added to target computer 'TargetPC1':
ForSDI
<EMPTY>
ForMATLAB
<EMPTY>
ForFileLog
<EMPTY>You can use the Instrument Viewer app to view, create, or
remove target computer instruments. When creating an instrument, you can add signals to
the instrument. Open the app by using the command
view(tg.Instruments), where tg is the target
computer name. Use the app buttons or the context menu in the app to view, create, or
remove the instruments.

The TargetSettings property holds a
TargetSettings structure that includes fields
name, address, sshPort,
xcpPort, username,
userPassword, and rootPassword. To view the
TargetSettings, in the MATLAB Command Window, type:
tg.TargetSettings
ans =
TargetSettings with properties:
name: 'TargetPC1'
address: '192.168.7.5'
sshPort: 22
xcpPort: 5555
username: 'slrt'
userPassword: 'slrt'
rootPassword: 'root'The SDIRunId property holds the Simulation Data Inspector run
identifier for the current simulation run. To view the SDIRunId, in
the MATLAB Command Window, type:
tg.SDIRunId
ans = int32 22110
The ptpd property holds a PTPControl structure
that includes fields Command and AutoStart. For
more information, see the Target.ptpd object. To view the TargetSettings, in the
MATLAB Command Window, type:
tg.ptpd
ans =
PTPControl with properties:
Command: 'ptpd -L -K -g'
AutoStart: 1The Stimulation property provides access to the Target.Stimulation object. To view the Stimulation, in
the MATLAB Command Window, type:
tg.Stimulation
ans = StimulationControl with no properties.
Status
The ProfilerStatus property holds the execution profiler status.
To view the ProfilerStatus, in the MATLAB Command Window, type:
tg.ProfilerStatus
ans =
'Ready'The TracerStatus property holds the execution tracer status. To
view the TracerStatus, in the MATLAB Command Window, type:
tg.TracerStatus
ans =
'Ready'The FileLog property holds a FileLogger
structure that includes fields Importing,
LoggingService, and DataAvailable. For more
information, see the Target.FileLog object. To view the TargetSettings, in the
MATLAB Command Window, type:
tg.FileLog
ans =
FileLogger with properties:
Importing: 0
ImportProgress: 100
LoggingService: STOPPED
DataAvailable: 0The TargetStatus property provides access to target computer
status information. The status values are enums. To view the
TargetStatus, in the MATLAB Command Window, type:
tg.TargetStatus
ans =
struct with fields:
State: BUSY
Error: ''The ModelStatus property provides access to information about the
loaded real-time application and related model. The status values are enums. To view the
ModelStatus, in the MATLAB Command Window, type:
tg.ModelStatus
ans =
struct with fields:
State: LOADED
Application: 'slrt_ex_osc_outport'
ModelName: 'slrt_ex_osc_outport'
Error: ''
LogLevel: "info"
PollingThreshold: 1.0000e-04
FileLogMaxRuns: 1
OverrideBaseRatePeriod: 0
StopTime: 10
ExecTime: 0
TETInfo: [1×1 struct]Version History
Introduced in R2020b
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.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)