add the ability for the ethernet device to check if the link is busy
--HG-- extra : convert_revision : 0dc0c4c4546869261f4508ad22a6a85aecf3c334
This commit is contained in:
parent
6e60d5c12f
commit
ae4208f3a3
|
@ -63,6 +63,9 @@ class EtherInt : public SimObject
|
|||
bool sendPacket(EthPacketPtr packet)
|
||||
{ return peer ? peer->recvPacket(packet) : true; }
|
||||
virtual bool recvPacket(EthPacketPtr packet) = 0;
|
||||
|
||||
bool askBusy() {return peer->isBusy(); }
|
||||
virtual bool isBusy() { return false; }
|
||||
};
|
||||
|
||||
#endif // __DEV_ETHERINT_HH__
|
||||
|
|
|
@ -114,6 +114,7 @@ class EtherLink : public SimObject
|
|||
Interface(const std::string &name, Link *txlink, Link *rxlink);
|
||||
bool recvPacket(EthPacketPtr packet) { return txlink->transmit(packet); }
|
||||
void sendDone() { peer->sendDone(); }
|
||||
bool isBusy() { return txlink->busy(); }
|
||||
};
|
||||
|
||||
Link *link[2];
|
||||
|
|
Loading…
Reference in a new issue