71 lines
1.9 KiB
C
71 lines
1.9 KiB
C
|
|
#ifndef TSN_AGGREGATED_NET_DEVICE_H
|
||
|
|
#define TSN_AGGREGATED_NET_DEVICE_H
|
||
|
|
|
||
|
|
#include "ns3/tsn-net-device.h"
|
||
|
|
|
||
|
|
namespace ns3
|
||
|
|
{
|
||
|
|
|
||
|
|
/**
|
||
|
|
* \ingroup tsn
|
||
|
|
* \class TsnAggregatedNetDevice
|
||
|
|
* \brief A Device for aggregated Ethernet full duplex Link.
|
||
|
|
*
|
||
|
|
* This TsnAggregatedNetDevice class specializes the TsnAggregatedNetDevice
|
||
|
|
* class. This class don't follow any standard. It was designed for experiment
|
||
|
|
* 802.1CB features on end-station.
|
||
|
|
*/
|
||
|
|
|
||
|
|
class TsnAggregatedNetDevice : public TsnNetDevice
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
/**
|
||
|
|
* \brief Get the TypeId
|
||
|
|
*
|
||
|
|
* \return The TypeId for this class
|
||
|
|
*/
|
||
|
|
static TypeId GetTypeId();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Construct a TsnAggregatedNetDevice
|
||
|
|
*
|
||
|
|
* This is the constructor for the TsnAggregatedNetDevice. It takes as a
|
||
|
|
* parameter a pointer to the Node to which this device is connected,
|
||
|
|
* as well as an optional DataRate object.
|
||
|
|
*/
|
||
|
|
TsnAggregatedNetDevice();
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Destroy a TsnAggregatedNetDevice
|
||
|
|
*
|
||
|
|
* This is the destructor for the TsnAggregatedNetDevice.
|
||
|
|
*/
|
||
|
|
~TsnAggregatedNetDevice();
|
||
|
|
|
||
|
|
// Delete copy constructor and assignment operator to avoid misuse
|
||
|
|
TsnAggregatedNetDevice& operator=(const TsnAggregatedNetDevice&) = delete;
|
||
|
|
TsnAggregatedNetDevice(const TsnAggregatedNetDevice&) = delete;
|
||
|
|
|
||
|
|
void AddNetDevice(Ptr<TsnNetDevice>);
|
||
|
|
|
||
|
|
bool SendFrom(Ptr<Packet> packet,
|
||
|
|
const Address& source,
|
||
|
|
const Address& dest,
|
||
|
|
uint16_t ethertype);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
/**
|
||
|
|
* \brief Dispose of the object
|
||
|
|
*/
|
||
|
|
void DoDispose();
|
||
|
|
|
||
|
|
bool MacRxPromiscCallback(Ptr<NetDevice> dev, Ptr<const Packet> packet, uint16_t protocol, const Address& sender, const Address& receiver, PacketType pType);
|
||
|
|
|
||
|
|
std::vector<Ptr<TsnNetDevice>> m_netDevices;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif /* TSN_AGGREGATED_NET_DEVICE_H */
|