Package ptolemy.cg.lib
Class Profile.Port
- java.lang.Object
-
- ptolemy.cg.lib.Profile.Port
-
- Enclosing class:
- Profile
public static class Profile.Port extends java.lang.Object
The port information to interface with modular code.
-
-
Constructor Summary
Constructors Constructor Description Port(java.lang.String name, boolean publisher, boolean subscriber, int width, int rate, int type, boolean input, boolean output, boolean multiport, java.lang.String pubSubChannelName)
Create the port.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPubSubChannelName()
Get the channel name for the publisher/subscriber pattern.boolean
input()
Return whether the port is an input.boolean
multiport()
Return whether the port is a multiport.java.lang.String
name()
Return the name of the port.boolean
output()
Return whether the port is an output.boolean
publisher()
Return whether the port is an publisher port.int
rate()
Return whether the rate of the port.boolean
subscriber()
Return whether the port is an subscriber port.int
type()
Return whether the rate of the port.int
width()
Return whether the width of the port.
-
-
-
Constructor Detail
-
Port
public Port(java.lang.String name, boolean publisher, boolean subscriber, int width, int rate, int type, boolean input, boolean output, boolean multiport, java.lang.String pubSubChannelName)
Create the port.- Parameters:
name
- The name of the port.publisher
- A flag that specifies whether it is a subscriber.subscriber
- A flag that specifies whether it is a publisher.width
- The width of the port.rate
- The rate of the porttype
- The code type of the port that can be mapped back to ptolemy typeinput
- A flag that specifies whether the port is an input port.output
- A flag that specifies whether the port is an output port.multiport
- A flag that specifies whether the port is multiportpubSubChannelName
- The name
-
-
Method Detail
-
getPubSubChannelName
public java.lang.String getPubSubChannelName()
Get the channel name for the publisher/subscriber pattern.- Returns:
- The channel name for the publisher/subscriber.
-
input
public boolean input()
Return whether the port is an input.- Returns:
- True when the port is an input port.
-
multiport
public boolean multiport()
Return whether the port is a multiport.- Returns:
- True if the port is a multiport.
-
name
public java.lang.String name()
Return the name of the port.- Returns:
- the port name.
-
output
public boolean output()
Return whether the port is an output.- Returns:
- True when the port is an output port.
-
publisher
public boolean publisher()
Return whether the port is an publisher port.- Returns:
- True when the port is an publisher port.
-
subscriber
public boolean subscriber()
Return whether the port is an subscriber port.- Returns:
- True when the port is an subscriber port.
-
width
public int width()
Return whether the width of the port.- Returns:
- the width of the port.
-
rate
public int rate()
Return whether the rate of the port.- Returns:
- the rate of the port.
-
type
public int type()
Return whether the rate of the port.- Returns:
- the rate of the port.
-
-