aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/vom/interface.hpp
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-11-28 22:29:13 -0800
committerNeale Ranns <nranns@cisco.com>2017-11-29 07:42:52 +0000
commita2ee029d0772e894911c84fb8a0cab5f253e145b (patch)
tree167d07ee3b3a482ef494f420ceef13a9657d4274 /src/vpp-api/vom/interface.hpp
parente80ae9ea8ed04c82c151a548916926b5dbfe8ecb (diff)
VOM: logging, populate and stats fixes
logging: allow a client to register a callback handler to recieve log messages that way the client can maintain a correctly sequenced log populate: fix the creation of interface and the setting of the handle stats: the reset promise idea is not defined behaviour. Use an eanble/disable command pair Change-Id: I347720bb65df2874c7619e722d593bc863ee2bf1 Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vpp-api/vom/interface.hpp')
-rw-r--r--src/vpp-api/vom/interface.hpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/vpp-api/vom/interface.hpp b/src/vpp-api/vom/interface.hpp
index 8cba2fa2c2c..da0db409e62 100644
--- a/src/vpp-api/vom/interface.hpp
+++ b/src/vpp-api/vom/interface.hpp
@@ -31,7 +31,7 @@ namespace VOM {
* Forward declaration of the stats and events command
*/
namespace interface_cmds {
-class stats_cmd;
+class stats_enable_cmd;
class events_cmd;
};
@@ -390,7 +390,8 @@ public:
* Virtual function called on the listener when the command has data
* ready to process
*/
- virtual void handle_interface_stat(interface_cmds::stats_cmd* cmd) = 0;
+ virtual void handle_interface_stat(
+ interface_cmds::stats_enable_cmd* cmd) = 0;
/**
* Return the HW::item representing the status
@@ -426,13 +427,10 @@ public:
protected:
/**
- * Construct an interface object with a handle and a HW address
+ * Set the handle of an interface object. Only called by the interface
+ * factory during the populate
*/
- interface(const handle_t& handle,
- const l2_address_t& l2_address,
- const std::string& name,
- type_t type,
- admin_state_t state);
+ void set(const handle_t& handle);
friend class interface_factory;
/**
@@ -560,7 +558,7 @@ private:
/**
* shared pointer to the stats object for this interface.
*/
- std::shared_ptr<interface_cmds::stats_cmd> m_stats;
+ std::shared_ptr<interface_cmds::stats_enable_cmd> m_stats;
/**
* The state of the interface