-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#102, #103 #107
#102, #103 #107
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,7 +39,7 @@ mod dev_att; | |
#[cfg(feature = "std")] | ||
fn main() -> Result<(), Error> { | ||
let thread = std::thread::Builder::new() | ||
.stack_size(160 * 1024) | ||
.stack_size(180 * 1024) | ||
.spawn(run) | ||
.unwrap(); | ||
|
||
|
@@ -74,6 +74,7 @@ fn run() -> Result<(), Error> { | |
device_name: "OnOff Light", | ||
product_name: "Light123", | ||
vendor_name: "Vendor PQR", | ||
unique_id: "aabbccdd", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Per my analysis, this actually isn't required. We can choose to make this an Option and interpret None as "" and it will both work and be consistent with the main matter repo behaviour. |
||
}; | ||
|
||
let (ipv4_addr, ipv6_addr, interface) = initialize_network()?; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ use crate::{ | |
interaction_model::messages::ib::{AttrDataTag, AttrRespTag}, | ||
tlv::{FromTLV, TLVElement, TLVWriter, TagType, ToTLV}, | ||
}; | ||
use log::error; | ||
use log::{error, warn}; | ||
|
||
use super::{AttrDetails, CmdDetails, DataModelHandler}; | ||
|
||
|
@@ -149,7 +149,10 @@ impl<'a, 'b, 'c> AttrDataEncoder<'a, 'b, 'c> { | |
}; | ||
|
||
if let Some(status) = status { | ||
AttrResp::Status(status).to_tlv(tw, TagType::Anonymous)?; | ||
let resp = AttrResp::Status(status); | ||
warn!("Read status: {:?}", resp); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Prefer clearer language like "Unsuccessful read status: " and "Unsuccessful write status: " -- otherwise it's easy to misinterpret as general |
||
|
||
resp.to_tlv(tw, TagType::Anonymous)?; | ||
} | ||
|
||
Ok(true) | ||
|
@@ -172,6 +175,7 @@ impl<'a, 'b, 'c> AttrDataEncoder<'a, 'b, 'c> { | |
}; | ||
|
||
if let Some(status) = status { | ||
warn!("Write status: {:?}", status); | ||
status.to_tlv(tw, TagType::Anonymous)?; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems unrelated, no?