libptpmgmt  1.4
libptpmgmt library that provides the functionality of linuxptp pmc
Public Member Functions | List of all members
MessageDispatcher Class Reference

Dispatch received PTP management message TLV. More...

#include <msgCall.h>

Inheritance diagram for MessageDispatcher:
Inheritance graph
[legend]
Collaboration diagram for MessageDispatcher:
Collaboration graph
[legend]

Public Member Functions

 MessageDispatcher ()=default
 
void callHadler (const Message &msg)
 
void callHadler (const Message &msg, mng_vals_e tlv_id, const BaseMngTlv *tlv)
 
virtual void noTlv (const Message &msg)
 
virtual void noTlvCallBack (const Message &msg, const char *idStr)
 
- Public Member Functions inherited from BaseMngDispatchCallback
virtual void CLOCK_DESCRIPTION_h (const Message &msg, const CLOCK_DESCRIPTION_t &tlv, const char *idStr)
 
virtual void USER_DESCRIPTION_h (const Message &msg, const USER_DESCRIPTION_t &tlv, const char *idStr)
 
virtual void INITIALIZE_h (const Message &msg, const INITIALIZE_t &tlv, const char *idStr)
 
virtual void FAULT_LOG_h (const Message &msg, const FAULT_LOG_t &tlv, const char *idStr)
 
virtual void DEFAULT_DATA_SET_h (const Message &msg, const DEFAULT_DATA_SET_t &tlv, const char *idStr)
 
virtual void CURRENT_DATA_SET_h (const Message &msg, const CURRENT_DATA_SET_t &tlv, const char *idStr)
 
virtual void PARENT_DATA_SET_h (const Message &msg, const PARENT_DATA_SET_t &tlv, const char *idStr)
 
virtual void TIME_PROPERTIES_DATA_SET_h (const Message &msg, const TIME_PROPERTIES_DATA_SET_t &tlv, const char *idStr)
 
virtual void PORT_DATA_SET_h (const Message &msg, const PORT_DATA_SET_t &tlv, const char *idStr)
 
virtual void PRIORITY1_h (const Message &msg, const PRIORITY1_t &tlv, const char *idStr)
 
virtual void PRIORITY2_h (const Message &msg, const PRIORITY2_t &tlv, const char *idStr)
 
virtual void DOMAIN_h (const Message &msg, const DOMAIN_t &tlv, const char *idStr)
 
virtual void SLAVE_ONLY_h (const Message &msg, const SLAVE_ONLY_t &tlv, const char *idStr)
 
virtual void LOG_ANNOUNCE_INTERVAL_h (const Message &msg, const LOG_ANNOUNCE_INTERVAL_t &tlv, const char *idStr)
 
virtual void ANNOUNCE_RECEIPT_TIMEOUT_h (const Message &msg, const ANNOUNCE_RECEIPT_TIMEOUT_t &tlv, const char *idStr)
 
virtual void LOG_SYNC_INTERVAL_h (const Message &msg, const LOG_SYNC_INTERVAL_t &tlv, const char *idStr)
 
virtual void VERSION_NUMBER_h (const Message &msg, const VERSION_NUMBER_t &tlv, const char *idStr)
 
virtual void TIME_h (const Message &msg, const TIME_t &tlv, const char *idStr)
 
virtual void CLOCK_ACCURACY_h (const Message &msg, const CLOCK_ACCURACY_t &tlv, const char *idStr)
 
virtual void UTC_PROPERTIES_h (const Message &msg, const UTC_PROPERTIES_t &tlv, const char *idStr)
 
virtual void TRACEABILITY_PROPERTIES_h (const Message &msg, const TRACEABILITY_PROPERTIES_t &tlv, const char *idStr)
 
virtual void TIMESCALE_PROPERTIES_h (const Message &msg, const TIMESCALE_PROPERTIES_t &tlv, const char *idStr)
 
virtual void UNICAST_NEGOTIATION_ENABLE_h (const Message &msg, const UNICAST_NEGOTIATION_ENABLE_t &tlv, const char *idStr)
 
virtual void PATH_TRACE_LIST_h (const Message &msg, const PATH_TRACE_LIST_t &tlv, const char *idStr)
 
virtual void PATH_TRACE_ENABLE_h (const Message &msg, const PATH_TRACE_ENABLE_t &tlv, const char *idStr)
 
virtual void GRANDMASTER_CLUSTER_TABLE_h (const Message &msg, const GRANDMASTER_CLUSTER_TABLE_t &tlv, const char *idStr)
 
virtual void UNICAST_MASTER_TABLE_h (const Message &msg, const UNICAST_MASTER_TABLE_t &tlv, const char *idStr)
 
virtual void UNICAST_MASTER_MAX_TABLE_SIZE_h (const Message &msg, const UNICAST_MASTER_MAX_TABLE_SIZE_t &tlv, const char *idStr)
 
virtual void ACCEPTABLE_MASTER_TABLE_h (const Message &msg, const ACCEPTABLE_MASTER_TABLE_t &tlv, const char *idStr)
 
virtual void ACCEPTABLE_MASTER_TABLE_ENABLED_h (const Message &msg, const ACCEPTABLE_MASTER_TABLE_ENABLED_t &tlv, const char *idStr)
 
virtual void ACCEPTABLE_MASTER_MAX_TABLE_SIZE_h (const Message &msg, const ACCEPTABLE_MASTER_MAX_TABLE_SIZE_t &tlv, const char *idStr)
 
virtual void ALTERNATE_MASTER_h (const Message &msg, const ALTERNATE_MASTER_t &tlv, const char *idStr)
 
virtual void ALTERNATE_TIME_OFFSET_ENABLE_h (const Message &msg, const ALTERNATE_TIME_OFFSET_ENABLE_t &tlv, const char *idStr)
 
virtual void ALTERNATE_TIME_OFFSET_NAME_h (const Message &msg, const ALTERNATE_TIME_OFFSET_NAME_t &tlv, const char *idStr)
 
virtual void ALTERNATE_TIME_OFFSET_MAX_KEY_h (const Message &msg, const ALTERNATE_TIME_OFFSET_MAX_KEY_t &tlv, const char *idStr)
 
virtual void ALTERNATE_TIME_OFFSET_PROPERTIES_h (const Message &msg, const ALTERNATE_TIME_OFFSET_PROPERTIES_t &tlv, const char *idStr)
 
virtual void TRANSPARENT_CLOCK_PORT_DATA_SET_h (const Message &msg, const TRANSPARENT_CLOCK_PORT_DATA_SET_t &tlv, const char *idStr)
 
virtual void LOG_MIN_PDELAY_REQ_INTERVAL_h (const Message &msg, const LOG_MIN_PDELAY_REQ_INTERVAL_t &tlv, const char *idStr)
 
virtual void TRANSPARENT_CLOCK_DEFAULT_DATA_SET_h (const Message &msg, const TRANSPARENT_CLOCK_DEFAULT_DATA_SET_t &tlv, const char *idStr)
 
virtual void PRIMARY_DOMAIN_h (const Message &msg, const PRIMARY_DOMAIN_t &tlv, const char *idStr)
 
virtual void DELAY_MECHANISM_h (const Message &msg, const DELAY_MECHANISM_t &tlv, const char *idStr)
 
virtual void EXTERNAL_PORT_CONFIGURATION_ENABLED_h (const Message &msg, const EXTERNAL_PORT_CONFIGURATION_ENABLED_t &tlv, const char *idStr)
 
virtual void MASTER_ONLY_h (const Message &msg, const MASTER_ONLY_t &tlv, const char *idStr)
 
virtual void HOLDOVER_UPGRADE_ENABLE_h (const Message &msg, const HOLDOVER_UPGRADE_ENABLE_t &tlv, const char *idStr)
 
virtual void EXT_PORT_CONFIG_PORT_DATA_SET_h (const Message &msg, const EXT_PORT_CONFIG_PORT_DATA_SET_t &tlv, const char *idStr)
 
virtual void TIME_STATUS_NP_h (const Message &msg, const TIME_STATUS_NP_t &tlv, const char *idStr)
 
virtual void GRANDMASTER_SETTINGS_NP_h (const Message &msg, const GRANDMASTER_SETTINGS_NP_t &tlv, const char *idStr)
 
virtual void PORT_DATA_SET_NP_h (const Message &msg, const PORT_DATA_SET_NP_t &tlv, const char *idStr)
 
virtual void SUBSCRIBE_EVENTS_NP_h (const Message &msg, const SUBSCRIBE_EVENTS_NP_t &tlv, const char *idStr)
 
virtual void PORT_PROPERTIES_NP_h (const Message &msg, const PORT_PROPERTIES_NP_t &tlv, const char *idStr)
 
virtual void PORT_STATS_NP_h (const Message &msg, const PORT_STATS_NP_t &tlv, const char *idStr)
 
virtual void SYNCHRONIZATION_UNCERTAIN_NP_h (const Message &msg, const SYNCHRONIZATION_UNCERTAIN_NP_t &tlv, const char *idStr)
 
virtual void PORT_SERVICE_STATS_NP_h (const Message &msg, const PORT_SERVICE_STATS_NP_t &tlv, const char *idStr)
 
virtual void UNICAST_MASTER_TABLE_NP_h (const Message &msg, const UNICAST_MASTER_TABLE_NP_t &tlv, const char *idStr)
 
virtual void PORT_HWCLOCK_NP_h (const Message &msg, const PORT_HWCLOCK_NP_t &tlv, const char *idStr)
 
virtual void POWER_PROFILE_SETTINGS_NP_h (const Message &msg, const POWER_PROFILE_SETTINGS_NP_t &tlv, const char *idStr)
 
virtual void CMLDS_INFO_NP_h (const Message &msg, const CMLDS_INFO_NP_t &tlv, const char *idStr)
 

Detailed Description

Dispatch received PTP management message TLV.

Note
Do not handle signalling messages!
You must inherit this class to use it!
callHadler() has an implementation in lua, tcl and go languages, other languages uses swig to translate this class.

Constructor & Destructor Documentation

◆ MessageDispatcher()

MessageDispatcher::MessageDispatcher ( )
default

Construct a message TLV dispatcher

Member Function Documentation

◆ callHadler() [1/2]

void MessageDispatcher::callHadler ( const Message msg)

Call handler based on Message last received message

Parameters
[in]msgMessage object

◆ callHadler() [2/2]

void MessageDispatcher::callHadler ( const Message msg,
mng_vals_e  tlv_id,
const BaseMngTlv tlv 
)

Call handler based on supplied TLV

Parameters
[in]msgMessage object
[in]tlv_idTLV ID
[in]tlvpointer to a TLV of TLV ID
Note
caller MUST @/b ensure the TLV ID match the actual TLV!

◆ noTlv()

virtual void MessageDispatcher::noTlv ( const Message msg)
inlinevirtual

Handler called if there is no TLV data It could be an empty TLV or unkown

Parameters
[in]msgMessage object

◆ noTlvCallBack()

virtual void MessageDispatcher::noTlvCallBack ( const Message msg,
const char *  idStr 
)
inlinevirtual

Handler called if TLV does not have a callback. i.e. inherit class did not implement a proper method for this TLV

Parameters
[in]msgMessage object
[in]idStrstring of the tlv_id

The documentation for this class was generated from the following file: