pvasr list client channels
This commit is contained in:
@@ -1470,6 +1470,15 @@ size_t BlockingServerTCPTransportCodec::getChannelCount() const {
|
||||
return _channels.size();
|
||||
}
|
||||
|
||||
void BlockingServerTCPTransportCodec::getChannels(std::vector<ServerChannel::shared_pointer>& channels) const
|
||||
{
|
||||
Lock lock(_channelsMutex);
|
||||
for(_channels_t::const_iterator it(_channels.begin()), end(_channels.end());
|
||||
it!=end; ++it)
|
||||
{
|
||||
channels.push_back(it->second);
|
||||
}
|
||||
}
|
||||
|
||||
void BlockingServerTCPTransportCodec::send(ByteBuffer* buffer,
|
||||
TransportSendControl* control) {
|
||||
|
||||
@@ -548,6 +548,8 @@ public:
|
||||
|
||||
virtual ServerChannel::shared_pointer getChannel(pvAccessID sid) OVERRIDE FINAL;
|
||||
|
||||
void getChannels(std::vector<ServerChannel::shared_pointer>& channels) const;
|
||||
|
||||
virtual size_t getChannelCount() const OVERRIDE FINAL;
|
||||
|
||||
virtual bool verify(epics::pvData::int32 timeoutMs) OVERRIDE FINAL {
|
||||
@@ -596,10 +598,11 @@ private:
|
||||
*/
|
||||
pvAccessID _lastChannelSID;
|
||||
|
||||
typedef std::map<pvAccessID, ServerChannel::shared_pointer> _channels_t;
|
||||
/**
|
||||
* Channel table (SID -> channel mapping).
|
||||
*/
|
||||
std::map<pvAccessID, ServerChannel::shared_pointer> _channels;
|
||||
_channels_t _channels;
|
||||
|
||||
mutable epics::pvData::Mutex _channelsMutex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user