FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
VOM::OM Class Reference

The interface to writing objects into VPP OM. More...

Data Structures

class  listener
 Class definition for listeners to OM events. More...
 
class  mark_n_sweep
 A class providing the RAII pattern for mark and sweep. More...
 

Static Public Member Functions

static void init ()
 Init. More...
 
static void populate (const client_db::key_t &key)
 populate the OM with state read from HW. More...
 
static void mark (const client_db::key_t &key)
 Mark all state owned by this key as stale. More...
 
static void sweep (const client_db::key_t &key)
 Sweep all the key's objects that are stale. More...
 
static void replay (void)
 Replay all of the objects to HW. More...
 
template<typename OBJ >
static rc_t commit (const client_db::key_t &key, const OBJ &obj)
 Make the State in VPP reflect the expressed desired state. More...
 
template<typename OBJ >
static rc_t write (const client_db::key_t &key, const OBJ &obj)
 Make the State in VPP reflect the expressed desired state. More...
 
static void remove (const client_db::key_t &key)
 Remove all object in the OM referenced by the key. More...
 
static void dump (const client_db::key_t &key, std::ostream &os)
 Print each of the object in the DB into the stream provided. More...
 
static void dump (std::ostream &os)
 Print each of the KEYS. More...
 
static bool register_listener (listener *listener)
 Register a listener of events. More...
 

Detailed Description

The interface to writing objects into VPP OM.

Definition at line 140 of file om.hpp.

Member Function Documentation

◆ commit()

template<typename OBJ >
static rc_t VOM::OM::commit ( const client_db::key_t key,
const OBJ &  obj 
)
inlinestatic

Make the State in VPP reflect the expressed desired state.

But don't call the HW - use this whilst processing dumped data from HW

Definition at line 202 of file om.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump() [1/2]

void VOM::OM::dump ( const client_db::key_t key,
std::ostream &  os 
)
static

Print each of the object in the DB into the stream provided.

Definition at line 97 of file om.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dump() [2/2]

void VOM::OM::dump ( std::ostream &  os)
static

Print each of the KEYS.

Definition at line 103 of file om.cpp.

+ Here is the call graph for this function:

◆ init()

void VOM::OM::init ( )
static

Init.

Initialse the connection to VPP.

Definition at line 30 of file om.cpp.

+ Here is the caller graph for this function:

◆ mark()

void VOM::OM::mark ( const client_db::key_t key)
static

Mark all state owned by this key as stale.

Definition at line 36 of file om.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ populate()

void VOM::OM::populate ( const client_db::key_t key)
static

populate the OM with state read from HW.

Definition at line 109 of file om.cpp.

+ Here is the call graph for this function:

◆ register_listener()

bool VOM::OM::register_listener ( OM::listener listener)
static

Register a listener of events.

Definition at line 127 of file om.cpp.

+ Here is the caller graph for this function:

◆ remove()

void VOM::OM::remove ( const client_db::key_t key)
static

Remove all object in the OM referenced by the key.

Definition at line 70 of file om.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replay()

void VOM::OM::replay ( void  )
static

Replay all of the objects to HW.

Definition at line 84 of file om.cpp.

+ Here is the call graph for this function:

◆ sweep()

void VOM::OM::sweep ( const client_db::key_t key)
static

Sweep all the key's objects that are stale.

Definition at line 50 of file om.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write()

template<typename OBJ >
static rc_t VOM::OM::write ( const client_db::key_t key,
const OBJ &  obj 
)
inlinestatic

Make the State in VPP reflect the expressed desired state.

After processing all the objects in the queue, in FIFO order, any remaining state owned by the client_db::key_t is purged. This is a template function so the object's update() function is always called with the derived type.

Definition at line 221 of file om.hpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: