DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::confmodel::NetworkInterface Class Reference

#include <NetworkInterface.hpp>

Inheritance diagram for dunedaq::confmodel::NetworkInterface:
[legend]
Collaboration diagram for dunedaq::confmodel::NetworkInterface:
[legend]

Classes

struct  Network_name
 

Public Member Functions

virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the NetworkInterface object.
 
virtual std::vector< const dunedaq::conffwk::DalObject * > get (const std::string &name, bool upcast_unregistered=true) const
 Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.
 
const std::string & get_mac_address () const
 Get "mac_address" attribute value. Destination MAC address on readout host.
 
void set_mac_address (const std::string &value)
 Set "mac_address" attribute value. Destination MAC address on readout host.
 
const std::vector< std::string > & get_ip_address () const
 Get "ip_address" attribute value. IP address in form a.b.c.d.
 
void set_ip_address (const std::vector< std::string > &value)
 Set "ip_address" attribute value. IP address in form a.b.c.d.
 
const std::string & get_interface_name () const
 Get "interface_name" attribute value. Name of interface e.g. eth0 or eno1.
 
void set_interface_name (const std::string &value)
 Set "interface_name" attribute value. Name of interface e.g. eth0 or eno1.
 
const std::string & get_network_mask () const
 Get "network_mask" attribute value. Network mask in for a.b.c.d.
 
void set_network_mask (const std::string &value)
 Set "network_mask" attribute value. Network mask in for a.b.c.d.
 
const std::string & get_network_name () const
 Get "network_name" attribute value. Name of network on this interface Control or Data.
 
void set_network_name (const std::string &value)
 Set "network_name" attribute value. Name of network on this interface Control or Data.
 
virtual void print (unsigned int offset, bool print_header, std::ostream &s) const
 Print details of the NetworkInterface object.
 
virtual std::vector< const dunedaq::conffwk::DalObject * > get (const std::string &name, bool upcast_unregistered=true) const
 Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.
 
const std::string & get_mac_address () const
 Get "mac_address" attribute value. Destination MAC address on readout host.
 
void set_mac_address (const std::string &value)
 Set "mac_address" attribute value. Destination MAC address on readout host.
 
const std::vector< std::string > & get_ip_address () const
 Get "ip_address" attribute value. IP address in form a.b.c.d.
 
void set_ip_address (const std::vector< std::string > &value)
 Set "ip_address" attribute value. IP address in form a.b.c.d.
 
const std::string & get_interface_name () const
 Get "interface_name" attribute value. Name of interface e.g. eth0 or eno1.
 
void set_interface_name (const std::string &value)
 Set "interface_name" attribute value. Name of interface e.g. eth0 or eno1.
 
const std::string & get_network_mask () const
 Get "network_mask" attribute value. Network mask in for a.b.c.d.
 
void set_network_mask (const std::string &value)
 Set "network_mask" attribute value. Network mask in for a.b.c.d.
 
const std::string & get_network_name () const
 Get "network_name" attribute value. Name of network on this interface Control or Data.
 
void set_network_name (const std::string &value)
 Set "network_name" attribute value. Name of network on this interface Control or Data.
 
- Public Member Functions inherited from dunedaq::conffwk::DalObject
const std::string & UID () const noexcept
 
const std::string & class_name () const noexcept
 
bool castable (const std::string &target) const noexcept
 
bool castable (const std::string *target) const noexcept
 
template<class TARGET >
const TARGET * cast () const noexcept
 Casts object to different class.
 
std::string full_name () const noexcept
 
const ConfigObjectconfig_object () const
 
DalRegistryregistry () const noexcept
 
Configurationconfiguration () const noexcept
 
void unread ()
 
void set (const ConfigObject &o) noexcept
 
void move (const std::string &at)
 
void rename (const std::string &new_id)
 
void p_hdr (std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
 print object headers
 
std::ostream & print_object (std::ostream &s) const
 print object details
 
void throw_init_ex (dunedaq::conffwk::Exception &ex)
 throw object initialisation exception (i.e.
 

Static Public Member Functions

static const std::string & __get_mac_address_str () noexcept
 
static const std::string & __get_ip_address_str () noexcept
 
static const std::string & __get_interface_name_str () noexcept
 
static const std::string & __get_network_mask_str () noexcept
 
static const std::string & __get_network_name_str () noexcept
 
static const std::string & __get_mac_address_str () noexcept
 
static const std::string & __get_ip_address_str () noexcept
 
static const std::string & __get_interface_name_str () noexcept
 
static const std::string & __get_network_mask_str () noexcept
 
static const std::string & __get_network_name_str () noexcept
 
- Static Public Member Functions inherited from dunedaq::conffwk::DalObject
static void p_null (std::ostream &s)
 print "(null)"
 
static void p_rm (std::ostream &s)
 print "(deleted object)"
 
static void p_error (std::ostream &s, dunedaq::conffwk::Exception &ex)
 print error text
 
static void throw_get_ex (const std::string &what, const std::string &class_name, const DalObject *obj)
 throw exception in generated get method (i.e.
 
static bool is_null (const DalObject *ref) noexcept
 check a pointer on DAL object is null
 

Static Public Attributes

static const std::string & s_class_name
 
static const std::string s_mac_address = "mac_address"
 
static const std::string s_ip_address = "ip_address"
 
static const std::string s_interface_name = "interface_name"
 
static const std::string s_network_mask = "network_mask"
 
static const std::string s_network_name = "network_name"
 

Protected Member Functions

 NetworkInterface (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~NetworkInterface () noexcept
 
virtual void init (bool init_children)
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
 NetworkInterface (conffwk::DalRegistry &db, const conffwk::ConfigObject &obj) noexcept
 
virtual ~NetworkInterface () noexcept
 
virtual void init (bool init_children)
 
bool get (const std::string &name, std::vector< const dunedaq::conffwk::DalObject * > &vec, bool upcast_unregistered, bool first_call) const
 
- Protected Member Functions inherited from dunedaq::conffwk::DalObject
 DalObject (DalRegistry &db, const ConfigObject &o) noexcept
 
virtual ~DalObject ()
 
void clear () noexcept
 
void check () const
 
bool is_deleted () const
 
void increment_created () noexcept
 
void increment_read () noexcept
 
void check_init () const
 Check and initialize object if necessary.
 
template<typename T >
void _set_object (const std::string &name, const T *value)
 Helper method for generated set single-value relationship methods.
 
template<typename T >
void _set_objects (const std::string &name, const std::vector< const T * > &value)
 Helper method for generated set multi-value relationship methods.
 
bool get_rel_objects (const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
 Read relationship values as DAL objects using DAL factory.
 
bool get_algo_objects (const std::string &name, std::vector< const DalObject * > &objs) const
 Run algorithm and return result as DAL objects using DAL factory.
 

Private Attributes

std::string m_mac_address
 
std::vector< std::string > m_ip_address
 
std::string m_interface_name
 
std::string m_network_mask
 
std::string m_network_name
 

Friends

class conffwk::Configuration
 
class conffwk::DalObject
 
class conffwk::DalFactory
 
class conffwk::DalRegistry
 

Additional Inherited Members

- Protected Attributes inherited from dunedaq::conffwk::DalObject
std::mutex m_mutex
 Used to protect changes of DAL object.
 
bool p_was_read
 is true, if the object was read
 
DalRegistryp_registry
 Configuration object.
 
ConfigObject p_obj
 Config object used by given template object.
 
std::string p_UID
 Is used for template objects (see dqm_conffwk)
 

Detailed Description

Definition at line 20 of file NetworkInterface.hpp.

Constructor & Destructor Documentation

◆ NetworkInterface() [1/2]

dunedaq::confmodel::NetworkInterface::NetworkInterface ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

Definition at line 26 of file NetworkInterface.cpp.

26 :
28 {
29 ;
30 }
The base class for any generated DAL object.
Definition DalObject.hpp:45

◆ ~NetworkInterface() [1/2]

dunedaq::confmodel::NetworkInterface::~NetworkInterface ( )
protectedvirtualnoexcept

Definition at line 76 of file NetworkInterface.cpp.

77 {
78 }

◆ NetworkInterface() [2/2]

dunedaq::confmodel::NetworkInterface::NetworkInterface ( conffwk::DalRegistry & db,
const conffwk::ConfigObject & obj )
protectednoexcept

◆ ~NetworkInterface() [2/2]

virtual dunedaq::confmodel::NetworkInterface::~NetworkInterface ( )
protectedvirtualnoexcept

Member Function Documentation

◆ __get_interface_name_str() [1/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_interface_name_str ( )
inlinestaticnoexcept

Definition at line 90 of file NetworkInterface.hpp.

90{ return s_interface_name; }
static const std::string s_interface_name

◆ __get_interface_name_str() [2/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_interface_name_str ( )
inlinestaticnoexcept

Definition at line 90 of file NetworkInterface.hpp.

90{ return s_interface_name; }

◆ __get_ip_address_str() [1/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_ip_address_str ( )
inlinestaticnoexcept

Definition at line 89 of file NetworkInterface.hpp.

89{ return s_ip_address; }

◆ __get_ip_address_str() [2/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_ip_address_str ( )
inlinestaticnoexcept

Definition at line 89 of file NetworkInterface.hpp.

89{ return s_ip_address; }

◆ __get_mac_address_str() [1/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_mac_address_str ( )
inlinestaticnoexcept

Definition at line 88 of file NetworkInterface.hpp.

88{ return s_mac_address; }

◆ __get_mac_address_str() [2/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_mac_address_str ( )
inlinestaticnoexcept

Definition at line 88 of file NetworkInterface.hpp.

88{ return s_mac_address; }

◆ __get_network_mask_str() [1/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_network_mask_str ( )
inlinestaticnoexcept

Definition at line 91 of file NetworkInterface.hpp.

91{ return s_network_mask; }
static const std::string s_network_mask

◆ __get_network_mask_str() [2/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_network_mask_str ( )
inlinestaticnoexcept

Definition at line 91 of file NetworkInterface.hpp.

91{ return s_network_mask; }

◆ __get_network_name_str() [1/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_network_name_str ( )
inlinestaticnoexcept

Definition at line 92 of file NetworkInterface.hpp.

92{ return s_network_name; }
static const std::string s_network_name

◆ __get_network_name_str() [2/2]

static const std::string & dunedaq::confmodel::NetworkInterface::__get_network_name_str ( )
inlinestaticnoexcept

Definition at line 92 of file NetworkInterface.hpp.

92{ return s_network_name; }

◆ get() [1/4]

std::vector< const dunedaq::conffwk::DalObject * > dunedaq::confmodel::NetworkInterface::get ( const std::string & name,
bool upcast_unregistered = true ) const
virtual

Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.

Parameters are:

Parameters
namename of the relationship or algorithm
Returns
value of relationship or result of algorithm
Exceptions
std::exceptionif there is no relationship or algorithm with such name in this and base classes

Implements dunedaq::conffwk::DalObject.

Reimplemented in dunedaq::confmodel::NetworkDevice, and dunedaq::confmodel::NetworkDevice.

Definition at line 80 of file NetworkInterface.cpp.

81 {
82 std::vector<const dunedaq::conffwk::DalObject *> vec;
83
84 if (!get(name, vec, upcast_unregistered, true))
85 throw_get_ex(name, s_class_name, this);
86
87 return vec;
88 }
static void throw_get_ex(const std::string &what, const std::string &class_name, const DalObject *obj)
throw exception in generated get method (i.e.
Definition DalObject.cpp:82
virtual std::vector< const dunedaq::conffwk::DalObject * > get(const std::string &name, bool upcast_unregistered=true) const
Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject...
static const std::string & s_class_name

◆ get() [2/4]

virtual std::vector< const dunedaq::conffwk::DalObject * > dunedaq::confmodel::NetworkInterface::get ( const std::string & name,
bool upcast_unregistered = true ) const
virtual

Get values of relationships and results of some algorithms as a vector of dunedaq::conffwk::DalObject pointers.

Parameters are:

Parameters
namename of the relationship or algorithm
Returns
value of relationship or result of algorithm
Exceptions
std::exceptionif there is no relationship or algorithm with such name in this and base classes

Implements dunedaq::conffwk::DalObject.

Reimplemented in dunedaq::confmodel::NetworkDevice, and dunedaq::confmodel::NetworkDevice.

◆ get() [3/4]

bool dunedaq::confmodel::NetworkInterface::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

Definition at line 90 of file NetworkInterface.cpp.

91 {
92 if (first_call)
93 {
94 std::lock_guard scoped_lock(m_mutex);
95
96 check();
97 check_init();
98
99 if (get_rel_objects(name, upcast_unregistered, vec))
100 return true;
101 }
102
103 if (first_call)
104 return get_algo_objects(name, vec);
105
106 return false;
107 }
bool get_rel_objects(const std::string &name, bool upcast_unregistered, std::vector< const DalObject * > &objs) const
Read relationship values as DAL objects using DAL factory.
Definition DalObject.cpp:8
std::mutex m_mutex
Used to protect changes of DAL object.
bool get_algo_objects(const std::string &name, std::vector< const DalObject * > &objs) const
Run algorithm and return result as DAL objects using DAL factory.
Definition DalObject.cpp:25
void check_init() const
Check and initialize object if necessary.

◆ get() [4/4]

bool dunedaq::confmodel::NetworkInterface::get ( const std::string & name,
std::vector< const dunedaq::conffwk::DalObject * > & vec,
bool upcast_unregistered,
bool first_call ) const
protected

◆ get_interface_name() [1/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_interface_name ( ) const
inline

Get "interface_name" attribute value. Name of interface e.g. eth0 or eno1.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 169 of file NetworkInterface.hpp.

170 {
171 std::lock_guard scoped_lock(m_mutex);
172 check();
173 check_init();
174 return m_interface_name;
175 }

◆ get_interface_name() [2/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_interface_name ( ) const
inline

Get "interface_name" attribute value. Name of interface e.g. eth0 or eno1.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 169 of file NetworkInterface.hpp.

170 {
171 std::lock_guard scoped_lock(m_mutex);
172 check();
173 check_init();
174 return m_interface_name;
175 }

◆ get_ip_address() [1/2]

const std::vector< std::string > & dunedaq::confmodel::NetworkInterface::get_ip_address ( ) const
inline

Get "ip_address" attribute value. IP address in form a.b.c.d.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 136 of file NetworkInterface.hpp.

137 {
138 std::lock_guard scoped_lock(m_mutex);
139 check();
140 check_init();
141 return m_ip_address;
142 }
std::vector< std::string > m_ip_address

◆ get_ip_address() [2/2]

const std::vector< std::string > & dunedaq::confmodel::NetworkInterface::get_ip_address ( ) const
inline

Get "ip_address" attribute value. IP address in form a.b.c.d.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 136 of file NetworkInterface.hpp.

137 {
138 std::lock_guard scoped_lock(m_mutex);
139 check();
140 check_init();
141 return m_ip_address;
142 }

◆ get_mac_address() [1/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_mac_address ( ) const
inline

Get "mac_address" attribute value. Destination MAC address on readout host.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 103 of file NetworkInterface.hpp.

104 {
105 std::lock_guard scoped_lock(m_mutex);
106 check();
107 check_init();
108 return m_mac_address;
109 }

◆ get_mac_address() [2/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_mac_address ( ) const
inline

Get "mac_address" attribute value. Destination MAC address on readout host.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 103 of file NetworkInterface.hpp.

104 {
105 std::lock_guard scoped_lock(m_mutex);
106 check();
107 check_init();
108 return m_mac_address;
109 }

◆ get_network_mask() [1/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_network_mask ( ) const
inline

Get "network_mask" attribute value. Network mask in for a.b.c.d.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 202 of file NetworkInterface.hpp.

203 {
204 std::lock_guard scoped_lock(m_mutex);
205 check();
206 check_init();
207 return m_network_mask;
208 }

◆ get_network_mask() [2/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_network_mask ( ) const
inline

Get "network_mask" attribute value. Network mask in for a.b.c.d.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 202 of file NetworkInterface.hpp.

203 {
204 std::lock_guard scoped_lock(m_mutex);
205 check();
206 check_init();
207 return m_network_mask;
208 }

◆ get_network_name() [1/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_network_name ( ) const
inline

Get "network_name" attribute value. Name of network on this interface Control or Data.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 244 of file NetworkInterface.hpp.

245 {
246 std::lock_guard scoped_lock(m_mutex);
247 check();
248 check_init();
249 return m_network_name;
250 }

◆ get_network_name() [2/2]

const std::string & dunedaq::confmodel::NetworkInterface::get_network_name ( ) const
inline

Get "network_name" attribute value. Name of network on this interface Control or Data.

Returns
the attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 244 of file NetworkInterface.hpp.

245 {
246 std::lock_guard scoped_lock(m_mutex);
247 check();
248 check_init();
249 return m_network_name;
250 }

◆ init() [1/2]

void dunedaq::confmodel::NetworkInterface::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Implements dunedaq::conffwk::DalObject.

Reimplemented in dunedaq::confmodel::NetworkDevice, and dunedaq::confmodel::NetworkDevice.

Definition at line 58 of file NetworkInterface.cpp.

59 {
60 p_was_read = true;
62 TLOG_DEBUG(5) << "read object " << this << " (class " << s_class_name << ')';
63
64 try {
70 }
71 catch (dunedaq::conffwk::Exception & ex) {
72 throw_init_ex(ex);
73 }
74 }
void get(const std::string &name, T &value)
Get value of object's attribute or relationship.
void throw_init_ex(dunedaq::conffwk::Exception &ex)
throw object initialisation exception (i.e.
Definition DalObject.cpp:74
void increment_read() noexcept
bool p_was_read
is true, if the object was read
ConfigObject p_obj
Config object used by given template object.
#define TLOG_DEBUG(lvl,...)
Definition Logging.hpp:112

◆ init() [2/2]

virtual void dunedaq::confmodel::NetworkInterface::init ( bool init_children)
protectedvirtual

Initialize object (method generated by genconffwk)

Parameters
init_childrenif true, initialize referenced objects

Implements dunedaq::conffwk::DalObject.

Reimplemented in dunedaq::confmodel::NetworkDevice, and dunedaq::confmodel::NetworkDevice.

◆ print() [1/2]

void dunedaq::confmodel::NetworkInterface::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the NetworkInterface object.

Parameters are:

Parameters
offsetnumber of spaces to shift object right (useful to print nested objects)
print_headerif false, do not print object header (to print attributes of base classes)
soutput stream

Implements dunedaq::conffwk::DalObject.

Reimplemented in dunedaq::confmodel::NetworkDevice, and dunedaq::confmodel::NetworkDevice.

Definition at line 33 of file NetworkInterface.cpp.

34 {
35 check_init();
36
37 try {
38 const std::string str(indent+2, ' ');
39
40 if (print_header)
41 p_hdr(s, indent, s_class_name, "dunedaq::confmodel");
42
43
44 // print direct attributes
45
51 }
52 catch (dunedaq::conffwk::Exception & ex) {
54 }
55 }
void p_hdr(std::ostream &s, unsigned int indent, const std::string &cl, const char *nm=nullptr) const
print object headers
Definition DalObject.cpp:65
static void p_error(std::ostream &s, dunedaq::conffwk::Exception &ex)
print error text
Definition DalObject.cpp:59
void p_mv_attr(std::ostream &s, const std::string &str, const std::string &name, const T &val) noexcept
print multi-value attribute
void p_sv_attr(std::ostream &s, const std::string &str, const std::string &name, const T &val) noexcept
print single-value attribute

◆ print() [2/2]

virtual void dunedaq::confmodel::NetworkInterface::print ( unsigned int offset,
bool print_header,
std::ostream & s ) const
virtual

Print details of the NetworkInterface object.

Parameters are:

Parameters
offsetnumber of spaces to shift object right (useful to print nested objects)
print_headerif false, do not print object header (to print attributes of base classes)
soutput stream

Implements dunedaq::conffwk::DalObject.

Reimplemented in dunedaq::confmodel::NetworkDevice, and dunedaq::confmodel::NetworkDevice.

◆ set_interface_name() [1/2]

void dunedaq::confmodel::NetworkInterface::set_interface_name ( const std::string & value)
inline

Set "interface_name" attribute value. Name of interface e.g. eth0 or eno1.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 185 of file NetworkInterface.hpp.

186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 clear();
191 }
void set_by_ref(const std::string &name, T &value)
Set attribute value.

◆ set_interface_name() [2/2]

void dunedaq::confmodel::NetworkInterface::set_interface_name ( const std::string & value)
inline

Set "interface_name" attribute value. Name of interface e.g. eth0 or eno1.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 185 of file NetworkInterface.hpp.

186 {
187 std::lock_guard scoped_lock(m_mutex);
188 check();
189 clear();
191 }

◆ set_ip_address() [1/2]

void dunedaq::confmodel::NetworkInterface::set_ip_address ( const std::vector< std::string > & value)
inline

Set "ip_address" attribute value. IP address in form a.b.c.d.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 152 of file NetworkInterface.hpp.

153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 clear();
158 }
void set_by_val(const std::string &name, T value)
Set attribute value.

◆ set_ip_address() [2/2]

void dunedaq::confmodel::NetworkInterface::set_ip_address ( const std::vector< std::string > & value)
inline

Set "ip_address" attribute value. IP address in form a.b.c.d.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 152 of file NetworkInterface.hpp.

153 {
154 std::lock_guard scoped_lock(m_mutex);
155 check();
156 clear();
158 }

◆ set_mac_address() [1/2]

void dunedaq::confmodel::NetworkInterface::set_mac_address ( const std::string & value)
inline

Set "mac_address" attribute value. Destination MAC address on readout host.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 119 of file NetworkInterface.hpp.

120 {
121 std::lock_guard scoped_lock(m_mutex);
122 check();
123 clear();
125 }

◆ set_mac_address() [2/2]

void dunedaq::confmodel::NetworkInterface::set_mac_address ( const std::string & value)
inline

Set "mac_address" attribute value. Destination MAC address on readout host.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 119 of file NetworkInterface.hpp.

120 {
121 std::lock_guard scoped_lock(m_mutex);
122 check();
123 clear();
125 }

◆ set_network_mask() [1/2]

void dunedaq::confmodel::NetworkInterface::set_network_mask ( const std::string & value)
inline

Set "network_mask" attribute value. Network mask in for a.b.c.d.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 218 of file NetworkInterface.hpp.

219 {
220 std::lock_guard scoped_lock(m_mutex);
221 check();
222 clear();
224 }

◆ set_network_mask() [2/2]

void dunedaq::confmodel::NetworkInterface::set_network_mask ( const std::string & value)
inline

Set "network_mask" attribute value. Network mask in for a.b.c.d.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 218 of file NetworkInterface.hpp.

219 {
220 std::lock_guard scoped_lock(m_mutex);
221 check();
222 clear();
224 }

◆ set_network_name() [1/2]

void dunedaq::confmodel::NetworkInterface::set_network_name ( const std::string & value)
inline

Set "network_name" attribute value. Name of network on this interface Control or Data.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 260 of file NetworkInterface.hpp.

261 {
262 std::lock_guard scoped_lock(m_mutex);
263 check();
264 clear();
266 }
void set_enum(const std::string &name, const std::string &value)
Set attribute enumeration value.

◆ set_network_name() [2/2]

void dunedaq::confmodel::NetworkInterface::set_network_name ( const std::string & value)
inline

Set "network_name" attribute value. Name of network on this interface Control or Data.

Parameters
valuenew attribute value
Exceptions
dunedaq::conffwk::Generic,dunedaq::conffwk::DeletedObject

Definition at line 260 of file NetworkInterface.hpp.

261 {
262 std::lock_guard scoped_lock(m_mutex);
263 check();
264 clear();
266 }

Friends And Related Symbol Documentation

◆ conffwk::Configuration

Definition at line 22 of file NetworkInterface.hpp.

◆ conffwk::DalFactory

conffwk::DalFactory
friend

Definition at line 24 of file NetworkInterface.hpp.

◆ conffwk::DalObject

Definition at line 23 of file NetworkInterface.hpp.

◆ conffwk::DalRegistry

Definition at line 25 of file NetworkInterface.hpp.

Member Data Documentation

◆ m_interface_name

std::string dunedaq::confmodel::NetworkInterface::m_interface_name
private

Definition at line 73 of file NetworkInterface.hpp.

◆ m_ip_address

std::vector< std::string > dunedaq::confmodel::NetworkInterface::m_ip_address
private

Definition at line 72 of file NetworkInterface.hpp.

◆ m_mac_address

std::string dunedaq::confmodel::NetworkInterface::m_mac_address
private

Definition at line 71 of file NetworkInterface.hpp.

◆ m_network_mask

std::string dunedaq::confmodel::NetworkInterface::m_network_mask
private

Definition at line 74 of file NetworkInterface.hpp.

◆ m_network_name

std::string dunedaq::confmodel::NetworkInterface::m_network_name
private

Definition at line 75 of file NetworkInterface.hpp.

◆ s_class_name

static const std::string & dunedaq::confmodel::NetworkInterface::s_class_name
static

The name of the configuration class.

Definition at line 37 of file NetworkInterface.hpp.

◆ s_interface_name

static const std::string dunedaq::confmodel::NetworkInterface::s_interface_name = "interface_name"
inlinestatic

Definition at line 84 of file NetworkInterface.hpp.

◆ s_ip_address

static const std::string dunedaq::confmodel::NetworkInterface::s_ip_address = "ip_address"
inlinestatic

Definition at line 83 of file NetworkInterface.hpp.

◆ s_mac_address

static const std::string dunedaq::confmodel::NetworkInterface::s_mac_address = "mac_address"
inlinestatic

Definition at line 82 of file NetworkInterface.hpp.

◆ s_network_mask

static const std::string dunedaq::confmodel::NetworkInterface::s_network_mask = "network_mask"
inlinestatic

Definition at line 85 of file NetworkInterface.hpp.

◆ s_network_name

static const std::string dunedaq::confmodel::NetworkInterface::s_network_name = "network_name"
inlinestatic

Definition at line 86 of file NetworkInterface.hpp.


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