diff --git a/src/ca/dbdToPv.cpp b/src/ca/dbdToPv.cpp index 636dc5e..09f30f7 100644 --- a/src/ca/dbdToPv.cpp +++ b/src/ca/dbdToPv.cpp @@ -392,7 +392,7 @@ Status DbdToPv::getFromDBD( copy_DBRScalarArray(value,count,pvValue); break; case DBR_LONG: - copy_DBRScalarArray(value,count,pvValue); + copy_DBRScalarArray(value,count,pvValue); break; case DBR_FLOAT: copy_DBRScalarArray(value,count,pvValue); @@ -430,7 +430,7 @@ Status DbdToPv::getFromDBD( case DBR_STRING: copy_DBRScalar(value,pvValue); break; case DBR_CHAR: copy_DBRScalar(value,pvValue); break; case DBR_SHORT: copy_DBRScalar(value,pvValue); break; - case DBR_LONG: copy_DBRScalar(value,pvValue); break; + case DBR_LONG: copy_DBRScalar(value,pvValue); break; case DBR_FLOAT: copy_DBRScalar(value,pvValue); break; case DBR_DOUBLE: copy_DBRScalar(value,pvValue); break; default: diff --git a/testCa/testCaProvider.cpp b/testCa/testCaProvider.cpp index ff275d3..ec02e8b 100644 --- a/testCa/testCaProvider.cpp +++ b/testCa/testCaProvider.cpp @@ -573,6 +573,7 @@ private: TestClient(string const &channelName,PVStructurePtr const & pvRequest); string channelName; PVStructurePtr pvRequest; + string putValue; TestChannelPtr testChannel; TestChannelGetPtr testChannelGet; TestChannelPutPtr testChannelPut; @@ -611,8 +612,14 @@ void TestClient::getDone( testOk(pvStructure->getSubField("timeStamp").get() != 0,"timeStamp not null"); testOk(pvStructure->getSubField("alarm").get() != 0,"alarm not null"); if (DEBUG) std::cout << testChannel->getChannelName() + " TestClient::getDone" + << " putValue " << putValue << " bitSet " << *bitSet << " pvStructure\n" << pvStructure << "\n"; + PVScalarPtr pvScalar = pvStructure->getSubField("value"); + if(pvScalar) { + string getValue = getConvert()->toString(pvScalar); + testOk(getValue.compare(putValue)==0,"getValue==putValue"); + } waitForGet.signal(); } @@ -649,6 +656,7 @@ void TestClient::put(string const & value) { testDiag("TestClient::put %s := %s", testChannel->getChannelName().c_str(), value.c_str()); + putValue = value; testChannelPut->put(value); waitPut(OPERATION_TIMEOUT); } @@ -756,7 +764,7 @@ void checkClient(const string &channelName, const string &putValue) MAIN(testCaProvider) { - testPlan(84 + EXIT_TESTS); + testPlan(87 + EXIT_TESTS); TestIocPtr testIoc(new TestIoc()); testIoc->start(); @@ -766,10 +774,8 @@ MAIN(testCaProvider) ChannelProviderRegistry::shared_pointer reg(ChannelProviderRegistry::clients()); try { ChannelProvider::shared_pointer channelProvider(reg->getProvider("ca")); - if (!channelProvider) - testAbort("Channel provider 'ca' not registered"); - - checkClient("DBRlongout", "5"); + if (!channelProvider) testAbort("Channel provider 'ca' not registered"); + checkClient("DBRlongout", "32768"); checkClient("DBRdoubleout", "1.5"); checkClient("DBRstringout", "test"); checkClient("DBRbyteArray", "1 2 3");