Simplify Module lookup in the Router
trait
#802
Labels
O: decoupling
Objective: aims to separate concerns and cause to independent, reusable components
Milestone
Summary
There is only one way to implement
lookup_module_channel
andlookup_module_packet
methods within theRouter
trait. Their main purpose is to extractPortId
fromChannelMsg
andPacketMsg
.We should consider removing them and, instead, introduce a free mapping function for each of the
ChannelMsg
andPacketMsg
that extractsPortId
. Following this, the existing methodlookup_module_by_port
can be used everywhere for subsequent module lookup operation.The text was updated successfully, but these errors were encountered: