blob: 3cdf42b8acbe906b61a13ebdbcbe0568163be751 [file] [log] [blame]
Andrew Geissler7264d902019-02-27 09:46:40 -06001#include "src/associations.hpp"
2
3#include <iostream>
4
5// Some debug functions for dumping out the main data structures in objmgr
6
Brad Bishopa098a372022-05-05 15:19:04 -04007void dumpAssociationOwnersType(AssociationOwnersType& assocOwners)
Andrew Geissler7264d902019-02-27 09:46:40 -06008{
9 using namespace std;
10 cout << "##### AssociationOwnersType #####" << endl;
11 for (auto i : assocOwners)
12 {
13 cout << "------------------------------------" << endl;
14 cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
15
16 for (auto j : i.second)
17 {
18 cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl;
19
20 for (auto k : j.second)
21 {
22 cout << setw(17) << left << "ASSOC PATH:" << k.first << endl;
23
24 for (auto l : k.second)
25 {
26 cout << setw(18) << left << "ENDPOINT:" << l << endl;
27 }
28 }
29 }
30 cout << "------------------------------------" << endl;
31 }
32}
33
Brad Bishopa098a372022-05-05 15:19:04 -040034void dumpAssociationInterfaces(AssociationInterfaces& assocInterfaces)
Andrew Geissler7264d902019-02-27 09:46:40 -060035{
36 using namespace std;
37 cout << "##### AssociationInterfaces #####" << endl;
38 for (auto i : assocInterfaces)
39 {
40 cout << "------------------------------------" << endl;
41 cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
42 auto intfEndpoints = std::get<endpointsPos>(i.second);
43
44 for (auto k : intfEndpoints)
45 {
46 cout << setw(16) << left << "ENDPOINTS:" << k << endl;
47 }
48 cout << "------------------------------------" << endl;
49 }
50}
51
Brad Bishopa098a372022-05-05 15:19:04 -040052void dumpInterfaceMapType(InterfaceMapType& intfMap)
Andrew Geissler7264d902019-02-27 09:46:40 -060053{
54 using namespace std;
Brad Bishopa098a372022-05-05 15:19:04 -040055 cout << "##### interfaceMapType #####" << endl;
Andrew Geissler7264d902019-02-27 09:46:40 -060056 for (auto i : intfMap)
57 {
58 cout << "------------------------------------" << endl;
59 cout << setw(15) << left << "OBJ PATH:" << i.first << endl;
60
61 for (auto j : i.second)
62 {
63 cout << setw(16) << left << "DBUS SERVICE:" << j.first << endl;
64
65 for (auto k : j.second)
66 {
67 cout << setw(18) << left << "INTERFACE:" << k << endl;
68 }
69 }
70 }
71 cout << "------------------------------------" << endl;
72}