|
libptpmgmt 2.0
libptpmgmt library that provides the functionality of linuxptp pmc
|
Create and parse PTP management messages. More...


Go to the source code of this file.
Classes | |
| struct | ptpmgmt_msg_t |
| struct | ptpmgmt_tlv_mem_t |
Typedefs | |
| typedef struct ptpmgmt_msg_t * | ptpmgmt_msg |
| typedef const struct ptpmgmt_msg_t * | const_ptpmgmt_msg |
| typedef bool(* | ptpmgmt_msg_sig_callback) (void *cookie, const_ptpmgmt_msg msg, enum ptpmgmt_tlvType_e tlvType, const void *tlv) |
| typedef struct ptpmgmt_tlv_mem_t * | ptpmgmt_tlv_mem |
| typedef const struct ptpmgmt_tlv_mem_t * | const_ptpmgmt_tlv_mem |
Create and parse PTP management messages.
Created following "IEEE Std 1588-2008", PTP version 2 with some updates from "IEEE Std 1588-2019"
| typedef const struct ptpmgmt_msg_t* const_ptpmgmt_msg |
pointer to constant ptpmgmt message structure
| typedef const struct ptpmgmt_tlv_mem_t* const_ptpmgmt_tlv_mem |
pointer to constant ptpmgmt message structure
| typedef struct ptpmgmt_msg_t* ptpmgmt_msg |
pointer to ptpmgmt message structure
| typedef bool(* ptpmgmt_msg_sig_callback) (void *cookie, const_ptpmgmt_msg msg, enum ptpmgmt_tlvType_e tlvType, const void *tlv) |
pointer to callback traverse sig TLVs
| [in] | cookie | pointer to a user cookie |
| [in] | msg | object |
| [in] | tlvType | Signalling TLV type |
| [in] | tlv | Signalling TLV |
| typedef struct ptpmgmt_tlv_mem_t* ptpmgmt_tlv_mem |
pointer to ptpmgmt TLV allocator structure
| const char * ptpmgmt_msg_act2str | ( | enum ptpmgmt_actionField_e | action | ) |
Convert action to string
| [in] | action |
| ptpmgmt_msg ptpmgmt_msg_alloc | ( | ) |
Alocate new message structure
| ptpmgmt_msg ptpmgmt_msg_alloc_prms | ( | ptpmgmt_cpMsgParams | prms | ) |
Alocate new message structure with parameters
| [in] | prms | ptpmgmt_MsgParams |
| const char * ptpmgmt_msg_clkType2str | ( | enum ptpmgmt_clockType_e | type | ) |
Convert clock type to string
| [in] | type | clock type |
| const char * ptpmgmt_msg_clockAcc2str | ( | enum ptpmgmt_clockAccuracy_e | value | ) |
Convert clock accuracy to string
| [in] | value | clock accuracy |
| const char * ptpmgmt_msg_delayMech2str | ( | enum ptpmgmt_delayMechanism_e | type | ) |
Convert delay mechanism to string
| [in] | type | delay mechanism |
| const char * ptpmgmt_msg_err2str | ( | enum ptpmgmt_MNG_PARSE_ERROR_e | err | ) |
Convert parse error code to string
| [in] | err | parse code |
| const char * ptpmgmt_msg_errId2str | ( | enum ptpmgmt_managementErrorId_e | err | ) |
Convert management error to string
| [in] | err | ID |
| const char * ptpmgmt_msg_faultRec2str | ( | enum ptpmgmt_faultRecord_e | code | ) |
Convert fault record severity code to string
| [in] | code | severity code |
| bool ptpmgmt_msg_findDelayMech | ( | const char * | str, |
| enum ptpmgmt_delayMechanism_e * | type, | ||
| bool | exact | ||
| ) |
Convert string to delay mechanism
| [in] | str | string to search |
| [out] | type | delay mechanism |
| [in] | exact | perform an exact match |
| bool ptpmgmt_msg_findMngID | ( | const char * | str, |
| enum ptpmgmt_mng_vals_e * | id, | ||
| bool | exact | ||
| ) |
Convert string to management id
| [in] | str | string to search |
| [out] | id | parse code |
| [in] | exact | perform an exact match |
| bool ptpmgmt_msg_findPortState | ( | const char * | str, |
| enum ptpmgmt_portState_e * | state, | ||
| bool | caseSens | ||
| ) |
Convert string to port state
| [in] | str | string to search |
| [out] | state | port state |
| [in] | caseSens | perform case sensetive match |
| bool ptpmgmt_msg_findTimeSrc | ( | const char * | str, |
| enum ptpmgmt_timeSource_e * | type, | ||
| bool | exact | ||
| ) |
Convert string to time source type
| [in] | str | string to search |
| [out] | type | time source |
| [in] | exact | perform an exact match |
| bool ptpmgmt_msg_is_FTRA | ( | uint8_t | flags | ) |
Check if frequency is traceable flag is enabled
| [in] | flags |
| bool ptpmgmt_msg_is_LI_59 | ( | uint8_t | flags | ) |
Check if leap 59 seconds flag is enabled
| [in] | flags |
| bool ptpmgmt_msg_is_LI_61 | ( | uint8_t | flags | ) |
Check if leap 61 seconds flag is enabled
| [in] | flags |
| bool ptpmgmt_msg_is_PTP | ( | uint8_t | flags | ) |
Check if is PTP instance flag is enabled
| [in] | flags |
| bool ptpmgmt_msg_is_TTRA | ( | uint8_t | flags | ) |
Check if is PTP instance flag is enabled
| [in] | flags |
| bool ptpmgmt_msg_is_UTCV | ( | uint8_t | flags | ) |
Check if UTC offset is valid flag is enabled
| [in] | flags |
| bool ptpmgmt_msg_isEmpty | ( | enum ptpmgmt_mng_vals_e | id | ) |
Check management TLV id uses empty dataField
| [in] | id | management TLV id |
| const char * ptpmgmt_msg_mng2str | ( | enum ptpmgmt_mng_vals_e | id | ) |
Convert management id to string
| [in] | id | parse code |
| const char * ptpmgmt_msg_netProt2str | ( | enum ptpmgmt_networkProtocol_e | protocol | ) |
Convert network protocol to string
| [in] | protocol | network protocol |
| const char * ptpmgmt_msg_portState2str | ( | enum ptpmgmt_portState_e | state | ) |
Convert port state to string
| [in] | state | port state |
| const char * ptpmgmt_msg_pwr2str | ( | enum ptpmgmt_linuxptpPowerProfileVersion_e | ver | ) |
Convert linuxptp power profile version to string
| [in] | ver | version |
| const char * ptpmgmt_msg_smpteLck2str | ( | enum ptpmgmt_SMPTEmasterLockingStatus_e | state | ) |
Convert SMPTE clock locking state to string
| [in] | state | SMPTE clock locking state |
| const char * ptpmgmt_msg_timeSrc2str | ( | enum ptpmgmt_timeSource_e | type | ) |
Convert time source to string
| [in] | type | time source |
| const char * ptpmgmt_msg_tlv2str | ( | enum ptpmgmt_tlvType_e | type | ) |
Convert TLV type to string
| [in] | type |
| const char * ptpmgmt_msg_ts2str | ( | enum ptpmgmt_linuxptpTimeStamp_e | type | ) |
Convert linuxptp time stamp type to string
| [in] | type | time stamp type |
| const char * ptpmgmt_msg_type2str | ( | enum ptpmgmt_msgType_e | type | ) |
Convert message type to string
| [in] | type |
| const char * ptpmgmt_msg_us2str | ( | enum ptpmgmt_linuxptpUnicastState_e | state | ) |
Convert linuxptp master unicasy state to string
| [in] | state |
| ptpmgmt_tlv_mem ptpmgmt_tlv_mem_alloc | ( | ) |
Alocate new tlv memory structure