Skip to content

Commit 9cfcce3

Browse files
committed
Address review comments
1 parent 4df9d3d commit 9cfcce3

File tree

8 files changed

+10
-1329
lines changed

8 files changed

+10
-1329
lines changed

examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter

-354
Large diffs are not rendered by default.

examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.zap

+10-633
Large diffs are not rendered by default.

examples/fabric-bridge-app/linux/ActionsServerCallbacks.cpp

-137
This file was deleted.

examples/fabric-bridge-app/linux/BUILD.gn

-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@ assert(chip_build_tools)
2121
executable("fabric-bridge-app") {
2222
sources = [
2323
"${chip_root}/examples/fabric-bridge-app/fabric-bridge-common/include/CHIPProjectAppConfig.h",
24-
"${chip_root}/examples/fabric-bridge-app/linux/ActionsServerCallbacks.cpp",
2524
"Device.cpp",
2625
"include/Device.h",
27-
"include/main.h",
2826
"main.cpp",
2927
]
3028

examples/fabric-bridge-app/linux/Device.cpp

-55
Original file line numberDiff line numberDiff line change
@@ -72,58 +72,3 @@ void Device::SetName(const char * szName)
7272
HandleDeviceChange(this, kChanged_Name);
7373
}
7474
}
75-
76-
void Device::SetLocation(std::string szLocation)
77-
{
78-
bool changed = (mLocation.compare(szLocation) != 0);
79-
80-
mLocation = szLocation;
81-
82-
ChipLogProgress(DeviceLayer, "Device[%s]: Location=\"%s\"", mName, mLocation.c_str());
83-
84-
if (changed)
85-
{
86-
HandleDeviceChange(this, kChanged_Location);
87-
}
88-
}
89-
90-
EndpointListInfo::EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type)
91-
{
92-
mEndpointListId = endpointListId;
93-
mName = name;
94-
mType = type;
95-
}
96-
97-
EndpointListInfo::EndpointListInfo(uint16_t endpointListId, std::string name, EndpointListTypeEnum type,
98-
chip::EndpointId endpointId)
99-
{
100-
mEndpointListId = endpointListId;
101-
mName = name;
102-
mType = type;
103-
mEndpoints.push_back(endpointId);
104-
}
105-
106-
void EndpointListInfo::AddEndpointId(chip::EndpointId endpointId)
107-
{
108-
mEndpoints.push_back(endpointId);
109-
}
110-
111-
Room::Room(std::string name, uint16_t endpointListId, EndpointListTypeEnum type, bool isVisible)
112-
{
113-
mName = name;
114-
mEndpointListId = endpointListId;
115-
mType = type;
116-
mIsVisible = isVisible;
117-
}
118-
119-
Action::Action(uint16_t actionId, std::string name, ActionTypeEnum type, uint16_t endpointListId, uint16_t supportedCommands,
120-
ActionStateEnum status, bool isVisible)
121-
{
122-
mActionId = actionId;
123-
mName = name;
124-
mType = type;
125-
mEndpointListId = endpointListId;
126-
mSupportedCommands = supportedCommands;
127-
mStatus = status;
128-
mIsVisible = isVisible;
129-
}

examples/fabric-bridge-app/linux/include/Device.h

-63
Original file line numberDiff line numberDiff line change
@@ -67,66 +67,3 @@ class Device
6767
chip::EndpointId mParentEndpointId;
6868
std::string mZone;
6969
};
70-
71-
class EndpointListInfo
72-
{
73-
public:
74-
EndpointListInfo(uint16_t endpointListId, std::string name, chip::app::Clusters::Actions::EndpointListTypeEnum type);
75-
EndpointListInfo(uint16_t endpointListId, std::string name, chip::app::Clusters::Actions::EndpointListTypeEnum type,
76-
chip::EndpointId endpointId);
77-
void AddEndpointId(chip::EndpointId endpointId);
78-
inline uint16_t GetEndpointListId() { return mEndpointListId; };
79-
std::string GetName() { return mName; };
80-
inline chip::app::Clusters::Actions::EndpointListTypeEnum GetType() { return mType; };
81-
inline chip::EndpointId * GetEndpointListData() { return mEndpoints.data(); };
82-
inline size_t GetEndpointListSize() { return mEndpoints.size(); };
83-
84-
private:
85-
uint16_t mEndpointListId = static_cast<uint16_t>(0);
86-
std::string mName;
87-
chip::app::Clusters::Actions::EndpointListTypeEnum mType = static_cast<chip::app::Clusters::Actions::EndpointListTypeEnum>(0);
88-
std::vector<chip::EndpointId> mEndpoints;
89-
};
90-
91-
class Room
92-
{
93-
public:
94-
Room(std::string name, uint16_t endpointListId, chip::app::Clusters::Actions::EndpointListTypeEnum type, bool isVisible);
95-
inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; };
96-
inline bool getIsVisible() { return mIsVisible; };
97-
inline void setName(std::string name) { mName = name; };
98-
inline std::string getName() { return mName; };
99-
inline chip::app::Clusters::Actions::EndpointListTypeEnum getType() { return mType; };
100-
inline uint16_t getEndpointListId() { return mEndpointListId; };
101-
102-
private:
103-
bool mIsVisible;
104-
std::string mName;
105-
uint16_t mEndpointListId;
106-
chip::app::Clusters::Actions::EndpointListTypeEnum mType;
107-
};
108-
109-
class Action
110-
{
111-
public:
112-
Action(uint16_t actionId, std::string name, chip::app::Clusters::Actions::ActionTypeEnum type, uint16_t endpointListId,
113-
uint16_t supportedCommands, chip::app::Clusters::Actions::ActionStateEnum status, bool isVisible);
114-
inline void setName(std::string name) { mName = name; };
115-
inline std::string getName() { return mName; };
116-
inline chip::app::Clusters::Actions::ActionTypeEnum getType() { return mType; };
117-
inline chip::app::Clusters::Actions::ActionStateEnum getStatus() { return mStatus; };
118-
inline uint16_t getActionId() { return mActionId; };
119-
inline uint16_t getEndpointListId() { return mEndpointListId; };
120-
inline uint16_t getSupportedCommands() { return mSupportedCommands; };
121-
inline void setIsVisible(bool isVisible) { mIsVisible = isVisible; };
122-
inline bool getIsVisible() { return mIsVisible; };
123-
124-
private:
125-
std::string mName;
126-
chip::app::Clusters::Actions::ActionTypeEnum mType;
127-
chip::app::Clusters::Actions::ActionStateEnum mStatus;
128-
uint16_t mActionId;
129-
uint16_t mEndpointListId;
130-
uint16_t mSupportedCommands;
131-
bool mIsVisible;
132-
};

examples/fabric-bridge-app/linux/include/main.h

-23
This file was deleted.

0 commit comments

Comments
 (0)