7#ifndef SERVERCONTEXT_H_
8#define SERVERCONTEXT_H_
12#include <pv/pvaDefs.h>
13#include <pv/beaconServerStatusProvider.h>
14#include <pv/pvaConstants.h>
15#include <pv/pvaVersion.h>
16#include <pv/pvAccess.h>
17#include <pv/configuration.h>
57 virtual void shutdown() = 0;
69 virtual void printInfo(std::ostream& str,
int lvl=0) = 0;
71 virtual epicsTimeStamp& getStartTime() = 0;
105 Configuration::const_shared_pointer _conf;
110 Config&
config(
const Configuration::const_shared_pointer& c) { _conf = c;
return *
this; }
134epicsShareFunc ServerContext::shared_pointer startPVAServer(
137 bool runInSeparateThread =
false,
138 bool printInfo =
false);
duration< int64_t > seconds
constexpr void push_back(const value_type &__x)
Options for a server insatnce.
Config & providers(const std::vector< ChannelProvider::shared_pointer > &p)
Attach many providers.
Config & config(const Configuration::const_shared_pointer &c)
Use specific configuration. Default is process environment.
Config & provider(const ChannelProvider::shared_pointer &p)
short hand for providers() with a length 1 vector.
The class representing a PVA Server context.
virtual void run(epics::pvData::uint32 seconds)=0
Run server (process events).
virtual epics::pvData::int32 getBroadcastPort()=0
Get broadcast port.
virtual const ServerGUID & getGUID()=0
Returns GUID (12-byte array).
virtual epics::pvData::int32 getServerPort()=0
Get server port.
virtual void printInfo(std::ostream &str, int lvl=0)=0
Prints detailed information about the context to the specified output stream.
virtual const Version & getVersion()=0
Get context implementation version.
virtual ~ServerContext()
Destructor.
static ServerContext::shared_pointer create(const Config &conf=Config())
Start a new PVA server.
virtual void setBeaconServerStatusProvider(BeaconServerStatusProvider::shared_pointer const &beaconServerStatusProvider)=0
Set beacon server status provider.
void printInfo(int lvl=0)
Prints detailed information about the context to the standard output stream.
virtual Configuration::shared_pointer getCurrentConfig()=0
Return a Configuration with the actual values being used, including defaults used,...
const std::string PVACCESS_ALL_PROVIDERS
"All-providers registered" PVA provider name.
Copyright - See the COPYRIGHT that is included with this distribution.