12#ifndef __PTPMGMT_TYPES_H
13#define __PTPMGMT_TYPES_H
20__PTPMGMT_NAMESPACE_BEGIN
24const int64_t
INT48_MIN = -INT64_C(0x7fffffffffff) - 1;
443 operator std::string()
const {
return string(); }
456 operator timespec()
const;
475 operator timeval()
const;
912 std::map<tlvType_e, bool> allowSigTlvs;
939__PTPMGMT_NAMESPACE_END
Types, enumerators, and structers used by C interface to PTP management messages.
int64_t Integer48_t
Definition types.h:64
uint16_t UInteger16_t
Definition types.h:48
uint64_t UInteger48_t
Definition types.h:52
uint8_t Nibble_t
Definition types.h:44
uint8_t UInteger8_t
Definition types.h:46
uint64_t UInteger64_t
Definition types.h:56
long double float_nanoseconds
Definition types.h:76
uint32_t UInteger32_t
Definition types.h:50
int8_t Integer8_t
Definition types.h:58
uint8_t Octet_t
Definition types.h:70
int16_t Integer16_t
Definition types.h:60
int32_t Integer32_t
Definition types.h:62
int64_t Integer64_t
Definition types.h:68
long double float_seconds
Definition types.h:74
double Float64_t
Definition types.h:72
Management IDs enumerator.
uint8_t alternatePriority1
Definition types.h:838
PortIdentity_t acceptablePortIdentity
Definition types.h:837
bool less(const ClockIdentity_t &rhs) const
bool operator==(const Binary &bin) const
Definition types.h:692
Octet_t v[8]
Definition types.h:647
bool eq(const Binary &bin) const
bool operator<(const ClockIdentity_t &rhs) const
Definition types.h:680
bool operator==(const ClockIdentity_t &rhs) const
Definition types.h:668
std::string string() const
bool eq(const ClockIdentity_t &rhs) const
UInteger8_t clockClass
Definition types.h:791
uint16_t offsetScaledLogVariance
Definition types.h:793
clockAccuracy_e clockAccuracy
Definition types.h:792
Timestamp_t faultTime
Definition types.h:824
PTPText_t faultName
Definition types.h:826
uint16_t faultRecordLength
Definition types.h:823
PTPText_t faultValue
Definition types.h:827
faultRecord_e severityCode
Definition types.h:825
PTPText_t faultDescription
Definition types.h:828
UInteger8_t priority2
Definition types.h:930
PortIdentity_t portIdentity
Definition types.h:924
ClockQuality_t clockQuality
Definition types.h:925
uint8_t selected
Definition types.h:926
linuxptpUnicastState_e portState
Definition types.h:928
UInteger8_t priority1
Definition types.h:929
PortAddress_t portAddress
Definition types.h:931
uint8_t transportSpecific
Definition types.h:862
bool rcvSignaling
Definition types.h:872
bool isUnicast
Definition types.h:866
uint8_t domainNumber
Definition types.h:863
size_t countSigTlvs() const
bool useZeroGet
Definition types.h:871
PortIdentity_t target
Definition types.h:869
PortIdentity_t self_id
Definition types.h:870
void removeSigTlv(tlvType_e type)
bool filterSignaling
Definition types.h:873
uint8_t minorVersion
Definition types.h:865
bool isSigTlv(tlvType_e type) const
implementSpecific_e implementSpecific
Definition types.h:868
bool sendAuth
Definition types.h:879
uint8_t boundaryHops
Definition types.h:864
void allowSigTlv(tlvType_e type)
uint8_t rcvAuth
Definition types.h:885
bool rcvSMPTEOrg
Definition types.h:874
uint8_t lengthField
Definition types.h:808
const char * string() const
std::string textField
Definition types.h:809
bool less(const PortAddress_t &rhs) const
bool operator==(const PortAddress_t &rhs) const
Definition types.h:769
Binary addressField
Definition types.h:753
UInteger16_t addressLength
Definition types.h:752
std::string string() const
bool eq(const PortAddress_t &rhs) const
networkProtocol_e networkProtocol
Definition types.h:745
bool operator<(const PortAddress_t &rhs) const
Definition types.h:781
bool operator==(const PortIdentity_t &rhs) const
Definition types.h:723
bool less(const PortIdentity_t &rhs) const
ClockIdentity_t clockIdentity
Definition types.h:702
std::string string() const
bool eq(const PortIdentity_t &rhs) const
UInteger16_t portNumber
Definition types.h:703
bool operator<(const PortIdentity_t &rhs) const
Definition types.h:735
float_nanoseconds getInterval() const
int64_t getIntervalInt() const
Integer64_t scaledNanoseconds
Definition types.h:396
Timestamp_t & add(float_seconds seconds)
Timestamp_t(const timespec &ts)
Timestamp_t & operator+=(const Timestamp_t &ts)
Definition types.h:578
uint64_t toNanoseconds() const
Timestamp_t(const timeval &tv)
bool eq(float_seconds seconds) const
Timestamp_t & add(const Timestamp_t &ts)
Timestamp_t(float_seconds seconds)
bool eq(const Timestamp_t &ts) const
bool operator==(float_seconds seconds) const
Definition types.h:533
std::string string() const
Timestamp_t(int64_t secs, uint32_t nsecs)
Timestamp_t & operator+=(float_seconds seconds)
Definition types.h:596
bool operator<(const Timestamp_t &ts) const
Definition types.h:548
void fromFloat(float_seconds seconds)
float_seconds toFloat() const
void toTimespec(timespec &ts) const
operator std::string() const
Definition types.h:443
UInteger48_t secondsField
Definition types.h:420
Timestamp_t & operator-(float_seconds seconds)
Definition types.h:626
void fromNanoseconds(uint64_t nanoseconds)
Timestamp_t & subt(float_seconds seconds)
Timestamp_t & operator-=(const Timestamp_t &ts)
Definition types.h:614
bool operator==(const Timestamp_t &ts) const
Definition types.h:520
void toTimeval(timeval &tv) const
Timestamp_t & operator-(const Timestamp_t &ts)
Definition types.h:608
Timestamp_t & operator-=(float_seconds seconds)
Definition types.h:632
bool less(const Timestamp_t &ts) const
bool less(float_seconds seconds) const
Timestamp_t & operator+(const Timestamp_t &ts)
Definition types.h:572
Timestamp_t & operator+(float_seconds seconds)
Definition types.h:590
bool operator<(float_seconds seconds) const
Definition types.h:560
UInteger32_t nanosecondsField
Definition types.h:421
Timestamp_t & subt(const Timestamp_t &ts)
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
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:847
@ RCV_AUTH_SIG_LAST
Definition types.h:852
@ RCV_AUTH_MNG
Definition types.h:850
@ RCV_AUTH_ALL
Definition types.h:855
@ RCV_AUTH_IGNORE
Definition types.h:857
@ RCV_AUTH_NONE
Definition types.h:848
@ RCV_AUTH_SIG_ALL
Definition types.h:854
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
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
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
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