Skip to content

Commit

Permalink
Add handler branch for HEARTBEAT_FRAG submessage to avoid error messa…
Browse files Browse the repository at this point in the history
…ge. Actual handling of HEARTBEAT_FRAGs is still unimplemented in Reader::handle_heartbeatfrag_msg().
  • Loading branch information
jhelovuo committed Mar 18, 2024
1 parent a3ce1d6 commit 980b2cf
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/rtps/submessage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ use crate::{
nack_frag::NackFrag,
submessage::{ReaderSubmessage, WriterSubmessage},
submessage_flag::{
endianness_flag, ACKNACK_Flags, DATAFRAG_Flags, DATA_Flags, GAP_Flags, HEARTBEAT_Flags,
INFODESTINATION_Flags, INFOREPLY_Flags, INFOSOURCE_Flags, INFOTIMESTAMP_Flags,
NACKFRAG_Flags,
endianness_flag, ACKNACK_Flags, DATAFRAG_Flags, DATA_Flags, GAP_Flags, HEARTBEATFRAG_Flags,
HEARTBEAT_Flags, INFODESTINATION_Flags, INFOREPLY_Flags, INFOSOURCE_Flags,
INFOTIMESTAMP_Flags, NACKFRAG_Flags,
},
submessage_header::SubmessageHeader,
submessage_kind::SubmessageKind,
submessages::{Data, DataFrag, Gap, InfoReply, InterpreterSubmessage},
submessages::{Data, DataFrag, Gap, HeartbeatFrag, InfoReply, InterpreterSubmessage},
},
Timestamp,
};
Expand Down Expand Up @@ -185,6 +185,14 @@ impl Submessage {
))
}

SubmessageKind::HEARTBEAT_FRAG => {
let f = BitFlags::<HEARTBEATFRAG_Flags>::from_bits_truncate(sub_header.flags);
mk_w_subm(WriterSubmessage::HeartbeatFrag(
HeartbeatFrag::read_from_buffer_with_ctx(e, &sub_content_buffer)?,
f,
))
}

// interpreter submessages
SubmessageKind::INFO_DST => {
let f = BitFlags::<INFODESTINATION_Flags>::from_bits_truncate(sub_header.flags);
Expand Down

0 comments on commit 980b2cf

Please sign in to comment.