μHAL (v2.7.9)
Part of the IPbus software repository
utilities.hpp
Go to the documentation of this file.
1 /*
2 ---------------------------------------------------------------------------
3 
4  This file is part of uHAL.
5 
6  uHAL is a hardware access library and programming framework
7  originally developed for upgrades of the Level-1 trigger of the CMS
8  experiment at CERN.
9 
10  uHAL is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  uHAL is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with uHAL. If not, see <http://www.gnu.org/licenses/>.
22 
23  Tom Williams, Rutherford Appleton Laboratory, Oxfordshire
24  email: tom.williams <AT> cern.ch
25 
26 ---------------------------------------------------------------------------
27 */
28 
29 
30 #ifndef _uhal_detail_utilities_hpp_
31 #define _uhal_detail_utilities_hpp_
32 
33 
34 #include <stdint.h>
35 #include <string>
36 #include <vector>
37 
38 
39 namespace uhal
40 {
41  class ClientInterface;
42  class Node;
43 
44  namespace detail
45  {
47  std::string getAddressDescription(const Node& aNode, const uint32_t aAddress, const size_t& aMaxListSize);
48 
50  std::string getAddressDescription(const ClientInterface& aClient, const uint32_t aAddress, const size_t& aMaxListSize);
51 
52  bool compareNodeAddr ( const Node* aNodeL, const Node* aNodeR );
53 
54  std::vector<std::pair<const Node*, const Node*> > getAddressOverlaps(const Node& aNode);
55 
56  void printNodeOverlapDescription(std::ostream& aStream, const Node& aNode1, const Node& aNode2);
57 
58  bool writeNodeOverlapReport(const std::string& aFilePath, const std::vector<std::pair<const Node*, const Node*> >& aNodes, const std::string& aHeader);
59 
60  }
61 }
62 
63 
64 #endif
uhal::detail::compareNodeAddr
bool compareNodeAddr(const Node *aNodeL, const Node *aNodeR)
Definition: utilities.cpp:115
uhal
Definition: HttpResponseGrammar.hpp:49
uhal::detail::getAddressOverlaps
std::vector< std::pair< const Node *, const Node * > > getAddressOverlaps(const Node &aNode)
Definition: utilities.cpp:121
uhal::detail::printNodeOverlapDescription
void printNodeOverlapDescription(std::ostream &aStream, const Node &aNode1, const Node &aNode2)
Definition: utilities.cpp:170
uhal::detail::writeNodeOverlapReport
bool writeNodeOverlapReport(const std::string &aFilePath, const std::vector< std::pair< const Node *, const Node * > > &aNodes, const std::string &aHeader)
Definition: utilities.cpp:198
uhal::detail::getAddressDescription
std::string getAddressDescription(const ClientInterface &, const uint32_t, const size_t &)
Generates a short string summarising which nodes match the specified address.
Definition: utilities.cpp:106