This is Unofficial EPICS BASE Doxygen Site
caConnTestMain.cpp
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 
10 #include <stdio.h>
11 #include <epicsStdlib.h>
12 
13 #include "caDiagnostics.h"
14 
15 int main ( int argc, char **argv )
16 {
17  double delay = 60.0 * 5.0;
18  unsigned count = 2000;
19 
20  if ( argc < 2 || argc > 4 ) {
21  printf ( "usage: %s < channel name > [ < count > ] [ < delay sec > ]\n", argv[0] );
22  return -1;
23  }
24 
25  if ( argc >= 3 ) {
26  int nConverted = sscanf ( argv[2], "%u", &count );
27  if ( nConverted != 1 ) {
28  printf ( "conversion failed, changing channel count arg \"%s\" to %u\n",
29  argv[1], count );
30  }
31  }
32 
33  if ( argc >= 4 ) {
34  int nConverted = epicsScanDouble( argv[3], &delay );
35  if ( nConverted != 1 ) {
36  printf ( "conversion failed, changing delay arg \"%s\" to %f\n",
37  argv[2], delay );
38  }
39  }
40 
41  caConnTest ( argv[1], count, delay );
42 
43  return 0;
44 }
void caConnTest(const char *pNameIn, unsigned channelCountIn, double delayIn)
Definition: caConnTest.cpp:58
int main(int argc, char **argv)
#define printf
Definition: epicsStdio.h:41
#define epicsScanDouble(str, to)
Definition: epicsStdlib.h:78