Connector¶
- class ospx.connector.Connector(name: str, variable: str | None = None, variable_group: str | None = None, type: str | None = None)¶
Bases:
object
Class representing a connector.
Connectors allow to explicitely make public a components scalar variable or variable group at the component’s outer interface.
An connector is for a component what an endpoint is for a connection. Connectors are hence the ‘counterparts’ to connection’s endpoints.
- __init__(name: str, variable: str | None = None, variable_group: str | None = None, type: str | None = None) None ¶
Methods
__init__
(name[, variable, variable_group, type])Attributes
Returns True if connector is a variable group connector.
Returns True if connector is a single variable connector.
Returns the type of the connector.
Returns the scalar variable this connector is defined for.
Returns the variable group this connector is defined for.
Returns the name of the variable or variable group this connector is defined for.
- property is_group_connector: bool¶
Returns True if connector is a variable group connector.
- Returns:
True if variable group connector. Otherwise False.
- Return type:
bool
- property is_single_connector: bool¶
Returns True if connector is a single variable connector.
- Returns:
True if single variable connector. Otherwise False.
- Return type:
bool
- property type: str | None¶
Returns the type of the connector.
- property variable: str | None¶
Returns the scalar variable this connector is defined for.
- Returns:
the scalar variable, if connector is a group connector. Otherwise None.
- Return type:
Union[str, None]
- property variable_group: str | None¶
Returns the variable group this connector is defined for.
- Returns:
the variable group, if connector is a group connector. Otherwise None.
- Return type:
Union[str, None]
- property variable_name: str¶
Returns the name of the variable or variable group this connector is defined for.
- Returns:
name of the variable or variable group
- Return type:
str