Exemplo n.º 1
0
 /// <summary>
 /// default name is "capeUnitPort"
 /// </summary>
 protected CapeUnitPortBase(string name, CapePortType type, CapePortDirection portDirection, string description = "", bool canRename = false)
     : base(name, description, canRename)
 {
     CasterLogger.Debug($"Create unit port {name}, type is {type}, direction is {portDirection}");
     _portDirection = portDirection;
     _portType      = type;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitPort"/> class.
 /// </summary>
 /// <param name="Name"><see cref="ICapeIdentification.ComponentName"/> of the <see cref="UnitPort"/>.</param>
 /// <param name="Description"><see cref="ICapeIdentification.ComponentDescription"/> of the <see cref="UnitPort"/>.</param>
 /// <param name="Direction"><see cref="CapePortDirection"/> of the <see cref="UnitPort"/></param>
 /// <param name="Type"><see cref="CapePortType"/> of the <see cref="UnitPort"/></param>
 public UnitPort(String Name, String Description, CapePortDirection Direction, CapePortType Type)
     : base(Name, Description)
 {
     m_Direction       = Direction;
     m_Type            = Type;
     m_ConnectedObject = null;
     m_ConnectedNonSerializableObject = null;
     isConnectObjectSerializable      = false;
 }
Exemplo n.º 3
0
        public static CapeOpenPortDirection Map(CapePortDirection direction)
        {
            switch (direction)
            {
            case CapePortDirection.CAPE_INLET:
                return(CapeOpenPortDirection.Inlet);

            case CapePortDirection.CAPE_OUTLET:
                return(CapeOpenPortDirection.Outlet);

            case CapePortDirection.CAPE_INLET_OUTLET:
                return(CapeOpenPortDirection.Bidirectional);

            default:
                throw new CapeOpenException();
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Create a energy port, contains a ICapeCollection
 /// </summary>
 public CapeInformationPort(string name, CapePortDirection portDirection, string description = "", bool canRename = false)
     : base(name, CapePortType.CAPE_INFORMATION, portDirection, description, canRename)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Create CapeMaterialPort
 /// </summary>
 public CapeMaterialPort(string name, CapePortDirection portDirection, string description = "", bool canRename = false)
     : base(name, CapePortType.CAPE_MATERIAL, portDirection, description, canRename)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Create a energy port, contains a ICapeCollection
 /// </summary>
 public CapeEnergyPort(string name, CapePortDirection portDirection, string description = "", bool canRename = false)
     : base(name, CapePortType.CAPE_ENERGY, portDirection, description, canRename)
 {
 }