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

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

Reply
 
Thread Tools Search this Thread Display Modes
Old September 28th, 2006   #1
sjackman
Task Group Member
 
Join Date: Sep 2006
Posts: 26
Default Sensor string tables

Following are the string tables used for sensors. The text encoding is UTF-8. Hope this is useful.

Cheers,
Shaun Jackman
Pathway Connectivity

Code:
static const char *types[] = {
	"Temperature", "Voltage", "Current", "Frequency",
	"Resistance", "Power", "Mass", "Length", "Area", "Volume",
	"Density", "Velocity", "Acceleration", "Force", "Energy",
	"Pressure", "Time", "Angle",
	"Position X", "Position Y", "Position Z", "Angular velocity",
	"Luminous intensity", "Luminous flux", "Illuminance",
	"Chrominance red", "Chrominance green", "Chrominance blue",
	"Contact", "Memory", "Item", "Humidity", "Counter 16 bit",
	"Other", "Manufacturer-specific",
};

static const char *units[] = {
	"", "C",
	"V (DC)", "V (AC peak)", "V (AC RMS)",
	"A (DC)", "A (AC peak)", "A (AC RMS)",
	"Hz", "Ω", "W", "kg",
	"m", "m", "m", "kg/m", "m/s", "m/s",
	"N", "J", "Pa", "s", "",
	"sr", "cd", "lm", "lx", "IRE", "B",
};

static const char *prefixes[] = {
	"",
	"d", "c", "m", "", "n", "p", "f", "a", "z", "y",
	"da", "h", "k", "M", "G", "T", "P", "E", "Z", "Y",
};

static const float factors[] = {
	1,
	1e-1, 1e-2, 1e-3, 1e-6, 1e-9,
	1e-12, 1e-15, 1e-18, 1e-21, 1e-24,
	1e1, 1e2, 1e3, 1e6, 1e9, 1e12, 1e15, 1e18, 1e21, 1e24,
};

struct sensor_definition {
	uint8_t sensor;
	uint8_t type;
	uint8_t unit;
	uint8_t prefix;
	uint16_t range_min;
	uint16_t range_max;
	uint16_t normal_min;
	uint16_t normal_max;
	uint8_t recorded_value_support;
	char description[32];
};

struct sensor_value {
	uint8_t sensor;
	uint16_t present;
	uint16_t lowest;
	uint16_t highest;
	uint16_t recorded;
} __attribute__((packed));
sjackman is offline   Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Reset sensor data of all sensors sjackman RDM Interpretation Questions 1 January 20th, 2008 07:47 PM


All times are GMT -6. The time now is 09:20 AM.


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