40#ifndef _uhal_ConnectionManager_hpp_
41#define _uhal_ConnectionManager_hpp_
46#include <unordered_map>
49#include <boost/filesystem/path.hpp>
74 UHAL_DEFINE_EXCEPTION_CLASS ( ConnectionUIDDoesNotExist , "Exception class to
handle the case where the UID requested does not exists in the map of connections." )
121 ConnectionManager (
const std::string& aFilenameExpr ,
const std::vector<std::string>& aUserClientActivationList );
139 std::vector<std::string> getDevices ( )
const;
146 std::vector<std::string> getDevices (
const std::string& aRegex )
const;
157 static HwInterface getDevice (
const std::string& aId ,
const std::string& aUri ,
const std::string& aAddressFileExpr );
159 static HwInterface getDevice (
const std::string& aId ,
const std::string& aUri ,
const std::string& aAddressFileExpr ,
const std::vector<std::string>& aUserClientActivationList );
162 static void clearAddressFileCache();
174 void CallBack (
const std::string& aProtocol ,
const boost::filesystem::path& aPath , std::vector<uint8_t>& aFile );
Wrapper to generate a new Python exception type.
\rst Holds a reference to a Python object (no reference counting)
A class to open and manage XML connection files and wrap up the interfaces to the NodeTreeBuilder and...
ConnectionManager(const ConnectionManager &)=delete
ConnectionManager & operator=(const ConnectionManager &)=delete
const std::vector< std::string > mUserClientActivationList
std::map< std::string, ConnectionDescriptor > mConnectionDescriptors
A map of connection identifiers to stucts containing details of the parsed XML node.
std::set< std::string > mPreviouslyOpenedFiles
A set of previously opened filenames, so that the same file is not parsed multiple times.
static std::mutex mMutex
A mutex lock to protect access to the factory methods in multithreaded environments.
A class which bundles a node tree and an IPbus client interface together providing everything you nee...
#define UHAL_DEFINE_EXCEPTION_CLASS(ClassName, ClassDescription)
bool operator==(const HashMe &lhs, const HashMe &rhs)
A struct to hold the fields of each entry in the XML connections file.
std::string id
An identifier for an individual.
boost::filesystem::path connection_file
The connection file which provided this entry.
std::string uri
The full uri for making the connection.
std::string address_table
The address table for building the node tree.