16
16
*/
17
17
18
18
/* *
19
- * @file Contains shell commands for a commissionee (eg. end device) related to commissioning .
19
+ * @file Contains shell commands for a ContentApp relating to Content App platform of the Video Player .
20
20
*/
21
21
22
22
#include < app-common/zap-generated/attribute-id.h>
@@ -46,20 +46,18 @@ namespace AppPlatform {
46
46
EmberAfStatus ContentApp::HandleReadAttribute (ClusterId clusterId, chip::AttributeId attributeId, uint8_t * buffer,
47
47
uint16_t maxReadLength)
48
48
{
49
- ChipLogProgress (DeviceLayer, " Read Attribute for device %s cluster %d attribute=%d)" ,
50
- GetApplicationBasic ()->GetApplicationName (), static_cast <uint16_t >(clusterId),
51
- static_cast <uint16_t >(attributeId));
49
+ ChipLogProgress (DeviceLayer, " Read Attribute for device %s cluster " ChipLogFormatMEI " attribute=" ChipLogFormatMEI,
50
+ GetApplicationBasic ()->GetApplicationName (), ChipLogValueMEI (clusterId), ChipLogValueMEI (attributeId));
52
51
53
- EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE;
54
52
if (clusterId == ZCL_APPLICATION_BASIC_CLUSTER_ID)
55
53
{
56
- ret = GetApplicationBasic ()->HandleReadAttribute (attributeId, buffer, maxReadLength);
54
+ return GetApplicationBasic ()->HandleReadAttribute (attributeId, buffer, maxReadLength);
57
55
}
58
56
if (clusterId == ZCL_ACCOUNT_LOGIN_CLUSTER_ID)
59
57
{
60
- ret = GetAccountLogin ()->HandleReadAttribute (attributeId, buffer, maxReadLength);
58
+ return GetAccountLogin ()->HandleReadAttribute (attributeId, buffer, maxReadLength);
61
59
}
62
- return ret ;
60
+ return EMBER_ZCL_STATUS_FAILURE ;
63
61
}
64
62
65
63
EmberAfStatus ContentApp::HandleWriteAttribute (ClusterId clusterId, chip::AttributeId attributeId, uint8_t * buffer)
@@ -68,17 +66,15 @@ EmberAfStatus ContentApp::HandleWriteAttribute(ClusterId clusterId, chip::Attrib
68
66
GetApplicationBasic ()->GetApplicationName (), static_cast <uint16_t >(clusterId),
69
67
static_cast <uint16_t >(attributeId));
70
68
71
- EmberAfStatus ret = EMBER_ZCL_STATUS_FAILURE;
72
-
73
69
if (clusterId == ZCL_APPLICATION_BASIC_CLUSTER_ID)
74
70
{
75
- ret = GetApplicationBasic ()->HandleWriteAttribute (attributeId, buffer);
71
+ return GetApplicationBasic ()->HandleWriteAttribute (attributeId, buffer);
76
72
}
77
73
if (clusterId == ZCL_ACCOUNT_LOGIN_CLUSTER_ID)
78
74
{
79
- ret = GetAccountLogin ()->HandleWriteAttribute (attributeId, buffer);
75
+ return GetAccountLogin ()->HandleWriteAttribute (attributeId, buffer);
80
76
}
81
- return ret ;
77
+ return EMBER_ZCL_STATUS_FAILURE ;
82
78
}
83
79
84
80
EmberAfStatus ApplicationBasic::HandleReadAttribute (chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
@@ -186,19 +182,6 @@ EmberAfStatus ApplicationLauncher::HandleWriteAttribute(chip::AttributeId attrib
186
182
return EMBER_ZCL_STATUS_FAILURE;
187
183
}
188
184
189
- EmberAfStatus ContentLauncher::HandleReadAttribute (chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
190
- {
191
- ChipLogProgress (DeviceLayer, " ContentLauncher::HandleReadAttribute: attrId=%d, maxReadLength=%d" ,
192
- static_cast <uint16_t >(attributeId), maxReadLength);
193
- return EMBER_ZCL_STATUS_FAILURE;
194
- }
195
-
196
- EmberAfStatus ContentLauncher::HandleWriteAttribute (chip::AttributeId attributeId, uint8_t * buffer)
197
- {
198
- ChipLogProgress (DeviceLayer, " ContentLauncher::HandleWriteAttribute: attrId=%d" , static_cast <uint16_t >(attributeId));
199
- return EMBER_ZCL_STATUS_FAILURE;
200
- }
201
-
202
185
EmberAfStatus MediaPlayback::HandleReadAttribute (chip::AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength)
203
186
{
204
187
ChipLogProgress (DeviceLayer, " MediaPlayback::HandleReadAttribute: attrId=%d, maxReadLength=%d" ,
0 commit comments