20
20
21
21
#include < platform/CHIPDeviceLayer.h>
22
22
23
- #include " Device .h"
23
+ #include " BridgedDevice .h"
24
24
25
- class DeviceManager
25
+ class BridgedDeviceManager
26
26
{
27
27
public:
28
- DeviceManager () = default ;
28
+ BridgedDeviceManager () = default ;
29
29
30
30
/* *
31
- * @brief Initializes the DeviceManager .
31
+ * @brief Initializes the BridgedDeviceManager .
32
32
*
33
- * This function sets up the initial state of the DeviceManager , clearing
33
+ * This function sets up the initial state of the BridgedDeviceManager , clearing
34
34
* any existing devices and setting the starting dynamic endpoint ID.
35
35
*/
36
36
void Init ();
@@ -47,7 +47,7 @@ class DeviceManager
47
47
* @param parentEndpointId The parent endpoint ID. Defaults to an invalid endpoint ID.
48
48
* @return int The index of the dynamic endpoint if successful, -1 otherwise.
49
49
*/
50
- int AddDeviceEndpoint (Device * dev, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId );
50
+ int AddDeviceEndpoint (BridgedDevice * dev, chip::EndpointId parentEndpointId = chip::kInvalidEndpointId );
51
51
52
52
/* *
53
53
* @brief Removes a device from a dynamic endpoint.
@@ -60,7 +60,7 @@ class DeviceManager
60
60
* @param dev A pointer to the device to be removed.
61
61
* @return int The index of the removed dynamic endpoint if successful, -1 otherwise.
62
62
*/
63
- int RemoveDeviceEndpoint (Device * dev);
63
+ int RemoveDeviceEndpoint (BridgedDevice * dev);
64
64
65
65
/* *
66
66
* @brief Gets a device from its endpoint ID.
@@ -69,9 +69,9 @@ class DeviceManager
69
69
* specified endpoint ID. If no device matches the endpoint ID, it returns nullptr.
70
70
*
71
71
* @param endpointId The endpoint ID of the device to be retrieved.
72
- * @return Device * A pointer to the device if found, nullptr otherwise.
72
+ * @return BridgedDevice * A pointer to the device if found, nullptr otherwise.
73
73
*/
74
- Device * GetDevice (chip::EndpointId endpointId) const ;
74
+ BridgedDevice * GetDevice (chip::EndpointId endpointId) const ;
75
75
76
76
/* *
77
77
* @brief Gets a device from its NodeId.
@@ -80,9 +80,9 @@ class DeviceManager
80
80
* specified NodeId. If no device matches the NodeId, it returns nullptr.
81
81
*
82
82
* @param nodeId The NodeId of the device to be retrieved.
83
- * @return Device * A pointer to the device if found, nullptr otherwise.
83
+ * @return BridgedDevice * A pointer to the device if found, nullptr otherwise.
84
84
*/
85
- Device * GetDeviceByNodeId (chip::NodeId nodeId) const ;
85
+ BridgedDevice * GetDeviceByNodeId (chip::NodeId nodeId) const ;
86
86
87
87
/* *
88
88
* @brief Removes a device from a dynamic endpoint by its NodeId.
@@ -98,22 +98,22 @@ class DeviceManager
98
98
int RemoveDeviceByNodeId (chip::NodeId nodeId);
99
99
100
100
private:
101
- friend DeviceManager & DeviceMgr ();
101
+ friend BridgedDeviceManager & BridgeDeviceMgr ();
102
102
103
- static DeviceManager sInstance ;
103
+ static BridgedDeviceManager sInstance ;
104
104
105
105
chip::EndpointId mCurrentEndpointId ;
106
106
chip::EndpointId mFirstDynamicEndpointId ;
107
- Device * mDevices [CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1 ];
107
+ BridgedDevice * mDevices [CHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT + 1 ];
108
108
};
109
109
110
110
/* *
111
- * Returns the public interface of the DeviceManager singleton object.
111
+ * Returns the public interface of the BridgedDeviceManager singleton object.
112
112
*
113
- * Applications should use this to access features of the DeviceManager
113
+ * Applications should use this to access features of the BridgedDeviceManager
114
114
* object.
115
115
*/
116
- inline DeviceManager & DeviceMgr ()
116
+ inline BridgedDeviceManager & BridgeDeviceMgr ()
117
117
{
118
- return DeviceManager ::sInstance ;
118
+ return BridgedDeviceManager ::sInstance ;
119
119
}
0 commit comments