272 bool monitor =
false;
279 while ((opt =
getopt(argc, argv,
":hvVRM:r:w:tmp:qdcF:f:ni")) != -1) {
289 fprintf(
stdout,
"pvAccess %u.%u.%u%s\n",
290 EPICS_PVA_MAJOR_VERSION,
291 EPICS_PVA_MINOR_VERSION,
292 EPICS_PVA_MAINTENANCE_VERSION,
293 (EPICS_PVA_DEVELOPMENT_FLAG)?
"-SNAPSHOT":
"");
294 fprintf(
stdout,
"pvData %u.%u.%u%s\n",
295 EPICS_PVD_MAJOR_VERSION,
296 EPICS_PVD_MINOR_VERSION,
297 EPICS_PVD_MAINTENANCE_VERSION,
298 (EPICS_PVD_DEVELOPMENT_FLAG)?
"-SNAPSHOT":
"");
299 fprintf(
stdout,
"Base %s\n", EPICS_VERSION_FULL);
306 if(strcmp(
optarg,
"raw")==0) {
307 outmode = pvd::PVStructure::Formatter::Raw;
308 }
else if(strcmp(
optarg,
"nt")==0) {
309 outmode = pvd::PVStructure::Formatter::NT;
310 }
else if(strcmp(
optarg,
"json")==0) {
311 outmode = pvd::PVStructure::Formatter::JSON;
314 outmode = pvd::PVStructure::Formatter::Raw;
322 fprintf(
stderr,
"'%s' is not a valid timeout value " 340 fprintf(
stderr,
"Unsupported option -f\n");
355 "Unrecognized option: '-%c'. ('" EXECNAME " -h' for help.)\n",
360 "Option '-%c' requires an argument. ('" EXECNAME " -h' for help.)\n",
373 outmode = pvd::PVStructure::Formatter::Raw;
375 pvd::PVStructure::shared_pointer pvRequest;
378 }
catch(std::exception& e){
379 fprintf(
stderr,
"failed to parse request string: %s\n", e.what());
384 pvnamewidth =
std::max(pvnamewidth, strlen(argv[
i]));
394 std::vector<std::tr1::shared_ptr<Tracker> > tracked;
396 epics::auto_ptr<WorkQueue> Q;
404 std::tr1::shared_ptr<MonTracker> mon(
new MonTracker(*Q, chan, pvRequest));
406 tracked.push_back(mon);
409 std::tr1::shared_ptr<Getter>
get(
new Getter(chan, pvRequest));
411 tracked.push_back(
get);
420 std::cerr<<
"Waiting...\n";
430 std::cerr<<
"Timeout\n";
437 if(refmon.running()) {
448 return haderror ? 1 : 0;
449 }
catch(std::exception& e) {
450 std::cerr<<
"Error: "<<e.what()<<
"\n";
int getopt(int nargc, char *const *nargv, const char *ostr)
static epicsMutex doneLock
#define SET_LOG_LEVEL(level)
static epicsEvent doneEvt
#define epicsScanDouble(str, to)
PVStructure::shared_pointer createRequest(std::string const &request)
static void start()
start provider ca
std::string defaultProvider
pvd::PVStructure::Formatter::format_t outmode