#ifndef GPTP_H #define GPTP_H #include "ns3/application.h" #include "ns3/clock.h" #include "ns3/tsn-net-device.h" #include "ns3/gPTP-header.h" #define NANOINSECOND 1000000000 namespace ns3 { class GPTP : public Application { public: /** * \brief Get the type ID. * \return the object TypeId */ static TypeId GetTypeId(); GPTP(); ~GPTP() override; /** * Enumeration of the states of the PTP port. */ enum GPTPportState { MASTER, SLAVE, PASSIVE, }; void SetMainClock(Ptr c); void AddDomain(uint8_t domainId); void AddDomain(uint8_t domainId, Ptr clock); void AddPort(Ptr net, GPTPportState state, uint8_t domainId); protected: void DoDispose() override; TracedCallback, double> m_NrTrace; TracedCallback, double> m_PdelayTrace; TracedCallback