large array modifications

This commit is contained in:
Jeff Hill
2002-05-29 00:19:31 +00:00
parent 565a372df1
commit a08fc2c551
8 changed files with 86 additions and 49 deletions

View File

@@ -101,7 +101,7 @@ epicsTimerNotify::expireStatus
exPV::expire ( const epicsTime & /*currentTime*/ ) // X aCC 361
{
this->scan();
if ( this->scanOn ) {
if ( this->scanOn && this->getScanPeriod() > 0.0 ) {
return expireStatus ( restart, this->getScanPeriod() );
}
else {
@@ -130,7 +130,8 @@ caStatus exPV::interestRegister()
this->interest = true;
if ( this->scanOn && this->getScanPeriod() < this->timer.getExpireDelay() ) {
if ( this->scanOn && this->getScanPeriod() > 0.0 &&
this->getScanPeriod() < this->timer.getExpireDelay() ) {
this->timer.start ( *this, this->getScanPeriod() );
}

View File

@@ -190,7 +190,7 @@ caStatus exVectorPV::updateValue(smartConstGDDPointer pValueIn)
return S_casApp_outOfBounds;
}
aitFloat32 *pF;
aitFloat64 *pF;
int gddStatus;
//
@@ -214,7 +214,7 @@ caStatus exVectorPV::updateValue(smartConstGDDPointer pValueIn)
//
// allocate array buffer
//
pF = new aitFloat32 [this->info.getElementCount()];
pF = new aitFloat64 [this->info.getElementCount()];
if (!pF) {
return S_casApp_noMemory;
}

View File

@@ -1,4 +1,6 @@
#include "envDefs.h"
#include "exServer.h"
#include "fdManager.h"
@@ -15,12 +17,13 @@ extern int main (int argc, const char **argv)
char pvPrefix[128] = "";
unsigned aliasCount = 1u;
unsigned scanOnAsUnsignedInt = true;
char arraySize[64] = "";
bool scanOn;
bool forever = true;
int i;
for (i=1; i<argc; i++) {
if (sscanf(argv[i], "-d\t%u", &debugLevel)==1) {
for ( i = 1; i < argc; i++ ) {
if (sscanf(argv[i], "-d %u", &debugLevel)==1) {
continue;
}
if (sscanf(argv[i],"-t %lf", &executionTime)==1) {
@@ -36,14 +39,23 @@ extern int main (int argc, const char **argv)
if (sscanf(argv[i],"-s %u", &scanOnAsUnsignedInt)==1) {
continue;
}
if (sscanf(argv[i],"-a %63s", arraySize)==1) {
continue;
}
printf ("\"%s\"?\n", argv[i]);
printf (
"usage: %s [-d<debug level> -t<execution time> -p<PV name prefix> -c<numbered alias count>] -s<1=scan on (default), 0=scan off]>\n",
"usage: %s [-d<debug level> -t<execution time> -p<PV name prefix> "
"-c<numbered alias count> -s<1=scan on (default), 0=scan off]> "
"-a<max array size>]\n",
argv[0]);
return (1);
}
if ( arraySize[0] != '\0' ) {
epicsEnvSet ( "EPICS_CA_MAX_ARRAY_BYTES", arraySize );
}
if (scanOnAsUnsignedInt) {
scanOn = true;
}