Skip to content

Commit

Permalink
feat: Add Device::GetNumSubChannels(channel)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbx committed Nov 3, 2021
1 parent 0eaea3c commit a3bb5fb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fairmq/Device.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,14 @@ class Device
throw;
}

size_t GetNumSubChannels(const std::string& channelName)
try {
return fChannels.at(channelName).size();
} catch (const std::out_of_range& oor) {
LOG(error) << "GetNumSubChannels(): '" << channelName << "' does not exist.";
throw;
}

/// @brief Get numbers of connected peers for the given channel
/// @param name channel name
/// @param index sub-channel
Expand Down

0 comments on commit a3bb5fb

Please sign in to comment.