24 singular_db<std::string, lldp_global> lldp_global::m_db;
26 lldp_global::event_handler lldp_global::m_evh;
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>
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);
124 lldp_global::event_handler::event_handler()
132 lldp_global::event_handler::handle_replay()
144 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.
void db_dump(const DB &db, std::ostream &os)
Print each of the objects in the DB into the stream provided.
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.