SysML 1.3 ports - generating code
IBM® Engineering Systems Design Rhapsody® provides a great deal of flexibility in terms of modeling with SysML 1.3 ports. However, if you plan to use the simulation feature with your model, there are certain modeling restrictions that you must adhere to. These restrictions are necessary in order to generate the code required for simulation of the model.
If you plan to use the simulation feature for your model, make sure that you adhere to the following modeling guidelines:
- For a directedFeature attribute, operation, or event reception of a proxy port, if you set the value of the direction tag to providedrequired, code is not generated for that attribute, operation, or event reception. For a flow property of a proxy port, if you set the value of the direction tag to Bidirectional, code is not generated for the flow property. In these cases, the following warning is displayed when Check Model is run:The interface block contains elements that will be ignored in code generation and in simulation of the model: provided-required attributes and operations, or bidirectional flow properties.
- The user interface allows you to link proxy ports but does not allow you to map specific directed attributes, operations, and flow properties to each other. You must use matching names to indicate such mappings. Note that when Check Model is run, you will not receive any warnings about linked proxy ports that do not have such matching elements.
- Since the name of the proxy port is not concatenated with the name of the individual directed elements, all such directed elements are treated as a single collection, even when you are using nested proxy ports. So the names of the individual directed elements must be unique within each such grouping. In cases where there are name collisions, the following warning is displayed when Check Model is run: The interface block and its nested proxy ports contain multiple features with the same name. This ambiguity may prevent some of the connectors from being initialized properly.