12 #ifndef __PTPMGMT_TYPES_H
13 #define __PTPMGMT_TYPES_H
20 __PTPMGMT_NAMESPACE_BEGIN
24 const int64_t
INT48_MIN = -INT64_C(0x7fffffffffff) - 1;
444 operator std::string()
const {
return string(); }
460 operator timespec()
const { timespec ts;
toTimespec(ts);
return ts; }
482 operator timeval()
const { timeval tv;
toTimeval(tv);
return tv; }
661 static size_t size() {
return sizeof v; }
671 void clear(
int val = 0) {memset(
v, val, 8);}
684 return memcmp(
v, rhs.
v,
size()) == 0;
698 return memcmp(
v, rhs.
v,
size()) < 0;
959 std::map<tlvType_e, bool> allowSigTlvs;
990 __PTPMGMT_NAMESPACE_END
Management IDs enumerator.
Types, enumerators, and structers used by C interface to PTP management messages.
Hold octets.
Definition: bin.h:28
size_t size() const
Definition: bin.h:74
size_t length() const
Definition: bin.h:69
const uint8_t * get() const
Definition: bin.h:84
uint8_t alternatePriority1
Definition: types.h:868
static size_t size()
Definition: types.h:873
PortIdentity_t acceptablePortIdentity
Definition: types.h:867
bool less(const ClockIdentity_t &rhs) const
Definition: types.h:697
bool operator==(const Binary &bin) const
Definition: types.h:705
Octet_t v[8]
Definition: types.h:656
bool eq(const Binary &bin) const
Definition: types.h:711
void clear(int val=0)
Definition: types.h:671
bool operator<(const ClockIdentity_t &rhs) const
Definition: types.h:691
bool operator==(const ClockIdentity_t &rhs) const
Definition: types.h:677
std::string string() const
static size_t size()
Definition: types.h:661
bool eq(const ClockIdentity_t &rhs) const
Definition: types.h:683
UInteger8_t clockClass
Definition: types.h:815
uint16_t offsetScaledLogVariance
Definition: types.h:817
static size_t size()
Definition: types.h:822
clockAccuracy_e clockAccuracy
Definition: types.h:816
Timestamp_t faultTime
Definition: types.h:851
PTPText_t faultName
Definition: types.h:853
uint16_t faultRecordLength
Definition: types.h:850
PTPText_t faultValue
Definition: types.h:854
size_t size() const
Definition: types.h:860
faultRecord_e severityCode
Definition: types.h:852
PTPText_t faultDescription
Definition: types.h:855
UInteger8_t priority2
Definition: types.h:977
PortIdentity_t portIdentity
Definition: types.h:971
ClockQuality_t clockQuality
Definition: types.h:972
uint8_t selected
Definition: types.h:973
linuxptpUnicastState_e portState
Definition: types.h:975
UInteger8_t priority1
Definition: types.h:976
size_t size() const
Definition: types.h:983
PortAddress_t portAddress
Definition: types.h:978
uint8_t scope
Definition: types.h:880
uint16_t value
Definition: types.h:879
ssize_t size
Definition: types.h:890
uint8_t allowed
Definition: types.h:881
uint8_t transportSpecific
Definition: types.h:909
bool rcvSignaling
Definition: types.h:919
bool isUnicast
Definition: types.h:913
uint8_t domainNumber
Definition: types.h:910
size_t countSigTlvs() const
bool useZeroGet
Definition: types.h:918
PortIdentity_t target
Definition: types.h:916
PortIdentity_t self_id
Definition: types.h:917
void removeSigTlv(tlvType_e type)
bool filterSignaling
Definition: types.h:920
uint8_t minorVersion
Definition: types.h:912
bool isSigTlv(tlvType_e type) const
implementSpecific_e implementSpecific
Definition: types.h:915
bool sendAuth
Definition: types.h:926
uint8_t boundaryHops
Definition: types.h:911
void allowSigTlv(tlvType_e type)
uint8_t rcvAuth
Definition: types.h:932
bool rcvSMPTEOrg
Definition: types.h:921
const char * string() const
Definition: types.h:846
uint8_t lengthField
Definition: types.h:835
size_t size() const
Definition: types.h:841
std::string textField
Definition: types.h:836
bool less(const PortAddress_t &rhs) const
bool operator==(const PortAddress_t &rhs) const
Definition: types.h:790
size_t size() const
Definition: types.h:776
Binary addressField
Definition: types.h:771
UInteger16_t addressLength
Definition: types.h:770
std::string string() const
bool eq(const PortAddress_t &rhs) const
Definition: types.h:796
networkProtocol_e networkProtocol
Definition: types.h:763
bool operator<(const PortAddress_t &rhs) const
Definition: types.h:805
bool operator==(const PortIdentity_t &rhs) const
Definition: types.h:739
void clear()
Definition: types.h:733
bool less(const PortIdentity_t &rhs) const
ClockIdentity_t clockIdentity
Definition: types.h:718
static size_t size()
Definition: types.h:724
std::string string() const
bool eq(const PortIdentity_t &rhs) const
Definition: types.h:745
UInteger16_t portNumber
Definition: types.h:719
bool operator<(const PortIdentity_t &rhs) const
Definition: types.h:753
float_nanoseconds getInterval() const
Definition: types.h:406
static size_t size()
Definition: types.h:401
int64_t getIntervalInt() const
Integer64_t scaledNanoseconds
Definition: types.h:396
Timestamp_t(const timespec &ts)
Definition: types.h:452
Timestamp_t & operator+(const Timestamp_t &ts)
Definition: types.h:586
Timestamp_t & operator+=(const Timestamp_t &ts)
Definition: types.h:592
uint64_t toNanoseconds() const
Timestamp_t()
Definition: types.h:422
Timestamp_t(const timeval &tv)
bool eq(float_seconds seconds) const
Timestamp_t(float_seconds seconds)
Definition: types.h:496
Timestamp_t & operator+(float_seconds seconds)
Definition: types.h:604
Timestamp_t & operator+=(float_seconds seconds)
Definition: types.h:610
bool eq(const Timestamp_t &ts) const
Definition: types.h:533
bool operator==(float_seconds seconds) const
Definition: types.h:543
std::string string() const
Timestamp_t & subt(const Timestamp_t &ts)
Timestamp_t(int64_t secs, uint32_t nsecs)
Definition: types.h:428
Timestamp_t & add(float_seconds seconds)
bool operator<(const Timestamp_t &ts) const
Definition: types.h:558
Timestamp_t & operator-(float_seconds seconds)
Definition: types.h:640
void fromFloat(float_seconds seconds)
float_seconds toFloat() const
void toTimespec(timespec &ts) const
Definition: types.h:466
Timestamp_t & subt(float_seconds seconds)
Definition: types.h:652
operator std::string() const
Definition: types.h:444
UInteger48_t secondsField
Definition: types.h:417
Timestamp_t & operator-=(const Timestamp_t &ts)
Definition: types.h:628
void fromNanoseconds(uint64_t nanoseconds)
Timestamp_t & operator-=(float_seconds seconds)
Definition: types.h:646
static size_t size()
Definition: types.h:434
bool operator==(const Timestamp_t &ts) const
Definition: types.h:527
void toTimeval(timeval &tv) const
Timestamp_t & operator-(const Timestamp_t &ts)
Definition: types.h:622
bool less(const Timestamp_t &ts) const
Definition: types.h:564
bool less(float_seconds seconds) const
Timestamp_t & add(const Timestamp_t &ts)
bool operator<(float_seconds seconds) const
Definition: types.h:574
UInteger32_t nanosecondsField
Definition: types.h:418
int64_t Integer48_t
Definition: types.h:56
clockAccuracy_e
Definition: types.h:229
@ Accurate_within_10ns
Definition: types.h:238
@ Accurate_Unknown
Definition: types.h:257
@ Accurate_more_10s
Definition: types.h:256
@ Accurate_within_2_5ns
Definition: types.h:237
@ Accurate_within_250ms
Definition: types.h:253
@ Accurate_within_100ms
Definition: types.h:252
@ Accurate_within_10s
Definition: types.h:255
@ Accurate_within_10ps
Definition: types.h:232
@ Accurate_within_25ns
Definition: types.h:239
@ Accurate_within_2_5ps
Definition: types.h:231
@ Accurate_within_25ms
Definition: types.h:251
@ Accurate_within_1s
Definition: types.h:254
@ Accurate_within_250ps
Definition: types.h:235
@ Accurate_within_1ps
Definition: types.h:230
@ Accurate_within_100us
Definition: types.h:246
@ Accurate_within_2_5ms
Definition: types.h:249
@ Accurate_within_1us
Definition: types.h:242
@ Accurate_within_10us
Definition: types.h:244
@ Accurate_within_25us
Definition: types.h:245
@ Accurate_within_25ps
Definition: types.h:233
@ Accurate_within_250ns
Definition: types.h:241
@ Accurate_within_1ns
Definition: types.h:236
@ Accurate_within_250us
Definition: types.h:247
@ Accurate_within_100ns
Definition: types.h:240
@ Accurate_within_1ms
Definition: types.h:248
@ Accurate_within_100ps
Definition: types.h:234
@ Accurate_within_2_5us
Definition: types.h:243
@ Accurate_within_10ms
Definition: types.h:250
managementErrorId_e
Definition: types.h:199
@ NO_SUCH_ID
Definition: types.h:201
@ NOT_SETABLE
Definition: types.h:204
@ WRONG_VALUE
Definition: types.h:203
@ NOT_SUPPORTED
Definition: types.h:205
@ WRONG_LENGTH
Definition: types.h:202
@ GENERAL_ERROR
Definition: types.h:206
@ RESPONSE_TOO_BIG
Definition: types.h:200
uint16_t UInteger16_t
Definition: types.h:40
@ F_TTRA
Definition: types.h:389
@ F_FTRA
Definition: types.h:392
@ F_UTCV
Definition: types.h:385
@ F_LI_61
Definition: types.h:381
@ F_PTP
Definition: types.h:387
@ F_LI_59
Definition: types.h:383
linuxptpTimeStamp_e
Definition: types.h:347
@ TS_SOFTWARE
Definition: types.h:349
@ TS_P2P1STEP
Definition: types.h:358
@ TS_LEGACY_HW
Definition: types.h:354
@ TS_HARDWARE
Definition: types.h:352
@ TS_ONESTEP
Definition: types.h:356
uint64_t UInteger48_t
Definition: types.h:44
msgType_e
Definition: types.h:114
@ Pdelay_Resp_Follow_Up
Definition: types.h:130
@ Pdelay_Resp
Definition: types.h:123
@ Pdelay_Req
Definition: types.h:121
@ Delay_Req
Definition: types.h:119
@ Sync
Definition: types.h:117
@ Follow_Up
Definition: types.h:126
@ Signaling
Definition: types.h:134
@ Management
Definition: types.h:136
@ Announce
Definition: types.h:132
@ Delay_Resp
Definition: types.h:128
implementSpecific_e
Definition: types.h:322
@ noImplementSpecific
Definition: types.h:323
@ linuxptp
Definition: types.h:324
delayMechanism_e
Definition: types.h:299
@ E2E
Definition: types.h:306
@ NO_MECHANISM
Definition: types.h:310
@ SPECIAL
Definition: types.h:317
@ COMMON_P2P
Definition: types.h:315
@ AUTO
Definition: types.h:304
@ P2P
Definition: types.h:308
tlvType_e
Definition: types.h:142
@ ENHANCED_ACCURACY_METRICS
Definition: types.h:165
@ ALTERNATE_TIME_OFFSET_INDICATOR
Definition: types.h:160
@ ACKNOWLEDGE_CANCEL_UNICAST_TRANSMISSION
Definition: types.h:156
@ SLAVE_RX_SYNC_TIMING_DATA
Definition: types.h:175
@ CANCEL_UNICAST_TRANSMISSION
Definition: types.h:154
@ MANAGEMENT
Definition: types.h:144
@ SLAVE_DELAY_TIMING_DATA_NP
Definition: types.h:188
@ PROTOCOL_ADDRESS
Definition: types.h:173
@ MANAGEMENT_ERROR_STATUS
Definition: types.h:146
@ TLV_PAD
Definition: types.h:183
@ PORT_COMMUNICATION_AVAILABILITY
Definition: types.h:171
@ SLAVE_TX_EVENT_TIMESTAMPS
Definition: types.h:179
@ AUTHENTICATION
Definition: types.h:185
@ SLAVE_RX_SYNC_COMPUTED_DATA
Definition: types.h:177
@ ORGANIZATION_EXTENSION
Definition: types.h:148
@ ORGANIZATION_EXTENSION_PROPAGATE
Definition: types.h:163
@ L1_SYNC
Definition: types.h:169
@ ORGANIZATION_EXTENSION_DO_NOT_PROPAGATE
Definition: types.h:167
@ REQUEST_UNICAST_TRANSMISSION
Definition: types.h:150
@ CUMULATIVE_RATE_RATIO
Definition: types.h:181
@ PATH_TRACE
Definition: types.h:158
@ GRANT_UNICAST_TRANSMISSION
Definition: types.h:152
portState_e
Definition: types.h:284
@ FAULTY
Definition: types.h:286
@ LISTENING
Definition: types.h:288
@ UNCALIBRATED
Definition: types.h:294
@ DISABLED
Definition: types.h:287
@ TIME_RECEIVER
Definition: types.h:296
@ PASSIVE
Definition: types.h:293
@ PRE_MASTER
Definition: types.h:289
@ INITIALIZING
Definition: types.h:285
@ TIME_TRANSMITTER
Definition: types.h:292
@ PRE_TIME_TRANSMITTER
Definition: types.h:290
@ SLAVE
Definition: types.h:295
@ MASTER
Definition: types.h:291
uint8_t Nibble_t
Definition: types.h:36
uint8_t UInteger8_t
Definition: types.h:38
__PTPMGMT_NAMESPACE_BEGIN const int64_t INT48_MIN
Definition: types.h:24
const int64_t INT48_MAX
Definition: types.h:28
SMPTEmasterLockingStatus_e
Definition: types.h:327
@ SMPTE_WARM_LOCKING
Definition: types.h:341
@ SMPTE_COLD_LOCKING
Definition: types.h:335
@ SMPTE_NOT_IN_USE
Definition: types.h:328
@ SMPTE_FREE_RUN
Definition: types.h:329
@ SMPTE_LOCKED
Definition: types.h:342
uint64_t UInteger64_t
Definition: types.h:48
linuxptpUnicastState_e
Definition: types.h:372
@ UC_WAIT
Definition: types.h:373
@ UC_HAVE_ANN
Definition: types.h:374
@ UC_HAVE_SYDY
Definition: types.h:376
@ UC_NEED_SYDY
Definition: types.h:375
MsgParams_RcvAuth_e
Definition: types.h:894
@ RCV_AUTH_SIG_LAST
Definition: types.h:899
@ RCV_AUTH_MNG
Definition: types.h:897
@ RCV_AUTH_ALL
Definition: types.h:902
@ RCV_AUTH_IGNORE
Definition: types.h:904
@ RCV_AUTH_NONE
Definition: types.h:895
@ RCV_AUTH_SIG_ALL
Definition: types.h:901
long double float_nanoseconds
Definition: types.h:68
actionField_e
Definition: types.h:191
@ GET
Definition: types.h:192
@ ACKNOWLEDGE
Definition: types.h:196
@ SET
Definition: types.h:193
@ COMMAND
Definition: types.h:195
@ RESPONSE
Definition: types.h:194
linuxptpPowerProfileVersion_e
Definition: types.h:363
@ IEEE_C37_238_VERSION_NONE
Definition: types.h:365
@ IEEE_C37_238_VERSION_2017
Definition: types.h:369
@ IEEE_C37_238_VERSION_2011
Definition: types.h:367
uint32_t UInteger32_t
Definition: types.h:42
int8_t Integer8_t
Definition: types.h:50
networkProtocol_e
Definition: types.h:220
@ UDP_IPv4
Definition: types.h:221
@ ControlNet
Definition: types.h:225
@ UDP_IPv6
Definition: types.h:222
@ PROFINET
Definition: types.h:226
@ IEEE_802_3
Definition: types.h:223
@ DeviceNet
Definition: types.h:224
uint8_t Octet_t
Definition: types.h:62
int16_t Integer16_t
Definition: types.h:52
int32_t Integer32_t
Definition: types.h:54
int64_t Integer64_t
Definition: types.h:60
MNG_PARSE_ERROR_e
Definition: types.h:71
@ MNG_PARSE_ERROR_SIG
Definition: types.h:77
@ MNG_PARSE_ERROR_ACTION
Definition: types.h:97
@ MNG_PARSE_ERROR_UNSUPPORT
Definition: types.h:99
@ MNG_PARSE_ERROR_AUTH_WRONG
Definition: types.h:107
@ MNG_PARSE_ERROR_MEM
Definition: types.h:101
@ MNG_PARSE_ERROR_TOO_SMALL
Definition: types.h:89
@ MNG_PARSE_ERROR_SMPTE
Definition: types.h:79
@ MNG_PARSE_ERROR_OK
Definition: types.h:73
@ MNG_PARSE_ERROR_AUTH
Definition: types.h:103
@ MNG_PARSE_ERROR_AUTH_NOKEY
Definition: types.h:109
@ MNG_PARSE_ERROR_SIZE_MISS
Definition: types.h:87
@ MNG_PARSE_ERROR_INVALID_TLV
Definition: types.h:83
@ MNG_PARSE_ERROR_HEADER
Definition: types.h:95
@ MNG_PARSE_ERROR_AUTH_NONE
Definition: types.h:105
@ MNG_PARSE_ERROR_MSG
Definition: types.h:75
@ MNG_PARSE_ERROR_INVALID_ID
Definition: types.h:81
@ MNG_PARSE_ERROR_SIZE
Definition: types.h:91
@ MNG_PARSE_ERROR_MISMATCH_TLV
Definition: types.h:85
@ MNG_PARSE_ERROR_VAL
Definition: types.h:93
const uint64_t UINT48_MAX
Definition: types.h:32
long double float_seconds
Definition: types.h:66
faultRecord_e
Definition: types.h:260
@ F_Critical
Definition: types.h:263
@ F_Informational
Definition: types.h:267
@ F_Alert
Definition: types.h:262
@ F_Warning
Definition: types.h:265
@ F_Debug
Definition: types.h:268
@ F_Error
Definition: types.h:264
@ F_Emergency
Definition: types.h:261
@ F_Notice
Definition: types.h:266
clockType_e
Definition: types.h:212
@ ordinaryClock
Definition: types.h:213
@ managementClock
Definition: types.h:217
@ boundaryClock
Definition: types.h:214
@ p2pTransparentClock
Definition: types.h:215
@ e2eTransparentClock
Definition: types.h:216
const size_t sizeof_UInteger48_t
Definition: types.h:46
double Float64_t
Definition: types.h:64
timeSource_e
Definition: types.h:271
@ ATOMIC_CLOCK
Definition: types.h:272
@ PTP
Definition: types.h:277
@ GPS
Definition: types.h:274
@ SERIAL_TIME_CODE
Definition: types.h:276
@ NTP
Definition: types.h:278
@ TERRESTRIAL_RADIO
Definition: types.h:275
@ INTERNAL_OSCILLATOR
Definition: types.h:281
@ GNSS
Definition: types.h:273
@ HAND_SET
Definition: types.h:279
@ OTHER
Definition: types.h:280
const size_t sizeof_Integer48_t
Definition: types.h:58