RAVENNAKIT
Loading...
Searching...
No Matches
rav::nmos::Node::Configuration Struct Reference

The configuration of the NMOS node. More...

#include <nmos_node.hpp>

Public Member Functions

boost::system::result< void, Error > validate () const
 Checks if the configuration is semantically valid, return a message if not.
boost::json::object to_json () const
auto constexpr tie () const

Static Public Member Functions

static boost::system::result< Configuration, std::string > from_json (const boost::json::value &json)
 Creates a configuration object from a JSON object.

Public Attributes

boost::uuids::uuid id
OperationMode operation_mode {OperationMode::mdns_p2p}
ApiVersion api_version {1, 3}
std::string registry_address
bool enabled {false}
uint16_t api_port {0}
std::string label
std::string description

Friends

bool operator== (const Configuration &lhs, const Configuration &rhs)
bool operator!= (const Configuration &lhs, const Configuration &rhs)

Detailed Description

The configuration of the NMOS node.

Definition at line 66 of file nmos_node.hpp.

Member Function Documentation

◆ from_json()

boost::system::result< Configuration, std::string > rav::nmos::Node::Configuration::from_json ( const boost::json::value & json)
static

Creates a configuration object from a JSON object.

Parameters
jsonThe JSON object to convert.
Returns
A configuration object if the JSON is valid, otherwise an error message.

◆ tie()

auto constexpr rav::nmos::Node::Configuration::tie ( ) const
inlinenodiscardconstexpr

Definition at line 94 of file nmos_node.hpp.

◆ to_json()

boost::json::object rav::nmos::Node::Configuration::to_json ( ) const
nodiscard
Returns
The configuration as a JSON object.

◆ validate()

boost::system::result< void, Error > rav::nmos::Node::Configuration::validate ( ) const
nodiscard

Checks if the configuration is semantically valid, return a message if not.

Returns
A result indicating whether the configuration is valid or not.

◆ operator!=

bool operator!= ( const Configuration & lhs,
const Configuration & rhs )
friend

Definition at line 102 of file nmos_node.hpp.

◆ operator==

bool operator== ( const Configuration & lhs,
const Configuration & rhs )
friend

Definition at line 98 of file nmos_node.hpp.

Member Data Documentation

◆ api_port

uint16_t rav::nmos::Node::Configuration::api_port {0}

Definition at line 72 of file nmos_node.hpp.

◆ api_version

ApiVersion rav::nmos::Node::Configuration::api_version {1, 3}

Definition at line 69 of file nmos_node.hpp.

◆ description

std::string rav::nmos::Node::Configuration::description

Definition at line 74 of file nmos_node.hpp.

◆ enabled

bool rav::nmos::Node::Configuration::enabled {false}

Definition at line 71 of file nmos_node.hpp.

◆ id

boost::uuids::uuid rav::nmos::Node::Configuration::id

Definition at line 67 of file nmos_node.hpp.

◆ label

std::string rav::nmos::Node::Configuration::label

Definition at line 73 of file nmos_node.hpp.

◆ operation_mode

OperationMode rav::nmos::Node::Configuration::operation_mode {OperationMode::mdns_p2p}

Definition at line 68 of file nmos_node.hpp.

◆ registry_address

std::string rav::nmos::Node::Configuration::registry_address

Definition at line 70 of file nmos_node.hpp.


The documentation for this struct was generated from the following file: