21 namespace bridge_domain_cmds {
25 , m_learning_mode(lmode)
38 msg_t req(con.
ctx(), std::ref(*
this));
40 auto& payload = req.get_request().get_payload();
45 payload.learn = m_learning_mode.
value();
80 msg_t req(con.
ctx(), std::ref(*
this));
82 auto& payload = req.get_request().get_payload();
116 m_dump.reset(
new msg_t(con.
ctx(), std::ref(*
this)));
118 auto& payload = m_dump->get_request().get_payload();
131 return (
"bridge-domain-dump");
static const rc_t NOOP
The HW write/update action was/has not been attempted.
HW::item< uint32_t > & m_hw_item
A reference to an object's HW::item that the command will update.
int value() const
Return the value of the enum - same as integer conversion.
rc_t issue(connection &con)
Issue the command to VPP/HW.
rc_t issue(connection &con)
Issue the command to VPP/HW.
Error codes that VPP will return during a HW write.
std::string to_string() const
convert to string format for debug purposes
bool operator==(const create_cmd &i) const
Comparison operator - only used for UT.
T & data()
Return the data read/written.
delete_cmd(HW::item< uint32_t > &item)
Constructor.
rc_t issue(connection &con)
Issue the command to VPP/HW.
A representation of the connection to VPP.
A cmd class that Dumps all the IPv4 L3 configs.
HW::item< uint32_t > & item()
return the HW item the command updates
A base class for all RPC commands to VPP.
#define VAPI_CALL(_stmt)
Convenince wrapper macro for error handling in VAPI sends.
Bridge Domain Learning mode.
bool operator==(const dump_cmd &i) const
Comparison operator - only used for UT.
bool operator==(const delete_cmd &i) const
Comparison operator - only used for UT.
DEFINE_VAPI_MSG_IDS_L2_API_JSON
static const rc_t OK
The HW write was successfull.
vapi::Connection & ctx()
Retrun the VAPI context the commands will use.
The VPP Object Model (VOM) library.
void set(const rc_t &rc)
Set the HW return code - should only be called from the family of Command objects.
vapi::Bridge_domain_add_del msg_t
convenient typedef
create_cmd(HW::item< uint32_t > &item, const bridge_domain::learning_mode_t &lmode)
Constructor.
A command class that creates an Bridge-Domain.
std::string to_string() const
convert to string format for debug purposes
std::string to_string() const
convert to string format for debug purposes
A cmd class that Delete an Bridge-Domain.
std::string to_string() const
convert to string format for debug purposes
rc_t wait()
Wait on the commands promise.