// Constant definitions for ANSI E1.20 RDM and associated specifications.
// Compiled by Shawn Silverman on 02-Feb-2019.
// Updated to add changes to tables B-2 and C-2 from http://www.esta.org/rdm on
// 11-Jul-2019.
// (c) 2019 Shawn Silverman
//
// Permission to use, copy, modify, and distribute this software
// is freely granted, provided that this notice is preserved.

// NOTES
// There are new variables fixing spelling mistakes for some of the variable
// names in E1.20. Variable names are not part of the protocol and won't affect
// implementation, however, the old spellings were kept and marked
// as [[deprecated("spelling")]].
// The list:
// * PRODUCT_DETAIL_FLUORESCENT fixes PRODUCT_DETAIL_FLUROESCENT
// * PRODUCT_DETAIL_OLFACTORY_STIMULATOR fixes PRODUCT_DETAIL_OLEFACTORY_STIMULATOR
// * PRODUCT_DETAIL_PROTOCOL_CONVERTER updates PRODUCT_DETAIL_PROTOCOL_CONVERTOR
//   (technically, "convertor" is a correct spelling, but "converter" is much more common)
// * PREFIX_FEMTO fixes PREFIX_FEMPTO
// * PREFIX_TERA fixes PREFIX_TERRA

#ifndef RDMCONST_H_
#define RDMCONST_H_

namespace rdm {

// ===========================================================================
//  ANSI E1.20 RDM
// ===========================================================================

// ---------------------------------------------------------------------------
//  7.6 Discovery Mute/Un-Mute Messages
// ---------------------------------------------------------------------------

// Table 7-3: Control Field
constexpr auto MUTE_CONTROL_PROXIED_DEVICE_MASK = (1 << 3);
constexpr auto MUTE_CONTROL_BOOT_LOADER_MASK    = (1 << 2);
constexpr auto MUTE_CONTROL_SUB_DEVICE_MASK     = (1 << 1);
constexpr auto MUTE_CONTROL_MANAGED_PROXY_MASK  = (1 << 0);

// ---------------------------------------------------------------------------
//  10.7.1 Get Sensor Definition (SENSOR_DEFINITION)
// ---------------------------------------------------------------------------

// Recorded Value support
constexpr auto SENSOR_MIN_MAX_SUPPORTED_MASK        = (1 << 1);
constexpr auto SENSOR_RECORDED_VALUE_SUPPORTED_MASK = (1 << 0);

// ---------------------------------------------------------------------------
//  Appendix A: Defined Parameters
// ---------------------------------------------------------------------------

// Protocol version.
constexpr auto PROTOCOL_VERSION = 0x100;

// START codes (Slot 0)
constexpr auto SC_RDM         = 0xCC;

// RDM Protocol Data Structure ID’s (Slot 1)
constexpr auto SC_SUB_MESSAGE = 0x01;

// Broadcast all Manufacturers
constexpr unsigned char BROADCAST_ALL_DEVICES_ID[6]{0xFF, 0xFF, 0xFF,
                                                    0xFF, 0xFF, 0xFF};
// Specific Manufacturer ID 0xmmmm
// ALL_DEVICES_ID = 0xmmmmFFFFFFFF

constexpr auto SUB_DEVICE_ALL_CALL = 0xFFFF;

// Table A-1: Command Class Defines
// [RDM Command Classes (Slot 20)]
constexpr auto DISCOVERY_COMMAND          = 0x10;
constexpr auto DISCOVERY_COMMAND_RESPONSE = 0x11;
constexpr auto GET_COMMAND                = 0x20;
constexpr auto GET_COMMAND_RESPONSE       = 0x21;
constexpr auto SET_COMMAND                = 0x30;
constexpr auto SET_COMMAND_RESPONSE       = 0x31;

// Table A-2: Response Type Defines
// [RDM Response Type (Slot 16)]
constexpr auto RESPONSE_TYPE_ACK          = 0x00;
constexpr auto RESPONSE_TYPE_ACK_TIMER    = 0x01;
constexpr auto RESPONSE_TYPE_NACK_REASON  = 0x02;  // See Table A-17
constexpr auto RESPONSE_TYPE_ACK_OVERFLOW = 0x03;  // Additional Response Data available beyond single response length.

// Table A-3: RDM Categories/Parameter ID Defines
// [RDM Parameter ID’s (Slot 21-22)]
// Category - Network Management
constexpr auto DISC_UNIQUE_BRANCH                 = 0x0001;  // Required
constexpr auto DISC_MUTE                          = 0x0002;  // Required
constexpr auto DISC_UN_MUTE                       = 0x0003;  // Required
constexpr auto PROXIED_DEVICES                    = 0x0010;  // GET
constexpr auto PROXIED_DEVICE_COUNT               = 0x0011;  // GET
constexpr auto COMMS_STATUS                       = 0x0015;  // GET, SET
// Category - Status Collection
constexpr auto QUEUED_MESSAGE                     = 0x0020;  // GET, See Table A-4
constexpr auto STATUS_MESSAGES                    = 0x0030;  // GET, See Table A-4
constexpr auto STATUS_ID_DESCRIPTION              = 0x0031;  // GET
constexpr auto CLEAR_STATUS_ID                    = 0x0032;  // SET
constexpr auto SUB_DEVICE_STATUS_REPORT_THRESHOLD = 0x0033;  // GET, SET, See Table A-4
// Category - RDM Information
constexpr auto SUPPORTED_PARAMETERS               = 0x0050;  // GET, Support required only if supporting Parameters beyond the minimum required set.
constexpr auto PARAMETER_DESCRIPTION              = 0x0051;  // GET, Support required for Manufacturer-Specific PIDs exposed in SUPPORTED_PARAMETERS message.
// Category - Product Information
constexpr auto DEVICE_INFO                        = 0x0060;  // GET, Required
constexpr auto PRODUCT_DETAIL_ID_LIST             = 0x0070;  // GET
constexpr auto DEVICE_MODEL_DESCRIPTION           = 0x0080;  // GET
constexpr auto MANUFACTURER_LABEL                 = 0x0081;  // GET
constexpr auto DEVICE_LABEL                       = 0x0082;  // GET, SET
constexpr auto FACTORY_DEFAULTS                   = 0x0090;  // GET, SET
constexpr auto LANGUAGE_CAPABILITIES              = 0x00A0;  // GET
constexpr auto LANGUAGE                           = 0x00B0;  // GET, SET
constexpr auto SOFTWARE_VERSION_LABEL             = 0x00C0;  // GET, Required
constexpr auto BOOT_SOFTWARE_VERSION_ID           = 0x00C1;  // GET
constexpr auto BOOT_SOFTWARE_VERSION_LABEL        = 0x00C2;  // GET
// Category - DMX512 Setup
constexpr auto DMX_PERSONALITY                    = 0x00E0;  // GET, SET
constexpr auto DMX_PERSONALITY_DESCRIPTION        = 0x00E1;  // GET
constexpr auto DMX_START_ADDRESS                  = 0x00F0;  // GET, SET, Support required if device uses a DMX512 Slot.
constexpr auto SLOT_INFO                          = 0x0120;  // GET
constexpr auto SLOT_DESCRIPTION                   = 0x0121;  // GET
constexpr auto DEFAULT_SLOT_VALUE                 = 0x0122;  // GET
// Category - Sensors (0x02xx)
constexpr auto SENSOR_DEFINITION                  = 0x0200;  // GET
constexpr auto SENSOR_VALUE                       = 0x0201;  // GET, SET
constexpr auto RECORD_SENSORS                     = 0x0202;  // SET
// Category - Dimmer Settings (0x03xx) (Future)
// Category - Power/Lamp Settings (0x04xx)
constexpr auto DEVICE_HOURS                       = 0x0400;  // GET, SET
constexpr auto LAMP_HOURS                         = 0x0401;  // GET, SET
constexpr auto LAMP_STRIKES                       = 0x0402;  // GET, SET
constexpr auto LAMP_STATE                         = 0x0403;  // GET, SET, See Table A-8
constexpr auto LAMP_ON_MODE                       = 0x0404;  // GET, SET, See Table A-9
constexpr auto DEVICE_POWER_CYCLES                = 0x0405;  // GET, SET
// Category - Display Settings (0x05xx)
constexpr auto DISPLAY_INVERT                     = 0x0500;  // GET, SET
constexpr auto DISPLAY_LEVEL                      = 0x0501;  // GET, SET
// Category - Configuration (0x06xx)
constexpr auto PAN_INVERT                         = 0x0600;  // GET, SET
constexpr auto TILT_INVERT                        = 0x0601;  // GET, SET
constexpr auto PAN_TILT_SWAP                      = 0x0602;  // GET, SET
constexpr auto REAL_TIME_CLOCK                    = 0x0603;  // GET, SET
// Category - Control (0x10xx)
constexpr auto IDENTIFY_DEVICE                    = 0x1000;  // GET, SET, Required
constexpr auto RESET_DEVICE                       = 0x1001;  // SET
constexpr auto POWER_STATE                        = 0x1010;  // GET, SET, See Table A-11
constexpr auto PERFORM_SELFTEST                   = 0x1020;  // GET, SET, See Table A-10
constexpr auto SELF_TEST_DESCRIPTION              = 0x1021;  // GET
constexpr auto CAPTURE_PRESET                     = 0x1030;  // SET
constexpr auto PRESET_PLAYBACK                    = 0x1031;  // GET, SET, See Table A-7
// ESTA Reserved Future RDM Development (0x7FE0-0x7FFF)
// Manufacturer-Specific PIDs           (0x8000-0xFFDF)
// ESTA Reserved Future RDM Development (0xFFE0-0xFFFF)

// Table A-4: Status Type Defines
constexpr auto STATUS_NONE             = 0x00;  // Not allowed for use with GET: QUEUED_MESSAGE
constexpr auto STATUS_GET_LAST_MESSAGE = 0x01;
constexpr auto STATUS_ADVISORY         = 0x02;
constexpr auto STATUS_WARNING          = 0x03;
constexpr auto STATUS_ERROR            = 0x04;
constexpr auto STATUS_ADVISORY_CLEARED = 0x12;  // Added in E1.20-2010
constexpr auto STATUS_WARNING_CLEARED  = 0x13;  // Added in E1.20-2010
constexpr auto STATUS_ERROR_CLEARED    = 0x14;  // Added in E1.20-2010

// Table A-5: Product Category Defines
constexpr auto PRODUCT_CATEGORY_NOT_DECLARED             = 0x0000;
// Fixtures - intended as source of illumination (See Note 1)
constexpr auto PRODUCT_CATEGORY_FIXTURE                  = 0x0100;  // No Fine Category declared
constexpr auto PRODUCT_CATEGORY_FIXTURE_FIXED            = 0x0101;  // No pan / tilt / focus style functions
constexpr auto PRODUCT_CATEGORY_FIXTURE_MOVING_YOKE      = 0x0102;
constexpr auto PRODUCT_CATEGORY_FIXTURE_MOVING_MIRROR    = 0x0103;
constexpr auto PRODUCT_CATEGORY_FIXTURE_OTHER            = 0x01FF;  // For example, focus but no pan/tilt.
// Fixture Accessories - add-ons to fixtures or projectors
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY        = 0x0200;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY_COLOR  = 0x0201;  // Scrollers / Color Changers
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY_YOKE   = 0x0202;  // Yoke add-on
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY_MIRROR = 0x0203;  // Moving mirror add-on
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY_EFFECT = 0x0204;  // Effects Discs
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY_BEAM   = 0x0205;  // Gobo Rotators / Iris / Shutters / Dousers / Beam modifiers.
constexpr auto PRODUCT_CATEGORY_FIXTURE_ACCESSORY_OTHER  = 0x02FF;
// Projectors - light source capable of producing realistic images from another media (Video / Slide / Oil Wheel / Film / LCD)
constexpr auto PRODUCT_CATEGORY_PROJECTOR                = 0x0300;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_PROJECTOR_FIXED          = 0x0301;  // No pan / tilt functions.
constexpr auto PRODUCT_CATEGORY_PROJECTOR_MOVING_YOKE    = 0x0302;
constexpr auto PRODUCT_CATEGORY_PROJECTOR_MOVING_MIRROR  = 0x0303;
constexpr auto PRODUCT_CATEGORY_PROJECTOR_OTHER          = 0x03FF;
// Atmospheric Effect - earth/wind/fire
constexpr auto PRODUCT_CATEGORY_ATMOSPHERIC              = 0x0400;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_ATMOSPHERIC_EFFECT       = 0x0401;  // Fogger / Hazer / Flame, etc.
constexpr auto PRODUCT_CATEGORY_ATMOSPHERIC_PYRO         = 0x0402;  // See Note 2.
constexpr auto PRODUCT_CATEGORY_ATMOSPHERIC_OTHER        = 0x04FF;
// Intensity Control (specifically Dimming equipment)
constexpr auto PRODUCT_CATEGORY_DIMMER                   = 0x0500;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_DIMMER_AC_INCANDESCENT   = 0x0501;  // AC > 50VAC
constexpr auto PRODUCT_CATEGORY_DIMMER_AC_FLUORESCENT    = 0x0502;
constexpr auto PRODUCT_CATEGORY_DIMMER_AC_COLDCATHODE    = 0x0503;  // High Voltage outputs such as Neon or other cold cathode.
constexpr auto PRODUCT_CATEGORY_DIMMER_AC_NONDIM         = 0x0504;  // Non-Dim module in dimmer rack.
constexpr auto PRODUCT_CATEGORY_DIMMER_AC_ELV            = 0x0505;  // AC <= 50V such as 12/24V AC Low voltage lamps.
constexpr auto PRODUCT_CATEGORY_DIMMER_AC_OTHER          = 0x0506;
constexpr auto PRODUCT_CATEGORY_DIMMER_DC_LEVEL          = 0x0507;  // Variable DC level output.
constexpr auto PRODUCT_CATEGORY_DIMMER_DC_PWM            = 0x0508;  // Chopped (PWM) output.
constexpr auto PRODUCT_CATEGORY_DIMMER_CS_LED            = 0x0509;  // Specialized LED dimmer.
constexpr auto PRODUCT_CATEGORY_DIMMER_OTHER             = 0x05FF;
// Power Control (other than Dimming equipment)
constexpr auto PRODUCT_CATEGORY_POWER                    = 0x0600;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_POWER_CONTROL            = 0x0601;  // Contactor racks, other forms of Power Controllers.
constexpr auto PRODUCT_CATEGORY_POWER_SOURCE             = 0x0602;  // Generators
constexpr auto PRODUCT_CATEGORY_POWER_OTHER              = 0x06FF;
// Scenic Drive - including motorized effects unrelated to light source.
constexpr auto PRODUCT_CATEGORY_SCENIC                   = 0x0700;  // No Fine Category declared
constexpr auto PRODUCT_CATEGORY_SCENIC_DRIVE             = 0x0701;  // Rotators / Kabuki drops, etc. See Note 2.
constexpr auto PRODUCT_CATEGORY_SCENIC_OTHER             = 0x07FF;
// DMX Infrastructure, conversion and interfaces
constexpr auto PRODUCT_CATEGORY_DATA                     = 0x0800;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_DATA_DISTRIBUTION        = 0x0801;  // Splitters / repeaters / data patch / Ethernet products used to distribute DMX universes.
constexpr auto PRODUCT_CATEGORY_DATA_CONVERSION          = 0x0802;  // Protocol Conversion analog decoders.
constexpr auto PRODUCT_CATEGORY_DATA_OTHER               = 0x08FF;
// Audio-Visual Equipment
constexpr auto PRODUCT_CATEGORY_AV                       = 0x0900;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_AV_AUDIO                 = 0x0901;  // Audio controller or device.
constexpr auto PRODUCT_CATEGORY_AV_VIDEO                 = 0x0902;  // Video controller or display device.
constexpr auto PRODUCT_CATEGORY_AV_OTHER                 = 0x09FF;
// Parameter Monitoring Equipment (See Note 3.)
constexpr auto PRODUCT_CATEGORY_MONITOR                  = 0x0A00;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_MONITOR_ACLINEPOWER      = 0x0A01;  // Product that monitors AC line voltage, current or power.
constexpr auto PRODUCT_CATEGORY_MONITOR_DCPOWER          = 0x0A02;  // Product that monitors DC line voltage, current or power.
constexpr auto PRODUCT_CATEGORY_MONITOR_ENVIRONMENTAL    = 0x0A03;  // Temperature or other environmental parameter.
constexpr auto PRODUCT_CATEGORY_MONITOR_OTHER            = 0x0AFF;
// Controllers, Backup devices
constexpr auto PRODUCT_CATEGORY_CONTROL                  = 0x7000;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_CONTROL_CONTROLLER       = 0x7001;
constexpr auto PRODUCT_CATEGORY_CONTROL_BACKUPDEVICE     = 0x7002;
constexpr auto PRODUCT_CATEGORY_CONTROL_OTHER            = 0x70FF;
// Test Equipment
constexpr auto PRODUCT_CATEGORY_TEST                     = 0x7100;  // No Fine Category declared.
constexpr auto PRODUCT_CATEGORY_TEST_EQUIPMENT           = 0x7101;
constexpr auto PRODUCT_CATEGORY_TEST_EQUIPMENT_OTHER     = 0x71FF;
// Miscellaneous
constexpr auto PRODUCT_CATEGORY_OTHER                    = 0x7FFF;  // For devices that aren't described within this table.
// Manufacturer Specific Categories (0x8000 - 0xDFFF)
// Note 1: A fixture in this context is defined as a light source intended as a means of illumination. A projector is a light source capable of producing realistic images from another media. A light source intended for use with Fiber Optics should be classified as a fixture.
// Note 2: The DMX512 standard specifically states that, as there is no mandatory error checking, DMX512 is not an appropriate control protocol for hazardous applications. RDM may, however, be appropriate for configuration and monitoring purposes.
// Note 3: This category is for equipment that has no DMX512 control capability, but uses RDM to provide a data logging or monitoring function.

// Table A-6: Product Detail Defines
// [Product Detail ID Defines]
constexpr auto PRODUCT_DETAIL_NOT_DECLARED          = 0x0000;
// Generally applied to fixtures
constexpr auto PRODUCT_DETAIL_ARC                   = 0x0001;  // Intended for constant light output.
constexpr auto PRODUCT_DETAIL_METAL_HALIDE          = 0x0002;
constexpr auto PRODUCT_DETAIL_INCANDESCENT          = 0x0003;
constexpr auto PRODUCT_DETAIL_LED                   = 0x0004;
[[deprecated("spelling")]]
constexpr auto PRODUCT_DETAIL_FLUROESCENT           = 0x0005;
constexpr auto PRODUCT_DETAIL_FLUORESCENT           = 0x0005;  // (FIXES PRODUCT_DETAIL_FLUROESCENT)
constexpr auto PRODUCT_DETAIL_COLDCATHODE           = 0x0006;  // includes Neon/Argon
constexpr auto PRODUCT_DETAIL_ELECTROLUMINESCENT    = 0x0007;
constexpr auto PRODUCT_DETAIL_LASER                 = 0x0008;
constexpr auto PRODUCT_DETAIL_FLASHTUBE             = 0x0009;  // Strobes or other flashtubes
// Generally applied to fixture accessories
constexpr auto PRODUCT_DETAIL_COLORSCROLLER         = 0x0100;
constexpr auto PRODUCT_DETAIL_COLORWHEEL            = 0x0101;
constexpr auto PRODUCT_DETAIL_COLORCHANGE           = 0x0102;  // Semaphore or other type
constexpr auto PRODUCT_DETAIL_IRIS_DOUSER           = 0x0103;
constexpr auto PRODUCT_DETAIL_DIMMING_SHUTTER       = 0x0104;
constexpr auto PRODUCT_DETAIL_PROFILE_SHUTTER       = 0x0105;  // hard-edge beam masking
constexpr auto PRODUCT_DETAIL_BARNDOOR_SHUTTER      = 0x0106;  // soft-edge beam masking
constexpr auto PRODUCT_DETAIL_EFFECTS_DISC          = 0x0107;
constexpr auto PRODUCT_DETAIL_GOBO_ROTATOR          = 0x0108;
// Generally applied to Projectors
constexpr auto PRODUCT_DETAIL_VIDEO                 = 0x0200;
constexpr auto PRODUCT_DETAIL_SLIDE                 = 0x0201;
constexpr auto PRODUCT_DETAIL_FILM                  = 0x0202;
constexpr auto PRODUCT_DETAIL_OILWHEEL              = 0x0203;
constexpr auto PRODUCT_DETAIL_LCDGATE               = 0x0204;
// Generally applied to Atmospheric Effects
constexpr auto PRODUCT_DETAIL_FOGGER_GLYCOL         = 0x0300;  // Glycol/Glycerin hazer
constexpr auto PRODUCT_DETAIL_FOGGER_MINERALOIL     = 0x0301;  // White Mineral oil hazer
constexpr auto PRODUCT_DETAIL_FOGGER_WATER          = 0x0302;  // Water hazer
constexpr auto PRODUCT_DETAIL_C02                   = 0x0303;  // Dry Ice/Carbon Dioxide based
constexpr auto PRODUCT_DETAIL_LN2                   = 0x0304;  // Nitrogen based
constexpr auto PRODUCT_DETAIL_BUBBLE                = 0x0305;  // including foam
constexpr auto PRODUCT_DETAIL_FLAME_PROPANE         = 0x0306;
constexpr auto PRODUCT_DETAIL_FLAME_OTHER           = 0x0307;
[[deprecated("spelling")]]
constexpr auto PRODUCT_DETAIL_OLEFACTORY_STIMULATOR = 0x0308;  // Scents
constexpr auto PRODUCT_DETAIL_OLFACTORY_STIMULATOR  = 0x0308;  // (FIXES PRODUCT_DETAIL_OLEFACTORY_STIMULATOR)
constexpr auto PRODUCT_DETAIL_SNOW                  = 0x0309;
constexpr auto PRODUCT_DETAIL_WATER_JET             = 0x030A;  // Fountain controls etc
constexpr auto PRODUCT_DETAIL_WIND                  = 0x030B;  // Air Mover
constexpr auto PRODUCT_DETAIL_CONFETTI              = 0x030C;
constexpr auto PRODUCT_DETAIL_HAZARD                = 0x030D;  // Any form of pyrotechnic control or device.
// Generally applied to Dimmers/Power controllers (See Note 1)
constexpr auto PRODUCT_DETAIL_PHASE_CONTROL         = 0x0400;
constexpr auto PRODUCT_DETAIL_REVERSE_PHASE_CONTROL = 0x0401;  // includes FET/IGBT
constexpr auto PRODUCT_DETAIL_SINE                  = 0x0402;
constexpr auto PRODUCT_DETAIL_PWM                   = 0x0403;
constexpr auto PRODUCT_DETAIL_DC                    = 0x0404;  // Variable voltage
constexpr auto PRODUCT_DETAIL_HFBALLAST             = 0x0405;  // for Fluroescent
constexpr auto PRODUCT_DETAIL_HFHV_NEONBALLAST      = 0x0406;  // for Neon/Argon and other coldcathode.
constexpr auto PRODUCT_DETAIL_HFHV_EL               = 0x0407;  // for Electroluminscent
constexpr auto PRODUCT_DETAIL_MHR_BALLAST           = 0x0408;  // for Metal Halide
constexpr auto PRODUCT_DETAIL_BITANGLE_MODULATION   = 0x0409;
constexpr auto PRODUCT_DETAIL_FREQUENCY_MODULATION  = 0x040A;
constexpr auto PRODUCT_DETAIL_HIGHFREQUENCY_12V     = 0x040B;  // as commonly used with MR16 lamps
constexpr auto PRODUCT_DETAIL_RELAY_MECHANICAL      = 0x040C;  // See Note 1
constexpr auto PRODUCT_DETAIL_RELAY_ELECTRONIC      = 0x040D;  // See Note 1, Note 2
constexpr auto PRODUCT_DETAIL_SWITCH_ELECTRONIC     = 0x040E;  // See Note 1, Note 2
constexpr auto PRODUCT_DETAIL_CONTACTOR             = 0x040F;  // See Note 1
// Generally applied to Scenic drive
constexpr auto PRODUCT_DETAIL_MIRRORBALL_ROTATOR    = 0x0500;
constexpr auto PRODUCT_DETAIL_OTHER_ROTATOR         = 0x0501;  // includes turntables
constexpr auto PRODUCT_DETAIL_KABUKI_DROP           = 0x0502;
constexpr auto PRODUCT_DETAIL_CURTAIN               = 0x0503;  // flown or traveller
constexpr auto PRODUCT_DETAIL_LINESET               = 0x0504;
constexpr auto PRODUCT_DETAIL_MOTOR_CONTROL         = 0x0505;
constexpr auto PRODUCT_DETAIL_DAMPER_CONTROL        = 0x0506;  // HVAC Damper
// Generally applied to Data Distribution
constexpr auto PRODUCT_DETAIL_SPLITTER              = 0x0600;  // Includes buffers/repeaters
constexpr auto PRODUCT_DETAIL_ETHERNET_NODE         = 0x0601;  // DMX512 to/from Ethernet
constexpr auto PRODUCT_DETAIL_MERGE                 = 0x0602;  // DMX512 combiner
constexpr auto PRODUCT_DETAIL_DATAPATCH             = 0x0603;  // Electronic Datalink Patch
constexpr auto PRODUCT_DETAIL_WIRELESS_LINK         = 0x0604;  // radio/infrared
// Generally applied to Data Conversion and Interfaces
[[deprecated("spelling")]]
constexpr auto PRODUCT_DETAIL_PROTOCOL_CONVERTOR    = 0x0701;  // D54/AMX192/Non DMX serial links, etc to/from DMX512
constexpr auto PRODUCT_DETAIL_PROTOCOL_CONVERTER    = 0x0701;  // (UPDATES PRODUCT_DETAIL_PROTOCOL_CONVERTOR)
constexpr auto PRODUCT_DETAIL_ANALOG_DEMULTIPLEX    = 0x0702;  // DMX to DC voltage
constexpr auto PRODUCT_DETAIL_ANALOG_MULTIPLEX      = 0x0703;  // DC Voltage to DMX
constexpr auto PRODUCT_DETAIL_SWITCH_PANEL          = 0x0704;  // Pushbuttons to DMX or polled using RDM
// Generally applied to Audio or Video (AV) devices
constexpr auto PRODUCT_DETAIL_ROUTER                = 0x0800;  // Switching device
constexpr auto PRODUCT_DETAIL_FADER                 = 0x0801;  // Single channel
constexpr auto PRODUCT_DETAIL_MIXER                 = 0x0802;  // Multi-channel
// Generally applied to Controllers, Backup devices and Test Equipment
constexpr auto PRODUCT_DETAIL_CHANGEOVER_MANUAL     = 0x0900;  // requires manual intervention to assume control of DMX line
constexpr auto PRODUCT_DETAIL_CHANGEOVER_AUTO       = 0x0901;  // may automatically assume control of DMX line
constexpr auto PRODUCT_DETAIL_TEST                  = 0x0902;  // test equipment
// Could be applied to any category
constexpr auto PRODUCT_DETAIL_GFI_RCD               = 0x0A00; // device includes GFI/RCD trip
constexpr auto PRODUCT_DETAIL_BATTERY               = 0x0A01; // device is battery operated
constexpr auto PRODUCT_DETAIL_CONTROLLABLE_BREAKER  = 0x0A02;
// Manufacturer Specific Types (0x8000-0xDFFF)
constexpr auto PRODUCT_DETAIL_OTHER                 = 0x7FFF; // for use where the Manufacturer believes that none of the defined details apply.
// Note 1: Products intended for switching 50V AC / 120V DC or greater should be declared with a Product Category of PRODUCT_CATEGORY_POWER_CONTROL.
//         Products only suitable for extra low voltage switching (typically up to 50VAC / 30VDC) at currents less than 1 ampere should be declared with a Product Category of PRODUCT_CATEGORY_DATA_CONVERSION.
//         Please refer to GET: DEVICE_INFO and Table A-5 for an explanation of Product Category declaration.
// Note 2: Products with TTL, MOSFET or Open Collector Transistor Outputs or similar non-isolated electronic outputs should be declared as PRODUCT_DETAIL_SWITCH_ELECTRONIC. Use of PRODUCT_DETAIL_RELAY_ELECTRONIC shall be restricted to devices whereby the switched circuits are electrically isolated from the control signals.

// Table A-7: Preset Playback Defines
constexpr auto PRESET_PLAYBACK_OFF = 0x0000;  // Returns to Normal DMX512 Input
constexpr auto PRESET_PLAYBACK_ALL = 0xFFFF;  // Plays Scenes in Sequence if supported.
// PRESET_PLAYBACK_SCENE = range 0x0001-0xFFFE  // Plays individual Scene #

// Table A-8: Lamp State Defines
constexpr auto LAMP_OFF         = 0x00;  // No demonstrable light output
constexpr auto LAMP_ON          = 0x01;
constexpr auto LAMP_STRIKE      = 0x02;  // Arc-Lamp ignite
constexpr auto LAMP_STANDBY     = 0x03;  // Arc-Lamp Reduced Power Mode
constexpr auto LAMP_NOT_PRESENT = 0x04;  // Lamp not installed
constexpr auto LAMP_ERROR       = 0x7F;
// Manufacturer-Specific States = range 0x80-0xDF

// Table A-9: Lamp On Mode Defines
constexpr auto LAMP_ON_MODE_OFF       = 0x00; // Lamp Stays off until directly instructed to Strike.
constexpr auto LAMP_ON_MODE_DMX       = 0x01; // Lamp Strikes upon receiving a DMX512 signal.
constexpr auto LAMP_ON_MODE_ON        = 0x02; // Lamp Strikes automatically at Power-up.
constexpr auto LAMP_ON_MODE_AFTER_CAL = 0x03; // Lamp Strikes after Calibration or Homing procedure.
// Manufacturer-Specific Modes = range 0x80-0xDF

// Table A-10: Self Test Defines
constexpr auto SELF_TEST_OFF = 0x00;  // Turns Self Tests Off
// Manufacturer Tests = range 0x01-0xFE  // Various Manufacturer Self Tests
constexpr auto SELF_TEST_ALL = 0xFF;  // Self Test All, if applicable

// Table A-11: Power State Defines
constexpr auto POWER_STATE_FULL_OFF = 0x00;  // Completely disengages power to device. Device can no longer respond.
constexpr auto POWER_STATE_SHUTDOWN = 0x01;  // Reduced power mode, may require device reset to return to normal operation. Device still responds to messages.
constexpr auto POWER_STATE_STANDBY  = 0x02;  // Reduced power mode. Device can return to NORMAL without a reset. Device still responds to messages.
constexpr auto POWER_STATE_NORMAL   = 0xFF;  // Normal Operating Mode.

// Table A-12: Sensor Type Defines
constexpr auto SENS_TEMPERATURE        = 0x00;
constexpr auto SENS_VOLTAGE            = 0x01;
constexpr auto SENS_CURRENT            = 0x02;
constexpr auto SENS_FREQUENCY          = 0x03;
constexpr auto SENS_RESISTANCE         = 0x04;  // Eg: Cable resistance
constexpr auto SENS_POWER              = 0x05;
constexpr auto SENS_MASS               = 0x06;  // Eg: Truss load Cell
constexpr auto SENS_LENGTH             = 0x07;
constexpr auto SENS_AREA               = 0x08;
constexpr auto SENS_VOLUME             = 0x09;  // Eg: Smoke Fluid
constexpr auto SENS_DENSITY            = 0x0A;
constexpr auto SENS_VELOCITY           = 0x0B;
constexpr auto SENS_ACCELERATION       = 0x0C;
constexpr auto SENS_FORCE              = 0x0D;
constexpr auto SENS_ENERGY             = 0x0E;
constexpr auto SENS_PRESSURE           = 0x0F;
constexpr auto SENS_TIME               = 0x10;
constexpr auto SENS_ANGLE              = 0x11;
constexpr auto SENS_POSITION_X         = 0x12;  // E.g.: Lamp position on Truss
constexpr auto SENS_POSITION_Y         = 0x13;
constexpr auto SENS_POSITION_Z         = 0x14;
constexpr auto SENS_ANGULAR_VELOCITY   = 0x15;  // E.g.: Wind speed
constexpr auto SENS_LUMINOUS_INTENSITY = 0x16;
constexpr auto SENS_LUMINOUS_FLUX      = 0x17;
constexpr auto SENS_ILLUMINANCE        = 0x18;
constexpr auto SENS_CHROMINANCE_RED    = 0x19;
constexpr auto SENS_CHROMINANCE_GREEN  = 0x1A;
constexpr auto SENS_CHROMINANCE_BLUE   = 0x1B;
constexpr auto SENS_CONTACTS           = 0x1C;  // E.g.: Switch inputs.
constexpr auto SENS_MEMORY             = 0x1D;  // E.g.: ROM Size
constexpr auto SENS_ITEMS              = 0x1E;  // E.g.: Scroller gel frames.
constexpr auto SENS_HUMIDITY           = 0x1F;
constexpr auto SENS_COUNTER_16BIT      = 0x20;
constexpr auto SENS_OTHER              = 0x7F;
// Manufacturer-Specific Sensors = range 0x80-0xFF

// Table A-13: Sensor Unit Defines (Comments are Table A-12 Reference)
constexpr auto UNITS_NONE                        = 0x00;  // CONTACTS
constexpr auto UNITS_CENTIGRADE                  = 0x01;  // TEMPERATURE
constexpr auto UNITS_VOLTS_DC                    = 0x02;  // VOLTAGE
constexpr auto UNITS_VOLTS_AC_PEAK               = 0x03;  // VOLTAGE
constexpr auto UNITS_VOLTS_AC_RMS                = 0x04;  // VOLTAGE
constexpr auto UNITS_AMPERE_DC                   = 0x05;  // CURRENT
constexpr auto UNITS_AMPERE_AC_PEAK              = 0x06;  // CURRENT
constexpr auto UNITS_AMPERE_AC_RMS               = 0x07;  // CURRENT
constexpr auto UNITS_HERTZ                       = 0x08;  // FREQUENCY / ANG_VEL
constexpr auto UNITS_OHM                         = 0x09;  // RESISTANCE
constexpr auto UNITS_WATT                        = 0x0A;  // POWER
constexpr auto UNITS_KILOGRAM                    = 0x0B;  // MASS
constexpr auto UNITS_METERS                      = 0x0C;  // LENGTH / POSITION
constexpr auto UNITS_METERS_SQUARED              = 0x0D;  // AREA
constexpr auto UNITS_METERS_CUBED                = 0x0E;  // VOLUME
constexpr auto UNITS_KILOGRAMMES_PER_METER_CUBED = 0x0F;  // DENSITY
constexpr auto UNITS_METERS_PER_SECOND           = 0x10;  // VELOCITY
constexpr auto UNITS_METERS_PER_SECOND_SQUARED   = 0x11;  // ACCELERATION
constexpr auto UNITS_NEWTON                      = 0x12;  // FORCE
constexpr auto UNITS_JOULE                       = 0x13;  // ENERGY
constexpr auto UNITS_PASCAL                      = 0x14;  // PRESSURE
constexpr auto UNITS_SECOND                      = 0x15;  // TIME
constexpr auto UNITS_DEGREE                      = 0x16;  // ANGLE
constexpr auto UNITS_STERADIAN                   = 0x17;  // ANGLE
constexpr auto UNITS_CANDELA                     = 0x18;  // LUMINOUS_INTENSITY
constexpr auto UNITS_LUMEN                       = 0x19;  // LUMINOUS_FLUX
constexpr auto UNITS_LUX                         = 0x1A;  // ILLUMINANCE
constexpr auto UNITS_IRE                         = 0x1B;  // CHROMINANCE
constexpr auto UNITS_BYTE                        = 0x1C;  // MEMORY
// Manufacturer-Specific Units = range 0x80-0xFF

// Table A-14: Sensor Unit Prefix Defines
constexpr auto PREFIX_NONE   = 0x00;  // Multiply by 1
constexpr auto PREFIX_DECI   = 0x01;  // Multiply by 10^-1
constexpr auto PREFIX_CENTI  = 0x02;  // Multiply by 10^-2
constexpr auto PREFIX_MILLI  = 0x03;  // Multiply by 10^-3
constexpr auto PREFIX_MICRO  = 0x04;  // Multiply by 10^-6
constexpr auto PREFIX_NANO   = 0x05;  // Multiply by 10^-9
constexpr auto PREFIX_PICO   = 0x06;  // Multiply by 10^-12
[[deprecated("spelling")]]
constexpr auto PREFIX_FEMPTO = 0x07;  // Multiply by 10^-15
constexpr auto PREFIX_FEMTO  = 0x07;  // (FIXES PREFIX_FEMPTO)
constexpr auto PREFIX_ATTO   = 0x08;  // Multiply by 10^-18
constexpr auto PREFIX_ZEPTO  = 0x09;  // Multiply by 10^-21
constexpr auto PREFIX_YOCTO  = 0x0A;  // Multiply by 10^-24
constexpr auto PREFIX_DECA   = 0x11;  // Multiply by 10^+1
constexpr auto PREFIX_HECTO  = 0x12;  // Multiply by 10^+2
constexpr auto PREFIX_KILO   = 0x13;  // Multiply by 10^+3
constexpr auto PREFIX_MEGA   = 0x14;  // Multiply by 10^+6
constexpr auto PREFIX_GIGA   = 0x15;  // Multiply by 10^+9
[[deprecated("spelling")]]
constexpr auto PREFIX_TERRA  = 0x16;  // Multiply by 10^+12
constexpr auto PREFIX_TERA   = 0x16;  // (FIXES PREFIX_TERRA)
constexpr auto PREFIX_PETA   = 0x17;  // Multiply by 10^+15
constexpr auto PREFIX_EXA    = 0x18;  // Multiply by 10^+18
constexpr auto PREFIX_ZETTA  = 0x19;  // Multiply by 10^+21
constexpr auto PREFIX_YOTTA  = 0x1A;  // Multiply by 10^+24
// Notes:
// When a prefix is used with MEMORY, the multiplier refers to binary multiple. i.e. KILO means multiply by 1024.
// When a prefix is used with MASS, note that the UNIT is Kilogram. The prefix PREFIX_MILLI is used to denote grams.

// Table A-15: Data Type Defines
constexpr auto DS_NOT_DEFINED    = 0x00;  // Data type is not defined
constexpr auto DS_BIT_FIELD      = 0x01;  // Data is bit packed
constexpr auto DS_ASCII          = 0x02;  // Data is a string
constexpr auto DS_UNSIGNED_BYTE  = 0x03;  // Data is an array of unsigned bytes
constexpr auto DS_SIGNED_BYTE    = 0x04;  // Data is an array of signed bytes
constexpr auto DS_UNSIGNED_WORD  = 0x05;  // Data is an array of unsigned 16-bit words
constexpr auto DS_SIGNED_WORD    = 0x06;  // Data is an array of signed 16-bit words
constexpr auto DS_UNSIGNED_DWORD = 0x07;  // Data is an array of unsigned 32-bit words
constexpr auto DS_SIGNED_DWORD   = 0x08;  // Data is an array of signed 32-bit words
// Manufacturer-Specific Data Types = range 0x80-0xDF

// Table A-16: Parameter Description Command Class Defines
// [Command Class Defines]
constexpr auto CC_GET     = 0x01;  // PID supports GET only
constexpr auto CC_SET     = 0x02;  // PID supports SET only
constexpr auto CC_GET_SET = 0x03;  // PID supports GET & SET

// Table A-17: Response NACK Reason Code Defines
// [Response NACK Reason Codes]
constexpr auto NR_UNKNOWN_PID               = 0x0000;  // The responder cannot comply with request because the message is not implemented in responder.
constexpr auto NR_FORMAT_ERROR              = 0x0001;  // The responder cannot interpret request as controller data was not formatted correctly.
constexpr auto NR_HARDWARE_FAULT            = 0x0002;  // The responder cannot comply due to an internal hardware fault.
constexpr auto NR_PROXY_REJECT              = 0x0003;  // Proxy is not the RDM line master and cannot comply with message.
constexpr auto NR_WRITE_PROTECT             = 0x0004;  // SET Command normally allowed but being blocked currently.
constexpr auto NR_UNSUPPORTED_COMMAND_CLASS = 0x0005;  // Not valid for Command Class attempted. May be used where GET allowed but SET is not supported.
constexpr auto NR_DATA_OUT_OF_RANGE         = 0x0006;  // Value for given Parameter out of allowable range or not supported.
constexpr auto NR_BUFFER_FULL               = 0x0007;  // Buffer or Queue space currently has no free space to store data.
constexpr auto NR_PACKET_SIZE_UNSUPPORTED   = 0x0008;  // Incoming message exceeds buffer capacity.
constexpr auto NR_SUB_DEVICE_OUT_OF_RANGE   = 0x0009;  // Sub-Device is out of range or unknown.
constexpr auto NR_PROXY_BUFFER_FULL         = 0x000A;  // Proxy buffer is full and can not store any more Queued Message or Status Message responses.

// ---------------------------------------------------------------------------
//  Appendix B: Status Message ID's
// ---------------------------------------------------------------------------

// Table B-2: Status Message ID Definitions
// [Status Message ID, Value, Data Value 1, Data Value 2, Status ID Description]
constexpr auto STS_CAL_FAIL           = 0x0001;  // Slot Label Code, , "%L failed calibration"
constexpr auto STS_SENS_NOT_FOUND     = 0x0002;  // Slot Label Code, , "%L sensor not found"
constexpr auto STS_SENS_ALWAYS_ON     = 0x0003;  // Slot Label Code, , "%L sensor always on"
constexpr auto STS_LAMP_DOUSED        = 0x0011;  // N/A, , "Lamp doused"
constexpr auto STS_LAMP_STRIKE        = 0x0012;  // N/A, , "Lamp failed to strike"
constexpr auto STS_OVERTEMP           = 0x0021;  // Sensor Number, Temperature, "Sensor %d over temp at %d degrees C"
constexpr auto STS_UNDERTEMP          = 0x0022;  // Sensor, Temperature, "Sensor %d under temp at %d degrees C"
constexpr auto STS_SENS_OUT_RANGE     = 0x0023;  // Sensor Number, , "Sensor %d out of range"
constexpr auto STS_OVERVOLTAGE_PHASE  = 0x0031;  // Phase Number, Voltage, "Phase %d over voltage at %d V."
constexpr auto STS_UNDERVOLTAGE_PHASE = 0x0032;  // Phase Number, Voltage, "Phase %d under voltage at %d V."
constexpr auto STS_OVERCURRENT        = 0x0033;  // Phase Number, Current, "Phase %d over current at %d A."
constexpr auto STS_UNDERCURRENT       = 0x0034;  // Phase Number, Current, "Phase %d under current at %d A."
constexpr auto STS_PHASE              = 0x0035;  // Phase Number, Phase Angle, "Phase %d is at %d degrees"
constexpr auto STS_PHASE_ERROR        = 0x0036;  // Phase Number, , "Phase %d Error."
constexpr auto STS_AMPS               = 0x0037;  // Current, , "%d Amps"
constexpr auto STS_VOLTS              = 0x0038;  // Volts, , "%d Volts"
constexpr auto STS_DIMSLOT_OCCUPIED   = 0x0041;  // N/A, , "No Dimmer"
constexpr auto STS_BREAKER_TRIP       = 0x0042;  // N/A, , "Tripped Breaker"
constexpr auto STS_WATTS              = 0x0043;  // Wattage, , "%d Watts"
constexpr auto STS_DIM_FAILURE        = 0x0044;  // N/A, , "Dimmer Failure"
constexpr auto STS_DIM_PANIC          = 0x0045;  // N/A, , "Panic Mode"
constexpr auto STS_READY              = 0x0050;  // Slot Label Code, , "%L ready"
constexpr auto STS_NOT_READY          = 0x0051;  // Slot Label Code, , "%L not ready"
constexpr auto STS_LOW_FLUID          = 0x0052;  // Slot Label Code, , "%L low fluid"
// http://www.esta.org/rdm
constexpr auto STS_FEEDBACK_ERROR          = 0x0004;  // Slot Label Code, N/A, %L feedback error
constexpr auto STS_INDEX_ERROR             = 0x0005;  // Slot Label Code, N/A, %L index circuit error
constexpr auto STS_LAMP_ACCESS_OPEN        = 0x0013;  // N/A, N/A, Lamp access open
constexpr auto STS_LAMP_ALWAYS_ON          = 0x0014;  // N/A, N/A, Lamp on without command
constexpr auto STS_LOAD_FAILURE            = 0x0046;  // N/A, N/A, Lamp or cable failure
constexpr auto STS_EEPROM_ERROR            = 0x0060;  // N/A, N/A, EEPROM error
constexpr auto STS_RAM_ERROR               = 0x0061;  // N/A, N/A, RAM error
constexpr auto STS_FPGA_ERROR              = 0x0062;  // N/A, N/A, FPGA programming error
constexpr auto STS_PROXY_BROADCAST_DROPPED = 0x0070;  // Parameter ID, Transaction Number, Proxy Drop: PID %x at TN %d
constexpr auto STS_ASC_RXOK                = 0x0071;  // Alternate StartCode, N/A, DMX ASC %x, received OK
constexpr auto STS_ASC_DROPPED             = 0x0072;  // Alternate StartCode, N/A, DMX ASC %x, now dropped
constexpr auto STS_DMXNSCNONE              = 0x0080;  // N/A, N/A, DMX NSC never received
constexpr auto STS_DMXNSCLOSS              = 0x0081;  // N/A, N/A, DMX NSC received, now dropped
constexpr auto STS_DMXNSCERROR             = 0x0082;  // N/A, N/A, DMX NSC timing, or packet error
constexpr auto STS_DMXNSC_OK               = 0x0083;  // N/A, N/A, DMX NSC received OK

// ---------------------------------------------------------------------------
//  Appendix C: Slot Info
// ---------------------------------------------------------------------------

// Table C-1: Slot Types
// [Slot ID Type]
constexpr auto ST_PRIMARY          = 0x00;  // Slot directly controls parameter (represents Coarse for 16-bit parameters)
constexpr auto ST_SEC_FINE         = 0x01;  // Fine, for 16-bit parameters
constexpr auto ST_SEC_TIMING       = 0x02;  // Slot sets timing value for associated parameter
constexpr auto ST_SEC_SPEED        = 0x03;  // Slot sets speed/velocity for associated parameter
constexpr auto ST_SEC_CONTROL      = 0x04;  // Slot provides control/mode info for parameter
constexpr auto ST_SEC_INDEX        = 0x05;  // Slot sets index position for associated parameter
constexpr auto ST_SEC_ROTATION     = 0x06;  // Slot sets rotation speed for associated parameter
constexpr auto ST_SEC_INDEX_ROTATE = 0x07;  // Combined index/rotation control
constexpr auto ST_SEC_UNDEFINED    = 0xFF;  // Undefined secondary type

// Table C-2: Slot ID Definitions
// [Slot Category/ID]
// Intensity Functions (0x00xx)
constexpr auto SD_INTENSITY         = 0x0001;  // Intensity
constexpr auto SD_INTENSITY_MASTER  = 0x0002;  // Intensity Master
// Movement Functions (0x01xx)
constexpr auto SD_PAN               = 0x0101;  // Pan
constexpr auto SD_TILT              = 0x0102;  // Tilt
// Color Functions (0x02xx)
constexpr auto SD_COLOR_WHEEL       = 0x0201;  // Color Wheel
constexpr auto SD_COLOR_SUB_CYAN    = 0x0202;  // Subtractive Color Mixer - Cyan/Blue
constexpr auto SD_COLOR_SUB_YELLOW  = 0x0203;  // Subtractive Color Mixer - Yellow/Amber
constexpr auto SD_COLOR_SUB_MAGENTA = 0x0204;  // Subtractive Color Mixer - Magenta
constexpr auto SD_COLOR_ADD_RED     = 0x0205;  // Additive Color Mixer - Red
constexpr auto SD_COLOR_ADD_GREEN   = 0x0206;  // Additive Color Mixer - Green
constexpr auto SD_COLOR_ADD_BLUE    = 0x0207;  // Additive Color Mixer - Blue
constexpr auto SD_COLOR_CORRECTION  = 0x0208;  // Color Temperature Correction
constexpr auto SD_COLOR_SCROLL      = 0x0209;  // Color Scroll
constexpr auto SD_COLOR_SEMAPHORE   = 0x0210;  // Color Semaphore
// http://www.esta.org/rdm
constexpr auto SD_COLOR_ADD_AMBER      = 0x0211;  // Additive Color Mixer - Amber
constexpr auto SD_COLOR_ADD_WHITE      = 0x0212;  // Additive Color Mixer - White
constexpr auto SD_COLOR_ADD_WARM_WHITE = 0x0213;  // Additive Color Mixer - Warm White
constexpr auto SD_COLOR_ADD_COOL_WHITE = 0x0214;  // Additive Color Mixer - Cool White
constexpr auto SD_COLOR_SUB_UV         = 0x0215;  // Subtractive Color Mixer - UV
constexpr auto SD_COLOR_HUE            = 0x0216;  // Hue
constexpr auto SD_COLOR_SATURATION     = 0x0217;  // Saturation
// Image Functions (0x03xx)
constexpr auto SD_STATIC_GOBO_WHEEL = 0x0301;  // Static gobo wheel
constexpr auto SD_ROTO_GOBO_WHEEL   = 0x0302;  // Rotating gobo wheel
constexpr auto SD_PRISM_WHEEL       = 0x0303;  // Prism wheel
constexpr auto SD_EFFECTS_WHEEL     = 0x0304;  // Effects wheel
// Beam Functions (0x04xx)
constexpr auto SD_BEAM_SIZE_IRIS    = 0x0401;  // Beam size iris
constexpr auto SD_EDGE              = 0x0402;  // Edge/Lens focus
constexpr auto SD_FROST             = 0x0403;  // Frost/Diffusion
constexpr auto SD_STROBE            = 0x0404;  // Strobe/Shutter
constexpr auto SD_ZOOM              = 0x0405;  // Zoom lens
constexpr auto SD_FRAMING_SHUTTER   = 0x0406;  // Framing shutter
constexpr auto SD_SHUTTER_ROTATE    = 0x0407;  // Framing shutter rotation
constexpr auto SD_DOUSER            = 0x0408;  // Douser
constexpr auto SD_BARN_DOOR         = 0x0409;  // Barn Door
// Control Fuctions (0x05xx)
constexpr auto SD_LAMP_CONTROL      = 0x0501;  // Lamp control functions
constexpr auto SD_FIXTURE_CONTROL   = 0x0502;  // Fixture control channel
constexpr auto SD_FIXTURE_SPEED     = 0x0503;  // Overall speed setting applied to multiple or all parameters
constexpr auto SD_MACRO             = 0x0504;  // Macro control
// http://www.esta.org/rdm
constexpr auto SD_POWER_CONTROL    = 0x0505;  // Relay or Power Control
constexpr auto SD_FAN_CONTROL      = 0x0506;  // Fan Control
constexpr auto SD_HEATER_CONTROL   = 0x0507;  // Heater Control
constexpr auto SD_FOUNTAIN_CONTROL = 0x0508;  // Fountain Water Pump Control
// Other
constexpr auto SD_UNDEFINED         = 0xFFFF;  // No definition

// ===========================================================================
//  ANSI E1.37-1 Dimmer Message Sets
// ===========================================================================

// Table A-1: RDM Parameter ID Defines
// [RDM Parameter ID’s (Slot 21-22)]
// Category - DMX512 Setup
constexpr auto DMX_BLOCK_ADDRESS                = 0x0140;  // GET, SET
constexpr auto DMX_FAIL_MODE                    = 0x0141;  // GET, SET
constexpr auto DMX_STARTUP_MODE                 = 0x0142;  // GET, SET
// Category - Dimmer Settings
constexpr auto DIMMER_INFO                      = 0x0340;  // GET
constexpr auto MINIMUM_LEVEL                    = 0x0341;  // GET, SET
constexpr auto MAXIMUM_LEVEL                    = 0x0342;  // GET, SET
constexpr auto CURVE                            = 0x0343;  // GET, SET
constexpr auto CURVE_DESCRIPTION                = 0x0344;  // GET, Support required only if CURVE is supported.
constexpr auto OUTPUT_RESPONSE_TIME             = 0x0345;  // GET, SET
constexpr auto OUTPUT_RESPONSE_TIME_DESCRIPTION = 0x0346;  // GET, Support required only if OUTPUT_RESPONSE_TIME is supported.
constexpr auto MODULATION_FREQUENCY             = 0x0347;  // GET, SET
constexpr auto MODULATION_FREQUENCY_DESCRIPTION = 0x0348;  // GET, Support required only if MODULATION_FREQUENCY is supported.
// Category - Power/Lamp Settings
constexpr auto BURN_IN                          = 0x0440;  // GET, SET
// Category - Configuration
constexpr auto LOCK_PIN                         = 0x0640;  // GET, SET
constexpr auto LOCK_STATE                       = 0x0641;  // GET, SET
constexpr auto LOCK_STATE_DESCRIPTION           = 0x0642;  // GET, Support required only if LOCK_STATE is supported
// Category - Control
constexpr auto IDENTIFY_MODE                    = 0x1040;  // GET, SET
constexpr auto PRESET_INFO                      = 0x1041;  // GET
constexpr auto PRESET_STATUS                    = 0x1042;  // GET, SET
constexpr auto PRESET_MERGEMODE                 = 0x1043;  // GET, SET, See Table A-3
constexpr auto POWER_ON_SELF_TEST               = 0x1044;  // GET, SET

// Table A-2: Preset Programmed Defines
constexpr auto PRESET_NOT_PROGRAMMED       = 0x00;  // Preset Scene not programmed.
constexpr auto PRESET_PROGRAMMED           = 0x01;  // Preset Scene programmed.
constexpr auto PRESET_PROGRAMMED_READ_ONLY = 0x02;  // Preset Scene Read-Only, Factory Programmed.

// Table A-3: Merge Mode Defines
constexpr auto MERGEMODE_DEFAULT  = 0x00;  // Preset overrides DMX512 default behavior as defined in E1.20 PRESET_PLAYBACK
constexpr auto MERGEMODE_HTP      = 0x01;  // Highest Takes Precedence on slot by slot basis
constexpr auto MERGEMODE_LTP      = 0x02;  // Latest change takes precedence from Preset or DMX512 on a slot by slot basis
constexpr auto MERGEMODE_DMX_ONLY = 0x03;  // DMX512 only, Preset ignored
constexpr auto MERGEMODE_OTHER    = 0xFF;  // Other (undefined) merge mode

// ===========================================================================
//  ANSI E1.37-2 IPv4 & DNS Configuration Messages
// ===========================================================================

// Table A-1: RDM Parameter ID Defines
// [RDM Parameter ID’s (Slot 21-22)]
// Category - IP & DMX Configuration
constexpr auto LIST_INTERFACES                  = 0x0700;  // GET, Support required only if any other PID in Table A-1 is supported
constexpr auto INTERFACE_LABEL                  = 0x0701;  // GET
constexpr auto INTERFACE_HARDWARE_ADDRESS_TYPE1 = 0x0702;  // GET
constexpr auto IPV4_DHCP_MODE                   = 0x0703;  // GET, SET
constexpr auto IPV4_ZEROCONF_MODE               = 0x0704;  // GET, SET
constexpr auto IPV4_CURRENT_ADDRESS             = 0x0705;  // GET
constexpr auto IPV4_STATIC_ADDRESS              = 0x0706;  // GET, SET
constexpr auto INTERFACE_RENEW_DHCP             = 0x0707;  // SET
constexpr auto INTERFACE_RELEASE_DHCP           = 0x0708;  // SET
constexpr auto INTERFACE_APPLY_CONFIGURATION    = 0x0709;  // SET, Support required only if the SET command for any of IPV4_DHCP_MODE, IPV4_ZEROCONF_MODE or IPV4_STATIC_ADDRESS are supported
constexpr auto IPV4_DEFAULT_ROUTE               = 0x070A;  // GET, SET
constexpr auto DNS_IPV4_NAME_SERVER             = 0x070B;  // GET, SET
constexpr auto DNS_HOSTNAME                     = 0x070C;  // GET, SET
constexpr auto DNS_DOMAIN_NAME                  = 0x070D;  // GET, SET

// Table A-2: Additional NACK Reason Codes
// [Response NACK Reason Codes]
constexpr auto NR_ACTION_NOT_SUPPORTED = 0x000B;  // The parameter data is valid but the SET operation cannot be performed with the current configuration.
// These are in addition to NACK Reason Codes defined in Table A-17 of E1.20

// Table A-3: DHCP Mode Defines
constexpr auto DHCP_STATUS_INACTIVE = 0x00;  // The IP address was not obtained via DHCP.
constexpr auto DHCP_STATUS_ACTIVE   = 0x01;  // The IP address was obtained via DHCP.
constexpr auto DHCP_STATUS_UNKNOWN  = 0x02;  // The system cannot determine if the address was obtained via DHCP.

}  // namespace rdm

#endif  // RDMCONST_H_
