multiChannel now allows an array of provider names
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
This document summarizes the changes to the module between releases.
|
||||
|
||||
## Release 4.8.0 (EPICS 7.0.4.* March 2021
|
||||
## Release 4.8.0 (EPICS 7.0.5.* March 2021)
|
||||
|
||||
* PvaClientNTMultiData::getChannelChangeFlags is a new method. It fixes issue #66.
|
||||
* Fix for issue #68. Both PvaClientArray and PvaClientField are not longer present. Neither was previously implemented.
|
||||
|
@ -66,14 +66,19 @@ public:
|
||||
* @param pvaClient The interface to pvaClient.
|
||||
* @param channelNames The names of the channel..
|
||||
* @param providerName The name of the provider.
|
||||
* This is also used for the provider for all channels
|
||||
* with providerNames.size less than channelNames.size()
|
||||
* @param maxNotConnected The maximum number of channels that can be disconnected.
|
||||
* @param providerNames The providerName for each Channells
|
||||
* @return The interface to the PvaClientMultiChannel
|
||||
*/
|
||||
static PvaClientMultiChannelPtr create(
|
||||
PvaClientPtr const &pvaClient,
|
||||
epics::pvData::shared_vector<const std::string> const & channelNames,
|
||||
std::string const & providerName = "pva",
|
||||
size_t maxNotConnected=0
|
||||
size_t maxNotConnected=0,
|
||||
epics::pvData::shared_vector<const std::string> const & providerNames
|
||||
= epics::pvData::shared_vector<const std::string>()
|
||||
);
|
||||
/**
|
||||
* @brief Destructor
|
||||
@ -150,15 +155,18 @@ private:
|
||||
PvaClientPtr const &pvaClient,
|
||||
epics::pvData::shared_vector<const std::string> const & channelNames,
|
||||
std::string const & providerName,
|
||||
size_t maxNotConnected);
|
||||
size_t maxNotConnected,
|
||||
epics::pvData::shared_vector<const std::string> const & providerNames);
|
||||
void checkConnected();
|
||||
|
||||
PvaClientPtr pvaClient;
|
||||
epics::pvData::shared_vector<const std::string> channelNames;
|
||||
std::string providerName;
|
||||
size_t maxNotConnected;
|
||||
epics::pvData::shared_vector<const std::string> const & providerNames;
|
||||
|
||||
size_t numChannel;
|
||||
size_t numProviderNames;
|
||||
epics::pvData::Mutex mutex;
|
||||
|
||||
size_t numConnected;
|
||||
|
@ -30,10 +30,12 @@ PvaClientMultiChannelPtr PvaClientMultiChannel::create(
|
||||
PvaClientPtr const &pvaClient,
|
||||
shared_vector<const string> const & channelNames,
|
||||
string const & providerName,
|
||||
size_t maxNotConnected)
|
||||
size_t maxNotConnected,
|
||||
shared_vector<const string> const & providerNames)
|
||||
{
|
||||
return PvaClientMultiChannelPtr(
|
||||
new PvaClientMultiChannel(pvaClient,channelNames,providerName,maxNotConnected));
|
||||
new PvaClientMultiChannel(
|
||||
pvaClient,channelNames,providerName,maxNotConnected,providerNames));
|
||||
}
|
||||
|
||||
|
||||
@ -41,12 +43,15 @@ PvaClientMultiChannel::PvaClientMultiChannel(
|
||||
PvaClientPtr const &pvaClient,
|
||||
shared_vector<const string> const & channelNames,
|
||||
string const & providerName,
|
||||
size_t maxNotConnected)
|
||||
size_t maxNotConnected,
|
||||
shared_vector<const string> const & providerNames)
|
||||
: pvaClient(pvaClient),
|
||||
channelNames(channelNames),
|
||||
providerName(providerName),
|
||||
maxNotConnected(maxNotConnected),
|
||||
providerNames(providerNames),
|
||||
numChannel(channelNames.size()),
|
||||
numProviderNames(providerNames.size()),
|
||||
numConnected(0),
|
||||
firstConnect(true),
|
||||
pvaClientChannelArray(PvaClientChannelArray(numChannel,PvaClientChannelPtr())),
|
||||
@ -79,7 +84,11 @@ Status PvaClientMultiChannel::connect(double timeout)
|
||||
if(!firstConnect) return Status::Ok;
|
||||
firstConnect = false;
|
||||
for(size_t i=0; i< numChannel; ++i) {
|
||||
pvaClientChannelArray[i] = pvaClient->createChannel(channelNames[i],providerName);
|
||||
if(numProviderNames<=i) {
|
||||
pvaClientChannelArray[i] = pvaClient->createChannel(channelNames[i],providerName);
|
||||
} else {
|
||||
pvaClientChannelArray[i] = pvaClient->createChannel(channelNames[i],providerNames[i]);
|
||||
}
|
||||
pvaClientChannelArray[i]->issueConnect();
|
||||
}
|
||||
Status returnStatus = Status::Ok;
|
||||
|
Reference in New Issue
Block a user