Documentation

SimulinkRealTime.getTargetSettings

Get target computer environment settings

Syntax

SimulinkRealTime.getTargetSettings
SimulinkRealTime.getTargetSettings(target_computer_name)
settings_object = SimulinkRealTime.getTargetSettings(___)
SimulinkRealTime.getTargetSettings('-all')
settings_object_vector = SimulinkRealTime.getTargetSettings('-all')

Description

example

SimulinkRealTime.getTargetSettings displays the environment settings for the default computer.

example

SimulinkRealTime.getTargetSettings(target_computer_name) displays the environment settings for a particular target computer.

example

settings_object = SimulinkRealTime.getTargetSettings(___) returns an environment object representing a target computer.

example

SimulinkRealTime.getTargetSettings('-all') displays a list of environment objects representing all defined target computers.

example

settings_object_vector = SimulinkRealTime.getTargetSettings('-all') returns a vector of environment objects representing all target computers.

Examples

collapse all

Display environment settings for default target computer.

SimulinkRealTime.getTargetSettings
Simulink Real-Time Target Settings

    Name                     : TargetPC1  
                   
    TargetRAMSizeMB          : Auto                          
    LegacyMultiCoreConfig    : on                            
    USBSupport               : on                            
    ShowHardware             : off                           
    EthernetIndex            : 0                             

    TcpIpTargetAddress       : 10.10.10.15                   
    TcpIpTargetPort          : 22222                         
    TcpIpSubNetMask          : 255.255.255.0                 
    TcpIpGateway             : 10.10.10.100                  
    TcpIpTargetDriver        : Auto                          
    TcpIpTargetBusType       : PCI                           

    TargetScope              : Enabled                       

    TargetBoot               : NetworkBoot                   
    TargetMACAddress         : 00:01:29:55:3c:bb    

Display environment settings for a specific target computer.

SimulinkRealTime.getTargetSettings('TargetPC2')
Simulink Real-Time Target Settings

    Name                     : TargetPC2                     

    TargetRAMSizeMB          : Auto                          
    LegacyMultiCoreConfig    : on                            
    USBSupport               : on                            
    ShowHardware             : off                           
    EthernetIndex            : 0                             

    TcpIpTargetAddress       : 10.10.10.30                   
    TcpIpTargetPort          : 22222                         
    TcpIpSubNetMask          : 255.255.255.0                 
    TcpIpGateway             : 255.255.255.255               
    TcpIpTargetDriver        : I8254x                        
    TcpIpTargetBusType       : PCI                           

    TargetScope              : Enabled                       

    TargetBoot               : NetworkBoot                   
    TargetMACAddress         : 90:e2:ba:17:5d:15         

Display environment settings for all target computers.

SimulinkRealTime.getTargetSettings('-all')
NumTargets: 2                             
Targets   : Name                 Communication Settings   . . .
            TargetPC1 (Default)  TcpIp:10.10.10.15:22222  . . .
            TargetPC2            TcpIp:10.10.10.30:22222  . . .

Simulink Real-Time Target Settings

    Name                     : TargetPC1                     
.
.
.

    TcpIpTargetAddress       : 10.10.10.15                   
.
.
.
    TargetBoot               : NetworkBoot                   
    TargetMACAddress         : 00:01:29:55:3c:bb             



Simulink Real-Time Target Settings

    Name                     : TargetPC2                     

.
.
.
    TcpIpTargetAddress       : 10.10.10.30                   
.
.
.
    TargetBoot               : NetworkBoot                   
    TargetMACAddress         : 90:e2:ba:17:5d:15             

Retrieve an environment settings object for a specific target computer. Use it to access a setting.

settings_object = SimulinkRealTime.getTargetSettings('TargetPC1');
settings_object.TcpIpTargetAddress
ans =

10.10.10.15

Loop through vector of environment settings objects. Print name and communication settings.

sov = SimulinkRealTime.getTargetSettings('-all');
ii = 1;
while ii <= length(sov) 
   disp(sprintf('%s TcpIpTargetAddress is %s', ... 
        sov(ii).Name, sov(ii).TcpIpTargetAddress))
ii = ii + 1;
end
TargetPC1 TcpIpTargetAddress is 10.10.10.15
TargetPC2 TcpIpTargetAddress is 10.10.10.30

Input Arguments

collapse all

The name-character vector of a target computer.

Example: 'TargetPC1'

Data Types: char

Output Arguments

collapse all

Object containing target computer environment settings.

Data Types: struct

Vector of objects containing target computer environment settings representing one or more target computers

Data Types: struct

Introduced in R2014a

Was this topic helpful?