Message Boundaries and Parsing #52
-
Hi, I'm not a network programmer or a professional programmer for that matter. I am trying to implement CMIP over TCP/IP (CMOT) (RFC 1189) as an intermediate step in the implementation of IEEE 11073, a standard for communication to, from and between medical devices. The |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Thank you for your question! Yeah, there should probably be an example of how to do this in the documentation, but what you need to do is use |
Beta Was this translation helpful? Give feedback.
-
Alright, thank you for that. I'll try it out and if it works then I'll use my experience to send you a pull request to the documentation containing an example. I have a follow up question: the CMOT standard (RFC 1189) has a bunch of different types of messages that can be sent. After using |
Beta Was this translation helpful? Give feedback.
-
Oh my Lord, I cannot believe I've been staring at that RFC for a month and I didn't read that! facepalm I was so absorbed in the original X.216 Presentation Protocol that forgot to scroll down the entire RFC... Thank you @XAMPPRocky you have made my year thumbs up |
Beta Was this translation helpful? Give feedback.
Thank you for your question! Yeah, there should probably be an example of how to do this in the documentation, but what you need to do is use
rasn::ber::de::Decoder
directly, which has thedecoded_len
method, which returns how many octets have been parsed. So you can use that get any remaining octets in the input withinput[decoder.decoded_len()..]
, and combine that with the new packet.