E1.20 RDM (Remote Device Management) Protocol Forums  

Go Back   E1.20 RDM (Remote Device Management) Protocol Forums > RDM Developer Forums > RDM General Implementation Discussion
Register FAQ Community Calendar Today's Posts Search

RDM General Implementation Discussion General Discussion and questions relating to implementing RDM in a product.

Reply
 
Thread Tools Search this Thread Display Modes
Old July 22nd, 2016   #1
ericthegeek
Task Group Member
 
Join Date: Aug 2008
Posts: 390
Default

Yes, null termination of strings is allowed.

10.1 says:
Text fields shall terminate based on Parameter Data Length, however if a NULL is encountered then that shall also act as a terminator for the text field.

So, in your "QUADRATIC",<0x00>,"abcdefghijklmnopqrstuv" example, the receiver should display "QUADRATIC" properly.

Personally, I don't like null termination, I think length termination is more in keeping with the spirit of RDM. But given the number of C programmers in the world that are more comfortable with null termination, there's nothing wrong with using it.
ericthegeek is offline   Reply With Quote
Old July 22nd, 2016   #2
hamish
Member
 
hamish's Avatar
 
Join Date: Apr 2009
Location: Dartmoor, Devon, England
Posts: 56
Send a message via Skype™ to hamish
Default

Not sure I'm quite on the same page, the standard, as it is written, may not be entierly expicit.

If as is suggested, null termination is generally acceptable, then I would expect the relevant text to read something akin to

Text fields shall either terminate based on Parameter Data Length or when a NULL is encountered.

IMO The standard states that string lengths shall be PDL determined,
this being the correct approach. It then ads a caveat with the statement however, determining the appropriate treatment, in the case of a null character being encountered.

By using PDL length determined strings, there is no doubt that the implimentation will be compliant with the standard.
__________________
______________________________________________
Hamish Dumbreck
hamish is offline   Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:48 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2026, vBulletin Solutions, Inc.