Skip to content

Commit

Permalink
docs: Add PhysicalPort to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenngn committed Nov 19, 2024
1 parent 4c015cf commit 94adfba
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/custom_diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ my_element.custom_diagram(collect=yaml.safe_load(my_yaml)).render("svgdiagram").
- [`la.LogicalFunction`][capellambse.metamodel.la.LogicalFunction]
- [`pa.PhysicalFunction`][capellambse.metamodel.pa.PhysicalFunction]
- [`fa.ComponentExchange`][capellambse.metamodel.fa.ComponentExchange]
- [`cs.PhysicalPort`][capellambse.metamodel.cs.PhysicalPort]

## Check out the code

Expand Down
1 change: 1 addition & 0 deletions docs/gen_images.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"Physical Node": "fdb34c92-7c49-491d-bf11-dd139930786e",
"Physical Behavior": "313f48f4-fb7e-47a8-b28a-76440932fcb9",
"Maintain": "ee745644-07d7-40b9-ad7a-910dc8cbb805",
"Physical Port": "c403d4f4-9633-42a2-a5d6-9e1df2655146",
}
interface_context_diagram_uuids: dict[str, str] = {
"Left to right": "3ef23099-ce9a-4f7d-812f-935f47e7938d",
Expand Down
14 changes: 14 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,20 @@ Available via `.context_diagram` on a [`ModelObject`][capellambse.model.ModelObj
<figcaption>Context of Maintain Switch Firmware [PDFB]</figcaption>
</figure>

- ??? example "[`pa.PhysicalPort`][capellambse.metamodel.pa.PhysicalPort] (PAB)"

``` py
import capellambse

model = capellambse.MelodyModel("tests/data/ContextDiagram.aird")
diag = model.by_uuid("c403d4f4-9633-42a2-a5d6-9e1df2655146").context_diagram
diag.render("svgdiagram").save(pretty=True)
```
<figure markdown>
<img src="assets/images/Context of PP 1svg" width="1000000">
<figcaption>Context of PP 1 [PAB]</figcaption>
</figure>

#### Hierarchy in diagrams

Hierarchical diagrams are diagrams where boxes have child boxes and edges
Expand Down

0 comments on commit 94adfba

Please sign in to comment.