Commit b06a2a2b authored by vasilvv's avatar vasilvv Committed by Commit bot

Add an interface to access individual queues on the switch

Merge internal change: 134721332

R=rch@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2391723003
Cr-Commit-Position: refs/heads/master@{#422823}
parent a0a347d1
......@@ -31,6 +31,10 @@ class Switch {
return &ports_[port_number - 1];
}
inline const Queue* port_queue(SwitchPortNumber port_number) {
return ports_[port_number - 1].queue();
}
private:
class Port : public Endpoint, public UnconstrainedPortInterface {
public:
......@@ -52,7 +56,8 @@ class Switch {
void Act() override;
inline bool connected() { return connected_; }
inline bool connected() const { return connected_; }
inline const Queue* queue() const { return &queue_; }
private:
Switch* parent_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment