SOIL C++
C++ Unified Device Interface
UDP::Configuration Class Reference

UDP Broadcast Configuration. More...

#include <Configuration.h>

Public Types

typedef std::map< std::string, int >::iterator iterator
 Iterator. More...
 

Public Member Functions

 Configuration ()
 Constructor. More...
 
 Configuration (std::string filename)
 JSON Constructor. More...
 
 ~Configuration ()
 Destructor. More...
 

Public Attributes

std::map< std::string, int > clients
 List of clients. More...
 

Detailed Description

Class to simplify the configuration of UDP broadcasts, i.e. by providing a list of client endpoints that can be populated from a JSON file. For simplicity, all members are public.

Definition at line 13 of file Configuration.h.

Member Typedef Documentation

◆ iterator

typedef std::map<std::string,int>::iterator UDP::Configuration::iterator

Typedefinition to provide an iterator-sytled access

Definition at line 21 of file Configuration.h.

Constructor & Destructor Documentation

◆ Configuration() [1/2]

UDP::Configuration::Configuration ( )

Default constructor, creates an empty list of clients.

Definition at line 7 of file Configuration.cpp.

◆ Configuration() [2/2]

UDP::Configuration::Configuration ( std::string  filename)

Constructor the takes a JSON file as input to populate the list of clients. See the project assets for a sample file.

Parameters
[in]filenamePath to the JSON configuration file

Definition at line 12 of file Configuration.cpp.

◆ ~Configuration()

UDP::Configuration::~Configuration ( )

Default destructor, empties the map.

Definition at line 24 of file Configuration.cpp.

Member Data Documentation

◆ clients

std::map<std::string, int> UDP::Configuration::clients

List of clients, implemented as map where the IPv4 address acts as unique identifier.

Definition at line 28 of file Configuration.h.


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