-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RPC improvements for example apps (#11285)
* RPC: Fix lighting service Was using the wrong cluster for on/off within lighting RPC service * RPC: Add pairing info to device service * RPC: Increase NRF Zephyr TTY Rx buffer * RPC: Add attributes RPC service Uses ember API to write/read matter attributes. * RPC: Add locking RPC to all-clusters ESP app
- Loading branch information
Showing
19 changed files
with
453 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
chip.rpc.AttributeData.data_bytes max_size:128 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
syntax = "proto3"; | ||
|
||
import 'pw_protobuf_protos/common.proto'; | ||
|
||
package chip.rpc; | ||
|
||
enum AttributeType { | ||
ZCL_NO_DATA_ATTRIBUTE_TYPE = 0x00; // No data | ||
ZCL_BOOLEAN_ATTRIBUTE_TYPE = 0x10; // Boolean | ||
ZCL_BITMAP8_ATTRIBUTE_TYPE = 0x18; // 8-bit bitmap | ||
ZCL_BITMAP16_ATTRIBUTE_TYPE = 0x19; // 16-bit bitmap | ||
ZCL_BITMAP32_ATTRIBUTE_TYPE = 0x1B; // 32-bit bitmap | ||
ZCL_BITMAP64_ATTRIBUTE_TYPE = 0x1F; // 64-bit bitmap | ||
ZCL_INT8U_ATTRIBUTE_TYPE = 0x20; // Unsigned 8-bit integer | ||
ZCL_INT16U_ATTRIBUTE_TYPE = 0x21; // Unsigned 16-bit integer | ||
ZCL_INT24U_ATTRIBUTE_TYPE = 0x22; // Unsigned 24-bit integer | ||
ZCL_INT32U_ATTRIBUTE_TYPE = 0x23; // Unsigned 32-bit integer | ||
ZCL_INT40U_ATTRIBUTE_TYPE = 0x24; // Unsigned 40-bit integer | ||
ZCL_INT48U_ATTRIBUTE_TYPE = 0x25; // Unsigned 48-bit integer | ||
ZCL_INT56U_ATTRIBUTE_TYPE = 0x26; // Unsigned 56-bit integer | ||
ZCL_INT64U_ATTRIBUTE_TYPE = 0x27; // Unsigned 64-bit integer | ||
ZCL_INT8S_ATTRIBUTE_TYPE = 0x28; // Signed 8-bit integer | ||
ZCL_INT16S_ATTRIBUTE_TYPE = 0x29; // Signed 16-bit integer | ||
ZCL_INT24S_ATTRIBUTE_TYPE = 0x2A; // Signed 24-bit integer | ||
ZCL_INT32S_ATTRIBUTE_TYPE = 0x2B; // Signed 32-bit integer | ||
ZCL_INT40S_ATTRIBUTE_TYPE = 0x2C; // Signed 40-bit integer | ||
ZCL_INT48S_ATTRIBUTE_TYPE = 0x2D; // Signed 48-bit integer | ||
ZCL_INT56S_ATTRIBUTE_TYPE = 0x2E; // Signed 56-bit integer | ||
ZCL_INT64S_ATTRIBUTE_TYPE = 0x2F; // Signed 64-bit integer | ||
ZCL_ENUM8_ATTRIBUTE_TYPE = 0x30; // 8-bit enumeration | ||
ZCL_ENUM16_ATTRIBUTE_TYPE = 0x31; // 16-bit enumeration | ||
ZCL_SINGLE_ATTRIBUTE_TYPE = 0x39; // Single precision | ||
ZCL_DOUBLE_ATTRIBUTE_TYPE = 0x3A; // Double precision | ||
ZCL_OCTET_STRING_ATTRIBUTE_TYPE = 0x41; // Octet String | ||
ZCL_CHAR_STRING_ATTRIBUTE_TYPE = 0x42; // Character String | ||
ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE = 0x43; // Long Octet String | ||
ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE = 0x44; // Long Character String | ||
ZCL_ARRAY_ATTRIBUTE_TYPE = 0x48; // List | ||
ZCL_STRUCT_ATTRIBUTE_TYPE = 0x4C; // Structure | ||
ZCL_TOD_ATTRIBUTE_TYPE = 0xE0; // Time of day | ||
ZCL_DATE_ATTRIBUTE_TYPE = 0xE1; // Date | ||
ZCL_UTC_ATTRIBUTE_TYPE = 0xE2; // UTC Time | ||
ZCL_EPOCH_US_ATTRIBUTE_TYPE = 0xE3; // Epoch Microseconds | ||
ZCL_EPOCH_S_ATTRIBUTE_TYPE = 0xE4; // Epoch Seconds | ||
ZCL_SYSTIME_US_ATTRIBUTE_TYPE = 0xE5; // System Time Microseconds | ||
ZCL_PERCENT_ATTRIBUTE_TYPE = 0xE6; // Percentage units 1% | ||
ZCL_PERCENT100THS_ATTRIBUTE_TYPE = 0xE7; // Percentage units 0.01% | ||
ZCL_CLUSTER_ID_ATTRIBUTE_TYPE = 0xE8; // Cluster ID | ||
ZCL_ATTRIB_ID_ATTRIBUTE_TYPE = 0xE9; // Attribute ID | ||
ZCL_FIELD_ID_ATTRIBUTE_TYPE = 0xEA; // Field ID | ||
ZCL_EVENT_ID_ATTRIBUTE_TYPE = 0xEB; // Event ID | ||
ZCL_COMMAND_ID_ATTRIBUTE_TYPE = 0xEC; // Command ID | ||
ZCL_ACTION_ID_ATTRIBUTE_TYPE = 0xED; // Action ID | ||
ZCL_TRANS_ID_ATTRIBUTE_TYPE = 0xEF; // Transaction ID | ||
ZCL_NODE_ID_ATTRIBUTE_TYPE = 0xF0; // Node ID | ||
ZCL_VENDOR_ID_ATTRIBUTE_TYPE = 0xF1; // Vendor ID | ||
ZCL_DEVTYPE_ID_ATTRIBUTE_TYPE = 0xF2; // Device Type ID | ||
ZCL_FABRIC_ID_ATTRIBUTE_TYPE = 0xF3; // Fabric ID | ||
ZCL_GROUP_ID_ATTRIBUTE_TYPE = 0xF4; // Group ID | ||
ZCL_STATUS_ATTRIBUTE_TYPE = 0xF5; // Status Code | ||
ZCL_DATA_VER_ATTRIBUTE_TYPE = 0xF6; // Data Version | ||
ZCL_EVENT_NO_ATTRIBUTE_TYPE = 0xF7; // Event Number | ||
ZCL_ENDPOINT_NO_ATTRIBUTE_TYPE = 0xF8; // Endpoint Number | ||
ZCL_FABRIC_IDX_ATTRIBUTE_TYPE = 0xF9; // Fabric Index | ||
ZCL_IPADR_ATTRIBUTE_TYPE = 0xFA; // IP Address | ||
ZCL_IPV4ADR_ATTRIBUTE_TYPE = 0xFB; // IPv4 Address | ||
ZCL_IPV6ADR_ATTRIBUTE_TYPE = 0xFC; // IPv6 Address | ||
ZCL_IPV6PRE_ATTRIBUTE_TYPE = 0xFD; // IPv6 Prefix | ||
ZCL_HWADR_ATTRIBUTE_TYPE = 0xFE; // Hardware Address | ||
ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF; // Unknown | ||
} | ||
|
||
message AttributeMetadata { | ||
uint32 endpoint = 1; | ||
uint32 cluster = 2; | ||
uint32 attribute_id = 3; | ||
AttributeType type = 4; | ||
} | ||
|
||
message AttributeData { | ||
oneof data { | ||
bool data_bool = 1; | ||
uint32 data_uint8 = 2; | ||
uint32 data_uint16 = 3; | ||
uint32 data_uint32 = 4; | ||
bytes data_bytes = 5; | ||
}; | ||
} | ||
|
||
message AttributeWrite { | ||
AttributeMetadata metadata = 1; | ||
AttributeData data = 2; | ||
} | ||
|
||
service Attributes { | ||
rpc Write(AttributeWrite) returns (pw.protobuf.Empty){} | ||
rpc Read(AttributeMetadata) returns (AttributeData){} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
|
||
chip.rpc.DeviceInfo.serial_number max_size:32 // length defined in chip spec 8.2.3.1 | ||
chip.rpc.DeviceInfo.serial_number max_size:32 // length defined in chip spec 8.2.3.1 | ||
chip.rpc.DeviceState.fabric_info max_count:2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.