libptpmgmt 2.0
libptpmgmt library that provides the functionality of linuxptp pmc
Loading...
Searching...
No Matches
Public Attributes | List of all members
ptpmgmt_dispatcher_t Struct Reference

Dispacher for management TLV. More...

#include <msgCall.h>

Public Attributes

void(* free )(ptpmgmt_dispatcher dispacher)
 
bool(* assign )(ptpmgmt_dispatcher dispacher, enum ptpmgmt_mng_vals_e tlv_id, ptpmgmt_dispatcher_callback callback)
 
bool(* assign_noTlv )(ptpmgmt_dispatcher dispacher, ptpmgmt_dispatcher_noTlv_callback callback)
 
bool(* assign_noTlvCallBack )(ptpmgmt_dispatcher dispacher, ptpmgmt_dispatcher_noTlvCallBack_callback callback)
 
void(* callHadler )(const_ptpmgmt_dispatcher dispacher, void *cookie, ptpmgmt_msg msg)
 
void(* callHadler_tlv )(const_ptpmgmt_dispatcher dispacher, void *cookie, ptpmgmt_msg msg, enum ptpmgmt_mng_vals_e tlv_id, const void *tlv)
 
void(* noTlv )(void *cookie, ptpmgmt_msg msg)
 
void(* noTlvCallBack )(void *cookie, ptpmgmt_msg msg, const char *idStr)
 

Detailed Description

Dispacher for management TLV.

Call-backs used by the callHadler and callHadler_tlv.

Note
the actual callbacks are assing in the library Only free() should be called directly

Member Data Documentation

◆ assign

bool(* ptpmgmt_dispatcher_t::assign) (ptpmgmt_dispatcher dispacher, enum ptpmgmt_mng_vals_e tlv_id, ptpmgmt_dispatcher_callback callback)

Assign tlv ID with callback function

Parameters
[in]dispacherpointer to dispatcher object
[in]tlv_idTLV ID
[in]callbackto use
Returns
true on success
Note
the callback parameters must match the callback in the structure

◆ assign_noTlv

bool(* ptpmgmt_dispatcher_t::assign_noTlv) (ptpmgmt_dispatcher dispacher, ptpmgmt_dispatcher_noTlv_callback callback)

Assign noTlv callback function

Parameters
[in]dispacherpointer to dispatcher object
[in]callbackto use
Returns
true on success
Note
We call the noTlv callback in case the TLV ID is unknown

◆ assign_noTlvCallBack

bool(* ptpmgmt_dispatcher_t::assign_noTlvCallBack) (ptpmgmt_dispatcher dispacher, ptpmgmt_dispatcher_noTlvCallBack_callback callback)

Assign noTlvCallBack callback function

Parameters
[in]dispacherpointer to dispatcher object
[in]callbackto use
Returns
true on success
Note
We call the noTlvCallBack callback in case we do not have a callback to a TLV ID

◆ callHadler

void(* ptpmgmt_dispatcher_t::callHadler) (const_ptpmgmt_dispatcher dispacher, void *cookie, ptpmgmt_msg msg)

Call handler based on Message last received message

Parameters
[in]dispacherpointer to dispatcher object
[in]cookieuser cookie passed to user callback
[in]msgpointer to message object wrapper
Note
Do not forget to null unused callbacks

◆ callHadler_tlv

void(* ptpmgmt_dispatcher_t::callHadler_tlv) (const_ptpmgmt_dispatcher dispacher, void *cookie, ptpmgmt_msg msg, enum ptpmgmt_mng_vals_e tlv_id, const void *tlv)

Call handler based on supplied TLV

Parameters
[in]dispacherpointer to dispatcher object
[in]cookieuser cookie passed to user callback
[in]msgpointer to message object wrapper
[in]tlv_idTLV ID
[in]tlvpointer to a TLV of TLV ID
Note
caller MUST @/b ensure the TLV ID match the actual TLV!
Do not forget to null unused callbacks

◆ free

void(* ptpmgmt_dispatcher_t::free) (ptpmgmt_dispatcher dispacher)

Free this dispacher object

Parameters
[in,out]dispacherobject to free

◆ noTlv

void(* ptpmgmt_dispatcher_t::noTlv) (void *cookie, ptpmgmt_msg msg)

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

Parameters
[in,out]cookiepointer to a user cookie
[in,out]msgpointer to the Message object

◆ noTlvCallBack

void(* ptpmgmt_dispatcher_t::noTlvCallBack) (void *cookie, ptpmgmt_msg msg, const char *idStr)

Handler called if TLV does not have a callback.

Parameters
[in,out]cookiepointer to a user cookie
[in,out]msgpointer to the Message object
[in]idStrstring of the tlv_id

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