cap5: Added CA->version function
Documented.
This commit is contained in:
@@ -13,6 +13,11 @@
|
||||
|
||||
<!-- Insert new items immediately below here ... -->
|
||||
|
||||
<h3>Added CA->version function to CA Perl Bindings</h3>
|
||||
|
||||
<p>This new function returns the version string from Base. The ca*.pl tools have
|
||||
been updated to display this in their help output.</p>
|
||||
|
||||
<h3>epicsString.h comparison functions fixed</h3>
|
||||
|
||||
<p>The case-independent string comparison functions epicsStrCaseCmp() and
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $version = '0.4';
|
||||
my $version = '0.5';
|
||||
|
||||
|
||||
package CA;
|
||||
@@ -507,6 +507,11 @@ class method syntax, e.g. C<< CA->pend_io(10) >>.
|
||||
|
||||
=over 4
|
||||
|
||||
=item version
|
||||
|
||||
Returns the EPICS_VERSION_STRING from the version of EPICS Base this software
|
||||
was built using.
|
||||
|
||||
=item flush_io
|
||||
|
||||
Flush outstanding IO requests to the server. This routine is useful for users
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "cadef.h"
|
||||
#include "db_access.h"
|
||||
#include "epicsVersion.h"
|
||||
#include "alarm.h"
|
||||
#include "alarmString.h"
|
||||
|
||||
@@ -1010,6 +1011,12 @@ void CA_flush_io(const char *class) {
|
||||
}
|
||||
|
||||
|
||||
/* CA::version($class) */
|
||||
|
||||
const char * CA_version(const char *class) {
|
||||
return EPICS_VERSION_STRING;
|
||||
}
|
||||
|
||||
/* CA::add_exception_event($class, \&sub) */
|
||||
|
||||
static
|
||||
@@ -1385,6 +1392,10 @@ void
|
||||
CA_flush_io (class)
|
||||
const char * class
|
||||
|
||||
const char *
|
||||
CA_version (class)
|
||||
const char * class
|
||||
|
||||
void
|
||||
CA_add_exception_event (class, sub)
|
||||
const char * class
|
||||
|
||||
@@ -148,11 +148,11 @@ sub display {
|
||||
}
|
||||
|
||||
sub HELP_MESSAGE {
|
||||
print STDERR "\nUsage: caget [options] <PV name> ...\n",
|
||||
print STDERR "\nUsage: caget.pl [options] <PV name> ...\n",
|
||||
"\n",
|
||||
" -h: Help: Print this message\n",
|
||||
"Channel Access options:\n",
|
||||
" -w <sec>: Wait time, specifies longer CA timeout, default is $opt_w second\n",
|
||||
" -w <sec>: Wait time, specifies CA timeout, default is $opt_w second\n",
|
||||
"Format options:\n",
|
||||
" -t: Terse mode - print only value, without name\n",
|
||||
" -a: Wide mode \"name timestamp value stat sevr\" (read PVs as DBR_TIME_xxx)\n",
|
||||
@@ -182,6 +182,7 @@ sub HELP_MESSAGE {
|
||||
" -0b: Print as binary number\n",
|
||||
"Set output field separator:\n",
|
||||
" -F <ofs>: Use <ofs> to separate fields on output\n",
|
||||
"\n";
|
||||
"\n",
|
||||
"Base version: ", CA->version, "\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -52,13 +52,14 @@ sub display {
|
||||
}
|
||||
|
||||
sub HELP_MESSAGE {
|
||||
print STDERR "\nUsage: cainfo [options] <PV name> ...\n",
|
||||
print STDERR "\nUsage: cainfo.pl [options] <PV name> ...\n",
|
||||
"\n",
|
||||
" -h: Help: Print this message\n",
|
||||
"Channel Access options:\n",
|
||||
" -w <sec>: Wait time, specifies CA timeout, default is $opt_w second\n",
|
||||
"\n",
|
||||
"Example: cainfo my_channel another_channel\n",
|
||||
"\n";
|
||||
"\n",
|
||||
"Base version: ", CA->version, "\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -109,11 +109,11 @@ sub display {
|
||||
}
|
||||
|
||||
sub HELP_MESSAGE {
|
||||
print STDERR "\nUsage: camonitor [options] <PV name> ...\n",
|
||||
print STDERR "\nUsage: camonitor.pl [options] <PV name> ...\n",
|
||||
"\n",
|
||||
" -h: Help: Print this message\n",
|
||||
"Channel Access options:\n",
|
||||
" -w <sec>: Wait time, specifies longer CA timeout, default is $opt_w second\n",
|
||||
" -w <sec>: Wait time, specifies CA timeout, default is $opt_w second\n",
|
||||
" -m <mask>: Specify CA event mask to use, with <mask> being any combination of\n",
|
||||
" 'v' (value), 'a' (alarm), 'l' (log/archive), 'p' (property)",
|
||||
" Default: '$opt_m'\n",
|
||||
@@ -144,6 +144,7 @@ sub HELP_MESSAGE {
|
||||
"\n",
|
||||
"Example: camonitor -f8 my_channel another_channel\n",
|
||||
" (doubles are printed as %f with 8 decimal digits)\n",
|
||||
"\n";
|
||||
"\n",
|
||||
"Base version: ", CA->version, "\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -401,23 +401,22 @@ sub printRecordList {
|
||||
sub HELP_MESSAGE {
|
||||
print STDERR "\n",
|
||||
"Usage: capr.pl -h\n",
|
||||
" capr.pl [-d file.dbd] [-w seconds] -r\n",
|
||||
" capr.pl [-d file.dbd] [-w seconds] -f record_type\n",
|
||||
" capr.pl [-d file.dbd] [-w seconds] record_name [interest]\n",
|
||||
"Description:\n",
|
||||
" Attempts to perform a \"dbpr\" record print via channel access for \n",
|
||||
" record_name at an interest level which defaults to level 0.\n\n",
|
||||
" The -r or -f options cause it to print record type or field lists.\n",
|
||||
" capr.pl [options] -r\n",
|
||||
" capr.pl [options] -f <record type>\n",
|
||||
" capr.pl [options] <record name> [<interest>]\n",
|
||||
"\n",
|
||||
"Options:\n",
|
||||
" -h Prints this help message.\n",
|
||||
" -r Lists all record types in the dbd file.\n",
|
||||
" -f record_type: Lists all fields plus their interest level, data type\n",
|
||||
" and number base for the given record_type.\n",
|
||||
" -d file.dbd: The dbd file containing record type definitions.\n",
|
||||
" This can be set using the EPICS_CAPR_DBD_FILE environment variable.\n",
|
||||
" Currently ", AbsPath($opt_d), "\n",
|
||||
" -w seconds: CA connection timeout, currently $opt_w\n",
|
||||
"\n";
|
||||
" -h Print this help message.\n",
|
||||
"Channel Access options:\n",
|
||||
" -w <sec>: Wait time, specifies CA timeout, default is $opt_w second\n",
|
||||
"Database Definitions:\n",
|
||||
" -d <file.dbd>: The file containing record type definitions.\n",
|
||||
" This can be set using the EPICS_CAPR_DBD_FILE environment variable.\n",
|
||||
" Default: ", AbsPath($opt_d), "\n",
|
||||
"Output Options:\n",
|
||||
" -r Lists all record types in the selected dbd file.\n",
|
||||
" -f <record type>: Lists all fields with their interest level, data type\n",
|
||||
" and number base for the given record_type.\n",
|
||||
"\n",
|
||||
"Base version: ", CA->version, "\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -151,11 +151,11 @@ sub display {
|
||||
}
|
||||
|
||||
sub HELP_MESSAGE {
|
||||
print STDERR "\nUsage: caput [options] <PV name> <PV value> ...\n",
|
||||
print STDERR "\nUsage: caput.pl [options] <PV name> <PV value> ...\n",
|
||||
"\n",
|
||||
" -h: Help: Print this message\n",
|
||||
"Channel Access options:\n",
|
||||
" -w <sec>: Wait time, specifies longer CA timeout, default is $opt_w second\n",
|
||||
" -w <sec>: Wait time, specifies CA timeout, default is $opt_w second\n",
|
||||
" -c: Use put_callback to wait for completion\n",
|
||||
"Format options:\n",
|
||||
" -t: Terse mode - print only sucessfully written value, without name\n",
|
||||
@@ -180,7 +180,8 @@ sub HELP_MESSAGE {
|
||||
"Examples:\n",
|
||||
" caput my_channel 1.2\n",
|
||||
" caput my_waveform 1.2 2.4 3.6 4.8 6.0\n",
|
||||
"\n";
|
||||
"\n",
|
||||
"Base version: ", CA->version, "\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user