From 8cc17bd593fc18e96e07ca26300431403dabbb01 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 4 May 2021 18:08:50 +0200 Subject: [PATCH] Remove endpoint 5 on the tv-app as it creates some random ZAP behavior (#6447) --- .../tv-common/gen/IMClusterCommandHandler.cpp | 4505 +---------------- .../tv-app/tv-common/gen/attribute-size.cpp | 65 - .../tv-common/gen/call-command-handler.cpp | 1325 +---- .../tv-app/tv-common/gen/callback-stub.cpp | 56 - examples/tv-app/tv-common/gen/callback.h | 1259 +---- .../tv-app/tv-common/gen/endpoint_config.h | 540 +- examples/tv-app/tv-common/gen/gen_config.h | 62 +- examples/tv-app/tv-common/tv-app.zap | 3581 +------------ 8 files changed, 540 insertions(+), 10853 deletions(-) diff --git a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp index 55d9dba3be7e88..5534388176fb7f 100644 --- a/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp +++ b/examples/tv-app/tv-common/gen/IMClusterCommandHandler.cpp @@ -489,27 +489,23 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // namespace AudioOutput -namespace Binding { +namespace ContentLaunch { void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) { { switch (aCommandId) { - case ZCL_BIND_COMMAND_ID: { + case ZCL_LAUNCH_CONTENT_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - chip::NodeId nodeId; - bool nodeIdExists = false; - chip::GroupId groupId; - bool groupIdExists = false; - chip::EndpointId endpointId; - bool endpointIdExists = false; - chip::ClusterId clusterId; - bool clusterIdExists = false; + uint8_t autoPlay; + bool autoPlayExists = false; + const uint8_t * data; + bool dataExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -517,58 +513,31 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (nodeIdExists) + if (autoPlayExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(nodeId); + TLVUnpackError = aDataTlv.Get(autoPlay); if (CHIP_NO_ERROR == TLVUnpackError) { - nodeIdExists = true; + autoPlayExists = true; validArgumentCount++; } break; case 1: - if (groupIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(groupId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - groupIdExists = true; - validArgumentCount++; - } - break; - case 2: - if (endpointIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(endpointId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - endpointIdExists = true; - validArgumentCount++; - } - break; - case 3: - if (clusterIdExists) + if (dataExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(clusterId); + // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. + TLVUnpackError = aDataTlv.GetDataPtr(data); if (CHIP_NO_ERROR == TLVUnpackError) { - clusterIdExists = true; + dataExists = true; validArgumentCount++; } break; @@ -596,10 +565,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfBindingClusterBindCallback(apCommandObj, nodeId, groupId, endpointId, clusterId); + emberAfContentLaunchClusterLaunchContentCallback(apCommandObj, autoPlay, const_cast(data)); } else { @@ -607,24 +576,20 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); + 2, validArgumentCount, TLVError, TLVUnpackError); } break; } - case ZCL_UNBIND_COMMAND_ID: { + case ZCL_LAUNCH_URL_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - chip::NodeId nodeId; - bool nodeIdExists = false; - chip::GroupId groupId; - bool groupIdExists = false; - chip::EndpointId endpointId; - bool endpointIdExists = false; - chip::ClusterId clusterId; - bool clusterIdExists = false; + const uint8_t * contentURL; + bool contentURLExists = false; + const uint8_t * displayString; + bool displayStringExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -632,58 +597,32 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (nodeIdExists) + if (contentURLExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(nodeId); + // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. + TLVUnpackError = aDataTlv.GetDataPtr(contentURL); if (CHIP_NO_ERROR == TLVUnpackError) { - nodeIdExists = true; + contentURLExists = true; validArgumentCount++; } break; case 1: - if (groupIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(groupId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - groupIdExists = true; - validArgumentCount++; - } - break; - case 2: - if (endpointIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(endpointId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - endpointIdExists = true; - validArgumentCount++; - } - break; - case 3: - if (clusterIdExists) + if (displayStringExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(clusterId); + // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. + TLVUnpackError = aDataTlv.GetDataPtr(displayString); if (CHIP_NO_ERROR == TLVUnpackError) { - clusterIdExists = true; + displayStringExists = true; validArgumentCount++; } break; @@ -711,10 +650,11 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfBindingClusterUnbindCallback(apCommandObj, nodeId, groupId, endpointId, clusterId); + emberAfContentLaunchClusterLaunchURLCallback(apCommandObj, const_cast(contentURL), + const_cast(displayString)); } else { @@ -722,7 +662,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); + 2, validArgumentCount, TLVError, TLVUnpackError); } break; } @@ -730,40 +670,34 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En // Unrecognized command ID, error status will apply. apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_BINDING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_CONTENT_LAUNCH_CLUSTER_ID); break; } } } } -} // namespace Binding +} // namespace ContentLaunch -namespace ColorControl { +namespace GeneralCommissioning { void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) { { switch (aCommandId) { - case ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID: { + case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t moveMode; - bool moveModeExists = false; - uint16_t rate; - bool rateExists = false; - uint16_t colorTemperatureMinimum; - bool colorTemperatureMinimumExists = false; - uint16_t colorTemperatureMaximum; - bool colorTemperatureMaximumExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; + uint16_t expiryLengthSeconds; + bool expiryLengthSecondsExists = false; + uint64_t breadcrumb; + bool breadcrumbExists = false; + uint32_t timeoutMs; + bool timeoutMsExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -771,86 +705,44 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (moveModeExists) + if (expiryLengthSecondsExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(moveMode); + TLVUnpackError = aDataTlv.Get(expiryLengthSeconds); if (CHIP_NO_ERROR == TLVUnpackError) { - moveModeExists = true; + expiryLengthSecondsExists = true; validArgumentCount++; } break; case 1: - if (rateExists) + if (breadcrumbExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(rate); + TLVUnpackError = aDataTlv.Get(breadcrumb); if (CHIP_NO_ERROR == TLVUnpackError) { - rateExists = true; + breadcrumbExists = true; validArgumentCount++; } break; case 2: - if (colorTemperatureMinimumExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(colorTemperatureMinimum); - if (CHIP_NO_ERROR == TLVUnpackError) - { - colorTemperatureMinimumExists = true; - validArgumentCount++; - } - break; - case 3: - if (colorTemperatureMaximumExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(colorTemperatureMaximum); - if (CHIP_NO_ERROR == TLVUnpackError) - { - colorTemperatureMaximumExists = true; - validArgumentCount++; - } - break; - case 4: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 5: - if (optionsOverrideExists) + if (timeoutMsExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(optionsOverride); + TLVUnpackError = aDataTlv.Get(timeoutMs); if (CHIP_NO_ERROR == TLVUnpackError) { - optionsOverrideExists = true; + timeoutMsExists = true; validArgumentCount++; } break; @@ -878,11 +770,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 6 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveColorTemperatureCallback(apCommandObj, moveMode, rate, colorTemperatureMinimum, - colorTemperatureMaximum, optionsMask, optionsOverride); + emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, expiryLengthSeconds, breadcrumb, timeoutMs); } else { @@ -890,24 +781,30 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 6, validArgumentCount, TLVError, TLVUnpackError); + 3, validArgumentCount, TLVError, TLVUnpackError); } break; } - case ZCL_MOVE_HUE_COMMAND_ID: { + case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); + break; + } + case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t moveMode; - bool moveModeExists = false; - uint8_t rate; - bool rateExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; + uint8_t location; + bool locationExists = false; + const uint8_t * countryCode; + bool countryCodeExists = false; + uint64_t breadcrumb; + bool breadcrumbExists = false; + uint32_t timeoutMs; + bool timeoutMsExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -915,58 +812,59 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (moveModeExists) + if (locationExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(moveMode); + TLVUnpackError = aDataTlv.Get(location); if (CHIP_NO_ERROR == TLVUnpackError) { - moveModeExists = true; + locationExists = true; validArgumentCount++; } break; case 1: - if (rateExists) + if (countryCodeExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(rate); + // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. + TLVUnpackError = aDataTlv.GetDataPtr(countryCode); if (CHIP_NO_ERROR == TLVUnpackError) { - rateExists = true; + countryCodeExists = true; validArgumentCount++; } break; case 2: - if (optionsMaskExists) + if (breadcrumbExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(optionsMask); + TLVUnpackError = aDataTlv.Get(breadcrumb); if (CHIP_NO_ERROR == TLVUnpackError) { - optionsMaskExists = true; + breadcrumbExists = true; validArgumentCount++; } break; case 3: - if (optionsOverrideExists) + if (timeoutMsExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(optionsOverride); + TLVUnpackError = aDataTlv.Get(timeoutMs); if (CHIP_NO_ERROR == TLVUnpackError) { - optionsOverrideExists = true; + timeoutMsExists = true; validArgumentCount++; } break; @@ -997,7 +895,8 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveHueCallback(apCommandObj, moveMode, rate, optionsMask, optionsOverride); + emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback( + apCommandObj, location, const_cast(countryCode), breadcrumb, timeoutMs); } else { @@ -1009,20 +908,34 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_MOVE_SATURATION_COMMAND_ID: { + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, + Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); + break; + } + } + } +} + +} // namespace GeneralCommissioning + +namespace KeypadInput { + +void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) +{ + { + switch (aCommandId) + { + case ZCL_SEND_KEY_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t moveMode; - bool moveModeExists = false; - uint8_t rate; - bool rateExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; + uint8_t keyCode; + bool keyCodeExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -1030,58 +943,16 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (moveModeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(moveMode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - moveModeExists = true; - validArgumentCount++; - } - break; - case 1: - if (rateExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(rate); - if (CHIP_NO_ERROR == TLVUnpackError) - { - rateExists = true; - validArgumentCount++; - } - break; - case 2: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsOverrideExists) + if (keyCodeExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(optionsOverride); + TLVUnpackError = aDataTlv.Get(keyCode); if (CHIP_NO_ERROR == TLVUnpackError) { - optionsOverrideExists = true; + keyCodeExists = true; validArgumentCount++; } break; @@ -1109,10 +980,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveSaturationCallback(apCommandObj, moveMode, rate, optionsMask, optionsOverride); + emberAfKeypadInputClusterSendKeyCallback(apCommandObj, keyCode); } else { @@ -1120,3844 +991,72 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); + 1, validArgumentCount, TLVError, TLVUnpackError); } break; } - case ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t colorTemperature; - bool colorTemperatureExists = false; - uint16_t transitionTime; - bool transitionTimeExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, + Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_KEYPAD_INPUT_CLUSTER_ID); + break; + } + } + } +} - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (colorTemperatureExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(colorTemperature); - if (CHIP_NO_ERROR == TLVUnpackError) - { - colorTemperatureExists = true; - validArgumentCount++; - } - break; - case 1: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 2: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveToColorTemperatureCallback(apCommandObj, colorTemperature, transitionTime, - optionsMask, optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_MOVE_TO_HUE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t hue; - bool hueExists = false; - uint8_t direction; - bool directionExists = false; - uint16_t transitionTime; - bool transitionTimeExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (hueExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(hue); - if (CHIP_NO_ERROR == TLVUnpackError) - { - hueExists = true; - validArgumentCount++; - } - break; - case 1: - if (directionExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(direction); - if (CHIP_NO_ERROR == TLVUnpackError) - { - directionExists = true; - validArgumentCount++; - } - break; - case 2: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 4: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveToHueCallback(apCommandObj, hue, direction, transitionTime, optionsMask, - optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 5, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t hue; - bool hueExists = false; - uint8_t saturation; - bool saturationExists = false; - uint16_t transitionTime; - bool transitionTimeExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (hueExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(hue); - if (CHIP_NO_ERROR == TLVUnpackError) - { - hueExists = true; - validArgumentCount++; - } - break; - case 1: - if (saturationExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(saturation); - if (CHIP_NO_ERROR == TLVUnpackError) - { - saturationExists = true; - validArgumentCount++; - } - break; - case 2: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 4: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveToHueAndSaturationCallback(apCommandObj, hue, saturation, transitionTime, optionsMask, - optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 5, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_MOVE_TO_SATURATION_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t saturation; - bool saturationExists = false; - uint16_t transitionTime; - bool transitionTimeExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (saturationExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(saturation); - if (CHIP_NO_ERROR == TLVUnpackError) - { - saturationExists = true; - validArgumentCount++; - } - break; - case 1: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 2: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterMoveToSaturationCallback(apCommandObj, saturation, transitionTime, optionsMask, - optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_STEP_COLOR_TEMPERATURE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t stepMode; - bool stepModeExists = false; - uint16_t stepSize; - bool stepSizeExists = false; - uint16_t transitionTime; - bool transitionTimeExists = false; - uint16_t colorTemperatureMinimum; - bool colorTemperatureMinimumExists = false; - uint16_t colorTemperatureMaximum; - bool colorTemperatureMaximumExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (stepModeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(stepMode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - stepModeExists = true; - validArgumentCount++; - } - break; - case 1: - if (stepSizeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(stepSize); - if (CHIP_NO_ERROR == TLVUnpackError) - { - stepSizeExists = true; - validArgumentCount++; - } - break; - case 2: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (colorTemperatureMinimumExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(colorTemperatureMinimum); - if (CHIP_NO_ERROR == TLVUnpackError) - { - colorTemperatureMinimumExists = true; - validArgumentCount++; - } - break; - case 4: - if (colorTemperatureMaximumExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(colorTemperatureMaximum); - if (CHIP_NO_ERROR == TLVUnpackError) - { - colorTemperatureMaximumExists = true; - validArgumentCount++; - } - break; - case 5: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 6: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 7 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterStepColorTemperatureCallback(apCommandObj, stepMode, stepSize, transitionTime, - colorTemperatureMinimum, colorTemperatureMaximum, - optionsMask, optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 7, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_STEP_HUE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t stepMode; - bool stepModeExists = false; - uint8_t stepSize; - bool stepSizeExists = false; - uint8_t transitionTime; - bool transitionTimeExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (stepModeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(stepMode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - stepModeExists = true; - validArgumentCount++; - } - break; - case 1: - if (stepSizeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(stepSize); - if (CHIP_NO_ERROR == TLVUnpackError) - { - stepSizeExists = true; - validArgumentCount++; - } - break; - case 2: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 4: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterStepHueCallback(apCommandObj, stepMode, stepSize, transitionTime, optionsMask, - optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 5, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_STEP_SATURATION_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t stepMode; - bool stepModeExists = false; - uint8_t stepSize; - bool stepSizeExists = false; - uint8_t transitionTime; - bool transitionTimeExists = false; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (stepModeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(stepMode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - stepModeExists = true; - validArgumentCount++; - } - break; - case 1: - if (stepSizeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(stepSize); - if (CHIP_NO_ERROR == TLVUnpackError) - { - stepSizeExists = true; - validArgumentCount++; - } - break; - case 2: - if (transitionTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(transitionTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - transitionTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 4: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 5 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterStepSaturationCallback(apCommandObj, stepMode, stepSize, transitionTime, optionsMask, - optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 5, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_STOP_MOVE_STEP_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t optionsMask; - bool optionsMaskExists = false; - uint8_t optionsOverride; - bool optionsOverrideExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (optionsMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsMaskExists = true; - validArgumentCount++; - } - break; - case 1: - if (optionsOverrideExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(optionsOverride); - if (CHIP_NO_ERROR == TLVUnpackError) - { - optionsOverrideExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfColorControlClusterStopMoveStepCallback(apCommandObj, optionsMask, optionsOverride); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_COLOR_CONTROL_CLUSTER_ID); - break; - } - } - } -} - -} // namespace ColorControl - -namespace ContentLaunch { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_LAUNCH_CONTENT_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t autoPlay; - bool autoPlayExists = false; - const uint8_t * data; - bool dataExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (autoPlayExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(autoPlay); - if (CHIP_NO_ERROR == TLVUnpackError) - { - autoPlayExists = true; - validArgumentCount++; - } - break; - case 1: - if (dataExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(data); - if (CHIP_NO_ERROR == TLVUnpackError) - { - dataExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfContentLaunchClusterLaunchContentCallback(apCommandObj, autoPlay, const_cast(data)); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_LAUNCH_URL_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - const uint8_t * contentURL; - bool contentURLExists = false; - const uint8_t * displayString; - bool displayStringExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (contentURLExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(contentURL); - if (CHIP_NO_ERROR == TLVUnpackError) - { - contentURLExists = true; - validArgumentCount++; - } - break; - case 1: - if (displayStringExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(displayString); - if (CHIP_NO_ERROR == TLVUnpackError) - { - displayStringExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfContentLaunchClusterLaunchURLCallback(apCommandObj, const_cast(contentURL), - const_cast(displayString)); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_CONTENT_LAUNCH_CLUSTER_ID); - break; - } - } - } -} - -} // namespace ContentLaunch - -namespace DoorLock { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_CLEAR_ALL_PINS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearAllPinsCallback(apCommandObj); - break; - } - case ZCL_CLEAR_ALL_RFIDS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearAllRfidsCallback(apCommandObj); - break; - } - case ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearHolidayScheduleCallback(apCommandObj, scheduleId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_CLEAR_PIN_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearPinCallback(apCommandObj, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_CLEAR_RFID_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearRfidCallback(apCommandObj, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearWeekdayScheduleCallback(apCommandObj, scheduleId, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterClearYeardayScheduleCallback(apCommandObj, scheduleId, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetHolidayScheduleCallback(apCommandObj, scheduleId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_LOG_RECORD_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t logIndex; - bool logIndexExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (logIndexExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(logIndex); - if (CHIP_NO_ERROR == TLVUnpackError) - { - logIndexExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetLogRecordCallback(apCommandObj, logIndex); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_PIN_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetPinCallback(apCommandObj, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_RFID_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetRfidCallback(apCommandObj, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_USER_TYPE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetUserTypeCallback(apCommandObj, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetWeekdayScheduleCallback(apCommandObj, scheduleId, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint16_t userId; - bool userIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterGetYeardayScheduleCallback(apCommandObj, scheduleId, userId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint32_t localStartTime; - bool localStartTimeExists = false; - uint32_t localEndTime; - bool localEndTimeExists = false; - uint8_t operatingModeDuringHoliday; - bool operatingModeDuringHolidayExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (localStartTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(localStartTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - localStartTimeExists = true; - validArgumentCount++; - } - break; - case 2: - if (localEndTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(localEndTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - localEndTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (operatingModeDuringHolidayExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(operatingModeDuringHoliday); - if (CHIP_NO_ERROR == TLVUnpackError) - { - operatingModeDuringHolidayExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterSetHolidayScheduleCallback(apCommandObj, scheduleId, localStartTime, localEndTime, - operatingModeDuringHoliday); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SET_PIN_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint8_t userStatus; - bool userStatusExists = false; - uint8_t userType; - bool userTypeExists = false; - const uint8_t * pin; - bool pinExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userStatusExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userStatus); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userStatusExists = true; - validArgumentCount++; - } - break; - case 2: - if (userTypeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userType); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userTypeExists = true; - validArgumentCount++; - } - break; - case 3: - if (pinExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(pin); - if (CHIP_NO_ERROR == TLVUnpackError) - { - pinExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterSetPinCallback(apCommandObj, userId, userStatus, userType, const_cast(pin)); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SET_RFID_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint8_t userStatus; - bool userStatusExists = false; - uint8_t userType; - bool userTypeExists = false; - const uint8_t * id; - bool idExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userStatusExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userStatus); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userStatusExists = true; - validArgumentCount++; - } - break; - case 2: - if (userTypeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userType); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userTypeExists = true; - validArgumentCount++; - } - break; - case 3: - if (idExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(id); - if (CHIP_NO_ERROR == TLVUnpackError) - { - idExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterSetRfidCallback(apCommandObj, userId, userStatus, userType, const_cast(id)); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SET_USER_TYPE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t userId; - bool userIdExists = false; - uint8_t userType; - bool userTypeExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userTypeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userType); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userTypeExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterSetUserTypeCallback(apCommandObj, userId, userType); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint16_t userId; - bool userIdExists = false; - uint8_t daysMask; - bool daysMaskExists = false; - uint8_t startHour; - bool startHourExists = false; - uint8_t startMinute; - bool startMinuteExists = false; - uint8_t endHour; - bool endHourExists = false; - uint8_t endMinute; - bool endMinuteExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - case 2: - if (daysMaskExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(daysMask); - if (CHIP_NO_ERROR == TLVUnpackError) - { - daysMaskExists = true; - validArgumentCount++; - } - break; - case 3: - if (startHourExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(startHour); - if (CHIP_NO_ERROR == TLVUnpackError) - { - startHourExists = true; - validArgumentCount++; - } - break; - case 4: - if (startMinuteExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(startMinute); - if (CHIP_NO_ERROR == TLVUnpackError) - { - startMinuteExists = true; - validArgumentCount++; - } - break; - case 5: - if (endHourExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(endHour); - if (CHIP_NO_ERROR == TLVUnpackError) - { - endHourExists = true; - validArgumentCount++; - } - break; - case 6: - if (endMinuteExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(endMinute); - if (CHIP_NO_ERROR == TLVUnpackError) - { - endMinuteExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 7 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterSetWeekdayScheduleCallback(apCommandObj, scheduleId, userId, daysMask, startHour, startMinute, - endHour, endMinute); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 7, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t scheduleId; - bool scheduleIdExists = false; - uint16_t userId; - bool userIdExists = false; - uint32_t localStartTime; - bool localStartTimeExists = false; - uint32_t localEndTime; - bool localEndTimeExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (scheduleIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(scheduleId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - scheduleIdExists = true; - validArgumentCount++; - } - break; - case 1: - if (userIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(userId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - userIdExists = true; - validArgumentCount++; - } - break; - case 2: - if (localStartTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(localStartTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - localStartTimeExists = true; - validArgumentCount++; - } - break; - case 3: - if (localEndTimeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(localEndTime); - if (CHIP_NO_ERROR == TLVUnpackError) - { - localEndTimeExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterSetYeardayScheduleCallback(apCommandObj, scheduleId, userId, localStartTime, localEndTime); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t timeoutInSeconds; - bool timeoutInSecondsExists = false; - const uint8_t * pin; - bool pinExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (timeoutInSecondsExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(timeoutInSeconds); - if (CHIP_NO_ERROR == TLVUnpackError) - { - timeoutInSecondsExists = true; - validArgumentCount++; - } - break; - case 1: - if (pinExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(pin); - if (CHIP_NO_ERROR == TLVUnpackError) - { - pinExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfDoorLockClusterUnlockWithTimeoutCallback(apCommandObj, timeoutInSeconds, const_cast(pin)); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_DOOR_LOCK_CLUSTER_ID); - break; - } - } - } -} - -} // namespace DoorLock - -namespace GeneralCommissioning { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_ARM_FAIL_SAFE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint16_t expiryLengthSeconds; - bool expiryLengthSecondsExists = false; - uint64_t breadcrumb; - bool breadcrumbExists = false; - uint32_t timeoutMs; - bool timeoutMsExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (expiryLengthSecondsExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(expiryLengthSeconds); - if (CHIP_NO_ERROR == TLVUnpackError) - { - expiryLengthSecondsExists = true; - validArgumentCount++; - } - break; - case 1: - if (breadcrumbExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(breadcrumb); - if (CHIP_NO_ERROR == TLVUnpackError) - { - breadcrumbExists = true; - validArgumentCount++; - } - break; - case 2: - if (timeoutMsExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(timeoutMs); - if (CHIP_NO_ERROR == TLVUnpackError) - { - timeoutMsExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfGeneralCommissioningClusterArmFailSafeCallback(apCommandObj, expiryLengthSeconds, breadcrumb, timeoutMs); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 3, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_COMMISSIONING_COMPLETE_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfGeneralCommissioningClusterCommissioningCompleteCallback(apCommandObj); - break; - } - case ZCL_SET_REGULATORY_CONFIG_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t location; - bool locationExists = false; - const uint8_t * countryCode; - bool countryCodeExists = false; - uint64_t breadcrumb; - bool breadcrumbExists = false; - uint32_t timeoutMs; - bool timeoutMsExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (locationExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(location); - if (CHIP_NO_ERROR == TLVUnpackError) - { - locationExists = true; - validArgumentCount++; - } - break; - case 1: - if (countryCodeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(countryCode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - countryCodeExists = true; - validArgumentCount++; - } - break; - case 2: - if (breadcrumbExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(breadcrumb); - if (CHIP_NO_ERROR == TLVUnpackError) - { - breadcrumbExists = true; - validArgumentCount++; - } - break; - case 3: - if (timeoutMsExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(timeoutMs); - if (CHIP_NO_ERROR == TLVUnpackError) - { - timeoutMsExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 4 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback( - apCommandObj, location, const_cast(countryCode), breadcrumb, timeoutMs); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 4, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_GENERAL_COMMISSIONING_CLUSTER_ID); - break; - } - } - } -} - -} // namespace GeneralCommissioning - -namespace IasZone { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t enrollResponseCode; - bool enrollResponseCodeExists = false; - uint8_t zoneId; - bool zoneIdExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (enrollResponseCodeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(enrollResponseCode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - enrollResponseCodeExists = true; - validArgumentCount++; - } - break; - case 1: - if (zoneIdExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(zoneId); - if (CHIP_NO_ERROR == TLVUnpackError) - { - zoneIdExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfIasZoneClusterZoneEnrollResponseCallback(apCommandObj, enrollResponseCode, zoneId); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_IAS_ZONE_CLUSTER_ID); - break; - } - } - } -} - -} // namespace IasZone - -namespace KeypadInput { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_SEND_KEY_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t keyCode; - bool keyCodeExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (keyCodeExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(keyCode); - if (CHIP_NO_ERROR == TLVUnpackError) - { - keyCodeExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfKeypadInputClusterSendKeyCallback(apCommandObj, keyCode); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_KEYPAD_INPUT_CLUSTER_ID); - break; - } - } - } -} - -} // namespace KeypadInput - -namespace LowPower { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_SLEEP_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfLowPowerClusterSleepCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LOW_POWER_CLUSTER_ID); - break; - } - } - } -} - -} // namespace LowPower - -namespace MediaInput { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_HIDE_INPUT_STATUS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaInputClusterHideInputStatusCallback(apCommandObj); - break; - } - case ZCL_RENAME_INPUT_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t index; - bool indexExists = false; - const uint8_t * name; - bool nameExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (indexExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(index); - if (CHIP_NO_ERROR == TLVUnpackError) - { - indexExists = true; - validArgumentCount++; - } - break; - case 1: - if (nameExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. - TLVUnpackError = aDataTlv.GetDataPtr(name); - if (CHIP_NO_ERROR == TLVUnpackError) - { - nameExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaInputClusterRenameInputCallback(apCommandObj, index, const_cast(name)); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 2, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SELECT_INPUT_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint8_t index; - bool indexExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (indexExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(index); - if (CHIP_NO_ERROR == TLVUnpackError) - { - indexExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaInputClusterSelectInputCallback(apCommandObj, index); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_SHOW_INPUT_STATUS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaInputClusterShowInputStatusCallback(apCommandObj); - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_INPUT_CLUSTER_ID); - break; - } - } - } -} - -} // namespace MediaInput - -namespace MediaPlayback { - -void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) -{ - { - switch (aCommandId) - { - case ZCL_MEDIA_FAST_FORWARD_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaFastForwardCallback(apCommandObj); - break; - } - case ZCL_MEDIA_NEXT_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaNextCallback(apCommandObj); - break; - } - case ZCL_MEDIA_PAUSE_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaPauseCallback(apCommandObj); - break; - } - case ZCL_MEDIA_PLAY_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaPlayCallback(apCommandObj); - break; - } - case ZCL_MEDIA_PREVIOUS_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaPreviousCallback(apCommandObj); - break; - } - case ZCL_MEDIA_REWIND_COMMAND_ID: { - - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaRewindCallback(apCommandObj); - break; - } - case ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint64_t deltaPositionMilliseconds; - bool deltaPositionMillisecondsExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (deltaPositionMillisecondsExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(deltaPositionMilliseconds); - if (CHIP_NO_ERROR == TLVUnpackError) - { - deltaPositionMillisecondsExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaSkipBackwardCallback(apCommandObj, deltaPositionMilliseconds); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint64_t deltaPositionMilliseconds; - bool deltaPositionMillisecondsExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (deltaPositionMillisecondsExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(deltaPositionMilliseconds); - if (CHIP_NO_ERROR == TLVUnpackError) - { - deltaPositionMillisecondsExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } - - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaSkipForwardCallback(apCommandObj, deltaPositionMilliseconds); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_MEDIA_SKIP_SEEK_COMMAND_ID: { - // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV - // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. - // Any error value TLVUnpackError means we have received an illegal value. - CHIP_ERROR TLVError = CHIP_NO_ERROR; - CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint64_t position; - bool positionExists = false; - uint32_t validArgumentCount = 0; - - while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) - { - switch (TLV::TagNumFromTag(aDataTlv.GetTag())) - { - case 0: - if (positionExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(position); - if (CHIP_NO_ERROR == TLVUnpackError) - { - positionExists = true; - validArgumentCount++; - } - break; - default: - // Unsupported tag, ignore it. - ChipLogProgress(Zcl, "Unknown TLV tag during processing."); - break; - } - if (TLVUnpackError != CHIP_NO_ERROR) - { - ChipLogProgress(Zcl, "Failed to decode TLV data with tag %" PRIx32 ": %" PRId32, - TLV::TagNumFromTag(aDataTlv.GetTag()), TLVUnpackError); - break; - } - } - - if (CHIP_END_OF_TLV == TLVError) - { - // CHIP_END_OF_TLV means we have iterated all items in the structure, which is not a real error. - TLVError = CHIP_NO_ERROR; - } - else - { - ChipLogProgress(Zcl, "Failed to decode TLV data: %" PRId32, TLVError); - } +} // namespace KeypadInput - // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) - { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaSkipSeekCallback(apCommandObj, position); - } - else - { - apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kBadRequest, - Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogProgress( - Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 1, validArgumentCount, TLVError, TLVUnpackError); - } - break; - } - case ZCL_MEDIA_START_OVER_COMMAND_ID: { +namespace LowPower { - // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaStartOverCallback(apCommandObj); - break; - } - case ZCL_MEDIA_STOP_COMMAND_ID: { +void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) +{ + { + switch (aCommandId) + { + case ZCL_SLEEP_COMMAND_ID: { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfMediaPlaybackClusterMediaStopCallback(apCommandObj); + emberAfLowPowerClusterSleepCallback(apCommandObj); break; } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_PLAYBACK_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_LOW_POWER_CLUSTER_ID); break; } } } } -} // namespace MediaPlayback +} // namespace LowPower -namespace NetworkCommissioning { +namespace MediaInput { void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) { { switch (aCommandId) { - case ZCL_DISABLE_NETWORK_COMMAND_ID: { + case ZCL_HIDE_INPUT_STATUS_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaInputClusterHideInputStatusCallback(apCommandObj); + break; + } + case ZCL_RENAME_INPUT_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - chip::ByteSpan networkID; - bool networkIDExists = false; - uint64_t breadcrumb; - bool breadcrumbExists = false; - uint32_t timeoutMs; - bool timeoutMsExists = false; + uint8_t index; + bool indexExists = false; + const uint8_t * name; + bool nameExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -4965,48 +1064,31 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (networkIDExists) + if (indexExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - { - const uint8_t * data = nullptr; - TLVUnpackError = aDataTlv.GetDataPtr(data); - networkID = chip::ByteSpan(data, aDataTlv.GetLength()); - } + TLVUnpackError = aDataTlv.Get(index); if (CHIP_NO_ERROR == TLVUnpackError) { - networkIDExists = true; + indexExists = true; validArgumentCount++; } break; case 1: - if (breadcrumbExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(breadcrumb); - if (CHIP_NO_ERROR == TLVUnpackError) - { - breadcrumbExists = true; - validArgumentCount++; - } - break; - case 2: - if (timeoutMsExists) + if (nameExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(timeoutMs); + // TODO(#5542): The cluster handlers should accept a ByteSpan for all string types. + TLVUnpackError = aDataTlv.GetDataPtr(name); if (CHIP_NO_ERROR == TLVUnpackError) { - timeoutMsExists = true; + nameExists = true; validArgumentCount++; } break; @@ -5034,10 +1116,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 2 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfNetworkCommissioningClusterDisableNetworkCallback(apCommandObj, networkID, breadcrumb, timeoutMs); + emberAfMediaInputClusterRenameInputCallback(apCommandObj, index, const_cast(name)); } else { @@ -5045,22 +1127,18 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 3, validArgumentCount, TLVError, TLVUnpackError); + 2, validArgumentCount, TLVError, TLVUnpackError); } break; } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { + case ZCL_SELECT_INPUT_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - chip::ByteSpan networkID; - bool networkIDExists = false; - uint64_t breadcrumb; - bool breadcrumbExists = false; - uint32_t timeoutMs; - bool timeoutMsExists = false; + uint8_t index; + bool indexExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -5068,48 +1146,16 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (networkIDExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - { - const uint8_t * data = nullptr; - TLVUnpackError = aDataTlv.GetDataPtr(data); - networkID = chip::ByteSpan(data, aDataTlv.GetLength()); - } - if (CHIP_NO_ERROR == TLVUnpackError) - { - networkIDExists = true; - validArgumentCount++; - } - break; - case 1: - if (breadcrumbExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(breadcrumb); - if (CHIP_NO_ERROR == TLVUnpackError) - { - breadcrumbExists = true; - validArgumentCount++; - } - break; - case 2: - if (timeoutMsExists) + if (indexExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(timeoutMs); + TLVUnpackError = aDataTlv.Get(index); if (CHIP_NO_ERROR == TLVUnpackError) { - timeoutMsExists = true; + indexExists = true; validArgumentCount++; } break; @@ -5137,10 +1183,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfNetworkCommissioningClusterEnableNetworkCallback(apCommandObj, networkID, breadcrumb, timeoutMs); + emberAfMediaInputClusterSelectInputCallback(apCommandObj, index); } else { @@ -5148,35 +1194,97 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 3, validArgumentCount, TLVError, TLVUnpackError); + 1, validArgumentCount, TLVError, TLVUnpackError); } break; } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { + case ZCL_SHOW_INPUT_STATUS_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaInputClusterShowInputStatusCallback(apCommandObj); + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, + Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_INPUT_CLUSTER_ID); + break; + } + } + } +} + +} // namespace MediaInput + +namespace MediaPlayback { + +void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, EndpointId aEndpointId, TLV::TLVReader & aDataTlv) +{ + { + switch (aCommandId) + { + case ZCL_MEDIA_FAST_FORWARD_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaFastForwardCallback(apCommandObj); + break; + } + case ZCL_MEDIA_NEXT_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaNextCallback(apCommandObj); + break; + } + case ZCL_MEDIA_PAUSE_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaPauseCallback(apCommandObj); + break; + } + case ZCL_MEDIA_PLAY_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaPlayCallback(apCommandObj); + break; + } + case ZCL_MEDIA_PREVIOUS_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaPreviousCallback(apCommandObj); + break; + } + case ZCL_MEDIA_REWIND_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaRewindCallback(apCommandObj); + break; + } + case ZCL_MEDIA_SKIP_BACKWARD_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - uint32_t timeoutMs; - bool timeoutMsExists = false; - uint32_t validArgumentCount = 0; + uint64_t deltaPositionMilliseconds; + bool deltaPositionMillisecondsExists = false; + uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) { switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (timeoutMsExists) + if (deltaPositionMillisecondsExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(timeoutMs); + TLVUnpackError = aDataTlv.Get(deltaPositionMilliseconds); if (CHIP_NO_ERROR == TLVUnpackError) { - timeoutMsExists = true; + deltaPositionMillisecondsExists = true; validArgumentCount++; } break; @@ -5207,7 +1315,7 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(apCommandObj, timeoutMs); + emberAfMediaPlaybackClusterMediaSkipBackwardCallback(apCommandObj, deltaPositionMilliseconds); } else { @@ -5219,67 +1327,31 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } break; } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { + case ZCL_MEDIA_SKIP_FORWARD_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - chip::ByteSpan NetworkID; - bool NetworkIDExists = false; - uint64_t Breadcrumb; - bool BreadcrumbExists = false; - uint32_t TimeoutMs; - bool TimeoutMsExists = false; - uint32_t validArgumentCount = 0; + uint64_t deltaPositionMilliseconds; + bool deltaPositionMillisecondsExists = false; + uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) { switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (NetworkIDExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - { - const uint8_t * data = nullptr; - TLVUnpackError = aDataTlv.GetDataPtr(data); - NetworkID = chip::ByteSpan(data, aDataTlv.GetLength()); - } - if (CHIP_NO_ERROR == TLVUnpackError) - { - NetworkIDExists = true; - validArgumentCount++; - } - break; - case 1: - if (BreadcrumbExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(Breadcrumb); - if (CHIP_NO_ERROR == TLVUnpackError) - { - BreadcrumbExists = true; - validArgumentCount++; - } - break; - case 2: - if (TimeoutMsExists) + if (deltaPositionMillisecondsExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(TimeoutMs); + TLVUnpackError = aDataTlv.Get(deltaPositionMilliseconds); if (CHIP_NO_ERROR == TLVUnpackError) { - TimeoutMsExists = true; + deltaPositionMillisecondsExists = true; validArgumentCount++; } break; @@ -5307,10 +1379,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfNetworkCommissioningClusterRemoveNetworkCallback(apCommandObj, NetworkID, Breadcrumb, TimeoutMs); + emberAfMediaPlaybackClusterMediaSkipForwardCallback(apCommandObj, deltaPositionMilliseconds); } else { @@ -5318,22 +1390,18 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 3, validArgumentCount, TLVError, TLVUnpackError); + 1, validArgumentCount, TLVError, TLVUnpackError); } break; } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { + case ZCL_MEDIA_SKIP_SEEK_COMMAND_ID: { // We are using TLVUnpackError and TLVError here since both of them can be CHIP_END_OF_TLV // When TLVError is CHIP_END_OF_TLV, it means we have iterated all of the items, which is not a real error. // Any error value TLVUnpackError means we have received an illegal value. CHIP_ERROR TLVError = CHIP_NO_ERROR; CHIP_ERROR TLVUnpackError = CHIP_NO_ERROR; - chip::ByteSpan ssid; - bool ssidExists = false; - uint64_t breadcrumb; - bool breadcrumbExists = false; - uint32_t timeoutMs; - bool timeoutMsExists = false; + uint64_t position; + bool positionExists = false; uint32_t validArgumentCount = 0; while ((TLVError = aDataTlv.Next()) == CHIP_NO_ERROR) @@ -5341,48 +1409,16 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En switch (TLV::TagNumFromTag(aDataTlv.GetTag())) { case 0: - if (ssidExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - { - const uint8_t * data = nullptr; - TLVUnpackError = aDataTlv.GetDataPtr(data); - ssid = chip::ByteSpan(data, aDataTlv.GetLength()); - } - if (CHIP_NO_ERROR == TLVUnpackError) - { - ssidExists = true; - validArgumentCount++; - } - break; - case 1: - if (breadcrumbExists) - { - ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); - TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; - break; - } - TLVUnpackError = aDataTlv.Get(breadcrumb); - if (CHIP_NO_ERROR == TLVUnpackError) - { - breadcrumbExists = true; - validArgumentCount++; - } - break; - case 2: - if (timeoutMsExists) + if (positionExists) { ChipLogProgress(Zcl, "Duplicate TLV tag %" PRIx32, TLV::TagNumFromTag(aDataTlv.GetTag())); TLVUnpackError = CHIP_ERROR_IM_MALFORMED_COMMAND_DATA_ELEMENT; break; } - TLVUnpackError = aDataTlv.Get(timeoutMs); + TLVUnpackError = aDataTlv.Get(position); if (CHIP_NO_ERROR == TLVUnpackError) { - timeoutMsExists = true; + positionExists = true; validArgumentCount++; } break; @@ -5410,10 +1446,10 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En } // TODO(#5590) We should encode a response of status code for invalid TLV. - if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 3 == validArgumentCount) + if (CHIP_NO_ERROR == TLVError && CHIP_NO_ERROR == TLVUnpackError && 1 == validArgumentCount) { // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. - emberAfNetworkCommissioningClusterScanNetworksCallback(apCommandObj, ssid, breadcrumb, timeoutMs); + emberAfMediaPlaybackClusterMediaSkipSeekCallback(apCommandObj, position); } else { @@ -5421,22 +1457,34 @@ void DispatchServerCommand(app::Command * apCommandObj, CommandId aCommandId, En Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); ChipLogProgress( Zcl, "Failed to dispatch command, %d/%" PRIu32 " arguments parsed, TLVError=%" PRIu32 ", UnpackError=%" PRIu32, - 3, validArgumentCount, TLVError, TLVUnpackError); + 1, validArgumentCount, TLVError, TLVUnpackError); } break; } + case ZCL_MEDIA_START_OVER_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaStartOverCallback(apCommandObj); + break; + } + case ZCL_MEDIA_STOP_COMMAND_ID: { + + // TODO(#5098) We should pass the Command Object and EndpointId to the cluster callbacks. + emberAfMediaPlaybackClusterMediaStopCallback(apCommandObj); + break; + } default: { // Unrecognized command ID, error status will apply. apCommandObj->AddStatusCode(nullptr, Protocols::SecureChannel::GeneralStatusCode::kNotFound, Protocols::SecureChannel::Id, Protocols::SecureChannel::kProtocolCodeGeneralFailure); - ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_NETWORK_COMMISSIONING_CLUSTER_ID); + ChipLogError(Zcl, "Unknown command %" PRIx16 " for cluster %" PRIx16, aCommandId, ZCL_MEDIA_PLAYBACK_CLUSTER_ID); break; } } } } -} // namespace NetworkCommissioning +} // namespace MediaPlayback namespace OnOff { @@ -5839,24 +1887,12 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC case ZCL_AUDIO_OUTPUT_CLUSTER_ID: clusters::AudioOutput::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_BINDING_CLUSTER_ID: - clusters::Binding::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; - case ZCL_COLOR_CONTROL_CLUSTER_ID: - clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; case ZCL_CONTENT_LAUNCH_CLUSTER_ID: clusters::ContentLaunch::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_DOOR_LOCK_CLUSTER_ID: - clusters::DoorLock::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_IAS_ZONE_CLUSTER_ID: - clusters::IasZone::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; case ZCL_KEYPAD_INPUT_CLUSTER_ID: clusters::KeypadInput::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; @@ -5869,9 +1905,6 @@ void DispatchSingleClusterCommand(chip::ClusterId aClusterId, chip::CommandId aC case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: clusters::MediaPlayback::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: - clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); - break; case ZCL_ON_OFF_CLUSTER_ID: clusters::OnOff::DispatchServerCommand(apCommandObj, aCommandId, aEndPointId, aReader); break; diff --git a/examples/tv-app/tv-common/gen/attribute-size.cpp b/examples/tv-app/tv-common/gen/attribute-size.cpp index 3d1ffc9b216a77..876e63f739a116 100644 --- a/examples/tv-app/tv-common/gen/attribute-size.cpp +++ b/examples/tv-app/tv-common/gen/attribute-size.cpp @@ -77,58 +77,6 @@ uint16_t emberAfCopyList(ClusterId clusterId, EmberAfAttributeMetadata * am, boo uint16_t entryLength = 0; switch (clusterId) { - case 0xF004: // Group Key Management Cluster - { - uint16_t entryOffset = kSizeLengthInBytes; - switch (am->attributeId) - { - case 0x0000: // groups - { - entryLength = 6; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %l is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _GroupState - _GroupState * entry = reinterpret_cast<_GroupState *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->VendorGroupId, write ? (uint8_t *) &entry->VendorGroupId : src, write, - &entryOffset, sizeof(entry->VendorGroupId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySetIndex, write ? (uint8_t *) &entry->GroupKeySetIndex : src, - write, &entryOffset, sizeof(entry->GroupKeySetIndex)); // INT16U - break; - } - case 0x0001: // group keys - { - entryLength = 29; - if (((index - 1) * entryLength) > (am->size - entryLength)) - { - ChipLogError(Zcl, "Index %l is invalid.", index); - return 0; - } - entryOffset = static_cast(entryOffset + ((index - 1) * entryLength)); - // Struct _GroupKey - _GroupKey * entry = reinterpret_cast<_GroupKey *>(write ? src : dest); - copyListMember(write ? dest : (uint8_t *) &entry->VendorId, write ? (uint8_t *) &entry->VendorId : src, write, - &entryOffset, sizeof(entry->VendorId)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyIndex, write ? (uint8_t *) &entry->GroupKeyIndex : src, write, - &entryOffset, sizeof(entry->GroupKeyIndex)); // INT16U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyRoot, write ? (uint8_t *) &entry->GroupKeyRoot : src, write, - &entryOffset, 16); // OCTET_STRING - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeyEpochStartTime, - write ? (uint8_t *) &entry->GroupKeyEpochStartTime : src, write, &entryOffset, - sizeof(entry->GroupKeyEpochStartTime)); // INT64U - copyListMember(write ? dest : (uint8_t *) &entry->GroupKeySecurityPolicy, - write ? (uint8_t *) &entry->GroupKeySecurityPolicy : src, write, &entryOffset, - sizeof(entry->GroupKeySecurityPolicy)); // GroupKeySecurityPolicy - break; - } - } - break; - } } return entryLength; @@ -148,19 +96,6 @@ uint16_t emberAfAttributeValueListSize(ClusterId clusterId, AttributeId attribut uint16_t entryLength = 0; switch (clusterId) { - case 0xF004: // Group Key Management Cluster - switch (attributeId) - { - case 0x0000: // groups - // Struct _GroupState - entryLength = 6; - break; - case 0x0001: // group keys - // Struct _GroupKey - entryLength = 29; - break; - } - break; } uint32_t totalSize = kSizeLengthInBytes + (entryCount * entryLength); diff --git a/examples/tv-app/tv-common/gen/call-command-handler.cpp b/examples/tv-app/tv-common/gen/call-command-handler.cpp index 17b5393e5ac11e..9ac0c2d36a3055 100644 --- a/examples/tv-app/tv-common/gen/call-command-handler.cpp +++ b/examples/tv-app/tv-common/gen/call-command-handler.cpp @@ -32,27 +32,20 @@ EmberAfStatus emberAfAccountLoginClusterServerCommandParse(EmberAfClusterCommand EmberAfStatus emberAfApplicationBasicClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfApplicationLauncherClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfBarrierControlClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfGroupKeyManagementClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfGroupsClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfIasZoneClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfIdentifyClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfKeypadInputClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLevelControlClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfLowPowerClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfMediaInputClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfMediaPlaybackClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfScenesClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfTvChannelClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfTargetNavigatorClusterServerCommandParse(EmberAfClusterCommand * cmd); -EmberAfStatus emberAfTemperatureMeasurementClusterServerCommandParse(EmberAfClusterCommand * cmd); EmberAfStatus emberAfWakeOnLanClusterServerCommandParse(EmberAfClusterCommand * cmd); static EmberAfStatus status(bool wasHandled, bool clusterExists, bool mfgSpecific) @@ -107,36 +100,20 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_AUDIO_OUTPUT_CLUSTER_ID: result = emberAfAudioOutputClusterServerCommandParse(cmd); break; - case ZCL_BARRIER_CONTROL_CLUSTER_ID: - // No commands are enabled for cluster Barrier Control - result = status(false, true, cmd->mfgSpecific); - break; - case ZCL_BINDING_CLUSTER_ID: - result = emberAfBindingClusterServerCommandParse(cmd); - break; case ZCL_COLOR_CONTROL_CLUSTER_ID: - result = emberAfColorControlClusterServerCommandParse(cmd); + // No commands are enabled for cluster Color Control + result = status(false, true, cmd->mfgSpecific); break; case ZCL_CONTENT_LAUNCH_CLUSTER_ID: result = emberAfContentLaunchClusterServerCommandParse(cmd); break; - case ZCL_DOOR_LOCK_CLUSTER_ID: - result = emberAfDoorLockClusterServerCommandParse(cmd); - break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: result = emberAfGeneralCommissioningClusterServerCommandParse(cmd); break; - case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: - // No commands are enabled for cluster Group Key Management - result = status(false, true, cmd->mfgSpecific); - break; case ZCL_GROUPS_CLUSTER_ID: // No commands are enabled for cluster Groups result = status(false, true, cmd->mfgSpecific); break; - case ZCL_IAS_ZONE_CLUSTER_ID: - result = emberAfIasZoneClusterServerCommandParse(cmd); - break; case ZCL_IDENTIFY_CLUSTER_ID: // No commands are enabled for cluster Identify result = status(false, true, cmd->mfgSpecific); @@ -157,9 +134,6 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: result = emberAfMediaPlaybackClusterServerCommandParse(cmd); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: - result = emberAfNetworkCommissioningClusterServerCommandParse(cmd); - break; case ZCL_ON_OFF_CLUSTER_ID: result = emberAfOnOffClusterServerCommandParse(cmd); break; @@ -173,10 +147,6 @@ EmberAfStatus emberAfClusterSpecificCommandParse(EmberAfClusterCommand * cmd) case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: result = emberAfTargetNavigatorClusterServerCommandParse(cmd); break; - case ZCL_TEMP_MEASUREMENT_CLUSTER_ID: - // No commands are enabled for cluster Temperature Measurement - result = status(false, true, cmd->mfgSpecific); - break; case ZCL_WAKE_ON_LAN_CLUSTER_ID: // No commands are enabled for cluster Wake on LAN result = status(false, true, cmd->mfgSpecific); @@ -251,1096 +221,122 @@ EmberAfStatus emberAfApplicationLauncherClusterServerCommandParse(EmberAfCluster case ZCL_LAUNCH_APP_COMMAND_ID: { uint16_t payloadOffset = cmd->payloadStartIndex; uint8_t * data; - /* TYPE WARNING: array array defaults to */ uint8_t * application; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + emberAfStringLength(data) + 1u); - application = cmd->buffer + payloadOffset; - - wasHandled = emberAfApplicationLauncherClusterLaunchAppCallback(nullptr, data, application); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_RENAME_OUTPUT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t index; - uint8_t * name; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - index = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - name = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfAudioOutputClusterRenameOutputCallback(nullptr, index, name); - break; - } - case ZCL_SELECT_OUTPUT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t index; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - index = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfAudioOutputClusterSelectOutputCallback(nullptr, index); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfBindingClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_BIND_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; - - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - nodeId = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - endpointId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - clusterId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfBindingClusterBindCallback(nullptr, nodeId, groupId, endpointId, clusterId); - break; - } - case ZCL_UNBIND_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - chip::NodeId nodeId; - chip::GroupId groupId; - chip::EndpointId endpointId; - chip::ClusterId clusterId; - - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - nodeId = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - groupId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - endpointId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - clusterId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfBindingClusterUnbindCallback(nullptr, nodeId, groupId, endpointId, clusterId); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfColorControlClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_MOVE_COLOR_TEMPERATURE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t moveMode; - uint16_t rate; - uint16_t colorTemperatureMinimum; - uint16_t colorTemperatureMaximum; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - rate = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - colorTemperatureMinimum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - colorTemperatureMaximum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterMoveColorTemperatureCallback( - nullptr, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, optionsOverride); - break; - } - case ZCL_MOVE_HUE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t moveMode; - uint8_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterMoveHueCallback(nullptr, moveMode, rate, optionsMask, optionsOverride); - break; - } - case ZCL_MOVE_SATURATION_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t moveMode; - uint8_t rate; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - moveMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - rate = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterMoveSaturationCallback(nullptr, moveMode, rate, optionsMask, optionsOverride); - break; - } - case ZCL_MOVE_TO_COLOR_TEMPERATURE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t colorTemperature; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - colorTemperature = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterMoveToColorTemperatureCallback(nullptr, colorTemperature, transitionTime, - optionsMask, optionsOverride); - break; - } - case ZCL_MOVE_TO_HUE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t hue; - uint8_t direction; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - hue = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - direction = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = - emberAfColorControlClusterMoveToHueCallback(nullptr, hue, direction, transitionTime, optionsMask, optionsOverride); - break; - } - case ZCL_MOVE_TO_HUE_AND_SATURATION_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t hue; - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - hue = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - saturation = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterMoveToHueAndSaturationCallback(nullptr, hue, saturation, transitionTime, - optionsMask, optionsOverride); - break; - } - case ZCL_MOVE_TO_SATURATION_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t saturation; - uint16_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - saturation = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterMoveToSaturationCallback(nullptr, saturation, transitionTime, optionsMask, - optionsOverride); - break; - } - case ZCL_STEP_COLOR_TEMPERATURE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t stepMode; - uint16_t stepSize; - uint16_t transitionTime; - uint16_t colorTemperatureMinimum; - uint16_t colorTemperatureMaximum; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - stepSize = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - colorTemperatureMinimum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - colorTemperatureMaximum = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterStepColorTemperatureCallback(nullptr, stepMode, stepSize, transitionTime, - colorTemperatureMinimum, colorTemperatureMaximum, - optionsMask, optionsOverride); - break; - } - case ZCL_STEP_HUE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t stepMode; - uint8_t stepSize; - uint8_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterStepHueCallback(nullptr, stepMode, stepSize, transitionTime, optionsMask, - optionsOverride); - break; - } - case ZCL_STEP_SATURATION_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t stepMode; - uint8_t stepSize; - uint8_t transitionTime; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - stepMode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - stepSize = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - transitionTime = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterStepSaturationCallback(nullptr, stepMode, stepSize, transitionTime, optionsMask, - optionsOverride); - break; - } - case ZCL_STOP_MOVE_STEP_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t optionsMask; - uint8_t optionsOverride; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - optionsOverride = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfColorControlClusterStopMoveStepCallback(nullptr, optionsMask, optionsOverride); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_LAUNCH_CONTENT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t autoPlay; - uint8_t * data; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - autoPlay = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfContentLaunchClusterLaunchContentCallback(nullptr, autoPlay, data); - break; - } - case ZCL_LAUNCH_URL_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t * contentURL; - uint8_t * displayString; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - contentURL = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + emberAfStringLength(contentURL) + 1u); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - displayString = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfContentLaunchClusterLaunchURLCallback(nullptr, contentURL, displayString); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} -EmberAfStatus emberAfDoorLockClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_CLEAR_ALL_PINS_COMMAND_ID: { - wasHandled = emberAfDoorLockClusterClearAllPinsCallback(nullptr); - break; - } - case ZCL_CLEAR_ALL_RFIDS_COMMAND_ID: { - wasHandled = emberAfDoorLockClusterClearAllRfidsCallback(nullptr); - break; - } - case ZCL_CLEAR_HOLIDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterClearHolidayScheduleCallback(nullptr, scheduleId); - break; - } - case ZCL_CLEAR_PIN_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterClearPinCallback(nullptr, userId); - break; - } - case ZCL_CLEAR_RFID_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterClearRfidCallback(nullptr, userId); - break; - } - case ZCL_CLEAR_WEEKDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterClearWeekdayScheduleCallback(nullptr, scheduleId, userId); - break; - } - case ZCL_CLEAR_YEARDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterClearYeardayScheduleCallback(nullptr, scheduleId, userId); - break; - } - case ZCL_GET_HOLIDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetHolidayScheduleCallback(nullptr, scheduleId); - break; - } - case ZCL_GET_LOG_RECORD_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t logIndex; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - logIndex = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetLogRecordCallback(nullptr, logIndex); - break; - } - case ZCL_GET_PIN_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetPinCallback(nullptr, userId); - break; - } - case ZCL_GET_RFID_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetRfidCallback(nullptr, userId); - break; - } - case ZCL_GET_USER_TYPE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetUserTypeCallback(nullptr, userId); - break; - } - case ZCL_GET_WEEKDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetWeekdayScheduleCallback(nullptr, scheduleId, userId); - break; - } - case ZCL_GET_YEARDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint16_t userId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterGetYeardayScheduleCallback(nullptr, scheduleId, userId); - break; - } - case ZCL_SET_HOLIDAY_SCHEDULE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint32_t localStartTime; - uint32_t localEndTime; - uint8_t operatingModeDuringHoliday; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - localStartTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 4); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - localEndTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 4); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - operatingModeDuringHoliday = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterSetHolidayScheduleCallback(nullptr, scheduleId, localStartTime, localEndTime, - operatingModeDuringHoliday); - break; - } - case ZCL_SET_PIN_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - uint8_t userStatus; - uint8_t userType; - uint8_t * pin; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userStatus = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - pin = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfDoorLockClusterSetPinCallback(nullptr, userId, userStatus, userType, pin); - break; - } - case ZCL_SET_RFID_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - uint8_t userStatus; - uint8_t userType; - uint8_t * id; - - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userStatus = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); + /* TYPE WARNING: array array defaults to */ uint8_t * application; + if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - id = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); + data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + emberAfStringLength(data) + 1u); + application = cmd->buffer + payloadOffset; - wasHandled = emberAfDoorLockClusterSetRfidCallback(nullptr, userId, userStatus, userType, id); + wasHandled = emberAfApplicationLauncherClusterLaunchAppCallback(nullptr, data, application); + break; + } + default: { + // Unrecognized command ID, error status will apply. break; } - case ZCL_SET_USER_TYPE_COMMAND_ID: { + } + } + return status(wasHandled, true, cmd->mfgSpecific); +} +EmberAfStatus emberAfAudioOutputClusterServerCommandParse(EmberAfClusterCommand * cmd) +{ + bool wasHandled = false; + + if (!cmd->mfgSpecific) + { + switch (cmd->commandId) + { + case ZCL_RENAME_OUTPUT_COMMAND_ID: { uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t userId; - uint8_t userType; + uint8_t index; + uint8_t * name; - if (cmd->bufLen < payloadOffset + 2) + if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) + index = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + 1); + if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - userType = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + name = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - wasHandled = emberAfDoorLockClusterSetUserTypeCallback(nullptr, userId, userType); + wasHandled = emberAfAudioOutputClusterRenameOutputCallback(nullptr, index, name); break; } - case ZCL_SET_WEEKDAY_SCHEDULE_COMMAND_ID: { + case ZCL_SELECT_OUTPUT_COMMAND_ID: { uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint16_t userId; - uint8_t daysMask; - uint8_t startHour; - uint8_t startMinute; - uint8_t endHour; - uint8_t endMinute; + uint8_t index; if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - daysMask = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - startHour = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - startMinute = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - endHour = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - endMinute = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + index = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - wasHandled = emberAfDoorLockClusterSetWeekdayScheduleCallback(nullptr, scheduleId, userId, daysMask, startHour, - startMinute, endHour, endMinute); + wasHandled = emberAfAudioOutputClusterSelectOutputCallback(nullptr, index); + break; + } + default: { + // Unrecognized command ID, error status will apply. break; } - case ZCL_SET_YEARDAY_SCHEDULE_COMMAND_ID: { + } + } + return status(wasHandled, true, cmd->mfgSpecific); +} +EmberAfStatus emberAfContentLaunchClusterServerCommandParse(EmberAfClusterCommand * cmd) +{ + bool wasHandled = false; + + if (!cmd->mfgSpecific) + { + switch (cmd->commandId) + { + case ZCL_LAUNCH_CONTENT_COMMAND_ID: { uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t scheduleId; - uint16_t userId; - uint32_t localStartTime; - uint32_t localEndTime; + uint8_t autoPlay; + uint8_t * data; if (cmd->bufLen < payloadOffset + 1) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - scheduleId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); + autoPlay = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 2) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - userId = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - localStartTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 4); - if (cmd->bufLen < payloadOffset + 4) + if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - localEndTime = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); + data = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - wasHandled = - emberAfDoorLockClusterSetYeardayScheduleCallback(nullptr, scheduleId, userId, localStartTime, localEndTime); + wasHandled = emberAfContentLaunchClusterLaunchContentCallback(nullptr, autoPlay, data); break; } - case ZCL_UNLOCK_WITH_TIMEOUT_COMMAND_ID: { + case ZCL_LAUNCH_URL_COMMAND_ID: { uint16_t payloadOffset = cmd->payloadStartIndex; - uint16_t timeoutInSeconds; - uint8_t * pin; + uint8_t * contentURL; + uint8_t * displayString; - if (cmd->bufLen < payloadOffset + 2) + if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - timeoutInSeconds = emberAfGetInt16u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 2); + contentURL = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); + payloadOffset = static_cast(payloadOffset + emberAfStringLength(contentURL) + 1u); if (cmd->bufLen < payloadOffset + 1u) { return EMBER_ZCL_STATUS_MALFORMED_COMMAND; } - pin = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); + displayString = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - wasHandled = emberAfDoorLockClusterUnlockWithTimeoutCallback(nullptr, timeoutInSeconds, pin); + wasHandled = emberAfContentLaunchClusterLaunchURLCallback(nullptr, contentURL, displayString); break; } default: { @@ -1433,42 +429,6 @@ EmberAfStatus emberAfGeneralCommissioningClusterServerCommandParse(EmberAfCluste } return status(wasHandled, true, cmd->mfgSpecific); } -EmberAfStatus emberAfIasZoneClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_ZONE_ENROLL_RESPONSE_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint8_t enrollResponseCode; - uint8_t zoneId; - - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - enrollResponseCode = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 1); - if (cmd->bufLen < payloadOffset + 1) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - zoneId = emberAfGetInt8u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfIasZoneClusterZoneEnrollResponseCallback(nullptr, enrollResponseCode, zoneId); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} EmberAfStatus emberAfKeypadInputClusterServerCommandParse(EmberAfClusterCommand * cmd) { bool wasHandled = false; @@ -1662,155 +622,6 @@ EmberAfStatus emberAfMediaPlaybackClusterServerCommandParse(EmberAfClusterComman } return status(wasHandled, true, cmd->mfgSpecific); } -EmberAfStatus emberAfNetworkCommissioningClusterServerCommandParse(EmberAfClusterCommand * cmd) -{ - bool wasHandled = false; - - if (!cmd->mfgSpecific) - { - switch (cmd->commandId) - { - case ZCL_DISABLE_NETWORK_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - chip::ByteSpan networkID; - uint64_t breadcrumb; - uint32_t timeoutMs; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - { - uint8_t * rawData = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - networkID = chip::ByteSpan(rawData + 1u, emberAfStringLength(rawData)); - } - payloadOffset = static_cast(payloadOffset + networkID.size() + 1u); - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - breadcrumb = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - timeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfNetworkCommissioningClusterDisableNetworkCallback(nullptr, networkID, breadcrumb, timeoutMs); - break; - } - case ZCL_ENABLE_NETWORK_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - chip::ByteSpan networkID; - uint64_t breadcrumb; - uint32_t timeoutMs; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - { - uint8_t * rawData = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - networkID = chip::ByteSpan(rawData + 1u, emberAfStringLength(rawData)); - } - payloadOffset = static_cast(payloadOffset + networkID.size() + 1u); - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - breadcrumb = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - timeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfNetworkCommissioningClusterEnableNetworkCallback(nullptr, networkID, breadcrumb, timeoutMs); - break; - } - case ZCL_GET_LAST_NETWORK_COMMISSIONING_RESULT_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - uint32_t timeoutMs; - - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - timeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(nullptr, timeoutMs); - break; - } - case ZCL_REMOVE_NETWORK_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - chip::ByteSpan NetworkID; - uint64_t Breadcrumb; - uint32_t TimeoutMs; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - { - uint8_t * rawData = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - NetworkID = chip::ByteSpan(rawData + 1u, emberAfStringLength(rawData)); - } - payloadOffset = static_cast(payloadOffset + NetworkID.size() + 1u); - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - Breadcrumb = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - TimeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfNetworkCommissioningClusterRemoveNetworkCallback(nullptr, NetworkID, Breadcrumb, TimeoutMs); - break; - } - case ZCL_SCAN_NETWORKS_COMMAND_ID: { - uint16_t payloadOffset = cmd->payloadStartIndex; - chip::ByteSpan ssid; - uint64_t breadcrumb; - uint32_t timeoutMs; - - if (cmd->bufLen < payloadOffset + 1u) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - { - uint8_t * rawData = emberAfGetString(cmd->buffer, payloadOffset, cmd->bufLen); - ssid = chip::ByteSpan(rawData + 1u, emberAfStringLength(rawData)); - } - payloadOffset = static_cast(payloadOffset + ssid.size() + 1u); - if (cmd->bufLen < payloadOffset + 8) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - breadcrumb = emberAfGetInt64u(cmd->buffer, payloadOffset, cmd->bufLen); - payloadOffset = static_cast(payloadOffset + 8); - if (cmd->bufLen < payloadOffset + 4) - { - return EMBER_ZCL_STATUS_MALFORMED_COMMAND; - } - timeoutMs = emberAfGetInt32u(cmd->buffer, payloadOffset, cmd->bufLen); - - wasHandled = emberAfNetworkCommissioningClusterScanNetworksCallback(nullptr, ssid, breadcrumb, timeoutMs); - break; - } - default: { - // Unrecognized command ID, error status will apply. - break; - } - } - } - return status(wasHandled, true, cmd->mfgSpecific); -} EmberAfStatus emberAfOnOffClusterServerCommandParse(EmberAfClusterCommand * cmd) { bool wasHandled = false; diff --git a/examples/tv-app/tv-common/gen/callback-stub.cpp b/examples/tv-app/tv-common/gen/callback-stub.cpp index 5d89bd17988000..952b0bd3dbed56 100644 --- a/examples/tv-app/tv-common/gen/callback-stub.cpp +++ b/examples/tv-app/tv-common/gen/callback-stub.cpp @@ -41,33 +41,18 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_AUDIO_OUTPUT_CLUSTER_ID: emberAfAudioOutputClusterInitCallback(endpoint); break; - case ZCL_BARRIER_CONTROL_CLUSTER_ID: - emberAfBarrierControlClusterInitCallback(endpoint); - break; - case ZCL_BINDING_CLUSTER_ID: - emberAfBindingClusterInitCallback(endpoint); - break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; case ZCL_CONTENT_LAUNCH_CLUSTER_ID: emberAfContentLaunchClusterInitCallback(endpoint); break; - case ZCL_DOOR_LOCK_CLUSTER_ID: - emberAfDoorLockClusterInitCallback(endpoint); - break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; - case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: - emberAfGroupKeyManagementClusterInitCallback(endpoint); - break; case ZCL_GROUPS_CLUSTER_ID: emberAfGroupsClusterInitCallback(endpoint); break; - case ZCL_IAS_ZONE_CLUSTER_ID: - emberAfIasZoneClusterInitCallback(endpoint); - break; case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; @@ -86,9 +71,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_MEDIA_PLAYBACK_CLUSTER_ID: emberAfMediaPlaybackClusterInitCallback(endpoint); break; - case ZCL_NETWORK_COMMISSIONING_CLUSTER_ID: - emberAfNetworkCommissioningClusterInitCallback(endpoint); - break; case ZCL_ON_OFF_CLUSTER_ID: emberAfOnOffClusterInitCallback(endpoint); break; @@ -101,9 +83,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: emberAfTargetNavigatorClusterInitCallback(endpoint); break; - case ZCL_TEMP_MEASUREMENT_CLUSTER_ID: - emberAfTemperatureMeasurementClusterInitCallback(endpoint); - break; case ZCL_WAKE_ON_LAN_CLUSTER_ID: emberAfWakeOnLanClusterInitCallback(endpoint); break; @@ -133,16 +112,6 @@ void __attribute__((weak)) emberAfAudioOutputClusterInitCallback(EndpointId endp // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfBarrierControlClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} -void __attribute__((weak)) emberAfBindingClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -153,31 +122,16 @@ void __attribute__((weak)) emberAfContentLaunchClusterInitCallback(EndpointId en // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfDoorLockClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfGroupKeyManagementClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfGroupsClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfIasZoneClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -208,11 +162,6 @@ void __attribute__((weak)) emberAfMediaPlaybackClusterInitCallback(EndpointId en // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfNetworkCommissioningClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfOnOffClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -233,11 +182,6 @@ void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfWakeOnLanClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/examples/tv-app/tv-common/gen/callback.h b/examples/tv-app/tv-common/gen/callback.h index cce8e153396db9..b48e438e919777 100644 --- a/examples/tv-app/tv-common/gen/callback.h +++ b/examples/tv-app/tv-common/gen/callback.h @@ -72,22 +72,6 @@ void emberAfApplicationLauncherClusterInitCallback(chip::EndpointId endpoint); */ void emberAfAudioOutputClusterInitCallback(chip::EndpointId endpoint); -/** @brief Barrier Control Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfBarrierControlClusterInitCallback(chip::EndpointId endpoint); - -/** @brief Binding Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfBindingClusterInitCallback(chip::EndpointId endpoint); - /** @brief Color Control Cluster Init * * Cluster Init @@ -104,14 +88,6 @@ void emberAfColorControlClusterInitCallback(chip::EndpointId endpoint); */ void emberAfContentLaunchClusterInitCallback(chip::EndpointId endpoint); -/** @brief Door Lock Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint); - /** @brief General Commissioning Cluster Init * * Cluster Init @@ -120,14 +96,6 @@ void emberAfDoorLockClusterInitCallback(chip::EndpointId endpoint); */ void emberAfGeneralCommissioningClusterInitCallback(chip::EndpointId endpoint); -/** @brief Group Key Management Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfGroupKeyManagementClusterInitCallback(chip::EndpointId endpoint); - /** @brief Groups Cluster Init * * Cluster Init @@ -136,14 +104,6 @@ void emberAfGroupKeyManagementClusterInitCallback(chip::EndpointId endpoint); */ void emberAfGroupsClusterInitCallback(chip::EndpointId endpoint); -/** @brief IAS Zone Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfIasZoneClusterInitCallback(chip::EndpointId endpoint); - /** @brief Identify Cluster Init * * Cluster Init @@ -192,14 +152,6 @@ void emberAfMediaInputClusterInitCallback(chip::EndpointId endpoint); */ void emberAfMediaPlaybackClusterInitCallback(chip::EndpointId endpoint); -/** @brief Network Commissioning Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfNetworkCommissioningClusterInitCallback(chip::EndpointId endpoint); - /** @brief On/off Cluster Init * * Cluster Init @@ -232,14 +184,6 @@ void emberAfTvChannelClusterInitCallback(chip::EndpointId endpoint); */ void emberAfTargetNavigatorClusterInitCallback(chip::EndpointId endpoint); -/** @brief Temperature Measurement Cluster Init - * - * Cluster Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfTemperatureMeasurementClusterInitCallback(chip::EndpointId endpoint); - /** @brief Wake on LAN Cluster Init * * Cluster Init @@ -533,27 +477,27 @@ EmberAfStatus emberAfAudioOutputClusterServerPreAttributeChangedCallback(chip::E void emberAfAudioOutputClusterServerTickCallback(chip::EndpointId endpoint); // -// Barrier Control Cluster server +// Color Control Cluster server // -/** @brief Barrier Control Cluster Server Init +/** @brief Color Control Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfBarrierControlClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfColorControlClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Barrier Control Cluster Server Attribute Changed +/** @brief Color Control Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfBarrierControlClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfColorControlClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Barrier Control Cluster Server Manufacturer Specific Attribute Changed +/** @brief Color Control Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -561,11 +505,11 @@ void emberAfBarrierControlClusterServerAttributeChangedCallback(chip::EndpointId * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfBarrierControlClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfColorControlClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Barrier Control Cluster Server Message Sent +/** @brief Color Control Cluster Server Message Sent * * Server Message Sent * @@ -576,11 +520,11 @@ void emberAfBarrierControlClusterServerManufacturerSpecificAttributeChangedCallb * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBarrierControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfColorControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief Barrier Control Cluster Server Pre Attribute Changed +/** @brief Color Control Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -590,41 +534,40 @@ void emberAfBarrierControlClusterServerMessageSentCallback(EmberOutgoingMessageT * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfBarrierControlClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfColorControlClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Barrier Control Cluster Server Tick +/** @brief Color Control Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfBarrierControlClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfColorControlClusterServerTickCallback(chip::EndpointId endpoint); // -// Binding Cluster server +// Content Launch Cluster server // -/** @brief Binding Cluster Server Init +/** @brief Content Launch Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfBindingClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfContentLaunchClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Binding Cluster Server Attribute Changed +/** @brief Content Launch Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfBindingClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfContentLaunchClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Binding Cluster Server Manufacturer Specific Attribute Changed +/** @brief Content Launch Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -632,11 +575,11 @@ void emberAfBindingClusterServerAttributeChangedCallback(chip::EndpointId endpoi * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfBindingClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Binding Cluster Server Message Sent +/** @brief Content Launch Cluster Server Message Sent * * Server Message Sent * @@ -647,11 +590,11 @@ void emberAfBindingClusterServerManufacturerSpecificAttributeChangedCallback(chi * @param message The message that was sent * @param status The status of the sent message */ -void emberAfBindingClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfContentLaunchClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief Binding Cluster Server Pre Attribute Changed +/** @brief Content Launch Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -661,40 +604,40 @@ void emberAfBindingClusterServerMessageSentCallback(EmberOutgoingMessageType typ * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfBindingClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfContentLaunchClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Binding Cluster Server Tick +/** @brief Content Launch Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfBindingClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfContentLaunchClusterServerTickCallback(chip::EndpointId endpoint); // -// Color Control Cluster server +// General Commissioning Cluster server // -/** @brief Color Control Cluster Server Init +/** @brief General Commissioning Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfColorControlClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfGeneralCommissioningClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Color Control Cluster Server Attribute Changed +/** @brief General Commissioning Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfColorControlClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfGeneralCommissioningClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Color Control Cluster Server Manufacturer Specific Attribute Changed +/** @brief General Commissioning Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -702,11 +645,11 @@ void emberAfColorControlClusterServerAttributeChangedCallback(chip::EndpointId e * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfColorControlClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Color Control Cluster Server Message Sent +/** @brief General Commissioning Cluster Server Message Sent * * Server Message Sent * @@ -717,11 +660,11 @@ void emberAfColorControlClusterServerManufacturerSpecificAttributeChangedCallbac * @param message The message that was sent * @param status The status of the sent message */ -void emberAfColorControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief Color Control Cluster Server Pre Attribute Changed +/** @brief General Commissioning Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -731,40 +674,41 @@ void emberAfColorControlClusterServerMessageSentCallback(EmberOutgoingMessageTyp * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfColorControlClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Color Control Cluster Server Tick +/** @brief General Commissioning Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfColorControlClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfGeneralCommissioningClusterServerTickCallback(chip::EndpointId endpoint); // -// Content Launch Cluster server +// Groups Cluster server // -/** @brief Content Launch Cluster Server Init +/** @brief Groups Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfContentLaunchClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfGroupsClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Content Launch Cluster Server Attribute Changed +/** @brief Groups Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfContentLaunchClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfGroupsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Content Launch Cluster Server Manufacturer Specific Attribute Changed +/** @brief Groups Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -772,11 +716,11 @@ void emberAfContentLaunchClusterServerAttributeChangedCallback(chip::EndpointId * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfGroupsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Content Launch Cluster Server Message Sent +/** @brief Groups Cluster Server Message Sent * * Server Message Sent * @@ -787,11 +731,11 @@ void emberAfContentLaunchClusterServerManufacturerSpecificAttributeChangedCallba * @param message The message that was sent * @param status The status of the sent message */ -void emberAfContentLaunchClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfGroupsClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief Content Launch Cluster Server Pre Attribute Changed +/** @brief Groups Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -801,40 +745,40 @@ void emberAfContentLaunchClusterServerMessageSentCallback(EmberOutgoingMessageTy * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfContentLaunchClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfGroupsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Content Launch Cluster Server Tick +/** @brief Groups Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfContentLaunchClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfGroupsClusterServerTickCallback(chip::EndpointId endpoint); // -// Door Lock Cluster server +// Identify Cluster server // -/** @brief Door Lock Cluster Server Init +/** @brief Identify Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfDoorLockClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfIdentifyClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Door Lock Cluster Server Attribute Changed +/** @brief Identify Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfDoorLockClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfIdentifyClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Door Lock Cluster Server Manufacturer Specific Attribute Changed +/** @brief Identify Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -842,11 +786,11 @@ void emberAfDoorLockClusterServerAttributeChangedCallback(chip::EndpointId endpo * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfDoorLockClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, +void emberAfIdentifyClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, uint16_t manufacturerCode); -/** @brief Door Lock Cluster Server Message Sent +/** @brief Identify Cluster Server Message Sent * * Server Message Sent * @@ -857,11 +801,11 @@ void emberAfDoorLockClusterServerManufacturerSpecificAttributeChangedCallback(ch * @param message The message that was sent * @param status The status of the sent message */ -void emberAfDoorLockClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, +void emberAfIdentifyClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, EmberStatus status); -/** @brief Door Lock Cluster Server Pre Attribute Changed +/** @brief Identify Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -871,40 +815,40 @@ void emberAfDoorLockClusterServerMessageSentCallback(EmberOutgoingMessageType ty * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfDoorLockClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, +EmberAfStatus emberAfIdentifyClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, EmberAfAttributeType attributeType, uint8_t size, uint8_t * value); -/** @brief Door Lock Cluster Server Tick +/** @brief Identify Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfDoorLockClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfIdentifyClusterServerTickCallback(chip::EndpointId endpoint); // -// General Commissioning Cluster server +// Keypad Input Cluster server // -/** @brief General Commissioning Cluster Server Init +/** @brief Keypad Input Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfGeneralCommissioningClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfKeypadInputClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief General Commissioning Cluster Server Attribute Changed +/** @brief Keypad Input Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfGeneralCommissioningClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfKeypadInputClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief General Commissioning Cluster Server Manufacturer Specific Attribute Changed +/** @brief Keypad Input Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -912,11 +856,11 @@ void emberAfGeneralCommissioningClusterServerAttributeChangedCallback(chip::Endp * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfKeypadInputClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief General Commissioning Cluster Server Message Sent +/** @brief Keypad Input Cluster Server Message Sent * * Server Message Sent * @@ -927,11 +871,11 @@ void emberAfGeneralCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfKeypadInputClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief General Commissioning Cluster Server Pre Attribute Changed +/** @brief Keypad Input Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -941,41 +885,40 @@ void emberAfGeneralCommissioningClusterServerMessageSentCallback(EmberOutgoingMe * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfGeneralCommissioningClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfKeypadInputClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief General Commissioning Cluster Server Tick +/** @brief Keypad Input Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfGeneralCommissioningClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfKeypadInputClusterServerTickCallback(chip::EndpointId endpoint); // -// Group Key Management Cluster server +// Level Control Cluster server // -/** @brief Group Key Management Cluster Server Init +/** @brief Level Control Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfGroupKeyManagementClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfLevelControlClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Group Key Management Cluster Server Attribute Changed +/** @brief Level Control Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfGroupKeyManagementClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfLevelControlClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Group Key Management Cluster Server Manufacturer Specific Attribute Changed +/** @brief Level Control Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -983,11 +926,11 @@ void emberAfGroupKeyManagementClusterServerAttributeChangedCallback(chip::Endpoi * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfGroupKeyManagementClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Group Key Management Cluster Server Message Sent +/** @brief Level Control Cluster Server Message Sent * * Server Message Sent * @@ -998,11 +941,11 @@ void emberAfGroupKeyManagementClusterServerManufacturerSpecificAttributeChangedC * @param message The message that was sent * @param status The status of the sent message */ -void emberAfGroupKeyManagementClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief Group Key Management Cluster Server Pre Attribute Changed +/** @brief Level Control Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -1012,41 +955,40 @@ void emberAfGroupKeyManagementClusterServerMessageSentCallback(EmberOutgoingMess * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfGroupKeyManagementClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfLevelControlClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Group Key Management Cluster Server Tick +/** @brief Level Control Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfGroupKeyManagementClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfLevelControlClusterServerTickCallback(chip::EndpointId endpoint); // -// Groups Cluster server +// Low Power Cluster server // -/** @brief Groups Cluster Server Init +/** @brief Low Power Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfGroupsClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfLowPowerClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Groups Cluster Server Attribute Changed +/** @brief Low Power Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfGroupsClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfLowPowerClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Groups Cluster Server Manufacturer Specific Attribute Changed +/** @brief Low Power Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -1054,361 +996,11 @@ void emberAfGroupsClusterServerAttributeChangedCallback(chip::EndpointId endpoin * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfGroupsClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfLowPowerClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Groups Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfGroupsClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Groups 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 emberAfGroupsClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); - -/** @brief Groups Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfGroupsClusterServerTickCallback(chip::EndpointId endpoint); - -// -// IAS Zone Cluster server -// - -/** @brief IAS Zone Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfIasZoneClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief IAS Zone Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfIasZoneClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief IAS Zone 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 emberAfIasZoneClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief IAS Zone Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfIasZoneClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief IAS Zone 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 emberAfIasZoneClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); - -/** @brief IAS Zone Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfIasZoneClusterServerTickCallback(chip::EndpointId endpoint); - -// -// Identify Cluster server -// - -/** @brief Identify Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfIdentifyClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Identify Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfIdentifyClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Identify 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 emberAfIdentifyClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Identify Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfIdentifyClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Identify 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 emberAfIdentifyClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); - -/** @brief Identify Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfIdentifyClusterServerTickCallback(chip::EndpointId endpoint); - -// -// Keypad Input Cluster server -// - -/** @brief Keypad Input Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfKeypadInputClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Keypad Input Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfKeypadInputClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Keypad Input 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 emberAfKeypadInputClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Keypad Input Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfKeypadInputClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Keypad Input 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 emberAfKeypadInputClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); - -/** @brief Keypad Input Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfKeypadInputClusterServerTickCallback(chip::EndpointId endpoint); - -// -// Level Control Cluster server -// - -/** @brief Level Control Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfLevelControlClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Level Control Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfLevelControlClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Level Control 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 emberAfLevelControlClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Level Control Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfLevelControlClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Level Control 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 emberAfLevelControlClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); - -/** @brief Level Control Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfLevelControlClusterServerTickCallback(chip::EndpointId endpoint); - -// -// Low Power Cluster server -// - -/** @brief Low Power Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfLowPowerClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Low Power Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfLowPowerClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Low Power 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 emberAfLowPowerClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Low Power Cluster Server Message Sent +/** @brief Low Power Cluster Server Message Sent * * Server Message Sent * @@ -1503,110 +1095,40 @@ void emberAfMediaInputClusterServerMessageSentCallback(EmberOutgoingMessageType * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfMediaInputClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); - -/** @brief Media Input Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfMediaInputClusterServerTickCallback(chip::EndpointId endpoint); - -// -// Media Playback Cluster server -// - -/** @brief Media Playback Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfMediaPlaybackClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Media Playback Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfMediaPlaybackClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Media Playback 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 emberAfMediaPlaybackClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Media Playback Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfMediaPlaybackClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Media Playback 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 emberAfMediaPlaybackClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfMediaInputClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Media Playback Cluster Server Tick +/** @brief Media Input Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfMediaPlaybackClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfMediaInputClusterServerTickCallback(chip::EndpointId endpoint); // -// Network Commissioning Cluster server +// Media Playback Cluster server // -/** @brief Network Commissioning Cluster Server Init +/** @brief Media Playback Cluster Server Init * * Server Init * * @param endpoint Endpoint that is being initialized */ -void emberAfNetworkCommissioningClusterServerInitCallback(chip::EndpointId endpoint); +void emberAfMediaPlaybackClusterServerInitCallback(chip::EndpointId endpoint); -/** @brief Network Commissioning Cluster Server Attribute Changed +/** @brief Media Playback Cluster Server Attribute Changed * * Server Attribute Changed * * @param endpoint Endpoint that is being initialized * @param attributeId Attribute that changed */ -void emberAfNetworkCommissioningClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); +void emberAfMediaPlaybackClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); -/** @brief Network Commissioning Cluster Server Manufacturer Specific Attribute Changed +/** @brief Media Playback Cluster Server Manufacturer Specific Attribute Changed * * Server Manufacturer Specific Attribute Changed * @@ -1614,11 +1136,11 @@ void emberAfNetworkCommissioningClusterServerAttributeChangedCallback(chip::Endp * @param attributeId Attribute that changed * @param manufacturerCode Manufacturer Code of the attribute that changed */ -void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); +void emberAfMediaPlaybackClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, + chip::AttributeId attributeId, + uint16_t manufacturerCode); -/** @brief Network Commissioning Cluster Server Message Sent +/** @brief Media Playback Cluster Server Message Sent * * Server Message Sent * @@ -1629,11 +1151,11 @@ void emberAfNetworkCommissioningClusterServerManufacturerSpecificAttributeChange * @param message The message that was sent * @param status The status of the sent message */ -void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); +void emberAfMediaPlaybackClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, + EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, + EmberStatus status); -/** @brief Network Commissioning Cluster Server Pre Attribute Changed +/** @brief Media Playback Cluster Server Pre Attribute Changed * * server Pre Attribute Changed * @@ -1643,18 +1165,17 @@ void emberAfNetworkCommissioningClusterServerMessageSentCallback(EmberOutgoingMe * @param size Attribute size * @param value Attribute value */ -EmberAfStatus emberAfNetworkCommissioningClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, uint8_t size, - uint8_t * value); +EmberAfStatus emberAfMediaPlaybackClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId, + EmberAfAttributeType attributeType, uint8_t size, + uint8_t * value); -/** @brief Network Commissioning Cluster Server Tick +/** @brief Media Playback Cluster Server Tick * * server Tick * * @param endpoint Endpoint that is being served */ -void emberAfNetworkCommissioningClusterServerTickCallback(chip::EndpointId endpoint); +void emberAfMediaPlaybackClusterServerTickCallback(chip::EndpointId endpoint); // // On/off Cluster server @@ -1935,77 +1456,6 @@ EmberAfStatus emberAfTargetNavigatorClusterServerPreAttributeChangedCallback(chi */ void emberAfTargetNavigatorClusterServerTickCallback(chip::EndpointId endpoint); -// -// Temperature Measurement Cluster server -// - -/** @brief Temperature Measurement Cluster Server Init - * - * Server Init - * - * @param endpoint Endpoint that is being initialized - */ -void emberAfTemperatureMeasurementClusterServerInitCallback(chip::EndpointId endpoint); - -/** @brief Temperature Measurement Cluster Server Attribute Changed - * - * Server Attribute Changed - * - * @param endpoint Endpoint that is being initialized - * @param attributeId Attribute that changed - */ -void emberAfTemperatureMeasurementClusterServerAttributeChangedCallback(chip::EndpointId endpoint, chip::AttributeId attributeId); - -/** @brief Temperature Measurement 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 emberAfTemperatureMeasurementClusterServerManufacturerSpecificAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - uint16_t manufacturerCode); - -/** @brief Temperature Measurement Cluster Server Message Sent - * - * Server Message Sent - * - * @param type The type of message sent - * @param indexOrDestination The destination or address 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 emberAfTemperatureMeasurementClusterServerMessageSentCallback(EmberOutgoingMessageType type, uint64_t indexOrDestination, - EmberApsFrame * apsFrame, uint16_t msgLen, uint8_t * message, - EmberStatus status); - -/** @brief Temperature Measurement 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 emberAfTemperatureMeasurementClusterServerPreAttributeChangedCallback(chip::EndpointId endpoint, - chip::AttributeId attributeId, - EmberAfAttributeType attributeType, - uint8_t size, uint8_t * value); - -/** @brief Temperature Measurement Cluster Server Tick - * - * server Tick - * - * @param endpoint Endpoint that is being served - */ -void emberAfTemperatureMeasurementClusterServerTickCallback(chip::EndpointId endpoint); - // // Wake on LAN Cluster server // @@ -2117,160 +1567,6 @@ bool emberAfAudioOutputClusterRenameOutputCallback(chip::app::Command * commandO bool emberAfAudioOutputClusterSelectOutputCallback(chip::app::Command * commandObj, uint8_t index); -/** - * @brief Binding Cluster Bind Command callback - * @param nodeId - * @param groupId - * @param endpointId - * @param clusterId - */ - -bool emberAfBindingClusterBindCallback(chip::app::Command * commandObj, chip::NodeId nodeId, chip::GroupId groupId, - chip::EndpointId endpointId, chip::ClusterId clusterId); - -/** - * @brief Binding Cluster Unbind Command callback - * @param nodeId - * @param groupId - * @param endpointId - * @param clusterId - */ - -bool emberAfBindingClusterUnbindCallback(chip::app::Command * commandObj, chip::NodeId nodeId, chip::GroupId groupId, - chip::EndpointId endpointId, chip::ClusterId clusterId); - -/** - * @brief Color Control Cluster MoveColorTemperature Command callback - * @param moveMode - * @param rate - * @param colorTemperatureMinimum - * @param colorTemperatureMaximum - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveColorTemperatureCallback(chip::app::Command * commandObj, uint8_t moveMode, uint16_t rate, - uint16_t colorTemperatureMinimum, uint16_t colorTemperatureMaximum, - uint8_t optionsMask, uint8_t optionsOverride); - -/** - * @brief Color Control Cluster MoveHue Command callback - * @param moveMode - * @param rate - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveHueCallback(chip::app::Command * commandObj, uint8_t moveMode, uint8_t rate, uint8_t optionsMask, - uint8_t optionsOverride); - -/** - * @brief Color Control Cluster MoveSaturation Command callback - * @param moveMode - * @param rate - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveSaturationCallback(chip::app::Command * commandObj, uint8_t moveMode, uint8_t rate, - uint8_t optionsMask, uint8_t optionsOverride); - -/** - * @brief Color Control Cluster MoveToColorTemperature Command callback - * @param colorTemperature - * @param transitionTime - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveToColorTemperatureCallback(chip::app::Command * commandObj, uint16_t colorTemperature, - uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride); - -/** - * @brief Color Control Cluster MoveToHue Command callback - * @param hue - * @param direction - * @param transitionTime - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveToHueCallback(chip::app::Command * commandObj, uint8_t hue, uint8_t direction, - uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride); - -/** - * @brief Color Control Cluster MoveToHueAndSaturation Command callback - * @param hue - * @param saturation - * @param transitionTime - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveToHueAndSaturationCallback(chip::app::Command * commandObj, uint8_t hue, uint8_t saturation, - uint16_t transitionTime, uint8_t optionsMask, - uint8_t optionsOverride); - -/** - * @brief Color Control Cluster MoveToSaturation Command callback - * @param saturation - * @param transitionTime - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterMoveToSaturationCallback(chip::app::Command * commandObj, uint8_t saturation, - uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride); - -/** - * @brief Color Control Cluster StepColorTemperature Command callback - * @param stepMode - * @param stepSize - * @param transitionTime - * @param colorTemperatureMinimum - * @param colorTemperatureMaximum - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterStepColorTemperatureCallback(chip::app::Command * commandObj, uint8_t stepMode, uint16_t stepSize, - uint16_t transitionTime, uint16_t colorTemperatureMinimum, - uint16_t colorTemperatureMaximum, uint8_t optionsMask, - uint8_t optionsOverride); - -/** - * @brief Color Control Cluster StepHue Command callback - * @param stepMode - * @param stepSize - * @param transitionTime - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterStepHueCallback(chip::app::Command * commandObj, uint8_t stepMode, uint8_t stepSize, - uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride); - -/** - * @brief Color Control Cluster StepSaturation Command callback - * @param stepMode - * @param stepSize - * @param transitionTime - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterStepSaturationCallback(chip::app::Command * commandObj, uint8_t stepMode, uint8_t stepSize, - uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride); - -/** - * @brief Color Control Cluster StopMoveStep Command callback - * @param optionsMask - * @param optionsOverride - */ - -bool emberAfColorControlClusterStopMoveStepCallback(chip::app::Command * commandObj, uint8_t optionsMask, uint8_t optionsOverride); - /** * @brief Content Launch Cluster LaunchContent Command callback * @param autoPlay @@ -2287,181 +1583,6 @@ bool emberAfContentLaunchClusterLaunchContentCallback(chip::app::Command * comma bool emberAfContentLaunchClusterLaunchURLCallback(chip::app::Command * commandObj, uint8_t * contentURL, uint8_t * displayString); -/** - * @brief Door Lock Cluster ClearAllPins Command callback - */ - -bool emberAfDoorLockClusterClearAllPinsCallback(chip::app::Command * commandObj); - -/** - * @brief Door Lock Cluster ClearAllRfids Command callback - */ - -bool emberAfDoorLockClusterClearAllRfidsCallback(chip::app::Command * commandObj); - -/** - * @brief Door Lock Cluster ClearHolidaySchedule Command callback - * @param scheduleId - */ - -bool emberAfDoorLockClusterClearHolidayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId); - -/** - * @brief Door Lock Cluster ClearPin Command callback - * @param userId - */ - -bool emberAfDoorLockClusterClearPinCallback(chip::app::Command * commandObj, uint16_t userId); - -/** - * @brief Door Lock Cluster ClearRfid Command callback - * @param userId - */ - -bool emberAfDoorLockClusterClearRfidCallback(chip::app::Command * commandObj, uint16_t userId); - -/** - * @brief Door Lock Cluster ClearWeekdaySchedule Command callback - * @param scheduleId - * @param userId - */ - -bool emberAfDoorLockClusterClearWeekdayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint16_t userId); - -/** - * @brief Door Lock Cluster ClearYeardaySchedule Command callback - * @param scheduleId - * @param userId - */ - -bool emberAfDoorLockClusterClearYeardayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint16_t userId); - -/** - * @brief Door Lock Cluster GetHolidaySchedule Command callback - * @param scheduleId - */ - -bool emberAfDoorLockClusterGetHolidayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId); - -/** - * @brief Door Lock Cluster GetLogRecord Command callback - * @param logIndex - */ - -bool emberAfDoorLockClusterGetLogRecordCallback(chip::app::Command * commandObj, uint16_t logIndex); - -/** - * @brief Door Lock Cluster GetPin Command callback - * @param userId - */ - -bool emberAfDoorLockClusterGetPinCallback(chip::app::Command * commandObj, uint16_t userId); - -/** - * @brief Door Lock Cluster GetRfid Command callback - * @param userId - */ - -bool emberAfDoorLockClusterGetRfidCallback(chip::app::Command * commandObj, uint16_t userId); - -/** - * @brief Door Lock Cluster GetUserType Command callback - * @param userId - */ - -bool emberAfDoorLockClusterGetUserTypeCallback(chip::app::Command * commandObj, uint16_t userId); - -/** - * @brief Door Lock Cluster GetWeekdaySchedule Command callback - * @param scheduleId - * @param userId - */ - -bool emberAfDoorLockClusterGetWeekdayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint16_t userId); - -/** - * @brief Door Lock Cluster GetYeardaySchedule Command callback - * @param scheduleId - * @param userId - */ - -bool emberAfDoorLockClusterGetYeardayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint16_t userId); - -/** - * @brief Door Lock Cluster SetHolidaySchedule Command callback - * @param scheduleId - * @param localStartTime - * @param localEndTime - * @param operatingModeDuringHoliday - */ - -bool emberAfDoorLockClusterSetHolidayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint32_t localStartTime, - uint32_t localEndTime, uint8_t operatingModeDuringHoliday); - -/** - * @brief Door Lock Cluster SetPin Command callback - * @param userId - * @param userStatus - * @param userType - * @param pin - */ - -bool emberAfDoorLockClusterSetPinCallback(chip::app::Command * commandObj, uint16_t userId, uint8_t userStatus, uint8_t userType, - uint8_t * pin); - -/** - * @brief Door Lock Cluster SetRfid Command callback - * @param userId - * @param userStatus - * @param userType - * @param id - */ - -bool emberAfDoorLockClusterSetRfidCallback(chip::app::Command * commandObj, uint16_t userId, uint8_t userStatus, uint8_t userType, - uint8_t * id); - -/** - * @brief Door Lock Cluster SetUserType Command callback - * @param userId - * @param userType - */ - -bool emberAfDoorLockClusterSetUserTypeCallback(chip::app::Command * commandObj, uint16_t userId, uint8_t userType); - -/** - * @brief Door Lock Cluster SetWeekdaySchedule Command callback - * @param scheduleId - * @param userId - * @param daysMask - * @param startHour - * @param startMinute - * @param endHour - * @param endMinute - */ - -bool emberAfDoorLockClusterSetWeekdayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint16_t userId, - uint8_t daysMask, uint8_t startHour, uint8_t startMinute, uint8_t endHour, - uint8_t endMinute); - -/** - * @brief Door Lock Cluster SetYeardaySchedule Command callback - * @param scheduleId - * @param userId - * @param localStartTime - * @param localEndTime - */ - -bool emberAfDoorLockClusterSetYeardayScheduleCallback(chip::app::Command * commandObj, uint8_t scheduleId, uint16_t userId, - uint32_t localStartTime, uint32_t localEndTime); - -/** - * @brief Door Lock Cluster UnlockWithTimeout Command callback - * @param timeoutInSeconds - * @param pin - */ - -bool emberAfDoorLockClusterUnlockWithTimeoutCallback(chip::app::Command * commandObj, uint16_t timeoutInSeconds, uint8_t * pin); - /** * @brief General Commissioning Cluster ArmFailSafe Command callback * @param expiryLengthSeconds @@ -2489,14 +1610,6 @@ bool emberAfGeneralCommissioningClusterCommissioningCompleteCallback(chip::app:: bool emberAfGeneralCommissioningClusterSetRegulatoryConfigCallback(chip::app::Command * commandObj, uint8_t location, uint8_t * countryCode, uint64_t breadcrumb, uint32_t timeoutMs); -/** - * @brief IAS Zone Cluster ZoneEnrollResponse Command callback - * @param enrollResponseCode - * @param zoneId - */ - -bool emberAfIasZoneClusterZoneEnrollResponseCallback(chip::app::Command * commandObj, uint8_t enrollResponseCode, uint8_t zoneId); - /** * @brief Keypad Input Cluster SendKey Command callback * @param keyCode @@ -2606,54 +1719,6 @@ bool emberAfMediaPlaybackClusterMediaStartOverCallback(chip::app::Command * comm bool emberAfMediaPlaybackClusterMediaStopCallback(chip::app::Command * commandObj); -/** - * @brief Network Commissioning Cluster DisableNetwork Command callback - * @param networkID - * @param breadcrumb - * @param timeoutMs - */ - -bool emberAfNetworkCommissioningClusterDisableNetworkCallback(chip::app::Command * commandObj, chip::ByteSpan networkID, - uint64_t breadcrumb, uint32_t timeoutMs); - -/** - * @brief Network Commissioning Cluster EnableNetwork Command callback - * @param networkID - * @param breadcrumb - * @param timeoutMs - */ - -bool emberAfNetworkCommissioningClusterEnableNetworkCallback(chip::app::Command * commandObj, chip::ByteSpan networkID, - uint64_t breadcrumb, uint32_t timeoutMs); - -/** - * @brief Network Commissioning Cluster GetLastNetworkCommissioningResult Command callback - * @param timeoutMs - */ - -bool emberAfNetworkCommissioningClusterGetLastNetworkCommissioningResultCallback(chip::app::Command * commandObj, - uint32_t timeoutMs); - -/** - * @brief Network Commissioning Cluster RemoveNetwork Command callback - * @param networkID - * @param breadcrumb - * @param timeoutMs - */ - -bool emberAfNetworkCommissioningClusterRemoveNetworkCallback(chip::app::Command * commandObj, chip::ByteSpan NetworkID, - uint64_t Breadcrumb, uint32_t TimeoutMs); - -/** - * @brief Network Commissioning Cluster ScanNetworks Command callback - * @param ssid - * @param breadcrumb - * @param timeoutMs - */ - -bool emberAfNetworkCommissioningClusterScanNetworksCallback(chip::app::Command * commandObj, chip::ByteSpan ssid, - uint64_t breadcrumb, uint32_t timeoutMs); - /** * @brief On/off Cluster Off Command callback */ diff --git a/examples/tv-app/tv-common/gen/endpoint_config.h b/examples/tv-app/tv-common/gen/endpoint_config.h index 95fd02872e8c02..6897a4aacd1026 100644 --- a/examples/tv-app/tv-common/gen/endpoint_config.h +++ b/examples/tv-app/tv-common/gen/endpoint_config.h @@ -160,85 +160,6 @@ /* 624 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: General Commissioning (server), big-endian */ \ - \ - /* 656 - FabricId, */ \ - 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 664 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: Color Control (server), big-endian */ \ - \ - /* 672 - compensation text, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: IAS Zone (server), big-endian */ \ - \ - /* 926 - IAS CIE address, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: Application Basic (server), big-endian */ \ - \ - /* 934 - vendor name, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 966 - application name, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 998 - application id, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: Group Key Management (server), big-endian */ \ - \ - /* 1030 - groups, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1284 - group keys, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU @@ -378,90 +299,11 @@ /* 624 - application id, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: General Commissioning (server), little-endian */ \ - \ - /* 656 - FabricId, */ \ - 1, 'o', 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 664 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: Color Control (server), little-endian */ \ - \ - /* 672 - compensation text, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: IAS Zone (server), little-endian */ \ - \ - /* 926 - IAS CIE address, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: Application Basic (server), little-endian */ \ - \ - /* 934 - vendor name, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 966 - application name, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 998 - application id, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 5, Cluster: Group Key Management (server), little-endian */ \ - \ - /* 1030 - groups, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 1284 - group keys, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (40) +#define GENERATED_DEFAULTS_COUNT (31) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -489,7 +331,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 188 +#define GENERATED_ATTRIBUTE_COUNT 87 #define GENERATED_ATTRIBUTES \ { \ \ @@ -632,141 +474,6 @@ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Identify (server) */ \ - { 0x0000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* identify time */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Groups (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Scenes (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x0003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x0004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: On/off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* on/off */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: General Commissioning (server) */ \ - { 0x0000, ZAP_TYPE(OCTET_STRING), 8, 0, ZAP_LONG_DEFAULTS_INDEX(656) }, /* FabricId */ \ - { 0x0001, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(664) }, /* Breadcrumb */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Network Commissioning (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Door Lock (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* lock state */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* lock type */ \ - { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* actuator enabled */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Barrier Control (server) */ \ - { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier moving state */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* barrier safety status */ \ - { 0x0003, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier capabilities */ \ - { 0x000A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* barrier position */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Color Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current hue */ \ - { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current saturation */ \ - { 0x0002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x616B) }, /* current x */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x607D) }, /* current y */ \ - { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* drift compensation */ \ - { 0x0006, ZAP_TYPE(CHAR_STRING), 254, 0, ZAP_LONG_DEFAULTS_INDEX(672) }, /* compensation text */ \ - { 0x0007, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x00FA) }, /* color temperature */ \ - { 0x0008, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* color mode */ \ - { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ - { 0x0010, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* number of primaries */ \ - { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 x */ \ - { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 y */ \ - { 0x0013, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 1 intensity */ \ - { 0x0015, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 x */ \ - { 0x0016, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 y */ \ - { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 2 intensity */ \ - { 0x0019, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 x */ \ - { 0x001A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 y */ \ - { 0x001B, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 3 intensity */ \ - { 0x0020, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 x */ \ - { 0x0021, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 y */ \ - { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 4 intensity */ \ - { 0x0024, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 x */ \ - { 0x0025, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 y */ \ - { 0x0026, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 5 intensity */ \ - { 0x0028, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 x */ \ - { 0x0029, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 y */ \ - { 0x002A, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* primary 6 intensity */ \ - { 0x0030, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point x */ \ - { 0x0031, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* white point y */ \ - { 0x0032, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r x */ \ - { 0x0033, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r y */ \ - { 0x0034, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point r intensity */ \ - { 0x0036, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g x */ \ - { 0x0037, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g y */ \ - { 0x0038, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point g intensity */ \ - { 0x003A, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b x */ \ - { 0x003B, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b y */ \ - { 0x003C, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* color point b intensity */ \ - { 0x4000, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* enhanced current hue */ \ - { 0x4001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* enhanced color mode */ \ - { 0x4002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop active */ \ - { 0x4003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* color loop direction */ \ - { 0x4004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0019) }, /* color loop time */ \ - { 0x400A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color capabilities */ \ - { 0x400B, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* color temp physical min */ \ - { 0x400C, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xFEFF) }, /* color temp physical max */ \ - { 0x400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ - { 0x4010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* start up color temperature mireds */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Temperature Measurement (server) */ \ - { 0x0000, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* measured value */ \ - { 0x0001, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* min measured value */ \ - { 0x0002, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* max measured value */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: IAS Zone (server) */ \ - { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ - { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ - { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(IEEE_ADDRESS), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(926) }, /* IAS CIE address */ \ - { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Low Power (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Application Basic (server) */ \ - { 0x0000, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* vendor name */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* vendor id */ \ - { 0x0002, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(966) }, /* application name */ \ - { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ - { 0x0005, ZAP_TYPE(CHAR_STRING), 32, 0, ZAP_LONG_DEFAULTS_INDEX(998) }, /* application id */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* catalog vendor id */ \ - { 0x0007, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* application satus */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Binding (server) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ - \ - /* Endpoint: 5, Cluster: Group Key Management (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1030) }, /* groups */ \ - { 0x0001, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1284) }, /* group keys */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* cluster revision */ \ } // This is an array of EmberAfCluster structures. @@ -792,18 +499,10 @@ }; \ const EmberAfGenericClusterFunction chipFuncArrayColorControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfColorControlClusterServerInitCallback, \ - }; \ - const EmberAfGenericClusterFunction chipFuncArrayDoorLockServer[] = { \ - (EmberAfGenericClusterFunction) emberAfDoorLockClusterServerAttributeChangedCallback, \ - }; \ - const EmberAfGenericClusterFunction chipFuncArrayIasZoneServer[] = { \ - (EmberAfGenericClusterFunction) emberAfIasZoneClusterServerInitCallback, \ - (EmberAfGenericClusterFunction) emberAfIasZoneClusterServerMessageSentCallback, \ - (EmberAfGenericClusterFunction) emberAfIasZoneClusterServerPreAttributeChangedCallback, \ }; #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 42 +#define GENERATED_CLUSTER_COUNT 26 #define GENERATED_CLUSTERS \ { \ { 0x0003, \ @@ -908,79 +607,6 @@ { \ 0x050D, ZAP_ATTRIBUTE_INDEX(79), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ - { 0x0003, \ - ZAP_ATTRIBUTE_INDEX(87), \ - 2, \ - 4, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ - chipFuncArrayIdentifyServer }, /* Endpoint: 5, Cluster: Identify (server) */ \ - { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(89), \ - 2, \ - 3, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayGroupsServer }, /* Endpoint: 5, Cluster: Groups (server) */ \ - { 0x0005, \ - ZAP_ATTRIBUTE_INDEX(91), \ - 6, \ - 8, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayScenesServer }, /* Endpoint: 5, Cluster: Scenes (server) */ \ - { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(97), \ - 2, \ - 3, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayOnOffServer }, /* Endpoint: 5, Cluster: On/off (server) */ \ - { 0x0008, \ - ZAP_ATTRIBUTE_INDEX(99), \ - 2, \ - 3, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayLevelControlServer }, /* Endpoint: 5, Cluster: Level Control (server) */ \ - { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(101), 3, 18, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: General Commissioning (server) */ \ - { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(104), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Network Commissioning (server) */ \ - { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(105), \ - 4, \ - 5, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ - chipFuncArrayDoorLockServer }, /* Endpoint: 5, Cluster: Door Lock (server) */ \ - { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(109), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Barrier Control (server) */ \ - { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(114), \ - 51, \ - 336, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - chipFuncArrayColorControlServer }, /* Endpoint: 5, Cluster: Color Control (server) */ \ - { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(165), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Temperature Measurement (server) */ \ - { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(169), \ - 6, \ - 16, \ - ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ - ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ - chipFuncArrayIasZoneServer }, /* Endpoint: 5, Cluster: IAS Zone (server) */ \ - { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(175), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Low Power (server) */ \ - { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(176), 8, 105, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ - { \ - 0xF000, ZAP_ATTRIBUTE_INDEX(184), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Binding (server) */ \ - { \ - 0xF004, ZAP_ATTRIBUTE_INDEX(185), 3, 510, ZAP_CLUSTER_MASK(SERVER), NULL \ - }, /* Endpoint: 5, Cluster: Group Key Management (server) */ \ } #define ZAP_CLUSTER_INDEX(index) ((EmberAfCluster *) (&generatedClusters[index])) @@ -989,61 +615,61 @@ #define GENERATED_ENDPOINT_TYPES \ { \ { ZAP_CLUSTER_INDEX(0), 16, 333 }, { ZAP_CLUSTER_INDEX(16), 3, 38 }, { ZAP_CLUSTER_INDEX(19), 4, 168 }, \ - { ZAP_CLUSTER_INDEX(23), 1, 105 }, { ZAP_CLUSTER_INDEX(24), 2, 107 }, { ZAP_CLUSTER_INDEX(26), 16, 1032 }, \ + { ZAP_CLUSTER_INDEX(23), 1, 105 }, { ZAP_CLUSTER_INDEX(24), 2, 107 }, \ } // Largest attribute size is needed for various buffers -#define ATTRIBUTE_LARGEST (255) +#define ATTRIBUTE_LARGEST (33) // Total size of singleton attributes #define ATTRIBUTE_SINGLETONS_SIZE (0) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1783) +#define ATTRIBUTE_MAX_SIZE (751) // Number of fixed endpoints -#define FIXED_ENDPOINT_COUNT (6) +#define FIXED_ENDPOINT_COUNT (5) // Array of endpoints that are supported, the data inside // the array is the endpoint number. #define FIXED_ENDPOINT_ARRAY \ { \ - 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005 \ + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004 \ } // Array of profile ids #define FIXED_PROFILE_IDS \ { \ - 0x0999, 0x0999, 0x0999, 0x0999, 0x0999, 0x0103 \ + 0x0999, 0x0999, 0x0999, 0x0999, 0x0999 \ } // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 0, 0, 0, 0, 0, 0 \ + 0, 0, 0, 0, 0 \ } // Array of device versions #define FIXED_DEVICE_VERSIONS \ { \ - 1, 1, 1, 1, 1, 1 \ + 1, 1, 1, 1, 1 \ } // Array of endpoint types supported on each endpoint #define FIXED_ENDPOINT_TYPES \ { \ - 0, 1, 2, 3, 4, 5 \ + 0, 1, 2, 3, 4 \ } // Array of networks supported on each endpoint #define FIXED_NETWORKS \ { \ - 0, 0, 0, 0, 0, 0 \ + 0, 0, 0, 0, 0 \ } // Array of EmberAfCommandMetadata structs. #define ZAP_COMMAND_MASK(mask) COMMAND_MASK_##mask -#define EMBER_AF_GENERATED_COMMAND_COUNT (230) +#define EMBER_AF_GENERATED_COMMAND_COUNT (133) #define GENERATED_COMMANDS \ { \ \ @@ -1223,130 +849,6 @@ { 0x050A, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* LaunchContentResponse */ \ { 0x050A, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* LaunchURL */ \ { 0x050A, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* LaunchURLResponse */ \ - \ - /* Endpoint: 5, Cluster: Identify (server) */ \ - { 0x0003, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Identify */ \ - { 0x0003, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* IdentifyQueryResponse */ \ - { 0x0003, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* IdentifyQuery */ \ - \ - /* Endpoint: 5, Cluster: Groups (server) */ \ - { 0x0004, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* AddGroup */ \ - { 0x0004, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* AddGroupResponse */ \ - { 0x0004, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ViewGroup */ \ - { 0x0004, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ViewGroupResponse */ \ - { 0x0004, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* GetGroupMembership */ \ - { 0x0004, 0x02, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* GetGroupMembershipResponse */ \ - { 0x0004, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveGroup */ \ - { 0x0004, 0x03, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* RemoveGroupResponse */ \ - { 0x0004, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveAllGroups */ \ - { 0x0004, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* AddGroupIfIdentifying */ \ - \ - /* Endpoint: 5, Cluster: Scenes (server) */ \ - { 0x0005, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* AddScene */ \ - { 0x0005, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* AddSceneResponse */ \ - { 0x0005, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ViewScene */ \ - { 0x0005, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ViewSceneResponse */ \ - { 0x0005, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveScene */ \ - { 0x0005, 0x02, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* RemoveSceneResponse */ \ - { 0x0005, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveAllScenes */ \ - { 0x0005, 0x03, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* RemoveAllScenesResponse */ \ - { 0x0005, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* StoreScene */ \ - { 0x0005, 0x04, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* StoreSceneResponse */ \ - { 0x0005, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RecallScene */ \ - { 0x0005, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* GetSceneMembership */ \ - { 0x0005, 0x06, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* GetSceneMembershipResponse */ \ - \ - /* Endpoint: 5, Cluster: On/off (server) */ \ - { 0x0006, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Off */ \ - { 0x0006, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* On */ \ - { 0x0006, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Toggle */ \ - \ - /* Endpoint: 5, Cluster: Level Control (server) */ \ - { 0x0008, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveToLevel */ \ - { 0x0008, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Move */ \ - { 0x0008, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Step */ \ - { 0x0008, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Stop */ \ - { 0x0008, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveToLevelWithOnOff */ \ - { 0x0008, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveWithOnOff */ \ - { 0x0008, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* StepWithOnOff */ \ - { 0x0008, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* StopWithOnOff */ \ - \ - /* Endpoint: 5, Cluster: General Commissioning (server) */ \ - { 0x0030, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ArmFailSafe */ \ - { 0x0030, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ArmFailSafeResponse */ \ - { 0x0030, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetRegulatoryConfig */ \ - { 0x0030, 0x03, \ - ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetRegulatoryConfigResponse */ \ - \ - /* Endpoint: 5, Cluster: Network Commissioning (server) */ \ - { 0x0031, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ScanNetworks */ \ - { 0x0031, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ScanNetworksResponse */ \ - { 0x0031, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* RemoveNetwork */ \ - { 0x0031, 0x0B, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* RemoveNetworkResponse */ \ - { 0x0031, 0x0C, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* EnableNetwork */ \ - { 0x0031, 0x0D, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* EnableNetworkResponse */ \ - { 0x0031, 0x0E, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* DisableNetwork */ \ - { 0x0031, 0x0F, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* DisableNetworkResponse */ \ - { 0x0031, 0x10, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* GetLastNetworkCommissioningResult */ \ - \ - /* Endpoint: 5, Cluster: Door Lock (server) */ \ - { 0x0101, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* LockDoor */ \ - { 0x0101, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* LockDoorResponse */ \ - { 0x0101, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* UnlockDoor */ \ - { 0x0101, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* UnlockDoorResponse */ \ - { 0x0101, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* UnlockWithTimeout */ \ - { 0x0101, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetLogRecord */ \ - { 0x0101, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetPin */ \ - { 0x0101, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetPin */ \ - { 0x0101, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearPin */ \ - { 0x0101, 0x08, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearAllPins */ \ - { 0x0101, 0x0B, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetWeekdaySchedule */ \ - { 0x0101, 0x0C, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetWeekdaySchedule */ \ - { 0x0101, 0x0D, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearWeekdaySchedule */ \ - { 0x0101, 0x0E, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetYeardaySchedule */ \ - { 0x0101, 0x0F, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetYeardaySchedule */ \ - { 0x0101, 0x10, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearYeardaySchedule */ \ - { 0x0101, 0x11, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetHolidaySchedule */ \ - { 0x0101, 0x12, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetHolidaySchedule */ \ - { 0x0101, 0x13, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearHolidaySchedule */ \ - { 0x0101, 0x14, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetUserType */ \ - { 0x0101, 0x15, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetUserType */ \ - { 0x0101, 0x16, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* SetRfid */ \ - { 0x0101, 0x17, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* GetRfid */ \ - { 0x0101, 0x18, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearRfid */ \ - { 0x0101, 0x19, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* ClearAllRfids */ \ - \ - /* Endpoint: 5, Cluster: Barrier Control (server) */ \ - { 0x0103, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* BarrierControlGoToPercent */ \ - { 0x0103, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* BarrierControlStop */ \ - \ - /* Endpoint: 5, Cluster: Color Control (server) */ \ - { 0x0300, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveToHue */ \ - { 0x0300, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveHue */ \ - { 0x0300, 0x02, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* StepHue */ \ - { 0x0300, 0x03, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveToSaturation */ \ - { 0x0300, 0x04, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveSaturation */ \ - { 0x0300, 0x05, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* StepSaturation */ \ - { 0x0300, 0x06, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveToHueAndSaturation */ \ - { 0x0300, 0x07, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveToColor */ \ - { 0x0300, 0x08, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* MoveColor */ \ - { 0x0300, 0x09, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* StepColor */ \ - { 0x0300, 0x0A, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveToColorTemperature */ \ - { 0x0300, 0x47, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* StopMoveStep */ \ - { 0x0300, 0x4B, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* MoveColorTemperature */ \ - { 0x0300, 0x4C, ZAP_COMMAND_MASK(INCOMING_SERVER) | ZAP_COMMAND_MASK(OUTGOING_SERVER) }, /* StepColorTemperature */ \ - \ - /* Endpoint: 5, Cluster: IAS Zone (server) */ \ - { 0x0500, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* ZoneEnrollResponse */ \ - { 0x0500, 0x00, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ZoneStatusChangeNotification */ \ - { 0x0500, 0x01, ZAP_COMMAND_MASK(INCOMING_CLIENT) }, /* ZoneEnrollRequest */ \ - \ - /* Endpoint: 5, Cluster: Low Power (server) */ \ - { 0x0508, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Sleep */ \ - \ - /* Endpoint: 5, Cluster: Binding (server) */ \ - { 0xF000, 0x00, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Bind */ \ - { 0xF000, 0x01, ZAP_COMMAND_MASK(INCOMING_SERVER) }, /* Unbind */ \ } // Array of EmberAfManufacturerCodeEntry structures for commands. @@ -1381,10 +883,10 @@ #define ZAP_REPORT_DIRECTION(x) ZRD(x) // User options for plugin Reporting -#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (8) +#define EMBER_AF_PLUGIN_REPORTING_TABLE_SIZE (6) #define EMBER_AF_PLUGIN_REPORTING_ENABLE_GROUP_BOUND_REPORTS -#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (8) +#define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS_TABLE_SIZE (6) #define EMBER_AF_GENERATED_REPORTING_CONFIG_DEFAULTS \ { \ \ @@ -1415,14 +917,4 @@ { \ ZAP_REPORT_DIRECTION(REPORTED), 0x0001, 0x0008, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ }, /* current level */ \ - \ - /* Endpoint: 5, Cluster: Door Lock (server) */ \ - { \ - ZAP_REPORT_DIRECTION(REPORTED), 0x0005, 0x0101, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ - }, /* lock state */ \ - \ - /* Endpoint: 5, Cluster: Temperature Measurement (server) */ \ - { \ - ZAP_REPORT_DIRECTION(REPORTED), 0x0005, 0x0402, 0x0000, ZAP_CLUSTER_MASK(SERVER), 0x0000, { { 0, 65344, 0 } } \ - }, /* measured value */ \ } diff --git a/examples/tv-app/tv-common/gen/gen_config.h b/examples/tv-app/tv-common/gen/gen_config.h index d1adf4a88125bf..c65b4259eca82a 100644 --- a/examples/tv-app/tv-common/gen/gen_config.h +++ b/examples/tv-app/tv-common/gen/gen_config.h @@ -30,30 +30,23 @@ /**** Cluster endpoint counts ****/ #define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (4) +#define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_APPLICATION_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_AUDIO_OUTPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_BARRIER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_BINDING_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (3) -#define EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_IAS_ZONE_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (3) -#define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (2) -#define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (3) -#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) +#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TV_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_WAKE_ON_LAN_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -78,16 +71,6 @@ #define EMBER_AF_PLUGIN_AUDIO_OUTPUT_SERVER #define EMBER_AF_PLUGIN_AUDIO_OUTPUT -// Use this macro to check if the server side of the Barrier Control cluster is included -#define ZCL_USING_BARRIER_CONTROL_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_BARRIER_CONTROL_SERVER -#define EMBER_AF_PLUGIN_BARRIER_CONTROL - -// Use this macro to check if the server side of the Binding cluster is included -#define ZCL_USING_BINDING_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_BINDING_SERVER -#define EMBER_AF_PLUGIN_BINDING - // Use this macro to check if the server side of the Color Control cluster is included #define ZCL_USING_COLOR_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER @@ -102,33 +85,16 @@ #define EMBER_AF_PLUGIN_CONTENT_LAUNCH_SERVER #define EMBER_AF_PLUGIN_CONTENT_LAUNCH -// Use this macro to check if the server side of the Door Lock cluster is included -#define ZCL_USING_DOOR_LOCK_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_DOOR_LOCK_SERVER -#define EMBER_AF_PLUGIN_DOOR_LOCK - // Use this macro to check if the server side of the General Commissioning cluster is included #define ZCL_USING_GENERAL_COMMISSIONING_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING -// Use this macro to check if the server side of the Group Key Management cluster is included -#define ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT_SERVER -#define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT - // Use this macro to check if the server side of the Groups cluster is included #define ZCL_USING_GROUPS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GROUPS_SERVER #define EMBER_AF_PLUGIN_GROUPS -// Use this macro to check if the server side of the IAS Zone cluster is included -#define ZCL_USING_IAS_ZONE_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_IAS_ZONE_SERVER -#define EMBER_AF_PLUGIN_IAS_ZONE -// User options for server plugin IAS Zone -#define EMBER_AF_PLUGIN_IAS_ZONE_SERVER_ZONE_TYPE 541 - // Use this macro to check if the server side of the Identify cluster is included #define ZCL_USING_IDENTIFY_CLUSTER_SERVER #define EMBER_AF_PLUGIN_IDENTIFY_SERVER @@ -163,11 +129,6 @@ #define EMBER_AF_PLUGIN_MEDIA_PLAYBACK_SERVER #define EMBER_AF_PLUGIN_MEDIA_PLAYBACK -// Use this macro to check if the server side of the Network Commissioning cluster is included -#define ZCL_USING_NETWORK_COMMISSIONING_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER -#define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING - // Use this macro to check if the server side of the On/off cluster is included #define ZCL_USING_ON_OFF_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ON_OFF_SERVER @@ -190,11 +151,6 @@ #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_SERVER #define EMBER_AF_PLUGIN_TARGET_NAVIGATOR -// Use this macro to check if the server side of the Temperature Measurement cluster is included -#define ZCL_USING_TEMP_MEASUREMENT_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT_SERVER -#define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT - // Use this macro to check if the server side of the Wake on LAN cluster is included #define ZCL_USING_WAKE_ON_LAN_CLUSTER_SERVER #define EMBER_AF_PLUGIN_WAKE_ON_LAN_SERVER diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index 6a566987e7a5bb..de9cdb6acfa492 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -1,5 +1,5 @@ { - "featureLevel": 26, + "featureLevel": 29, "creator": "zap", "keyValuePairs": [ { @@ -4699,3558 +4699,6 @@ ] } ] - }, - { - "name": "Anonymous Endpoint Type", - "deviceTypeName": "CHIP-All-Clusters-Server", - "deviceTypeCode": 0, - "deviceTypeProfileId": 259, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "IdentifyQuery", - "code": 1, - "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": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "IdentifyQueryResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "identify time", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "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": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "name support", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "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": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "scene count", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current scene", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current group", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "scene valid", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "name support", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Toggle", - "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": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "on/off", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "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": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "current level", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 40, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MfgSpecificPing", - "code": 0, - "mfgCode": 4098, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Basic", - "code": 40, - "mfgCode": null, - "define": "BASIC_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "StartUp", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ShutDown", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Leave", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "InteractionModelVersion", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "UserLabel", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersion", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "HardwareVersionString", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersion", - "code": 9, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "SoftwareVersionString", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ArmFailSafe", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfig", - "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": "General Commissioning", - "code": 48, - "mfgCode": null, - "define": "GENERAL_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ArmFailSafeResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRegulatoryConfigResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "FabricId", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "o", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Breadcrumb", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ScanNetworks", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveNetwork", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "EnableNetwork", - "code": 12, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "DisableNetwork", - "code": 14, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetLastNetworkCommissioningResult", - "code": 16, - "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": "Network Commissioning", - "code": 49, - "mfgCode": null, - "define": "NETWORK_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ScanNetworksResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveNetworkResponse", - "code": 11, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "EnableNetworkResponse", - "code": 13, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "DisableNetworkResponse", - "code": 15, - "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": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Door Lock", - "code": 257, - "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "LockDoor", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnlockDoor", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnlockWithTimeout", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetLogRecord", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetPin", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetPin", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearPin", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearAllPins", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetWeekdaySchedule", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetWeekdaySchedule", - "code": 12, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearWeekdaySchedule", - "code": 13, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetYeardaySchedule", - "code": 14, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetYeardaySchedule", - "code": 15, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearYeardaySchedule", - "code": 16, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetHolidaySchedule", - "code": 17, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetHolidaySchedule", - "code": 18, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearHolidaySchedule", - "code": 19, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetUserType", - "code": 20, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetUserType", - "code": 21, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "SetRfid", - "code": 22, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "GetRfid", - "code": 23, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearRfid", - "code": 24, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "ClearAllRfids", - "code": 25, - "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": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Door Lock", - "code": 257, - "mfgCode": null, - "define": "DOOR_LOCK_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "LockDoorResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UnlockDoorResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "lock state", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "lock type", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "actuator enabled", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "door state", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enable logging", - "code": 32, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "language", - "code": 33, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "led settings", - "code": 34, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "auto relock time", - "code": 35, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "sound volume", - "code": 36, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "operating mode", - "code": 37, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "default configuration register", - "code": 39, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enable local programming", - "code": 40, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enable one touch locking", - "code": 41, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enable inside status led", - "code": 42, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enable privacy mode button", - "code": 43, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "wrong code entry limit", - "code": 48, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "user code temporary disable time", - "code": 49, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "send pin over the air", - "code": 50, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "require pin for rf operation", - "code": 51, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zigbee security level", - "code": 52, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "alarm mask", - "code": 64, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "keypad operation event mask", - "code": 65, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "RF operation event mask", - "code": 66, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "manual operation event mask", - "code": 67, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rfid operation event mask", - "code": 68, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "keypad programming event mask", - "code": 69, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rf programming event mask", - "code": 70, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "rfid programming event mask", - "code": 71, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "BarrierControlGoToPercent", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "BarrierControlStop", - "code": 1, - "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": "Barrier Control", - "code": 259, - "mfgCode": null, - "define": "BARRIER_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "barrier moving state", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier safety status", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier capabilities", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "barrier position", - "code": 10, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToHue", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveHue", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepHue", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToSaturation", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveSaturation", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepSaturation", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToHueAndSaturation", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveToColorTemperature", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StopMoveStep", - "code": 71, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "MoveColorTemperature", - "code": 75, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "StepColorTemperature", - "code": 76, - "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": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Color Control", - "code": 768, - "mfgCode": null, - "define": "COLOR_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "current hue", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current saturation", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "remaining time", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current x", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x616B", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current y", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x607D", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "drift compensation", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "compensation text", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color temperature", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00FA", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color mode", - "code": 8, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color control options", - "code": 15, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "number of primaries", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 1 x", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 1 y", - "code": 18, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 1 intensity", - "code": 19, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 2 x", - "code": 21, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 2 y", - "code": 22, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 2 intensity", - "code": 23, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 3 x", - "code": 25, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 3 y", - "code": 26, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 3 intensity", - "code": 27, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 4 x", - "code": 32, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 4 y", - "code": 33, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 4 intensity", - "code": 34, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 5 x", - "code": 36, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 5 y", - "code": 37, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 5 intensity", - "code": 38, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 6 x", - "code": 40, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 6 y", - "code": 41, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "primary 6 intensity", - "code": 42, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "white point x", - "code": 48, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "white point y", - "code": 49, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point r x", - "code": 50, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point r y", - "code": 51, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point r intensity", - "code": 52, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point g x", - "code": 54, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point g y", - "code": 55, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point g intensity", - "code": 56, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point b x", - "code": 58, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point b y", - "code": 59, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color point b intensity", - "code": 60, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enhanced current hue", - "code": 16384, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "enhanced color mode", - "code": 16385, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop active", - "code": 16386, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop direction", - "code": 16387, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color loop time", - "code": 16388, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0019", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color capabilities", - "code": 16394, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color temp physical min", - "code": 16395, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "color temp physical max", - "code": 16396, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xFEFF", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "couple color temp to level min-mireds", - "code": 16397, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "start up color temperature mireds", - "code": 16400, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "measured value", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "min measured value", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "max measured value", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "tolerance", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "ZoneEnrollResponse", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "IAS Zone", - "code": 1280, - "mfgCode": null, - "define": "IAS_ZONE_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "ZoneStatusChangeNotification", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ZoneEnrollRequest", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "zone state", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone type", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "zone status", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "IAS CIE address", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Zone ID", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0xff", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Low Power", - "code": 1288, - "mfgCode": null, - "define": "LOW_POWER_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Sleep", - "code": 0, - "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": "Low Power", - "code": 1288, - "mfgCode": null, - "define": "LOW_POWER_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Application Basic", - "code": 1293, - "mfgCode": null, - "define": "APPLICATION_BASIC_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "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": "Application Basic", - "code": 1293, - "mfgCode": null, - "define": "APPLICATION_BASIC_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "vendor name", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "vendor id", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application name", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "product id", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application id", - "code": 5, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "catalog vendor id", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "application satus", - "code": 7, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x01", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Binding", - "code": 61440, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Bind", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "Unbind", - "code": 1, - "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": "Binding", - "code": 61440, - "mfgCode": null, - "define": "BINDING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Group Key Management", - "code": 61444, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "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": "Group Key Management", - "code": 61444, - "mfgCode": null, - "define": "GROUP_KEY_MANAGEMENT_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "groups", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "group keys", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "cluster revision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 0, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - } - ] } ], "endpoints": [ @@ -8259,42 +4707,45 @@ "endpointTypeIndex": 0, "profileId": 2457, "endpointId": 0, - "networkId": 0 + "networkId": 0, + "endpointVersion": null, + "deviceIdentifier": null }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 2457, "endpointId": 1, - "networkId": 0 + "networkId": 0, + "endpointVersion": null, + "deviceIdentifier": null }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 2, "profileId": 2457, "endpointId": 2, - "networkId": 0 + "networkId": 0, + "endpointVersion": null, + "deviceIdentifier": null }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 3, "profileId": 2457, "endpointId": 3, - "networkId": 0 + "networkId": 0, + "endpointVersion": null, + "deviceIdentifier": null }, { "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 4, "profileId": 2457, "endpointId": 4, - "networkId": 0 - }, - { - "endpointTypeName": "Anonymous Endpoint Type", - "endpointTypeIndex": 5, - "profileId": 259, - "endpointId": 5, - "networkId": 0 + "networkId": 0, + "endpointVersion": null, + "deviceIdentifier": null } ], "log": []