7 #ifndef SERVERCONTEXT_H_ 8 #define SERVERCONTEXT_H_ 57 virtual void shutdown() = 0;
62 void printInfo(
int lvl =0);
69 virtual void printInfo(std::ostream&
str,
int lvl=0) = 0;
88 virtual Configuration::shared_pointer getCurrentConfig() = 0;
90 virtual const std::vector<ChannelProvider::shared_pointer>& getChannelProviders() =0;
105 Configuration::const_shared_pointer _conf;
106 std::vector<ChannelProvider::shared_pointer> _providers;
110 Config&
config(
const Configuration::const_shared_pointer& c) { _conf = c;
return *
this; }
112 Config&
providers(
const std::vector<ChannelProvider::shared_pointer>& p) { _providers = p;
return *
this; }
114 Config&
provider(
const ChannelProvider::shared_pointer& p) { _providers.push_back(p);
return *
this; }
130 static ServerContext::shared_pointer create(
const Config& conf =
Config());
137 bool runInSeparateThread =
false,
138 bool printInfo =
false);
Config & config(const Configuration::const_shared_pointer &c)
Use specific configuration. Default is process environment.
TODO only here because of the Lockable.
Mark external symbols and entry points for shared libraries.
Config & providers(const std::vector< ChannelProvider::shared_pointer > &p)
Attach many providers.
#define POINTER_DEFINITIONS(clazz)
epicsShareFunc ServerContext::shared_pointer startPVAServer(std::string const &providerNames=PVACCESS_ALL_PROVIDERS, int timeToRun=0, bool runInSeparateThread=false, bool printInfo=false)
EPICS time stamp, for use from C code.
void getVersion(epics::pvData::PVDataVersion *ptr)
Options for a server insatnce.
std::tr1::shared_ptr< BeaconServerStatusProvider > shared_pointer
EPICS time-stamps (epicsTimeStamp), epicsTime C++ class and C functions for handling wall-clock times...
epicsShareExtern const std::string PVACCESS_ALL_PROVIDERS
Config & provider(const ChannelProvider::shared_pointer &p)
short hand for providers() with a length 1 vector.