ioc: set PVAS_SERVER_PORT

Publish TCP port used by IOC singleton server for
consumption by recsync.
This commit is contained in:
Michael Davidsaver committed 2026-09-16 13:34:56 -07:00
1 parent 7ecb39b3cd
commit 6dfa490bed
2 files changed
+12

No files matched your search

+1
View File
@@ -16,6 +16,7 @@ Release Notes
enough for a channel to be considered "claimed". It is necessary to set some GET/RPC/MONITOR/...
handler.
- ioc: serve ``display.precision`` for boRecord.HIGH and mbbxDirect (Sang Woo Kim)
- ioc: publish ``$PVAS_SERVER_PORT`` and ``$PVXS_SERVER_PORT`` with the IOC singleton server's TCP port.
- tools: The CLI tools are now built only with epics-base >= 3.15 .
- tools: pvxput now understand JSON syntax.
- tools: CLI tool argument parsing now requires that option flags appear before positional arguments.
+11
View File
@@ -16,6 +16,9 @@
#include <memory>
#include <stdexcept>
#include <stdlib.h>
#include <envDefs.h>
#include <epicsExport.h>
#include <epicsExit.h>
#include <epicsString.h>
@@ -93,6 +96,14 @@ void initialisePvxsServer() {
Guard G(pvxServer->lock);
if(!pvxServer->srv) {
pvxServer->srv = Server(conf);
std::ostringstream strm;
std::string portstr(SB()<<pvxServer->srv.config().tcp_port);
// publish our effective TCP port number
epicsEnvSet("PVXS_SERVER_PORT", portstr.c_str());
// publish with the same name used by pvAccessCPP,
// which may later overwrite if it is also loaded.
epicsEnvSet("PVAS_SERVER_PORT", portstr.c_str());
}
}