getEntityPortsImpl
Class: matlab.DiscreteEventSystem
Namespace: matlab
Define input ports and output ports of discrete-event system
Syntax
[inputTypes,outputTypes]=getEntityPortsImpl(obj)
Description
[
defines
input ports and output ports of a discrete-event system.inputTypes
,outputTypes
]=getEntityPortsImpl(obj
)
Input Arguments
obj
— Discrete-event System object™
MATLAB® object
Discrete-event System object.
Output Arguments
inputTypes
— Input types
cell vector of character vectors
Input port types of a discrete-event system, specified as a cell vector of character vectors with a length that is the same as the number of input ports.
The Nth element of the vector that specifies the type of the Nth input port.
If the port is an entity port, the character vector indicates the entity type name of this port. The name must match one of the entity types specified in
getEntityTypesImpl
.If the port is a signal port, the character vector must be empty (
''
).
outputTypes
— Output types
cell vector of character vectors
Output port types of a discrete-event system, specified as a cell vector with a length that is the same as the number of output ports.
The Nth element of the vector that specifies type of the Nth output port.
If the port is an entity port, the character vector indicates the entity type name of this port. The name must match one of the entity types specified in
getEntityTypesImpl
.If the port is a signal port, the character vector must be empty (
''
).
Examples
Get Entity Inputs and Outputs for Discrete-Event System
Get entity input and output port types for discrete-event system.
function [inputTypes,outputTypes] = getEntityPortsImpl(obj) % Specify input and output port types. % % This implementation further specifies port type and entity % type at these inputs and outputs: % Inputs: % 1. Signal port % 2. Entity port receiving entities of type 'entity1' % 3. Entity port receiving entities of type 'entity2' % Outputs: % 1. Signal port % 2. Entity port sending entities of type 'entity2' % % The discrete-event system must have already defined: % - 3 inputs (by method 'getNumInputsImpl') and % - 2 outputs (by method 'getNumOutputsImpl') inputTypes = {'', 'entity1', 'entity2'}; outputTypes = {'', 'entity2'}; end
Version History
Introduced in R2016a
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)