Skip to content

Commit

Permalink
UML for tdi_table_manager updates (#300)
Browse files Browse the repository at this point in the history
- PlantUML files for the `TdiExternManager` and `TdiTableAnnex`
  class diagrams and `.png` files for the `images` folder.

Signed-off-by: Derek Foster <[email protected]>
  • Loading branch information
ffoulkes authored Oct 28, 2024
1 parent da61270 commit 13f62df
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 0 deletions.
Binary file added stratum/docs/images/tdi_extern_manager.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added stratum/docs/images/tdi_table_annex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
76 changes: 76 additions & 0 deletions stratum/docs/plantuml/tdi_extern_manager.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@startuml
hide empty attributes
hide empty methods
hide circle

class P4InfoManager {
+ InitializeAndVerify()
+ FindResourceTypeByID()
..
- ProcessPreamble()
..
- all_resource_ids_
- all_resource_names_
- id_to_resource_type_map
}

class P4ExternManager {
+ RegisterExterns()
}
class TdiExternManager {
{static}+ CreateInstance()
+ RegisterExterns()
..
+ FindPktModMeterByID()
+ FindPktModMeterByName()
+ FindDirectPktModMeterByID()
+ FindDirectPktModMeterByName()
}
class Es2kExternManager {
{static}+ CreateInstance()
+ RegisterExterns()
..
+ FindPktModMeterByID()
+ FindPktModMeterByName()
+ FindDirectPktModMeterByID()
+ FindDirectPktModMeterByName()
..
+ direct_pkt_mod_meter_map_size()
+ pkt_mod_meter_map_size()
+ statistics()
..
- direct_pkt_mod_meter_map_
- pkt_mod_meter_map_
}
P4ExternManager <|-- TdiExternManager
TdiExternManager <|-- Es2kExternManager
P4InfoManager --> P4ExternManager
Es2kExternManager ..> "callback" P4InfoManager

class P4ResourceMap <<template>> {
+ BuildMaps()
+ FindByID()
+ FindByName()
..
+ resource_type()
+ size()
}
P4InfoManager *-- P4ResourceMap
Es2kExternManager *-- P4ResourceMap

class TdiTableManager
TdiTableManager -> P4InfoManager
TdiTableManager --> TdiExternManager

class TdiTargetFactory {
+ CreateTdiExternManager()
}
class Es2kTargetFactory {
+ CreateTdiExternManager()
}
TdiTargetFactory <|-- Es2kTargetFactory
TdiTableManager -> TdiTargetFactory
TdiTargetFactory .> "creates" TdiExternManager
Es2kTargetFactory .> "creates" Es2kExternManager

@enduml
49 changes: 49 additions & 0 deletions stratum/docs/plantuml/tdi_table_annex.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@startuml
hide empty attributes
hide empty methods
hide circle

class TdiTableAnnex {
{static} + CreateInstance()
+ Initialize()
..
+ BuildDirPktModTableData()
+ ReadDirPktModMeterEntry()
+ ReadPktModMeterEntry()
+ WritePktModMeterEntry()
}
class Es2kTableAnnex {
{static} + CreateInstance()
+ Initialize()
..
+ BuildDirPktModTableData()
+ ReadDirPktModMeterEntry()
+ ReadPktModMeterEntry()
+ WritePktModMeterEntry()
}
TdiTableAnnex <|-- Es2kTableAnnex
'TdiTableAnnex ..> TdiExternManager
Es2kTableAnnex -> Es2kExternManager

TdiExternManager <|-- Es2kExternManager

class TdiTableManager
TdiTableManager --> TdiExternManager
TdiTableManager --> TdiTableAnnex
TdiTableManager --> TdiTargetFactory

class TdiTargetFactory {
'+ CreateTdiExternManager()
+ CreateTdiTableAnnex()
}
class Es2kTargetFactory {
'+ CreateTdiExternManager()
+ CreateTdiTableAnnex()
}
TdiTargetFactory <|-- Es2kTargetFactory
TdiTargetFactory -> TdiTableAnnex
'TdiTargetFactory -> TdiExternManager
Es2kTargetFactory -> Es2kTableAnnex
'Es2kTargetFactory -> Es2kExternManager

@enduml

0 comments on commit 13f62df

Please sign in to comment.