Skip to content

Commit d29749b

Browse files
authored
Revert "OTAServerDelegate class for vendor logic (project-chip#6476)" (project-chip#7534)
This reverts commit f9d5741.
1 parent 23f37bf commit d29749b

31 files changed

+229
-1838
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+12-97
Original file line numberDiff line numberDiff line change
@@ -1188,100 +1188,6 @@
11881188
}
11891189
]
11901190
},
1191-
{
1192-
"name": "OTA Software Update Server",
1193-
"code": 41,
1194-
"mfgCode": null,
1195-
"define": "OTA_SERVER_CLUSTER",
1196-
"side": "client",
1197-
"enabled": 0,
1198-
"commands": [
1199-
{
1200-
"name": "QueryImage",
1201-
"code": 0,
1202-
"mfgCode": null,
1203-
"source": "client",
1204-
"incoming": 1,
1205-
"outgoing": 1
1206-
},
1207-
{
1208-
"name": "ApplyUpdateRequest",
1209-
"code": 1,
1210-
"mfgCode": null,
1211-
"source": "client",
1212-
"incoming": 1,
1213-
"outgoing": 1
1214-
},
1215-
{
1216-
"name": "NotifyUpdateApplied",
1217-
"code": 2,
1218-
"mfgCode": null,
1219-
"source": "client",
1220-
"incoming": 1,
1221-
"outgoing": 1
1222-
}
1223-
],
1224-
"attributes": [
1225-
{
1226-
"name": "cluster revision",
1227-
"code": 65533,
1228-
"mfgCode": null,
1229-
"side": "client",
1230-
"included": 1,
1231-
"storageOption": "RAM",
1232-
"singleton": 0,
1233-
"bounded": 0,
1234-
"defaultValue": "0x0001",
1235-
"reportable": 0,
1236-
"minInterval": 0,
1237-
"maxInterval": 65344,
1238-
"reportableChange": 0
1239-
}
1240-
]
1241-
},
1242-
{
1243-
"name": "OTA Software Update Server",
1244-
"code": 41,
1245-
"mfgCode": null,
1246-
"define": "OTA_SERVER_CLUSTER",
1247-
"side": "server",
1248-
"enabled": 1,
1249-
"commands": [
1250-
{
1251-
"name": "QueryImageResponse",
1252-
"code": 3,
1253-
"mfgCode": null,
1254-
"source": "server",
1255-
"incoming": 1,
1256-
"outgoing": 1
1257-
},
1258-
{
1259-
"name": "ApplyUpdateRequestResponse",
1260-
"code": 4,
1261-
"mfgCode": null,
1262-
"source": "server",
1263-
"incoming": 1,
1264-
"outgoing": 1
1265-
}
1266-
],
1267-
"attributes": [
1268-
{
1269-
"name": "cluster revision",
1270-
"code": 65533,
1271-
"mfgCode": null,
1272-
"side": "server",
1273-
"included": 1,
1274-
"storageOption": "RAM",
1275-
"singleton": 0,
1276-
"bounded": 0,
1277-
"defaultValue": "0x0001",
1278-
"reportable": 1,
1279-
"minInterval": 0,
1280-
"maxInterval": 65344,
1281-
"reportableChange": 0
1282-
}
1283-
]
1284-
},
12851191
{
12861192
"name": "General Commissioning",
12871193
"code": 48,
@@ -7099,7 +7005,7 @@
70997005
"mfgCode": null,
71007006
"define": "OTA_SERVER_CLUSTER",
71017007
"side": "server",
7102-
"enabled": 0,
7008+
"enabled": 1,
71037009
"commands": [
71047010
{
71057011
"name": "QueryImageResponse",
@@ -7198,8 +7104,17 @@
71987104
"mfgCode": null,
71997105
"define": "OTA_CLIENT_CLUSTER",
72007106
"side": "server",
7201-
"enabled": 0,
7202-
"commands": [],
7107+
"enabled": 1,
7108+
"commands": [
7109+
{
7110+
"name": "AnnounceOtaServer",
7111+
"code": 0,
7112+
"mfgCode": null,
7113+
"source": "server",
7114+
"incoming": 0,
7115+
"outgoing": 1
7116+
}
7117+
],
72037118
"attributes": [
72047119
{
72057120
"name": "cluster revision",

examples/all-clusters-app/all-clusters-common/gen/callback-stub.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
110110
case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID:
111111
emberAfNetworkCommissioningClusterInitCallback(endpoint);
112112
break;
113+
case ZCL_OTA_CLIENT_CLUSTER_ID:
114+
emberAfOtaSoftwareUpdateClientClusterInitCallback(endpoint);
115+
break;
113116
case ZCL_OTA_SERVER_CLUSTER_ID:
114117
emberAfOtaSoftwareUpdateServerClusterInitCallback(endpoint);
115118
break;
@@ -308,6 +311,11 @@ void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(Endpoi
308311
// To prevent warning
309312
(void) endpoint;
310313
}
314+
void __attribute__((weak)) emberAfOtaSoftwareUpdateClientClusterInitCallback(EndpointId endpoint)
315+
{
316+
// To prevent warning
317+
(void) endpoint;
318+
}
311319
void __attribute__((weak)) emberAfOtaSoftwareUpdateServerClusterInitCallback(EndpointId endpoint)
312320
{
313321
// To prevent warning

examples/all-clusters-app/all-clusters-common/gen/callback.h

+79
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,14 @@ void emberAfMediaPlaybackClusterInitCallback(chip::EndpointId endpoint);
256256
*/
257257
void emberAfNetworkCommissioningClusterInitCallback(chip::EndpointId endpoint);
258258

259+
/** @brief OTA Software Update Client Cluster Init
260+
*
261+
* Cluster Init
262+
*
263+
* @param endpoint Endpoint that is being initialized
264+
*/
265+
void emberAfOtaSoftwareUpdateClientClusterInitCallback(chip::EndpointId endpoint);
266+
259267
/** @brief OTA Software Update Server Cluster Init
260268
*
261269
* Cluster Init
@@ -2295,6 +2303,77 @@ EmberAfStatus emberAfNetworkCommissioningClusterServerPreAttributeChangedCallbac
22952303
*/
22962304
void emberAfNetworkCommissioningClusterServerTickCallback(chip::EndpointId endpoint);
22972305

2306+
//
2307+
// OTA Software Update Client Cluster server
2308+
//
2309+
2310+
/** @brief OTA Software Update Client Cluster Server Init
2311+
*
2312+
* Server Init
2313+
*
2314+
* @param endpoint Endpoint that is being initialized
2315+
*/
2316+
void emberAfOtaSoftwareUpdateClientClusterServerInitCallback(chip::EndpointId endpoint);
2317+
2318+
/** @brief OTA Software Update Client Cluster Server Attribute Changed
2319+
*
2320+
* Server Attribute Changed
2321+
*
2322+
* @param endpoint Endpoint that is being initialized
2323+
* @param attributeId Attribute that changed
2324+
*/
2325+
void emberAfOtaSoftwareUpdateClientClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);
2326+
2327+
/** @brief OTA Software Update Client Cluster Server Manufacturer Specific Attribute Changed
2328+
*
2329+
* Server Manufacturer Specific Attribute Changed
2330+
*
2331+
* @param endpoint Endpoint that is being initialized
2332+
* @param attributeId Attribute that changed
2333+
* @param manufacturerCode Manufacturer Code of the attribute that changed
2334+
*/
2335+
void emberAfOtaSoftwareUpdateClientClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
2336+
chip::AttributeId attributeId,
2337+
uint16_t manufacturerCode);
2338+
2339+
/** @brief OTA Software Update Client Cluster Server Message Sent
2340+
*
2341+
* Server Message Sent
2342+
*
2343+
* @param type The type of message sent
2344+
* @param destination The destination to which the message was sent
2345+
* @param apsFrame The APS frame for the message
2346+
* @param msgLen The length of the message
2347+
* @param message The message that was sent
2348+
* @param status The status of the sent message
2349+
*/
2350+
void emberAfOtaSoftwareUpdateClientClusterServerMessageSentCallback(const chip::MessageSendDestination & destination,
2351+
EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
2352+
EmberStatus status);
2353+
2354+
/** @brief OTA Software Update Client Cluster Server Pre Attribute Changed
2355+
*
2356+
* server Pre Attribute Changed
2357+
*
2358+
* @param endpoint Endpoint that is being initialized
2359+
* @param attributeId Attribute to be changed
2360+
* @param attributeType Attribute type
2361+
* @param size Attribute size
2362+
* @param value Attribute value
2363+
*/
2364+
EmberAfStatus emberAfOtaSoftwareUpdateClientClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint,
2365+
chip::AttributeId attributeId,
2366+
EmberAfAttributeType attributeType,
2367+
uint16_t size, uint8_t * value);
2368+
2369+
/** @brief OTA Software Update Client Cluster Server Tick
2370+
*
2371+
* server Tick
2372+
*
2373+
* @param endpoint Endpoint that is being served
2374+
*/
2375+
void emberAfOtaSoftwareUpdateClientClusterServerTickCallback(chip::EndpointId endpoint);
2376+
22982377
//
22992378
// OTA Software Update Server Cluster server
23002379
//

0 commit comments

Comments
 (0)