Skip to content

Commit

Permalink
Update dot15d4-cat with new IEs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremydub committed Jan 16, 2025
1 parent 5a9200f commit 98af939
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion dot15d4-cat/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fn main() {
"{}: {}{:?}",
"frame type".bold(),
if fc.frame_version() == FrameVersion::Ieee802154_2020
&& fc.frame_type() == FrameType::Beacon
&& (fc.frame_type() == FrameType::Beacon || fc.frame_type() == FrameType::Ack)
{
"Enhanced "
} else {
Expand Down Expand Up @@ -265,6 +265,13 @@ fn main() {
NestedSubId::Short(NestedSubIdShort::TschTimeslot) => {
if let Ok(timeslot) = TschTimeslot::new(nested.content()) {
w.writeln(format!("{timeslot}"));
if timeslot.has_timeslot_timings() {
w.write(format!(
"{:indent$}",
timeslot.timeslot_timings(),
indent = w.indent
));
}
} else {
w.writeln("invalid".to_string());
}
Expand All @@ -274,6 +281,21 @@ fn main() {
TschSlotframeAndLink::new(nested.content())
{
w.writeln(format!("{slotframe_and_link}"));
for slotframe_descriptor in
slotframe_and_link.slotframe_descriptors()
{
w.writeln(format!(
"{}",
format!("{slotframe_descriptor}").italic()
));
w.increase_indent();
for link_information in
slotframe_descriptor.link_informations()
{
w.writeln(format!("{link_information}"));
}
w.decrease_indent();
}
} else {
w.writeln("invalid".to_string());
}
Expand Down

0 comments on commit 98af939

Please sign in to comment.