37 : m_config(r.m_config)
39 , m_outputs(r.m_outputs)
46 m_db.release(
key(),
this);
64 return (
key() == m.
key() && m_outputs == m.m_outputs);
88 s <<
"qos-map:" << (int)m_id;
94 map::update(
const map& m)
96 m_outputs = m.m_outputs;
104 map::find_or_add(
const map& temp)
106 return (m_db.find_or_add(temp.
key(), temp));
112 return (m_db.find(k));
118 return find_or_add(*
this);
134 map::event_handler::handle_replay()
144 for (uint32_t ii = 0; ii < 4; ii++) {
145 std::copy(std::begin(rows[ii].outputs),
std::end(rows[ii].outputs),
155 std::shared_ptr<map_cmds::dump_cmd>
cmd =
156 std::make_shared<map_cmds::dump_cmd>();
161 for (
auto& rr : *cmd) {
162 auto& payload = rr.get_payload();
164 map qr(payload.map.id,
from_api(payload.map.rows));
170 map::event_handler::order()
const static std::shared_ptr< map > find(const key_t &k)
Find the instnace of the bridge_domain domain in the OM.
static void dump(std::ostream &os)
Dump all bridge_domain-doamin 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.
const std::string key_t
In the opflex world each entity is known by a URI which can be converted into a string.
const key_t key() const
Return the object's key.
const key_t id() const
Return the object's ID.
static void register_handler(const std::vector< std::string > &cmds, const std::string &help, command_handler *ch)
Register a command handler for inspection.
static rc_t write()
Write/Execute all commands hitherto enqueued.
rc_t rc() const
Get the HW return code.
vl_api_qos_egress_map_row_t rows[4]
bool operator==(const map &bdae) const
comparison operator
A cmd class that deletes a GBP endpoint.
std::shared_ptr< map > singular() const
Return the matching 'singular instance'.
A Database to store the unique 'singular' instances of a single object type.
std::array< std::array< bits_t, 256 >, 4 > outputs_t
Tables in which entries are added, e.g bridge/route-domains.
static rc_t commit(const client_db::key_t &key, const OBJ &obj)
Make the State in VPP reflect the expressed desired state.
void event_handler(void *tls_async)
dependency_t
There needs to be a strict order in which object types are read from VPP (at boot time) and replayed ...
static const rc_t OK
The HW write was successfull.
static void enqueue(cmd *f)
Enqueue A command for execution.
A command class that creates or updates the GBP endpoint.
A QoS map determines how value from one source are translated to values of another source...
static const map::outputs_t from_api(vapi_type_qos_egress_map_row rows[4])
The VPP Object Model (VOM) library.
A representation of a method call to VPP.
f64 end
end of the time range
std::string to_string() const
Convert to string for debugging.
void replay(void)
replay the object to create it in hardware
static bool register_listener(listener *listener)
Register a listener of events.
map(uint32_t id, const outputs_t &o)