E1.20 RDM (Remote Device Management) Protocol Forums

E1.20 RDM (Remote Device Management) Protocol Forums (http://www.rdmprotocol.org/forums/index.php)
-   RDM General Implementation Discussion (http://www.rdmprotocol.org/forums/forumdisplay.php?f=4)
-   -   Sensor string tables (http://www.rdmprotocol.org/forums/showthread.php?t=48)

sjackman September 28th, 2006 05:16 PM

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));



All times are GMT -6. The time now is 01:47 PM.

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