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.

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old February 2nd, 2014   #2
sblair
Administrator
 
Join Date: Feb 2006
Posts: 441
Send a message via AIM to sblair Send a message via MSN to sblair
Default

Welcome to the forums George!

I'll take the second part first. All the units for Sensors are pre-defined within the protocol. So a controller that supports Sensors should have support for all the unit types listed in Table A-13.

SUPPORTED_PARAMETERS is only used to tell the controller what messages (PIDs) that are implemented in the device. There is very little a controller can do with a device without using SUPPORTED_PARAMETERS to find out the capabilities of the device.

Here's some code snippets that show temperature sensor implementations. Sometimes code is faster than English

Sorry for the whitespace mangling the forums do to it, but it should be somewhat readable. This is how to define a message. Then the SENSOR_VALUE message is used to get the actual values for the sensor after it has been defined.

Code:
 
case
E120_SENSOR_DEFINITION:
switch(pRdmMessage->uData[0])
{
case 0: //CPU Temp
i = 0; ParamData[i++] = 0; //Sens # ParamData[i++] = E120_SENS_TEMPERATURE; //Type ParamData[i++] = E120_UNITS_CENTIGRADE; //Unit ParamData[i++] = E120_PREFIX_NONE; //Prefix ParamData[i++] = (BYTE)(RDM_MINIMUM_TEMPERATURE >> 8); //Range Min Value 16-bit ParamData[i++] = (BYTE)(RDM_MINIMUM_TEMPERATURE); ParamData[i++] = (BYTE)(RDM_MAXIMUM_TEMPERATURE >>8); //Range Max Value 16-bit ParamData[i++] = (BYTE)(RDM_MAXIMUM_TEMPERATURE); ParamData[i++] = (BYTE)(RDM_MINIMUM_TEMPERATURE >> 8); //Normal Min 16-bit ParamData[i++] = (BYTE)(RDM_MINIMUM_TEMPERATURE);
ParamData[i++] = (BYTE)(RDM_MAXIMUM_TEMPERATURE >> 8); //Normal Max/ 16-bit
ParamData[i++] = (BYTE)(RDM_MAXIMUM_TEMPERATURE); ParamData[i++] = 2; //Recorded Value Bit Masks: Bit 1 indicates Max/Min support strcpy((char*)(pParamData+i), "CPU Temp");
BufferSize = (BYTE)(i + 8);
respond = TRUE; //Description variable 32 chars.
break;
__________________
Scott M. Blair
RDM Protocol Forums Admin
sblair is offline   Reply With Quote
 

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
QUEUED_MESSAGE - must controllers support this? berntd RDM General Implementation Discussion 4 December 11th, 2024 08:53 AM
Sensor type and Sensor unit for No of Phases question berntd RDM General Implementation Discussion 1 October 1st, 2009 10:04 PM
Sensor type and Sensor unit for DMX rate question berntd RDM General Implementation Discussion 3 October 1st, 2009 12:41 AM
DMX/RDM support in new SBC tracyu RDM Marketplace Discussion 0 June 2nd, 2008 05:57 PM


All times are GMT -6. The time now is 10:57 AM.


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