32
32
#include < lib/support/CodeUtils.h>
33
33
#include < lib/support/ZclString.h>
34
34
#include < platform/CHIPDeviceLayer.h>
35
+ #include < protocols/interaction_model/StatusCode.h>
35
36
36
37
#if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED
37
38
@@ -41,19 +42,20 @@ using namespace chip::app::Clusters;
41
42
using namespace chip ::Access;
42
43
using ApplicationStatusEnum = app::Clusters::ApplicationBasic::ApplicationStatusEnum;
43
44
using GetSetupPINResponseType = app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Type;
45
+ using chip::Protocols::InteractionModel::Status;
44
46
45
47
// Device Version for dynamic endpoints:
46
48
#define DEVICE_VERSION_DEFAULT 1
47
49
48
- EmberAfStatus emberAfExternalAttributeReadCallback (EndpointId endpoint, ClusterId clusterId,
49
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
50
- uint16_t maxReadLength)
50
+ Status emberAfExternalAttributeReadCallback (EndpointId endpoint, ClusterId clusterId,
51
+ const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer,
52
+ uint16_t maxReadLength)
51
53
{
52
54
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint (endpoint);
53
55
54
56
ChipLogDetail (DeviceLayer, " emberAfExternalAttributeReadCallback endpoint %d " , endpointIndex);
55
57
56
- EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE ;
58
+ Status ret = Status::Failure ;
57
59
58
60
ContentApp * app = ContentAppPlatform::GetInstance ().GetContentApp (endpoint);
59
61
if (app != nullptr )
@@ -68,14 +70,14 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI
68
70
return ret;
69
71
}
70
72
71
- EmberAfStatus emberAfExternalAttributeWriteCallback (EndpointId endpoint, ClusterId clusterId,
72
- const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
73
+ Status emberAfExternalAttributeWriteCallback (EndpointId endpoint, ClusterId clusterId,
74
+ const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
73
75
{
74
76
uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint (endpoint);
75
77
76
78
ChipLogDetail (DeviceLayer, " emberAfExternalAttributeWriteCallback endpoint %d " , endpointIndex);
77
79
78
- EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE ;
80
+ Status ret = Status::Failure ;
79
81
80
82
ContentApp * app = ContentAppPlatform::GetInstance ().GetContentApp (endpoint);
81
83
if (app != nullptr )
@@ -93,18 +95,18 @@ EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, Cluster
93
95
namespace chip {
94
96
namespace AppPlatform {
95
97
96
- EmberAfStatus __attribute__ ((weak)) AppPlatformExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
97
- const EmberAfAttributeMetadata * attributeMetadata,
98
- uint8_t * buffer, uint16_t maxReadLength)
98
+ Status __attribute__ ((weak)) AppPlatformExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId,
99
+ const EmberAfAttributeMetadata * attributeMetadata,
100
+ uint8_t * buffer, uint16_t maxReadLength)
99
101
{
100
- return (EMBER_ZCL_STATUS_FAILURE );
102
+ return (Status::Failure );
101
103
}
102
104
103
- EmberAfStatus __attribute__ ((weak))
105
+ Status __attribute__ ((weak))
104
106
AppPlatformExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId,
105
107
const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer)
106
108
{
107
- return (EMBER_ZCL_STATUS_FAILURE );
109
+ return (Status::Failure );
108
110
}
109
111
110
112
EndpointId ContentAppPlatform::AddContentApp (ContentApp * app, EmberAfEndpointType * ep,
0 commit comments