l1_source¶
L1 source management module.
On platforms with a crosspoint, interfaces can configure their source using a config.
This module provides APIs to set and delete source configs, watch for config changes, get source configs and source statuses, and iterate through source configs and source statuses.
-
namespace
eos
-
class
l1_source_handler
: public eos::base_handler<l1_source_mgr, l1_source_handler>¶ Public Functions
-
l1_source_handler
(l1_source_mgr *)¶
-
l1_source_mgr *
get_l1_source_mgr
() const¶
-
void
watch_all_l1_source
(bool)¶ Register to receive notification when l1 source config for any interface changes.
-
-
class
l1_source_iter_t
: public eos::iter_base<intf_id_t, l1_source_iter_impl>¶ - #include <l1_source.h>
An iterator that yields a intf_id_t for each l1 source config/status.
Private Functions
-
l1_source_iter_t
(l1_source_iter_impl *const )¶
Friends
-
friend
eos::l1_source_iter_impl
-
-
class
l1_source_mgr
: public eos::base_mgr<l1_source_handler, intf_id_t>¶ - #include <l1_source.h>
The l1 source manager. This class inspects and configures l1 source for an interface.
Public Functions
-
virtual
~l1_source_mgr
()¶
-
virtual void
l1_source_is
(intf_id_t, l1_source_t source) = 0¶ Configures l1 source of an interface.
-
virtual bool
exists
(intf_id_t) const = 0¶ Returns whether a l1 source config exists for the interface.
-
virtual l1_source_t
l1_source_config
(intf_id_t) = 0¶ Returns the source config for an interface. If no source config is set, returns the default source config.
-
virtual l1_source_t
l1_source_status
(intf_id_t) = 0¶ Returns the source status for an interface. If no source status exists, returns the default source status.
-
virtual l1_source_iter_t
l1_source_config_iter
() const = 0¶ Iterator for l1 source configuration.
-
virtual l1_source_iter_t
l1_source_status_iter
() const = 0¶ Iterator for l1 source status.
Protected Functions
-
l1_source_mgr
()¶
Private Members
-
eos::l1_source_mgr::l1_source_mgr
Friends
-
friend
eos::l1_source_handler
-
virtual
-
class
Type definitions in l1_source¶
-
namespace
eos
Enums
-
class
l1_source_t
¶ - #include <l1_source.h>
L1 source class.
The interface id “port” should be defined only if l1 source type is port.
Public Functions
-
l1_source_t
()¶ Default constructor.
-
l1_source_t
(l1_source_type_t l1_source_type)¶ Constructor specifying only l1 source type.
-
l1_source_t
(l1_source_type_t l1_source_type, intf_id_t port)¶ Constructor specifying both l1 source type and interface id.
-
l1_source_t
(const l1_source_t &other)¶
-
l1_source_t &
operator=
(l1_source_t const &other)¶
-
l1_source_type_t
l1_source_type
() const¶
-
void
l1_source_type_is
(l1_source_type_t l1_source_type)¶
-
bool
operator==
(l1_source_t const &other) const¶
-
bool
operator!=
(l1_source_t const &other) const¶
-
bool
operator<
(l1_source_t const &other) const¶
-
uint32_t
hash
() const¶ The hash function for type l1_source_t.
-
void
mix_me
(hash_mix &h) const¶ The hash mix function for type l1_source_t.
Friends
-
std::ostream &
operator<<
(std::ostream &os, const l1_source_t &obj)¶ A utility stream operator that adds a string representation of l1_source_t to the ostream.
-
-
class