print server Config

This commit is contained in:
Michael Davidsaver
2020-02-08 10:28:33 -08:00
parent 0e99f85ba2
commit 4b5439a427
6 changed files with 43 additions and 24 deletions
+35
View File
@@ -126,6 +126,41 @@ Server Config::build()
return ret;
}
std::ostream& operator<<(std::ostream& strm, const Config& conf)
{
bool first;
strm<<"EPICS_PVAS_INTF_ADDR_LIST=\"";
first = true;
for(auto& iface : conf.interfaces) {
if(first)
first = false;
else
strm<<' ';
strm<<iface;
}
strm<<"\"\n";
strm<<"EPICS_PVAS_BEACON_ADDR_LIST=\"";
first = true;
for(auto& iface : conf.beaconDestinations) {
if(first)
first = false;
else
strm<<' ';
strm<<iface;
}
strm<<"\"\n";
strm<<"EPICS_PVAS_AUTO_BEACON_ADDR_LIST="<<(conf.auto_beacon?"YES":"NO")<<'\n';
strm<<"EPICS_PVAS_SERVER_PORT="<<conf.tcp_port<<'\n';
strm<<"EPICS_PVAS_BROADCAST_PORT="<<conf.udp_port<<'\n';
return strm;
}
Server::Server(Config&& conf)
{
/* Here be dragons.