qc_set_default_model_uri qc_set_default_target_uri navigation bar

Table of Contents

qc_get_default_target_uri

Returns the default target URI for a particular protocol or model URI.

Syntax

uri = qc_get_default_target_uri(protocol)    % target URI for the specified protocol
uri = qc_get_default_target_uri(model_uri)   % target URI for the specified model URI
uri = qc_get_default_target_uri              % target URI for the model URI of the default target type
    

Description

Returns the default target URI for the specified protocol or model URI. The default target URI is used as a template to derive the target URI from the URI for the model, according to the protocol used for the model URI. The default target URI may be changed using qc_set_default_target_uri. The default setting is persistent across Matlab sessions and is specific to the protocol. If a model URI is given, the protocol for the URI is extracted and used to look up the default target URI.

If no argument is specified then the default model URI associated with the default target type is used as the argument.

The default target URI may contain the following format specifiers, which are used to derive the target URI from the model URI:

%m = the model name
%h = the hostname from the model URI
%p = the port from the model URI (not usually used)
%P = the path from the model URI i.e. the portion following the '/' after the hostname and port (not usually used)
%o = the options from the model URI i.e. the portion following the '?' (not usually used)
%f = the fragment from the model URI i.e. the portion following the '#' (not usually used)

The specified protocol or model URI arguments may be cell arrays of strings.

Parameters

protocol

A string specifying a valid QUARC communication protocol or a cell array of strings e.g. 'tcpip'.

model_uri

A string containing a model URI or a cell array of strings e.g. 'shmem://%m:1', or 'tcpip://qnx-dev:17001'.

Outputs

uri

A string containing the template used to derive the target URI from the model URI, or a cell array of strings if the inputs were cell arrays.

Examples

uri = qc_get_default_target_uri('tcpip'); % Gets the default target URI for the TCP/IP protocol
    

See Also

 

navigation bar