Skip to content

Commit

Permalink
Merge pull request project-chip#213 from ivmarkov/thread
Browse files Browse the repository at this point in the history
Support for Thread
  • Loading branch information
kedars authored Sep 26, 2024
2 parents 1bcb7b7 + 87655b0 commit 3bf4f79
Show file tree
Hide file tree
Showing 3 changed files with 504 additions and 1 deletion.
17 changes: 16 additions & 1 deletion rs-matter/src/data_model/root_endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,26 @@ const WIFI_NW_CLUSTERS: [Cluster<'static>; 10] = [
group_key_management::CLUSTER,
];

/// The type of operational network (Ethernet, Wifi or (future) Thread)
const THREAD_NW_CLUSTERS: [Cluster<'static>; 10] = [
descriptor::CLUSTER,
cluster_basic_information::CLUSTER,
general_commissioning::CLUSTER,
nw_commissioning::THR_CLUSTER,
admin_commissioning::CLUSTER,
noc::CLUSTER,
access_control::CLUSTER,
general_diagnostics::CLUSTER,
wifi_nw_diagnostics::CLUSTER,
group_key_management::CLUSTER,
];

/// The type of operational network (Ethernet, Wifi or Thread)
/// for which root endpoint meta-data is being requested
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
pub enum OperNwType {
Ethernet,
Wifi,
Thread,
}

/// A utility function to create a root (Endpoint 0) object using the requested operational network type.
Expand All @@ -62,6 +76,7 @@ pub const fn clusters(op_nw_type: OperNwType) -> &'static [Cluster<'static>] {
match op_nw_type {
OperNwType::Ethernet => &ETH_NW_CLUSTERS,
OperNwType::Wifi => &WIFI_NW_CLUSTERS,
OperNwType::Thread => &THREAD_NW_CLUSTERS,
}
}

Expand Down
1 change: 1 addition & 0 deletions rs-matter/src/data_model/sdm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ pub mod general_diagnostics;
pub mod group_key_management;
pub mod noc;
pub mod nw_commissioning;
pub mod thread_nw_diagnostics;
pub mod wifi_nw_diagnostics;
Loading

0 comments on commit 3bf4f79

Please sign in to comment.