Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UML for tdi_table_manager updates #300

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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