/** * Copyright - See the COPYRIGHT that is included with this distribution. * pvxs is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ #include #include #include #include #include DEFINE_LOGGER(app, "mailbox"); namespace { using namespace pvxs; using namespace pvxs::server; void usage(const char* cmd) { std::cerr<<"Usage: "<\n"; } } // namespace int main(int argc, char* argv[]) { if(argc<=1) { usage(argv[0]); return 1; } pvxs::logger_level_set(app.name, pvxs::Level::Info); pvxs::logger_config_env(); auto initial = nt::NTScalar{TypeCode::Float64}.create(); initial["value"] = 42.0; initial["alarm.severity"] = 0; initial["alarm.status"] = 0; initial["alarm.message"] = ""; auto pv(SharedPV::buildMailbox()); pv.open(initial); auto serv = Config::from_env() .build() .addPV(argv[1], pv); std::cout<<"Effective config\n"<