Skip to content

Commit

Permalink
Merge branch 'master' into TC-SC-4.3-python-test
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-marquez-csa authored Oct 15, 2024
2 parents 929a12d + bbc0fb2 commit 8864f7c
Show file tree
Hide file tree
Showing 54 changed files with 412 additions and 271 deletions.
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ endpoint 2 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x00;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -5079,7 +5079,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
13 changes: 2 additions & 11 deletions examples/chef/common/chef-concentration-measurement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,8 @@ Protocols::InteractionModel::Status chefConcentrationMeasurementWriteCallback(

if (attributeId == measuredValueId)
{
float newValue = 0;
uint16_t tlvLen = *(uint16_t *) buffer;
chip::TLV::TLVReader reader;
reader.Init(buffer + sizeof(uint16_t), tlvLen);
reader.Next();
reader.Get(newValue);

ChipLogDetail(DeviceLayer, "TLV Type %d, Length %d \n", static_cast<int>(reader.GetType()), tlvLen);
// 2 bytes buf length + 5 bytes TLV for float
ChipLogDetail(DeviceLayer, "buffer: %02x%02x%02x%02x%02x%02x%02x \n", buffer[0], buffer[1], buffer[2], buffer[3], buffer[4],
buffer[5], buffer[6]);
float newValue;
std::memcpy(&newValue, buffer, sizeof(float)); // Copy buffer content to float

CHIP_ERROR err = clusterInstance->SetMeasuredValue(MakeNullable(newValue));
if (CHIP_NO_ERROR == err)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2271,7 +2271,7 @@ endpoint 1 {
}

server cluster LevelControl {
ram attribute currentLevel default = 0x01;
ram attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4206,7 +4206,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2300,7 +2300,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x00;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x1;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2885,7 +2885,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2082,7 +2082,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2943,7 +2943,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2343,7 +2343,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,7 @@ endpoint 13 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_onofflight_samplemei.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_onofflight_samplemei.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2911,7 +2911,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3062,4 +3062,4 @@
"parentEndpointIdentifier": 0
}
]
}
}
2 changes: 1 addition & 1 deletion examples/chef/devices/rootnode_watervalve_6bb39f1f67.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2983,4 +2983,4 @@
"parentEndpointIdentifier": 0
}
]
}
}
4 changes: 2 additions & 2 deletions examples/chef/sample_app_util/test_files/sample_zap_file.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4522,7 +4522,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -4554,7 +4554,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"defaultValue": "0x01",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
1 change: 1 addition & 0 deletions examples/common/pigweed/protos/attributes_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ message AttributeData {
int32 data_int8 = 6;
int32 data_int16 = 7;
int32 data_int32 = 8;
float data_single = 10;
};
optional bytes tlv_data = 9;
}
Expand Down
8 changes: 7 additions & 1 deletion examples/common/pigweed/rpc_services/Attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service<Attributes>
case chip_rpc_AttributeData_data_bytes_tag:
data = &request.data.data.data_bytes;
break;
case chip_rpc_AttributeData_data_single_tag:
data = &request.data.data.data_single;
break;
default:
return pw::Status::InvalidArgument();
}
Expand Down Expand Up @@ -133,6 +136,10 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service<Attributes>
PW_TRY(TlvBufferGetData(tlvBuffer, TLV::kTLVType_SignedInteger, response.data.data_int32));
response.which_data = chip_rpc_AttributeData_data_int32_tag;
break;
case chip_rpc_AttributeType_ZCL_SINGLE_ATTRIBUTE_TYPE:
PW_TRY(TlvBufferGetData(tlvBuffer, TLV::kTLVType_FloatingPointNumber, response.data.data_single));
response.which_data = chip_rpc_AttributeData_data_single_tag;
break;
case chip_rpc_AttributeType_ZCL_BITMAP8_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_BITMAP16_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_BITMAP32_ATTRIBUTE_TYPE:
Expand All @@ -148,7 +155,6 @@ class Attributes : public pw_rpc::nanopb::Attributes::Service<Attributes>
case chip_rpc_AttributeType_ZCL_INT48S_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_INT56S_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_INT64S_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_SINGLE_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_DOUBLE_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_OCTET_STRING_ATTRIBUTE_TYPE:
case chip_rpc_AttributeType_ZCL_CHAR_STRING_ATTRIBUTE_TYPE:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4315,4 +4315,4 @@
"parentEndpointIdentifier": null
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3020,7 +3020,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4484,7 +4484,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x254;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2952,7 +2952,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x254",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2577,7 +2577,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x254;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3928,7 +3928,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x254",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2440,7 +2440,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x254;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3135,7 +3135,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x254",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2957,7 +2957,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4500,7 +4500,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/zap/lighting-on-off.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2137,7 +2137,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/zap/lighting-on-off.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3637,7 +3637,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/qpg/zap/light.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2631,7 +2631,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/qpg/zap/light.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4770,7 +4770,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2588,7 +2588,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3803,7 +3803,7 @@
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
"defaultValue": "0xFE",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2860,7 +2860,7 @@ endpoint 1 {
}

server cluster LevelControl {
persist attribute currentLevel default = 0x01;
persist attribute currentLevel default = 0xFE;
ram attribute remainingTime default = 0x0000;
ram attribute minLevel default = 0x01;
ram attribute maxLevel default = 0xFE;
Expand Down
Loading

0 comments on commit 8864f7c

Please sign in to comment.