23 singular_db<std::string, lldp_global> lldp_global::m_db;
25 lldp_global::event_handler lldp_global::m_evh;
30 : m_system_name(system_name)
32 , m_tx_interval(tx_interval)
37 : m_system_name(o.m_system_name)
38 , m_tx_hold(o.m_tx_hold)
39 , m_tx_interval(o.m_tx_interval)
48 m_db.release(m_system_name,
this);
54 return (m_system_name);
60 return ((
key() == l.
key()) && (m_tx_hold == l.m_tx_hold) &&
61 (m_tx_interval == l.m_tx_interval));
81 m_tx_hold, m_tx_interval));
90 <<
" system_name:" << m_system_name <<
" tx-hold:" << m_tx_hold
91 <<
" tx-interval:" << m_tx_interval;
101 m_tx_hold, m_tx_interval));
105 std::shared_ptr<lldp_global>
108 return (m_db.find_or_add(temp.
key(), temp));
111 std::shared_ptr<lldp_global>
114 return (m_db.find(k));
117 std::shared_ptr<lldp_global>
120 return find_or_add(*
this);
123 lldp_global::event_handler::event_handler()
131 lldp_global::event_handler::handle_replay()
143 lldp_global::event_handler::order()
const const key_t & key() const
Get this objects key.
Global Configuration has no dependency.
static void dump(std::ostream &os)
Dump all LLDP globals into the stream provided.
bool operator==(const lldp_global &l) const
Comparison operator.
std::shared_ptr< lldp_global > singular() const
Return the 'singular' of the LLDP global that matches this object.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
std::string key_t
The key for the global conifugration is the 'system' namse.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
std::string to_string() const
convert to string format for debug purposes
A representation of LLDP global configuration.
static std::shared_ptr< lldp_global > find(const key_t &k)
Find LLDP global config from its key.
lldp_global(const std::string &system_name, uint32_t tx_hold, uint32_t tx_interval)
Construct a new object matching the desried state.
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static void enqueue(cmd *f)
Enqueue A command for execution.
A command class that binds the LLDP global to the interface.
The VPP Object Model (VOM) library.
~lldp_global()
Destructor.
static bool register_listener(listener *listener)
Register a listener of events.