Update README and add contrib dir
This commit is contained in:
63
contrib/tsn/model/transmission-gate.h
Normal file
63
contrib/tsn/model/transmission-gate.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#ifndef TRANSMISSION_GATE_H
|
||||
#define TRANSMISSION_GATE_H
|
||||
|
||||
#include "ns3/object.h"
|
||||
#include "ns3/packet.h"
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
class TransmissionGate: public Object
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* \brief Get the TypeId
|
||||
*
|
||||
* \return The TypeId for this class
|
||||
*/
|
||||
static TypeId GetTypeId();
|
||||
|
||||
/**
|
||||
* \brief Create a TransmissionGate
|
||||
*/
|
||||
TransmissionGate();
|
||||
|
||||
/**
|
||||
* Destroy a TransmissionGate
|
||||
*
|
||||
* This is the destructor for the TransmissionGate.
|
||||
*/
|
||||
~TransmissionGate();
|
||||
|
||||
// Delete copy constructor and assignment operator to avoid misuse
|
||||
TransmissionGate& operator=(const TransmissionGate&) = delete;
|
||||
TransmissionGate(const TransmissionGate&) = delete;
|
||||
|
||||
bool IsOpen();
|
||||
void Open();
|
||||
void Close();
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
/**
|
||||
* Enumeration of the states of the transimission gate.
|
||||
*/
|
||||
enum State
|
||||
{
|
||||
OPEN, /**< The transimission gate is open */
|
||||
CLOSE /**< The transimission gate is close */
|
||||
};
|
||||
|
||||
/**
|
||||
* The state of the Net Device transmit state machine.
|
||||
*/
|
||||
State m_state;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* TRANSMISSION_GATE_H */
|
||||
Reference in New Issue
Block a user