Merged changes from 3.15 branch, to revno 12807
This commit is contained in:
+70
-43
@@ -1146,16 +1146,10 @@ the output.</p>
|
||||
<td>Wide mode "name timestamp value stat sevr" (read PVs as
|
||||
DBR_TIME_xxx)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-n</td>
|
||||
<td>Print DBF_ENUM values as number (default are enum strings)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-d <type></td>
|
||||
<td>Request specific dbr type; use string (DBR_ prefix may be omitted)
|
||||
|
||||
<p>or number of one of the following types:</p>
|
||||
|
||||
<td>Request specific dbr type; use string (DBR_ prefix may be omitted)<br>
|
||||
or number of one of the following types:<br>
|
||||
<table border="1">
|
||||
<tbody>
|
||||
<tr>
|
||||
@@ -1272,6 +1266,14 @@ the output.</p>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>Enum format:</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-n</td>
|
||||
<td>Print DBF_ENUM value as number (default is enum string)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>Arrays:</strong></td>
|
||||
@@ -1303,15 +1305,15 @@ the output.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-e <nr></td>
|
||||
<td>Use %e format, with <nr> digits after the decimal point</td>
|
||||
<td>Use %e format, with a precision of <nr> digits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-f <nr></td>
|
||||
<td>Use %f format, with <nr> digits after the decimal point</td>
|
||||
<td>Use %f format, with a precision of <nr> digits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-g <nr></td>
|
||||
<td>Use %g format, with <nr> digits after the decimal point</td>
|
||||
<td>Use %g format, with a precision of <nr> digits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-s</td>
|
||||
@@ -1349,6 +1351,14 @@ the output.</p>
|
||||
<td>-0b</td>
|
||||
<td>Print as binary number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>Alternate output field separator:</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-F <ofs></td>
|
||||
<td>Use <ofs> as an alternate output field separator</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1381,9 +1391,10 @@ the output.</p>
|
||||
<td>Wait time, specifies longer CA timeout, default is 1.0 second</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-m <mask></td>
|
||||
<td>Specify CA event mask to use, with <mask> being any combination
|
||||
of 'v' (value), 'a' (alarm), 'l' (log), 'p' (property). Default: va</td>
|
||||
<td>-m <msk></td>
|
||||
<td>Specify CA event mask to use. <msk> is any combination of<br>
|
||||
'v' (value), 'a' (alarm), 'l' (log/archive), 'p' (property).<br>
|
||||
Default event mask is 'va'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-p <prio></td>
|
||||
@@ -1405,8 +1416,8 @@ the output.</p>
|
||||
'n' = no timestamps<br>
|
||||
'r' = relative timestamps (time elapsed since start of program)<br>
|
||||
'i' = incremental timestamps (time elapsed since last update)<br>
|
||||
'I' = incremental timestamps (time elapsed since last update, by
|
||||
channel)</td>
|
||||
'I' = incremental timestamps (time since last update, by channel)<br>
|
||||
'r', 'i' or 'I' require 's' or 'c' to select the time source</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -1414,7 +1425,7 @@ the output.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-n</td>
|
||||
<td>Print DBF_ENUM values as number (default are enum strings)</td>
|
||||
<td>Print DBF_ENUM values as number (default is enum string)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
@@ -1422,16 +1433,15 @@ the output.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Value format: Print number of requested values, then list of
|
||||
values</td>
|
||||
<td>Array values: Print number of elements, then list of values</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Default:</td>
|
||||
<td>Print all values</td>
|
||||
<td>Default: Request and print all elements (dynamic arrays supported)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-# <count></td>
|
||||
<td>Print first <count> elements of an array</td>
|
||||
<td>-# <num></td>
|
||||
<td>Request and print up to <num> elements</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-S</td>
|
||||
@@ -1439,23 +1449,23 @@ the output.</p>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>Floating point type format:</strong></td>
|
||||
<td><strong>Floating point format:</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Default:</td>
|
||||
<td>Use %g format</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-e <nr></td>
|
||||
<td>Use %e format, with <nr> digits after the decimal point</td>
|
||||
<td>-e <num></td>
|
||||
<td>Use %e format, with a precision of <num> digits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-f <nr></td>
|
||||
<td>Use %f format, with <nr> digits after the decimal point</td>
|
||||
<td>-f <num></td>
|
||||
<td>Use %f format, with a precision of <num> digits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-g <nr></td>
|
||||
<td>Use %g format, with <nr> digits after the decimal point</td>
|
||||
<td>-g <num></td>
|
||||
<td>Use %g format, with a precision of <num> digits</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-s</td>
|
||||
@@ -1497,21 +1507,27 @@ the output.</p>
|
||||
</table>
|
||||
|
||||
<h3><a name="caput">caput</a></h3>
|
||||
<pre>caput [options] <PV name> <value>
|
||||
<pre>caput [options] <PV name> <value> ...
|
||||
caput -a [options] <PV name> <no of elements> <value> ...</pre>
|
||||
|
||||
<h4>Description</h4>
|
||||
|
||||
<p>Put value to a PV.</p>
|
||||
|
||||
<p>The specified value is written to the PV (as a string). The PV value is read
|
||||
before and after the write operation and printed as "Old" and "new" values on
|
||||
stdout.</p>
|
||||
<p>The specified value is written to the PV (as a string). The PV's value is
|
||||
read before and after the write operation and printed as "Old" and "New" values
|
||||
on stdout.</p>
|
||||
|
||||
<p>The array variant writes an array to the specified PV. The first numeric
|
||||
argument specifying the number of array elements is kept for compatibility with
|
||||
the array data format of caget - the actual number of values specified on the
|
||||
command line is used.</p>
|
||||
<p>There are two variants to the arguments for this command. For the scalar
|
||||
variant without the <code>-a</code> flag, all the value arguments provided after
|
||||
the PV name are concatenated with a single space character between them, and the
|
||||
resulting string (up to 40 characters long unless the <code>-S</code> flag is
|
||||
given) is written to the specified PV.</p>
|
||||
|
||||
<p>The array variant with the <code>-a</code> flag writes an array of string
|
||||
values to the specified PV. The numeric argument giving the number of array
|
||||
elements is actually ignored, the array length to be written is actually
|
||||
controlled by the number of values provided on the command line.</p>
|
||||
|
||||
<table border="1">
|
||||
<caption></caption>
|
||||
@@ -1550,12 +1566,16 @@ command line is used.</p>
|
||||
<td>-t</td>
|
||||
<td>Terse mode - print only successfully written value, without name</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-l</td>
|
||||
<td>Long mode "name timestamp value stat sevr" (read PVs as DBR_TIME_xxx)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><strong>Enum Format:</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Default:</td>
|
||||
<td>Auto - try value as ENUM string, then as index number</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -1571,17 +1591,24 @@ command line is used.</p>
|
||||
<td><strong>Arrays:</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-a</td>
|
||||
<td>Put array data</td>
|
||||
<td>Default:</td>
|
||||
<td>Put scalar</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Value format: Print number of requested values, then list of
|
||||
values</td>
|
||||
<td>Value format: all value arguments concatenated with spaces</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-S</td>
|
||||
<td>Put string as an array of char (long string)</td>
|
||||
<td>Put string as an array of chars (long string)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>-a</td>
|
||||
<td>Put array</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Value format: number of values, then list of values</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -149,9 +149,9 @@ cac::cac (
|
||||
iiuExistenceCount ( 0u ),
|
||||
cacShutdownInProgress ( false )
|
||||
{
|
||||
if ( ! osiSockAttach () ) {
|
||||
throwWithLocation ( caErrorCode (ECA_INTERNAL) );
|
||||
}
|
||||
if ( ! osiSockAttach () ) {
|
||||
throwWithLocation ( udpiiu :: noSocket () );
|
||||
}
|
||||
|
||||
try {
|
||||
long status;
|
||||
|
||||
@@ -61,11 +61,6 @@ static const double CA_CONN_VERIFY_PERIOD = 30.0; /* (sec) how often to request
|
||||
*/
|
||||
static const unsigned contiguousMsgCountWhichTriggersFlowControl = 10u;
|
||||
|
||||
class caErrorCode {
|
||||
public:
|
||||
caErrorCode ( int ) {};
|
||||
};
|
||||
|
||||
/*
|
||||
* CA internal functions
|
||||
*/
|
||||
|
||||
@@ -504,6 +504,7 @@ void ca_repeater ()
|
||||
if ( sockerrno == SOCK_EADDRINUSE ) {
|
||||
osiSockRelease ();
|
||||
debugPrintf ( ( "CA Repeater: exiting because a repeater is already running\n" ) );
|
||||
delete [] pBuf;
|
||||
return;
|
||||
}
|
||||
char sockErrBuf[64];
|
||||
|
||||
@@ -44,12 +44,7 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#if 0
|
||||
const unsigned mSecPerSec = 1000u;
|
||||
const unsigned uSecPerSec = 1000u * mSecPerSec;
|
||||
#endif
|
||||
|
||||
tcpSendThread::tcpSendThread (
|
||||
tcpSendThread::tcpSendThread (
|
||||
class tcpiiu & iiuIn, const char * pName,
|
||||
unsigned stackSize, unsigned priority ) :
|
||||
thread ( *this, pName, stackSize, priority ), iiu ( iiuIn )
|
||||
@@ -807,28 +802,6 @@ tcpiiu::tcpiiu (
|
||||
}
|
||||
}
|
||||
|
||||
# if 0
|
||||
//
|
||||
// windows has a really strange implementation of thess options
|
||||
// and we can avoid the need for this by using pthread_kill on unix
|
||||
//
|
||||
{
|
||||
struct timeval timeout;
|
||||
double pollInterval = connectionTimeout / 8.0;
|
||||
timeout.tv_sec = static_cast < long > ( pollInterval );
|
||||
timeout.tv_usec = static_cast < long >
|
||||
( ( pollInterval - timeout.tv_sec ) * uSecPerSec );
|
||||
// intentionally ignore status as we dont expect that all systems
|
||||
// will accept this request
|
||||
setsockopt ( this->sock, SOL_SOCKET, SO_SNDTIMEO,
|
||||
( char * ) & timeout, sizeof ( timeout ) );
|
||||
// intentionally ignore status as we dont expect that all systems
|
||||
// will accept this request
|
||||
setsockopt ( this->sock, SOL_SOCKET, SO_RCVTIMEO,
|
||||
( char * ) & timeout, sizeof ( timeout ) );
|
||||
}
|
||||
# endif
|
||||
|
||||
if ( isNameService() ) {
|
||||
pSearchDest->setCircuit ( this );
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ static epicsEventId epId;
|
||||
|
||||
void usage (void)
|
||||
{
|
||||
fprintf (stderr, "\nUsage: caput [options] <PV name> <PV value>\n"
|
||||
fprintf (stderr, "\nUsage: caput [options] <PV name> <PV value> ...\n"
|
||||
" caput -a [options] <PV name> <no of values> <PV value> ...\n\n"
|
||||
" -h: Help: Print this message\n"
|
||||
"Channel Access options:\n"
|
||||
@@ -71,9 +71,11 @@ void usage (void)
|
||||
" -n: Force interpretation of values as numbers\n"
|
||||
" -s: Force interpretation of values as strings\n"
|
||||
"Arrays:\n"
|
||||
" Default: Put scalar\n"
|
||||
" Value format: all value arguments concatenated with spaces\n"
|
||||
" -S: Put string as an array of chars (long string)\n"
|
||||
" -a: Put array\n"
|
||||
" Value format: number of requested values, then list of values\n"
|
||||
" -S: Put string as an array of char (long string)\n"
|
||||
" Value format: number of values, then list of values\n"
|
||||
"Alternate output field separator:\n"
|
||||
" -F <ofs>: Use <ofs> as an alternate output field separator\n"
|
||||
"\nExample: caput my_channel 1.2\n"
|
||||
|
||||
@@ -930,10 +930,12 @@ bool udpiiu::pushDatagramMsg ( epicsGuard < epicsMutex > & guard,
|
||||
|
||||
caHdr * pbufmsg = ( caHdr * ) &this->xmitBuf[this->nBytesInXmitBuf];
|
||||
*pbufmsg = msg;
|
||||
memcpy ( pbufmsg + 1, pExt, extsize );
|
||||
if ( extsize != alignedExtSize ) {
|
||||
char *pDest = (char *) ( pbufmsg + 1 );
|
||||
memset ( pDest + extsize, '\0', alignedExtSize - extsize );
|
||||
if ( extsize ) {
|
||||
memcpy ( pbufmsg + 1, pExt, extsize );
|
||||
if ( extsize != alignedExtSize ) {
|
||||
char *pDest = (char *) ( pbufmsg + 1 );
|
||||
memset ( pDest + extsize, '\0', alignedExtSize - extsize );
|
||||
}
|
||||
}
|
||||
AlignedWireRef < epicsUInt16 > ( pbufmsg->m_postsize ) = alignedExtSize;
|
||||
this->nBytesInXmitBuf += msgsize;
|
||||
|
||||
Reference in New Issue
Block a user