systemΒΆ

Module for system identifying information.

This module provides access to important identifying information of the system, similar to what is available from the ‘show version’ and ‘show hostname’ CLI commands.

namespace eos
class system_handler
#include <system.h>

Handler class for changes in system identifying information.

Public Functions

system_handler(system_mgr *)
system_mgr * get_system_mgr() const

Returns the associated system_mgr.

virtual void on_hostname(std::string const &)

Handler called when the hostname changes.

virtual void on_fqdn(std::string const &)

Handler called when the fully qualified domain name changes.

virtual void on_system_info_initialized()

Handler called once the system identifying information is set.

The on_system_info_initialized() method will be called when the serial_number and model_name have been discovered and are accessible via the system_mgr class.

class system_mgr
#include <system.h>

A manager for identifying information of the system.

Create one of these via eos::get_system_mgr() prior to starting the agent main loop. When your eos::agent_handler::on_initialized virtual function is called, the manager is valid for use.

Public Functions

virtual ~system_mgr()
virtual std::string hostname() const = 0

Returns the system hostname.

virtual std::string fqdn() const = 0

Returns the system fully qualified domain name.

virtual std::string serial_number() const = 0

Returns the system serial number.

virtual std::string model_name() const = 0

Returns the system model name.

virtual std::string hardware_revision() const = 0

Returns the hardware revision.

virtual std::string software_revision() const = 0

Returns the running software version.

Protected Functions

system_mgr()

Private Members

system_mgr

Friends

friend class system_handler

Previous topic

subintf

Next topic

timer