|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
24 singular_db<std::string, lldp_global> lldp_global::m_db;
31 : m_system_name(system_name)
33 , m_tx_interval(tx_interval)
38 : m_system_name(o.m_system_name)
39 , m_tx_hold(o.m_tx_hold)
40 , m_tx_interval(o.m_tx_interval)
49 m_db.release(m_system_name,
this);
55 return (m_system_name);
61 return ((
key() == l.
key()) && (m_tx_hold == l.m_tx_hold) &&
62 (m_tx_interval == l.m_tx_interval));
82 m_tx_hold, m_tx_interval));
91 <<
" system_name:" << m_system_name <<
" tx-hold:" << m_tx_hold
92 <<
" tx-interval:" << m_tx_interval;
102 m_tx_hold, m_tx_interval));
106 std::shared_ptr<lldp_global>
107 lldp_global::find_or_add(
const lldp_global& temp)
109 return (m_db.find_or_add(temp.key(), temp));
112 std::shared_ptr<lldp_global>
115 return (m_db.find(k));
118 std::shared_ptr<lldp_global>
121 return find_or_add(*
this);
132 lldp_global::event_handler::handle_replay()
144 lldp_global::event_handler::order()
const
A command class that binds the LLDP global to the interface.
The VPP Object Model (VOM) library.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
std::shared_ptr< lldp_global > singular() const
Return the 'singular' of the LLDP global that matches this object.
bool operator==(const lldp_global &l) const
Comparison operator.
std::string key_t
The key for the global conifugration is the 'system' namse.
static void dump(std::ostream &os)
Dump all LLDP globals into the stream provided.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
static bool register_listener(listener *listener)
Register a listener of events.
A representation of LLDP global configuration.
const typedef std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
static void enqueue(cmd *f)
Enqueue A command for execution.
const key_t & key() const
Get this objects key.
static std::shared_ptr< lldp_global > find(const key_t &k)
Find LLDP global config from its key.
void event_handler(void *tls_async)
lldp_global(const std::string &system_name, uint32_t tx_hold, uint32_t tx_interval)
Construct a new object matching the desried state.
~lldp_global()
Destructor.
@ GLOBAL
Global Configuration has no dependency.
std::string to_string() const
convert to string format for debug purposes