Rebase changes on latest commit
This commit is contained in:
parent
9858fdefdc
commit
34e137a346
7 changed files with 8 additions and 8 deletions
|
@ -39,7 +39,7 @@ fn main() {
|
||||||
};
|
};
|
||||||
let dev_att = Box::new(dev_att::HardCodedDevAtt::new());
|
let dev_att = Box::new(dev_att::HardCodedDevAtt::new());
|
||||||
|
|
||||||
let mut matter = core::Matter::new(&dev_info, dev_att, &comm_data).unwrap();
|
let mut matter = core::Matter::new(dev_info, dev_att, comm_data).unwrap();
|
||||||
let dm = matter.get_data_model();
|
let dm = matter.get_data_model();
|
||||||
{
|
{
|
||||||
let mut node = dm.node.write().unwrap();
|
let mut node = dm.node.write().unwrap();
|
||||||
|
|
|
@ -53,9 +53,9 @@ impl Matter {
|
||||||
/// requires a set of device attestation certificates and keys. It is the responsibility of
|
/// requires a set of device attestation certificates and keys. It is the responsibility of
|
||||||
/// this object to return the device attestation details when queried upon.
|
/// this object to return the device attestation details when queried upon.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
dev_det: &BasicInfoConfig,
|
dev_det: BasicInfoConfig,
|
||||||
dev_att: Box<dyn DevAttDataFetcher>,
|
dev_att: Box<dyn DevAttDataFetcher>,
|
||||||
dev_comm: &CommissioningData,
|
dev_comm: CommissioningData,
|
||||||
) -> Result<Box<Matter>, Error> {
|
) -> Result<Box<Matter>, Error> {
|
||||||
let mdns = Mdns::get()?;
|
let mdns = Mdns::get()?;
|
||||||
mdns.set_values(dev_det.vid, dev_det.pid);
|
mdns.set_values(dev_det.vid, dev_det.pid);
|
||||||
|
|
|
@ -97,7 +97,7 @@ pub struct BasicInfoCluster {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BasicInfoCluster {
|
impl BasicInfoCluster {
|
||||||
pub fn new(cfg: &BasicInfoConfig) -> Result<Box<Self>, Error> {
|
pub fn new(cfg: BasicInfoConfig) -> Result<Box<Self>, Error> {
|
||||||
let mut cluster = Box::new(BasicInfoCluster {
|
let mut cluster = Box::new(BasicInfoCluster {
|
||||||
base: Cluster::new(ID)?,
|
base: Cluster::new(ID)?,
|
||||||
});
|
});
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub struct DataModel {
|
||||||
|
|
||||||
impl DataModel {
|
impl DataModel {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
dev_details: &BasicInfoConfig,
|
dev_details: BasicInfoConfig,
|
||||||
dev_att: Box<dyn DevAttDataFetcher>,
|
dev_att: Box<dyn DevAttDataFetcher>,
|
||||||
fabric_mgr: Arc<FabricMgr>,
|
fabric_mgr: Arc<FabricMgr>,
|
||||||
acl_mgr: Arc<AclMgr>,
|
acl_mgr: Arc<AclMgr>,
|
||||||
|
|
|
@ -41,7 +41,7 @@ type WriteNode<'a> = RwLockWriteGuard<'a, Box<Node>>;
|
||||||
|
|
||||||
pub fn device_type_add_root_node(
|
pub fn device_type_add_root_node(
|
||||||
node: &mut WriteNode,
|
node: &mut WriteNode,
|
||||||
dev_info: &BasicInfoConfig,
|
dev_info: BasicInfoConfig,
|
||||||
dev_att: Box<dyn DevAttDataFetcher>,
|
dev_att: Box<dyn DevAttDataFetcher>,
|
||||||
fabric_mgr: Arc<FabricMgr>,
|
fabric_mgr: Arc<FabricMgr>,
|
||||||
acl_mgr: Arc<AclMgr>,
|
acl_mgr: Arc<AclMgr>,
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
//!
|
//!
|
||||||
//! /// Get the Matter Object
|
//! /// Get the Matter Object
|
||||||
//! /// The dev_att is an object that implements the DevAttDataFetcher trait.
|
//! /// The dev_att is an object that implements the DevAttDataFetcher trait.
|
||||||
//! let mut matter = Matter::new(&dev_info, dev_att, &comm_data).unwrap();
|
//! let mut matter = Matter::new(dev_info, dev_att, comm_data).unwrap();
|
||||||
//! let dm = matter.get_data_model();
|
//! let dm = matter.get_data_model();
|
||||||
//! {
|
//! {
|
||||||
//! let mut node = dm.node.write().unwrap();
|
//! let mut node = dm.node.write().unwrap();
|
||||||
|
|
|
@ -106,7 +106,7 @@ impl ImEngine {
|
||||||
default_acl.add_subject(IM_ENGINE_PEER_ID).unwrap();
|
default_acl.add_subject(IM_ENGINE_PEER_ID).unwrap();
|
||||||
acl_mgr.add(default_acl).unwrap();
|
acl_mgr.add(default_acl).unwrap();
|
||||||
let dm = DataModel::new(
|
let dm = DataModel::new(
|
||||||
&dev_det,
|
dev_det,
|
||||||
dev_att,
|
dev_att,
|
||||||
fabric_mgr.clone(),
|
fabric_mgr.clone(),
|
||||||
acl_mgr.clone(),
|
acl_mgr.clone(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue