11#include <promeki/config.h>
12#if PROMEKI_ENABLE_NETWORK
20PROMEKI_NAMESPACE_BEGIN
79 static constexpr const char *DefaultPtpProfile =
"IEEE1588-2008";
82 Rfc7273RefClk() =
default;
98 static Rfc7273RefClk ptp(
const String &profile,
const EUI64 &gmid = EUI64(),
110 static Rfc7273RefClk ptpTraceable(
const String &profile);
117 static Rfc7273RefClk localMac(
const MacAddress &mac);
127 static Rfc7273RefClk local();
139 static Result<Rfc7273RefClk> fromSdpValue(
const String &value);
142 Kind kind()
const {
return _kind; }
145 bool isValid()
const {
return _kind != Kind::None; }
148 bool isTraceable()
const {
return _traceable; }
151 const String &profile()
const {
return _profile; }
154 const EUI64 &grandmasterId()
const {
return _gmid; }
157 uint8_t domain()
const {
return _domain; }
160 const MacAddress &localMacAddress()
const {
return _mac; }
171 String toSdpValue()
const;
174 bool operator==(
const Rfc7273RefClk &other)
const;
177 bool operator!=(
const Rfc7273RefClk &other)
const {
return !(*
this == other); }
180 Kind _kind = Kind::None;
181 bool _traceable =
false;