Files
dofs/docs/network/network_switch.md

19 lines
1016 B
Markdown

# network/network_switch.h
## `NetworkSwitch::NetworkSwitch`
`NetworkSwitch(Simulator *const sim, NodeId id, uint16_t total_ports, ECNEngine *const ecn, SwitchBuffer *const buf, const RoutingTables *const rt, Time forwarding_latency, Time multicast_dup_delay) noexcept`
## `NetworkSwitch::get_status`
`NodeStatus get_status() const noexcept`
## `NetworkSwitch::port_cnt`
`uint16_t port_cnt() const noexcept`
## `NetworkSwitch::recv_pkt`
`virtual void recv_pkt(Packet &pkt, PortId ingress) override`
## `NetworkSwitch::set_status`
`void set_status(NodeStatus s, Time new_forward_latency = Time(0)) noexcept`
## `enqueue_one`
`void enqueue_one(Packet pkt, PortId egress, FlowPriority prio) noexcept;`
## `forward_after_delay`
`private: void forward_after_delay(Packet pkt, PortId ingress) noexcept;`
## `group_bit_set`
`static inline bool group_bit_set(PacketGroups mask, std::size_t gid) noexcept;`
## `merge_sorted_unique`
`static void merge_sorted_unique(std::vector<PortId> &base, const std::vector<PortId> &add);`