PDA

View Full Version : RDM Appendix A #define header file attached


sblair
August 27th, 2006, 04:21 PM
Appendix A #define file attached

I'm posting a complete .h file for all the #defines in Appendix A. The easiest place to make a mistake in implementing RDM is entering the wrong #define.

Every entry in Appendix A is listed in here. In order to avoid #define duplicates in existing code, all the defines are prefixed with E120_ to keep it clear.

If you have any questions or catch a discrepancy, let me know.


Revision History
9/18/06 Added Copyright and usage permissions.
9/21/06 Removed some non-ASCII characters in the comments.
10/01/06 Added Protocol Version define. Removed some stray spaces breaking GCC compliles

sjackman
September 18th, 2006, 11:47 AM
Thanks, Scott! I'd like to update the Wireshark (previously known as Ethereal) protocol decoder. Could you please add a copyright and license statement to the header file? For the license statement, I would suggest...

Permission to use, copy, modify, and distribute this software
is freely granted, provided that this notice is preserved.

Alternatively, you could simply put the file in the public domain.

Thanks!
Shaun Jackman

sblair
September 18th, 2006, 06:05 PM
Shaun,

I've added the information you need and updated the attached file above.

Let me know how it works out.

sjackman
September 19th, 2006, 10:13 AM
Thanks, Scott. Looks great.

Cheers,
Shaun

sjackman
September 19th, 2006, 11:47 AM
Scott,

One more note. The header file is either corrupted or non-ASCII/non-ISO/non-UTF. It contains the character 150 (0x96), which I suspect should be a hyphen or a dash, and the character 146 (0x92), which I suspect should be an apostrophe.

Cheers,
Shaun


$ diff /tmp/RDM.h rdm-e120.h |cat -v
26c26
< /* RDM Protocol Data Structure IDM-^Rs (Slot 1) */
---
> /* RDM Protocol Data Structure ID's (Slot 1) */
29c29
< /* Broadcast Device UIDM-^Rs */
---
> /* Broadcast Device UID's */
168c168
< /* Fixture Accessories M-^V add-ons to fixtures or projectors */
---
> /* Fixture Accessories - add-ons to fixtures or projectors */
245c245
< #define E120_PRODUCT_CATEGORY_OTHER 0x7FFF /* For devices that arenM-^Rt described within this table. */
---
> #define E120_PRODUCT_CATEGORY_OTHER 0x7FFF /* For devices that aren't described within this table. */

sblair
September 21st, 2006, 10:35 PM
Shaun,

I think I got them all out now.

Scott

sjackman
September 27th, 2006, 02:00 PM
The header file is missing a */ to end a comment on line 545, which annoys GCC.

../rdm-e120.h:546:1: error: "/*" within comment

Cheers,
Shaun

--- rdm-e120.h 19 Sep 2006 19:51:24 -0000 1.1
+++ rdm-e120.h 27 Sep 2006 19:59:26 -0000
@@ -542,7 +542,7 @@
#define E120_DS_UNSIGNED_WORD 0x05 /* Data is an array of unsigned 16-bit words */
#define E120_DS_SIGNED_WORD 0x06 /* Data is an array of signed 16-bit words */
#define E120_DS_UNSIGNED_DWORD 0x07 /* Data is an array of unsigned 32-bit words */
-#define E120_DS_SIGNED_DWORD 0x08 /* Data is an array of signed 32-bit words
+#define E120_DS_SIGNED_DWORD 0x08 /* Data is an array of signed 32-bit words */
/* Manufacturer-Specific Data Types 0x80-
0xDF */

sjackman
September 29th, 2006, 01:12 PM
This patch adds the protocol version used by the device info parameter.

Cheers,
Shaun


--- rdm-e120.h 27 Sep 2006 20:01:00 -0000 1.2
+++ rdm-e120.h 29 Sep 2006 19:08:45 -0000
@@ -20,6 +20,9 @@
/*****************************************************************/


+/* Protocol version. */
+#define E120_PROTOCOL_VERSION 0x100
+
/* RDM START CODE (Slot 0) */
#define E120_SC_RDM 0xCC

sjackman
September 30th, 2006, 12:51 PM
There is a stray space in `E120_STATUS_GET_LAST_ MESSAGE' (sic).


150c150
< #define E120_STATUS_GET_LAST_ MESSAGE 0x01
---
> #define E120_STATUS_GET_LAST_MESSAGE 0x01


Cheers,
Shaun

sblair
October 1st, 2006, 02:41 PM
Shaun,

I added the Protocol Version and fixed the stray space and GCC line wrap issue.

Scott

sjackman
November 17th, 2006, 02:03 PM
There is a stray space in `E120_PRODUCT_DETAIL_NOT DECLARED'.


258c258
< #define E120_PRODUCT_DETAIL_NOT DECLARED 0x0000
---
> #define E120_PRODUCT_DETAIL_NOT_DECLARED 0x0000


Cheers,
Shaun

sjackman
November 20th, 2006, 11:24 AM
This patch adds constants for the control field of the mute/un-mute messages.

Cheers,
Shaun


diff -u -p -r1.4 rdm-e120.h
--- rdm-e120.h 17 Oct 2006 19:22:06 -0000 1.4
+++ rdm-e120.h 20 Nov 2006 18:16:02 -0000
@@ -68,6 +68,12 @@
#define E120_PROXIED_DEVICE_COUNT 0x0011
#define E120_COMMS_STATUS 0x0015

+/* Discovery Mute/Un-Mute Messages Control Field. See Table 7-3. */
+#define E120_CONTROL_PROXIED_DEVICE 0x0008
+#define E120_CONTROL_BOOT_LOADER 0x0004
+#define E120_CONTROL_SUB_DEVICE 0x0002
+#define E120_CONTROL_MANAGED_PROXY 0x0001
+
/* Category - Status Collection */
#define E120_QUEUED_MESSAGE 0x0020 /* See Table A-4 */
#define E120_STATUS_MESSAGES 0x0030 /* See Table A-4 */