19 namespace lldp_global_cmds {
21 const std::string& system_name,
25 , m_system_name(system_name)
27 , m_tx_interval(tx_interval)
34 return (m_system_name == other.m_system_name);
40 msg_t req(con.
ctx(), std::ref(*
this));
42 auto& payload = req.get_request().get_payload();
43 payload.tx_hold = m_tx_hold;
44 payload.tx_interval = m_tx_interval;
46 memcpy(payload.system_name, m_system_name.c_str(),
47 std::min(
sizeof(payload.system_name), m_system_name.length()));
59 <<
" system_name:" << m_system_name <<
" tx-hold:" << m_tx_hold
60 <<
" tx-interval:" << m_tx_interval;
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.
rc_t issue(connection &con)
Issue the command to VPP/HW.
bool operator==(const config_cmd &i) const
Comparison operator - only used for UT.
A representation of the connection to VPP.
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
A command class that binds the LLDP global to the interface.
config_cmd(HW::item< bool > &item, const std::string &system_name, uint32_t tx_hold, uint32_t tx_interval)
Constructor.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
std::string to_string() const
convert to string format for debug purposes
HW::item< bool > & m_hw_item
A reference to an object's HW::item that the command will update.
vapi::Lldp_config msg_t
convenient typedef