View Single Post
Old November 14th, 2018   #2
Join Date: Feb 2006
Posts: 430
Send a message via AIM to sblair Send a message via MSN to sblair

Hey Shawn,

Welcome to the RDM forums! It's a good question and you are likely to get different answers from different people. The standard is not specific about order things must be validated in so it is largely up to your implementation.

Some people are very strict in their implementations and like to fully validate the message header before trying to act on the contents. As you indicate it also tends to be how your parser is written as well.

I generally try to take an accepting view that if I can understand the message contents then I'll try and act on it, regardless if there is some benign formatting issue.

That being said, I tend to prefer inspecting the Command Class and the PID first. Most everything after that is more subjective. Even if you have a Write Protect you will still need to respond to Get Commands and there may be some Set Commands that are still considered valid. So it really just depends on your implementation. My belief is that without a valid Command Class and PID, you really don't fully know what the intent of the message is to properly NACK the contents.
Scott M. Blair
RDM Protocol Forums Admin
sblair is offline   Reply With Quote