1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 53 unchanged lines hidden (view full) --- 62 ~PerfectSwitch(); 63 64 std::string name() 65 { return csprintf("PerfectSwitch-%i", m_switch_id); } 66 67 void init(SimpleNetwork *); 68 void addInPort(const std::vector<MessageBuffer*>& in); 69 void addOutPort(const std::vector<MessageBuffer*>& out, |
70 const NetDest& routing_table_entry); |
71 int getInLinks() const { return m_in.size(); } 72 int getOutLinks() const { return m_out.size(); } 73 74 void wakeup(); 75 void storeEventInfo(int info); 76 |
77 void clearStats(); |
78 void collateStats(); |
79 void print(std::ostream& out) const; 80 81 private: 82 // Private copy constructor and assignment operator 83 PerfectSwitch(const PerfectSwitch& obj); 84 PerfectSwitch& operator=(const PerfectSwitch& obj); 85 86 SwitchID m_switch_id; --- 24 unchanged lines hidden --- |