Skip to content

Commit

Permalink
Revert "OTAServerDelegate class for vendor logic (#6476)" (#7534)
Browse files Browse the repository at this point in the history
This reverts commit f9d5741.
  • Loading branch information
woody-apple authored Jun 10, 2021
1 parent 23f37bf commit d29749b
Show file tree
Hide file tree
Showing 31 changed files with 229 additions and 1,838 deletions.
109 changes: 12 additions & 97 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1188,100 +1188,6 @@
}
]
},
{
"name": "OTA Software Update Server",
"code": 41,
"mfgCode": null,
"define": "OTA_SERVER_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "QueryImage",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "ApplyUpdateRequest",
"code": 1,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
},
{
"name": "NotifyUpdateApplied",
"code": 2,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
{
"name": "cluster revision",
"code": 65533,
"mfgCode": null,
"side": "client",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0001",
"reportable": 0,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "OTA Software Update Server",
"code": 41,
"mfgCode": null,
"define": "OTA_SERVER_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "QueryImageResponse",
"code": 3,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 1
},
{
"name": "ApplyUpdateRequestResponse",
"code": 4,
"mfgCode": null,
"source": "server",
"incoming": 1,
"outgoing": 1
}
],
"attributes": [
{
"name": "cluster revision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0001",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "General Commissioning",
"code": 48,
Expand Down Expand Up @@ -7099,7 +7005,7 @@
"mfgCode": null,
"define": "OTA_SERVER_CLUSTER",
"side": "server",
"enabled": 0,
"enabled": 1,
"commands": [
{
"name": "QueryImageResponse",
Expand Down Expand Up @@ -7198,8 +7104,17 @@
"mfgCode": null,
"define": "OTA_CLIENT_CLUSTER",
"side": "server",
"enabled": 0,
"commands": [],
"enabled": 1,
"commands": [
{
"name": "AnnounceOtaServer",
"code": 0,
"mfgCode": null,
"source": "server",
"incoming": 0,
"outgoing": 1
}
],
"attributes": [
{
"name": "cluster revision",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId)
case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID:
emberAfNetworkCommissioningClusterInitCallback(endpoint);
break;
case ZCL_OTA_CLIENT_CLUSTER_ID:
emberAfOtaSoftwareUpdateClientClusterInitCallback(endpoint);
break;
case ZCL_OTA_SERVER_CLUSTER_ID:
emberAfOtaSoftwareUpdateServerClusterInitCallback(endpoint);
break;
Expand Down Expand Up @@ -308,6 +311,11 @@ void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(Endpoi
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfOtaSoftwareUpdateClientClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
(void) endpoint;
}
void __attribute__((weak)) emberAfOtaSoftwareUpdateServerClusterInitCallback(EndpointId endpoint)
{
// To prevent warning
Expand Down
79 changes: 79 additions & 0 deletions examples/all-clusters-app/all-clusters-common/gen/callback.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,14 @@ void emberAfMediaPlaybackClusterInitCallback(chip::EndpointId endpoint);
*/
void emberAfNetworkCommissioningClusterInitCallback(chip::EndpointId endpoint);

/** @brief OTA Software Update Client Cluster Init
*
* Cluster Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAfOtaSoftwareUpdateClientClusterInitCallback(chip::EndpointId endpoint);

/** @brief OTA Software Update Server Cluster Init
*
* Cluster Init
Expand Down Expand Up @@ -2295,6 +2303,77 @@ EmberAfStatus emberAfNetworkCommissioningClusterServerPreAttributeChangedCallbac
*/
void emberAfNetworkCommissioningClusterServerTickCallback(chip::EndpointId endpoint);

//
// OTA Software Update Client Cluster server
//

/** @brief OTA Software Update Client Cluster Server Init
*
* Server Init
*
* @param endpoint Endpoint that is being initialized
*/
void emberAfOtaSoftwareUpdateClientClusterServerInitCallback(chip::EndpointId endpoint);

/** @brief OTA Software Update Client Cluster Server Attribute Changed
*
* Server Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute that changed
*/
void emberAfOtaSoftwareUpdateClientClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId);

/** @brief OTA Software Update Client Cluster Server Manufacturer Specific Attribute Changed
*
* Server Manufacturer Specific Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute that changed
* @param manufacturerCode Manufacturer Code of the attribute that changed
*/
void emberAfOtaSoftwareUpdateClientClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
uint16_t manufacturerCode);

/** @brief OTA Software Update Client Cluster Server Message Sent
*
* Server Message Sent
*
* @param type The type of message sent
* @param destination The destination to which the message was sent
* @param apsFrame The APS frame for the message
* @param msgLen The length of the message
* @param message The message that was sent
* @param status The status of the sent message
*/
void emberAfOtaSoftwareUpdateClientClusterServerMessageSentCallback(const chip::MessageSendDestination & destination,
EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message,
EmberStatus status);

/** @brief OTA Software Update Client Cluster Server Pre Attribute Changed
*
* server Pre Attribute Changed
*
* @param endpoint Endpoint that is being initialized
* @param attributeId Attribute to be changed
* @param attributeType Attribute type
* @param size Attribute size
* @param value Attribute value
*/
EmberAfStatus emberAfOtaSoftwareUpdateClientClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint,
chip::AttributeId attributeId,
EmberAfAttributeType attributeType,
uint16_t size, uint8_t * value);

/** @brief OTA Software Update Client Cluster Server Tick
*
* server Tick
*
* @param endpoint Endpoint that is being served
*/
void emberAfOtaSoftwareUpdateClientClusterServerTickCallback(chip::EndpointId endpoint);

//
// OTA Software Update Server Cluster server
//
Expand Down
Loading

0 comments on commit d29749b

Please sign in to comment.