994 lines
42 KiB
C++
994 lines
42 KiB
C++
/*
|
||
rdm.h
|
||
|
||
Copyright (c) 2021 Kevin Matz (kevin.matz@gmail.com)
|
||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
of this software and associated documentation files (the "Software"), to deal
|
||
in the Software without restriction, including without limitation the rights
|
||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
copies of the Software, and to permit persons to whom the Software is
|
||
furnished to do so, subject to the following conditions:
|
||
|
||
The above copyright notice and this permission notice shall be included in all
|
||
copies or substantial portions of the Software.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||
SOFTWARE.
|
||
*/
|
||
#pragma once
|
||
|
||
#include "dmx.h"
|
||
#include "parameterdescription.h"
|
||
#include <string>
|
||
|
||
/**
|
||
* @brief \cite RDM The Remote Device Management Protocol
|
||
*/
|
||
namespace RDM {
|
||
/// \cite RDM 10.5.1 Get Device Info (DEVICE_INFO)
|
||
/// RDM Protocol Version:
|
||
/// The version of this standard is 1.0
|
||
static const uint16_t RDM_PROTOCOL_VERSION = 0x0100;
|
||
|
||
const size_t MESSAGE_MINIMUM_LENGTH = 24; //!< 6.2.3 Message Length, 0 PDL
|
||
|
||
// Appendix A: Defined Parameters (Normative)
|
||
static const uint8_t SC_RDM = 0xCC; //!< START Codes (Slot 0)
|
||
static const uint8_t SC_SUB_MESSAGE = 0x01; //!< RDM Protocol Data Structure ID’s (Slot 1)
|
||
// Broadcast Device UID’s
|
||
static const uint64_t BROADCAST_ALL_DEVICES_ID = 0xFFFFFFFFFFFF; //!< Broadcast all Manufacturers
|
||
static const uint64_t ALL_DEVICE_ID_MASK = 0x0000FFFFFFFF; //!< Specific Manufacturer ID in high 2 bytes
|
||
static const uint16_t SUB_DEVICE_ALL_CALL = 0xFFFF; //!< all sub-devices
|
||
|
||
|
||
// Table A-1: Command Class Defines (Slot 20)
|
||
static const uint8_t DISCOVERY_COMMAND = 0x10;
|
||
static const uint8_t DISCOVERY_COMMAND_RESPONSE = 0x11;
|
||
static const uint8_t GET_COMMAND = 0x20;
|
||
static const uint8_t GET_COMMAND_RESPONSE = 0x21;
|
||
static const uint8_t SET_COMMAND = 0x30;
|
||
static const uint8_t SET_COMMAND_RESPONSE = 0x31;
|
||
|
||
|
||
// Table A-2: Response Type Defines (Slot 16)
|
||
static const uint8_t RESPONSE_TYPE_ACK = 0x00;
|
||
static const uint8_t RESPONSE_TYPE_ACK_TIMER = 0x01;
|
||
static const uint8_t RESPONSE_TYPE_NACK_REASON = 0x02; //!< See Table A-17
|
||
static const uint8_t RESPONSE_TYPE_ACK_OVERFLOW = 0x03; //!< Additional Response Data available beyond single response length.
|
||
|
||
|
||
// Table A-4: Status Type Defines
|
||
static const uint8_t STATUS_NONE = 0x00; //!< Not allowed for use with GET: QUEUED_MESSAGE
|
||
static const uint8_t STATUS_GET_LAST_MESSAGE = 0x01;
|
||
static const uint8_t STATUS_ADVISORY = 0x02;
|
||
static const uint8_t STATUS_WARNING = 0x03;
|
||
static const uint8_t STATUS_ERROR = 0x04;
|
||
static const uint8_t STATUS_ADVISORY_CLEARED = 0x12;
|
||
static const uint8_t STATUS_WARNING_CLEARED = 0x13;
|
||
static const uint8_t STATUS_ERROR_CLEARED = 0x14;
|
||
|
||
|
||
// Table A-3: RDM Categories/Parameter ID Defines
|
||
const ParameterDescription StandardDescription(const PID pid);
|
||
// Category – Network Management
|
||
/// \cite RDM 7.5 Discovery Unique Branch Message (DISC_UNIQUE_BRANCH)
|
||
constexpr ParameterDescription DISC_UNIQUE_BRANCH = {
|
||
.pid = 0x0001,
|
||
.pdl = {
|
||
.get = 12,
|
||
},
|
||
.command_class = CC_DISC,
|
||
.description = "Discovery Unique Branch",
|
||
};
|
||
/// \cite RDM 7.6.3 Discovery Mute Message (DISC_MUTE)
|
||
constexpr ParameterDescription DISC_MUTE = {
|
||
.pid = 0x0002,
|
||
.pdl = {
|
||
.get_response = 2,
|
||
},
|
||
.command_class = CC_DISC,
|
||
.description = "Discovery Mute",
|
||
};
|
||
/// \cite RDM 7.6.4 Discovery Un-Mute Message (DISC_UN_MUTE)
|
||
constexpr ParameterDescription DISC_UN_MUTE = {
|
||
.pid = 0x0003,
|
||
.pdl = {
|
||
.get_response = 2,
|
||
},
|
||
.command_class = CC_DISC,
|
||
.description = "Discovery Un-Mute",
|
||
};
|
||
/// \cite RDM 8.4.2 Get Proxied Devices (PROXIED_DEVICES)
|
||
constexpr ParameterDescription PROXIED_DEVICES = {
|
||
.pid = 0x0010,
|
||
.command_class = CC_GET,
|
||
.description = "Proxied Devices",
|
||
};
|
||
/// \cite RDM 8.4.1 Get Proxied Device Count (PROXIED_DEVICE_COUNT)
|
||
constexpr ParameterDescription PROXIED_DEVICE_COUNT = {
|
||
.pid = 0x0011,
|
||
.pdl = {
|
||
.get_response = 2,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Proxied Device Count",
|
||
};
|
||
/// \cite RDM 10.2.1 Communication Status (COMMS_STATUS)
|
||
constexpr ParameterDescription COMMS_STATUS = {
|
||
.pid = 0x0015,
|
||
.pdl = {
|
||
.get_response = 6,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Communication Status",
|
||
};
|
||
|
||
|
||
// Category - Status Collection
|
||
/// \cite RDM 10.3.1 Get Queued Message (QUEUED_MESSAGE)
|
||
constexpr ParameterDescription QUEUED_MESSAGE = {
|
||
.pid = 0x0020,
|
||
.pdl = {
|
||
.get = 1,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Queued Message",
|
||
}; // See Table A-4
|
||
/// \cite RDM 10.3.2 Get Status Messages (STATUS_MESSAGES)
|
||
constexpr ParameterDescription STATUS_MESSAGES = {
|
||
.pid = 0x0030,
|
||
.pdl = {
|
||
.get = 1,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Status Messages",
|
||
}; // See Table A-4
|
||
/// \cite RDM 10.3.3 Get Status ID Description (STATUS_ID_DESCRIPTION)
|
||
constexpr ParameterDescription STATUS_ID_DESCRIPTION = {
|
||
.pid = 0x0031,
|
||
.pdl = {
|
||
.get = 2,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Status ID Description",
|
||
};
|
||
/// \cite RDM 10.3.4 Clear Status ID (CLEAR_STATUS_ID)
|
||
constexpr ParameterDescription CLEAR_STATUS_ID = {
|
||
.pid = 0x0032,
|
||
.command_class = CC_SET,
|
||
.description = "Clear Status ID",
|
||
};
|
||
/// \cite RDM 10.3.5 Get/Set Sub-Device Status Reporting Threshold
|
||
constexpr ParameterDescription SUB_DEVICE_STATUS_REPORT_THRESHOLD = {
|
||
.pid = 0x0033,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Sub-Device Reporting Threshold",
|
||
}; // See Table A-4
|
||
|
||
|
||
// Category - RDM Information
|
||
/// \cite RDM 10.4.1 Get Supported Parameters (SUPPORTED_PARAMETERS)
|
||
constexpr ParameterDescription SUPPORTED_PARAMETERS = {
|
||
.pid = 0x0050,
|
||
.command_class = CC_GET,
|
||
.description = "Supported Parameters",
|
||
};
|
||
/// \cite RDM 10.4.2 Get Parameter Description (PARAMETER_DESCRIPTION)
|
||
constexpr ParameterDescription PARAMETER_DESCRIPTION = {
|
||
.pid = 0x0051,
|
||
.pdl = {
|
||
.get = 2,
|
||
.get_response = 20, // + optional description
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Parameter Description",
|
||
};
|
||
|
||
|
||
// Category – Product Information
|
||
|
||
/// \cite RDM 10.5.1 Get Device Info (DEVICE_INFO)
|
||
constexpr ParameterDescription DEVICE_INFO = {
|
||
.pid = 0x0060,
|
||
.pdl = {
|
||
.get_response = 19,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Device Info",
|
||
};
|
||
/// \cite RDM 10.5.2 Get Product Detail ID List (PRODUCT_DETAIL_ID_LIST)
|
||
constexpr ParameterDescription PRODUCT_DETAIL_ID_LIST = {
|
||
.pid = 0x0070,
|
||
.command_class = CC_GET,
|
||
.description = "Product Detail ID List",
|
||
};
|
||
/// \cite RDM 10.5.3 Get Device Model Description (DEVICE_MODEL_DESCRIPTION)
|
||
constexpr ParameterDescription DEVICE_MODEL_DESCRIPTION = {
|
||
.pid = 0x0080,
|
||
.command_class = CC_GET,
|
||
.description = "Device Model Description",
|
||
};
|
||
/// \cite RDM 10.5.4 Get Manufacturer Label (MANUFACTURER_LABEL)
|
||
constexpr ParameterDescription MANUFACTURER_LABEL = {
|
||
.pid = 0x0081,
|
||
.command_class = CC_GET,
|
||
.description = "Manufacturer Label",
|
||
};
|
||
/// \cite RDM 10.5.5 Get/Set Device Label (DEVICE_LABEL)
|
||
constexpr ParameterDescription DEVICE_LABEL = {
|
||
.pid = 0x0082,
|
||
.command_class = CC_GET_SET,
|
||
.description = "Device Label",
|
||
};
|
||
/// \cite RDM 10.5.6 Get/Set Factory Defaults (FACTORY_DEFAULTS)
|
||
constexpr ParameterDescription FACTORY_DEFAULTS = {
|
||
.pid = 0x0090,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Factory Defaults",
|
||
};
|
||
/// \cite RDM 10.5.7 Get Language Capabilities (LANGUAGE_CAPABILITIES)
|
||
constexpr ParameterDescription LANGUAGE_CAPABILITIES = {
|
||
.pid = 0x00A0,
|
||
.command_class = CC_GET,
|
||
.description = "Language Capabilities",
|
||
};
|
||
/// \cite RDM 10.5.8 Get/Set Language (LANGUAGE)
|
||
constexpr ParameterDescription LANGUAGE = {
|
||
.pid = 0x00B0,
|
||
.pdl = {
|
||
.get_response = 2,
|
||
.set = 2,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Language",
|
||
};
|
||
/// \cite RDM 10.5.9 Get Software Version Label (SOFTWARE_VERSION_LABEL)
|
||
constexpr ParameterDescription SOFTWARE_VERSION_LABEL = {
|
||
.pid = 0x00C0,
|
||
.command_class = CC_GET,
|
||
.description = "Software Version Label",
|
||
};
|
||
/// \cite RDM 10.5.10 Get Boot Software Version ID (BOOT_SOFTWARE_VERSION_ID)
|
||
constexpr ParameterDescription BOOT_SOFTWARE_VERSION_ID = {
|
||
.pid = 0x00C1,
|
||
.pdl = {
|
||
.get_response = 4,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Boot Software Version ID",
|
||
};
|
||
/// \cite RDM 10.5.11 Get Boot Software Version Label (BOOT_SOFTWARE_VERSION_LABEL)
|
||
constexpr ParameterDescription BOOT_SOFTWARE_VERSION_LABEL = {
|
||
.pid = 0x00C2,
|
||
.command_class = CC_GET,
|
||
.description = "Boot Software Version Label",
|
||
};
|
||
|
||
|
||
// Category - DMX512 Setup
|
||
|
||
/// \cite RDM 10.6.1 Get/Set DMX512 Personality (DMX_PERSONALITY)
|
||
constexpr ParameterDescription DMX_PERSONALITY = {
|
||
.pid = 0x00E0,
|
||
.pdl = {
|
||
.get_response = 2,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "DMX512 Personality",
|
||
};
|
||
/// \cite RDM 10.6.2 Get DMX512 Personality Description (DMX_PERSONALITY_DESCRIPTION)
|
||
constexpr ParameterDescription DMX_PERSONALITY_DESCRIPTION = {
|
||
.pid = 0x00E1,
|
||
.pdl = {
|
||
.get = 1,
|
||
.get_response = 3,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "DMX512 Personality Description",
|
||
};
|
||
/// \cite RDM 10.6.3 Get/Set DMX512 Starting Address (DMX_START_ADDRESS)
|
||
constexpr ParameterDescription DMX_START_ADDRESS = {
|
||
.pid = 0x00F0,
|
||
.pdl = {
|
||
.get_response = 2,
|
||
.set = 2,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.maximum_value = DMX::E111_LAST_SLOT,
|
||
.description = "DMX512 Starting Address",
|
||
};
|
||
/// \cite RDM 10.6.4 Get Slot Info (SLOT_INFO)
|
||
constexpr ParameterDescription SLOT_INFO = {
|
||
.pid = 0x0120,
|
||
.command_class = CC_GET,
|
||
.description = "Slot Info",
|
||
};
|
||
/// \cite RDM 10.6.5 Get Slot Description (SLOT_DESCRIPTION)
|
||
constexpr ParameterDescription SLOT_DESCRIPTION = {
|
||
.pid = 0x0121,
|
||
.pdl = {
|
||
.get = 2,
|
||
.get_response = 2,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Slot Description",
|
||
};
|
||
/// \cite RDM 10.6.6 Get Default Slot Value (DEFAULT_SLOT_VALUE)
|
||
constexpr ParameterDescription DEFAULT_SLOT_VALUE = {
|
||
.pid = 0x0122,
|
||
.pdl = {
|
||
.get = 1,
|
||
.get_response = 13,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Default Slot Value",
|
||
};
|
||
|
||
|
||
// Category – Sensors
|
||
|
||
/// \cite RDM 10.7.1 Get Sensor Definition (SENSOR_DEFINITION)
|
||
constexpr ParameterDescription SENSOR_DEFINITION {
|
||
.pid = 0x0200,
|
||
.pdl = {
|
||
.get = 1,
|
||
.get_response = 13,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Sensor Definition",
|
||
};
|
||
/// \cite RDM 10.7.2 Get/Set Sensor (SENSOR_VALUE)
|
||
constexpr ParameterDescription SENSOR_VALUE = {
|
||
.pid = 0x0201,
|
||
.pdl = {
|
||
.get = 1,
|
||
.get_response = 9,
|
||
.set = 1,
|
||
.set_response = 9,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Sensor Value",
|
||
};
|
||
/// \cite RDM 10.7.3 Record Sensors (RECORD_SENSORS)
|
||
constexpr ParameterDescription RECORD_SENSORS = {
|
||
.pid = 0x0202,
|
||
.pdl = {
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_SET,
|
||
.description = "Record Sensors",
|
||
};
|
||
|
||
|
||
// Category – Power/Lamp Settings
|
||
|
||
/// \cite RDM 10.8.1 Get/Set Device Hours (DEVICE_HOURS)
|
||
constexpr ParameterDescription DEVICE_HOURS = {
|
||
.pid = 0x0400,
|
||
.pdl = {
|
||
.get_response = 4,
|
||
.set = 4,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Device Hours",
|
||
};
|
||
/// \cite RDM 10.8.2 Get/Set Lamp Hours (LAMP_HOURS)
|
||
constexpr ParameterDescription LAMP_HOURS = {
|
||
.pid = 0x0401,
|
||
.pdl = {
|
||
.get_response = 4,
|
||
.set = 4,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Lamp Hours",
|
||
};
|
||
/// \cite RDM 10.8.3 Get/Set Lamp Strikes (LAMP_STRIKES)
|
||
constexpr ParameterDescription LAMP_STRIKES = {
|
||
.pid = 0x0402,
|
||
.pdl = {
|
||
.get_response = 4,
|
||
.set = 4,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Lamp Strikes",
|
||
};
|
||
/// \cite RDM 10.8.4 Get/Set Lamp State (LAMP_STATE)
|
||
constexpr ParameterDescription LAMP_STATE = {
|
||
.pid = 0x0403,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Lamp State",
|
||
};
|
||
/// \cite RDM 10.8.5 Get/Set Lamp On Mode (LAMP_ON_MODE)
|
||
constexpr ParameterDescription LAMP_ON_MODE = {
|
||
.pid = 0x0404,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Lamp On Mode",
|
||
};
|
||
/// \cite RDM 10.8.6 Get/Set Device Power Cycles (DEVICE_POWER_CYCLES)
|
||
constexpr ParameterDescription DEVICE_POWER_CYCLES = {
|
||
.pid = 0x0405,
|
||
.pdl = {
|
||
.get_response = 4,
|
||
.set = 4,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Device Power Cycles",
|
||
};
|
||
|
||
|
||
// Category - Display Settings
|
||
|
||
/// \cite RDM 10.9.1 Get/Set Display Invert (DISPLAY_INVERT)
|
||
constexpr ParameterDescription DISPLAY_INVERT = {
|
||
.pid = 0x0500,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Display Invert",
|
||
};
|
||
/// \cite RDM 10.9.2 Get/Set Display Level (DISPLAY_LEVEL)
|
||
constexpr ParameterDescription DISPLAY_LEVEL = {
|
||
.pid = 0x0501,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Display Level",
|
||
};
|
||
|
||
|
||
// Category – Configuration
|
||
|
||
/// \cite RDM 10.10.1 Get/Set Pan Invert (PAN_INVERT)
|
||
constexpr ParameterDescription PAN_INVERT = {
|
||
.pid = 0x0600,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Pan Invert",
|
||
};
|
||
/// \cite RDM 10.10.2 Get/Set Tilt Invert (TILT_INVERT)
|
||
constexpr ParameterDescription TILT_INVERT = {
|
||
.pid = 0x0601,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Tilt Invert",
|
||
};
|
||
/// \cite RDM 10.10.3 Get/Set Pan/Tilt Swap (PAN_TILT_SWAP)
|
||
constexpr ParameterDescription PAN_TILT_SWAP = {
|
||
.pid = 0x0602,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Pan/Tilt Swap",
|
||
};
|
||
/// \cite RDM 10.10.4 Get/Set Device Real-Time Clock (REAL_TIME_CLOCK)
|
||
constexpr ParameterDescription REAL_TIME_CLOCK = {
|
||
.pid = 0x0603,
|
||
.pdl = {
|
||
.get_response = 7,
|
||
.set = 7,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Device Real-Time Clock",
|
||
};
|
||
|
||
|
||
// Category – Control
|
||
|
||
/// \cite RDM 10.11.1 Get/Set Identify Device (IDENTIFY_DEVICE)
|
||
constexpr ParameterDescription IDENTIFY_DEVICE = {
|
||
.pid = 0x1000,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Identify Device",
|
||
};
|
||
/// \cite RDM 10.11.2 Reset Device (RESET_DEVICE)
|
||
constexpr ParameterDescription RESET_DEVICE = {
|
||
.pid = 0x1001,
|
||
.pdl = {
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_SET,
|
||
.description = "Reset Device",
|
||
};
|
||
/// \cite RDM 10.11.3 Get/Set Power State (POWER_STATE)
|
||
constexpr ParameterDescription POWER_STATE = {
|
||
.pid = 0x1010,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Get/Set Power State",
|
||
};
|
||
/// \cite RDM 10.11.4 Get/Set Perform Self Test (PERFORM_SELFTEST)
|
||
constexpr ParameterDescription PERFORM_SELFTEST = {
|
||
.pid = 0x1020,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Get/Set Perform Self Test",
|
||
};
|
||
/// \cite RDM 10.11.5 Get Self Test Description (SELF_TEST_DESCRIPTION)
|
||
constexpr ParameterDescription SELF_TEST_DESCRIPTION = {
|
||
.pid = 0x1021,
|
||
.pdl = {
|
||
.get_response = 1,
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_GET,
|
||
.description = "Get Self Test Description",
|
||
};
|
||
/// \cite RDM 10.11.6 Capture Preset (CAPTURE_PRESET)
|
||
constexpr ParameterDescription CAPTURE_PRESET = {
|
||
.pid = 0x1030,
|
||
.pdl = {
|
||
.set = 1,
|
||
},
|
||
.command_class = CC_SET,
|
||
.description = "Capture Preset",
|
||
};
|
||
/// \cite RDM 10.11.7 Get/Set Preset Playback (PRESET_PLAYBACK)
|
||
constexpr ParameterDescription PRESET_PLAYBACK = {
|
||
.pid = 0x1031,
|
||
.pdl = {
|
||
.get_response = 3,
|
||
.set = 3,
|
||
},
|
||
.command_class = CC_GET_SET,
|
||
.description = "Preset Playback",
|
||
};
|
||
|
||
/// \cite RDM Table A-3: RDM Categories/Parameter ID Defines
|
||
constexpr const ParameterDescription *PIDs[] =
|
||
{
|
||
// Network Management
|
||
&DISC_UNIQUE_BRANCH,
|
||
&DISC_MUTE,
|
||
&DISC_UN_MUTE,
|
||
&PROXIED_DEVICES,
|
||
&PROXIED_DEVICE_COUNT,
|
||
&COMMS_STATUS,
|
||
// Status Collection
|
||
&QUEUED_MESSAGE,
|
||
&STATUS_MESSAGES,
|
||
&STATUS_ID_DESCRIPTION,
|
||
&CLEAR_STATUS_ID,
|
||
&SUB_DEVICE_STATUS_REPORT_THRESHOLD,
|
||
// RDM Information
|
||
&SUPPORTED_PARAMETERS,
|
||
&PARAMETER_DESCRIPTION,
|
||
// Product Information
|
||
&DEVICE_INFO,
|
||
&PRODUCT_DETAIL_ID_LIST,
|
||
&DEVICE_MODEL_DESCRIPTION,
|
||
&MANUFACTURER_LABEL,
|
||
&DEVICE_LABEL,
|
||
&FACTORY_DEFAULTS,
|
||
&LANGUAGE_CAPABILITIES,
|
||
&LANGUAGE,
|
||
&SOFTWARE_VERSION_LABEL,
|
||
&BOOT_SOFTWARE_VERSION_ID,
|
||
&BOOT_SOFTWARE_VERSION_LABEL,
|
||
// DMX512 Setup
|
||
&DMX_PERSONALITY,
|
||
&DMX_PERSONALITY_DESCRIPTION,
|
||
&DMX_START_ADDRESS,
|
||
&SLOT_INFO,
|
||
&SLOT_DESCRIPTION,
|
||
&DEFAULT_SLOT_VALUE,
|
||
// Sensors
|
||
&SENSOR_DEFINITION,
|
||
&SENSOR_VALUE,
|
||
&RECORD_SENSORS,
|
||
// Power/Lamp Settings
|
||
&DEVICE_HOURS,
|
||
&LAMP_HOURS,
|
||
&LAMP_STRIKES,
|
||
&LAMP_STATE,
|
||
&LAMP_ON_MODE,
|
||
&DEVICE_POWER_CYCLES,
|
||
// Display Settings
|
||
&DISPLAY_INVERT,
|
||
&DISPLAY_LEVEL,
|
||
// Configuration
|
||
&PAN_INVERT,
|
||
&TILT_INVERT,
|
||
&PAN_TILT_SWAP,
|
||
&REAL_TIME_CLOCK,
|
||
// Control
|
||
&IDENTIFY_DEVICE,
|
||
&RESET_DEVICE,
|
||
&POWER_STATE,
|
||
&PERFORM_SELFTEST,
|
||
&SELF_TEST_DESCRIPTION,
|
||
&CAPTURE_PRESET,
|
||
&PRESET_PLAYBACK,
|
||
};
|
||
|
||
|
||
std::string ProductCategoryDescription(const uint16_t PRODUCT_CATEGORY);
|
||
// Table A-5: Product Category Defines
|
||
static const uint16_t PRODUCT_CATEGORY_NOT_DECLARED = 0x0000;
|
||
// Fixtures – intended as source of illumination
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE = 0x0100; //!< No Fine Category declared
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_FIXED = 0x0101; //!< No pan / tilt / focus style functions
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_MOVING_YOKE = 0x0102;
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_MOVING_MIRROR = 0x0103;
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_OTHER = 0x01FF; //!< For example, focus but no pan/tilt.
|
||
// Fixture Accessories – add-ons to fixtures or projectors
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY = 0x0200; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY_COLOR = 0x0201; //!< Scrollers / Color Changers
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY_YOKE = 0x0202; //!< Yoke add-on
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY_MIRROR = 0x0203; //!< Moving mirror add-on
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY_EFFECT = 0x0204; //!< Effects Discs
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY_BEAM = 0x0205; //!< Gobo Rotators / Iris / Shutters / Dousers / Beam modifiers.
|
||
static const uint16_t PRODUCT_CATEGORY_FIXTURE_ACCESSORY_OTHER = 0x02FF;
|
||
// Projectors - light source capable of producing realistic images from another media
|
||
static const uint16_t PRODUCT_CATEGORY_PROJECTOR = 0x0300; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_PROJECTOR_FIXED = 0x0301; //!< No pan / tilt functions.
|
||
static const uint16_t PRODUCT_CATEGORY_PROJECTOR_MOVING_YOKE = 0x0302;
|
||
static const uint16_t PRODUCT_CATEGORY_PROJECTOR_MOVING_MIRROR = 0x0303;
|
||
static const uint16_t PRODUCT_CATEGORY_PROJECTOR_OTHER = 0x03FF;
|
||
// Atmospheric Effect – earth/wind/fire
|
||
static const uint16_t PRODUCT_CATEGORY_ATMOSPHERIC = 0x0400; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_ATMOSPHERIC_EFFECT = 0x0401; //!< Fogger / Hazer / Flame, etc.
|
||
static const uint16_t PRODUCT_CATEGORY_ATMOSPHERIC_PYRO = 0x0402; //!< See Note 2.
|
||
static const uint16_t PRODUCT_CATEGORY_ATMOSPHERIC_OTHER = 0x04FF;
|
||
// Intensity Control (specifically Dimming equipment)
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER = 0x0500; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_AC_INCANDESCENT = 0x0501; //!< AC > 50VAC
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_AC_FLUORESCENT = 0x0502;
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_AC_COLDCATHODE = 0x0503; //!< High Voltage outputs such as Neon or other cold cathode.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_AC_NONDIM = 0x0504; //!< Non-Dim module in dimmer rack.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_AC_ELV = 0x0505; //!< AC <= 50V such as 12/24V AC Low voltage lamps.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_AC_OTHER = 0x0506;
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_DC_LEVEL = 0x0507; //!< Variable DC level output.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_DC_PWM = 0x0508; //!< Chopped (PWM) output.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_CS_LED = 0x0509; //!< Specialized LED dimmer.
|
||
static const uint16_t PRODUCT_CATEGORY_DIMMER_OTHER = 0x05FF;
|
||
// Power Control (other than Dimming equipment)
|
||
static const uint16_t PRODUCT_CATEGORY_POWER = 0x0600; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_POWER_CONTROL = 0x0601; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_POWER_SOURCE = 0x0602; //!< Generators
|
||
static const uint16_t PRODUCT_CATEGORY_POWER_OTHER = 0x06FF;
|
||
// Scenic Drive – including motorized effects unrelated to light source.
|
||
static const uint16_t PRODUCT_CATEGORY_SCENIC = 0x0700;
|
||
static const uint16_t PRODUCT_CATEGORY_SCENIC_DRIVE = 0x0701; //!< Rotators / Kabuki drops, etc.
|
||
static const uint16_t PRODUCT_CATEGORY_SCENIC_OTHER = 0x07FF;
|
||
// DMX Infrastructure, conversion and interfaces
|
||
static const uint16_t PRODUCT_CATEGORY_DATA = 0x0800;
|
||
static const uint16_t PRODUCT_CATEGORY_DATA_DISTRIBUTION = 0x0801;
|
||
static const uint16_t PRODUCT_CATEGORY_DATA_CONVERSION = 0x0802;
|
||
static const uint16_t PRODUCT_CATEGORY_DATA_OTHER = 0x08FF;
|
||
// Audio-Visual Equipment
|
||
static const uint16_t PRODUCT_CATEGORY_AV = 0x0900;
|
||
static const uint16_t PRODUCT_CATEGORY_AV_AUDIO = 0x0901;
|
||
static const uint16_t PRODUCT_CATEGORY_AV_VIDEO = 0x0902;
|
||
static const uint16_t PRODUCT_CATEGORY_AV_OTHER = 0x09FF;
|
||
// Parameter Monitoring Equipment
|
||
static const uint16_t PRODUCT_CATEGORY_MONITOR = 0x0A00;
|
||
static const uint16_t PRODUCT_CATEGORY_MONITOR_ACLINEPOWER = 0x0A01;
|
||
static const uint16_t PRODUCT_CATEGORY_MONITOR_DCPOWER = 0x0A02;
|
||
static const uint16_t PRODUCT_CATEGORY_MONITOR_ENVIRONMENTAL = 0x0A03;
|
||
static const uint16_t PRODUCT_CATEGORY_MONITOR_OTHER = 0x0AFF;
|
||
// Controllers, Backup devices
|
||
static const uint16_t PRODUCT_CATEGORY_CONTROL = 0x7000;
|
||
static const uint16_t PRODUCT_CATEGORY_CONTROL_CONTROLLER = 0x7001;
|
||
static const uint16_t PRODUCT_CATEGORY_CONTROL_BACKUPDEVICE = 0x7002;
|
||
static const uint16_t PRODUCT_CATEGORY_CONTROL_OTHER = 0x70FF;
|
||
// Test Equipment
|
||
static const uint16_t PRODUCT_CATEGORY_TEST = 0x7100; //!< No Fine Category declared.
|
||
static const uint16_t PRODUCT_CATEGORY_TEST_EQUIPMENT = 0x7101;
|
||
static const uint16_t PRODUCT_CATEGORY_TEST_EQUIPMENT_OTHER = 0x71FF;
|
||
// Miscellaneous
|
||
static const uint16_t PRODUCT_CATEGORY_OTHER = 0x7FFF; //!< For devices that aren’t described within this table.
|
||
|
||
std::string ProductDetailDescription(const uint16_t PRODUCT_DETAIL);
|
||
// Table A-6: Product Detail
|
||
static const uint16_t PRODUCT_DETAIL_NOT_DECLARED = 0x0000;
|
||
// Generally applied to fixtures
|
||
static const uint16_t PRODUCT_DETAIL_ARC = 0x0001;
|
||
static const uint16_t PRODUCT_DETAIL_METAL_HALIDE = 0x0002;
|
||
static const uint16_t PRODUCT_DETAIL_INCANDESCENT = 0x0003;
|
||
static const uint16_t PRODUCT_DETAIL_LED = 0x0004;
|
||
static const uint16_t PRODUCT_DETAIL_FLUROESCENT = 0x0005;
|
||
static const uint16_t PRODUCT_DETAIL_COLDCATHODE = 0x0006;
|
||
static const uint16_t PRODUCT_DETAIL_ELECTROLUMINESCENT = 0x0007;
|
||
static const uint16_t PRODUCT_DETAIL_LASER = 0x0008;
|
||
static const uint16_t PRODUCT_DETAIL_FLASHTUBE = 0x0009;
|
||
// Generally applied to fixture accessories
|
||
static const uint16_t PRODUCT_DETAIL_COLORSCROLLER = 0x0100;
|
||
static const uint16_t PRODUCT_DETAIL_COLORWHEEL = 0x0101;
|
||
static const uint16_t PRODUCT_DETAIL_COLORCHANGE = 0x0102;
|
||
static const uint16_t PRODUCT_DETAIL_IRIS_DOUSER = 0x0103;
|
||
static const uint16_t PRODUCT_DETAIL_DIMMING_SHUTTER = 0x0104;
|
||
static const uint16_t PRODUCT_DETAIL_PROFILE_SHUTTER = 0x0105;
|
||
static const uint16_t PRODUCT_DETAIL_BARNDOOR_SHUTTER = 0x0106;
|
||
static const uint16_t PRODUCT_DETAIL_EFFECTS_DISC = 0x0107;
|
||
static const uint16_t PRODUCT_DETAIL_GOBO_ROTATOR = 0x0108;
|
||
// Generally applied to Projectors
|
||
static const uint16_t PRODUCT_DETAIL_VIDEO = 0x0200;
|
||
static const uint16_t PRODUCT_DETAIL_SLIDE = 0x0201;
|
||
static const uint16_t PRODUCT_DETAIL_FILM = 0x0202;
|
||
static const uint16_t PRODUCT_DETAIL_OILWHEEL = 0x0203;
|
||
static const uint16_t PRODUCT_DETAIL_LCDGATE = 0x0204;
|
||
// Generally applied to Atmospheric Effects
|
||
static const uint16_t PRODUCT_DETAIL_FOGGER_GLYCOL = 0x0300;
|
||
static const uint16_t PRODUCT_DETAIL_FOGGER_MINERALOIL = 0x0301;
|
||
static const uint16_t PRODUCT_DETAIL_FOGGER_WATER = 0x0302;
|
||
static const uint16_t PRODUCT_DETAIL_C02 = 0x0303;
|
||
static const uint16_t PRODUCT_DETAIL_LN2 = 0x0304;
|
||
static const uint16_t PRODUCT_DETAIL_BUBBLE = 0x0305;
|
||
static const uint16_t PRODUCT_DETAIL_FLAME_PROPANE = 0x0306;
|
||
static const uint16_t PRODUCT_DETAIL_FLAME_OTHER = 0x0307;
|
||
static const uint16_t PRODUCT_DETAIL_OLEFACTORY_STIMULATOR = 0x0308;
|
||
static const uint16_t PRODUCT_DETAIL_SNOW = 0x0309;
|
||
static const uint16_t PRODUCT_DETAIL_WATER_JET = 0x030a;
|
||
static const uint16_t PRODUCT_DETAIL_WIND = 0x030b;
|
||
static const uint16_t PRODUCT_DETAIL_CONFETTI = 0x030c;
|
||
static const uint16_t PRODUCT_DETAIL_HAZARD = 0x030d;
|
||
// Generally applied to Dimmers/Power controllers
|
||
static const uint16_t PRODUCT_DETAIL_PHASE_CONTROL = 0x0400;
|
||
static const uint16_t PRODUCT_DETAIL_REVERSE_PHASE_CONTROL = 0x0401;
|
||
static const uint16_t PRODUCT_DETAIL_SINE = 0x0402;
|
||
static const uint16_t PRODUCT_DETAIL_PWM = 0x0403;
|
||
static const uint16_t PRODUCT_DETAIL_DC = 0x0404;
|
||
static const uint16_t PRODUCT_DETAIL_HFBALLAST = 0x0405;
|
||
static const uint16_t PRODUCT_DETAIL_HFHV_NEONBALLAST = 0x0406;
|
||
static const uint16_t PRODUCT_DETAIL_HFHV_EL = 0x0407;
|
||
static const uint16_t PRODUCT_DETAIL_MHR_BALLAST = 0x0408;
|
||
static const uint16_t PRODUCT_DETAIL_BITANGLE_MODULATION = 0x0409;
|
||
static const uint16_t PRODUCT_DETAIL_FREQUENCY_MODULATION = 0x040a;
|
||
static const uint16_t PRODUCT_DETAIL_HIGHFREQUENCY_12V = 0x040b;
|
||
static const uint16_t PRODUCT_DETAIL_RELAY_MECHANICAL = 0x040c;
|
||
static const uint16_t PRODUCT_DETAIL_RELAY_ELECTRONIC = 0x040d;
|
||
static const uint16_t PRODUCT_DETAIL_SWITCH_ELECTRONIC = 0x040e;
|
||
static const uint16_t PRODUCT_DETAIL_CONTACTOR = 0x040f;
|
||
// Generally applied to Scenic drive
|
||
static const uint16_t PRODUCT_DETAIL_MIRRORBALL_ROTATOR = 0x0500;
|
||
static const uint16_t PRODUCT_DETAIL_OTHER_ROTATOR = 0x0501;
|
||
static const uint16_t PRODUCT_DETAIL_KABUKI_DROP = 0x0502;
|
||
static const uint16_t PRODUCT_DETAIL_CURTAIN = 0x0503;
|
||
static const uint16_t PRODUCT_DETAIL_LINESET = 0x0504;
|
||
static const uint16_t PRODUCT_DETAIL_MOTOR_CONTROL = 0x0505;
|
||
static const uint16_t PRODUCT_DETAIL_DAMPER_CONTROL = 0x0506;
|
||
// Generally applied to Data Distribution
|
||
static const uint16_t PRODUCT_DETAIL_SPLITTER = 0x0600;
|
||
static const uint16_t PRODUCT_DETAIL_ETHERNET_NODE = 0x0601;
|
||
static const uint16_t PRODUCT_DETAIL_MERGE = 0x0602;
|
||
static const uint16_t PRODUCT_DETAIL_DATAPATCH = 0x0603;
|
||
static const uint16_t PRODUCT_DETAIL_WIRELESS_LINK = 0x0604;
|
||
// Generally applied to Data Conversion and Interfaces
|
||
static const uint16_t PRODUCT_DETAIL_PROTOCOL_CONVERTOR = 0x0701;
|
||
static const uint16_t PRODUCT_DETAIL_ANALOG_DEMULTIPLEX = 0x0702;
|
||
static const uint16_t PRODUCT_DETAIL_ANALOG_MULTIPLEX = 0x0703;
|
||
static const uint16_t PRODUCT_DETAIL_SWITCH_PANEL = 0x0704;
|
||
// Generally applied to Audio or Video (AV) devices
|
||
static const uint16_t PRODUCT_DETAIL_ROUTER = 0x0800;
|
||
static const uint16_t PRODUCT_DETAIL_FADER = 0x0801;
|
||
static const uint16_t PRODUCT_DETAIL_MIXER = 0x0802;
|
||
// Generally applied to Controllers, Backup devices and Test Equipment
|
||
static const uint16_t PRODUCT_DETAIL_CHANGEOVER_MANUAL = 0x0900;
|
||
static const uint16_t PRODUCT_DETAIL_CHANGEOVER_AUTO = 0x0901;
|
||
static const uint16_t PRODUCT_DETAIL_TEST = 0x0902;
|
||
// Could be applied to any category
|
||
static const uint16_t PRODUCT_DETAIL_GFI_RCD = 0x0A00;
|
||
static const uint16_t PRODUCT_DETAIL_BATTERY = 0x0A01;
|
||
static const uint16_t PRODUCT_DETAIL_CONTROLLABLE_BREAKER = 0x0A02;
|
||
// for where the Manufacturer believes that none of the defined details apply.
|
||
static const uint16_t PRODUCT_DETAIL_OTHER = 0x7FFF;
|
||
|
||
// Table A-7: Preset Playback Defines
|
||
static const uint16_t PRESET_PLAYBACK_OFF = 0x0000;
|
||
static const uint16_t PRESET_PLAYBACK_ALL = 0xFFFF;
|
||
|
||
// Table A-8: Lamp State Defines
|
||
static const uint8_t LAMP_OFF = 0x00;
|
||
static const uint8_t LAMP_ON = 0x01;
|
||
static const uint8_t LAMP_STRIKE = 0x02;
|
||
static const uint8_t LAMP_STANDBY = 0x03;
|
||
static const uint8_t LAMP_NOT_PRESENT = 0x04;
|
||
static const uint8_t LAMP_ERROR = 0x7F;
|
||
|
||
// Table A-9: Lamp On Mode Defines
|
||
static const uint8_t LAMP_ON_MODE_OFF = 0x00;
|
||
static const uint8_t LAMP_ON_MODE_DMX = 0x01;
|
||
static const uint8_t LAMP_ON_MODE_ON = 0x02;
|
||
static const uint8_t LAMP_ON_MODE_AFTER_CAL = 0x03;
|
||
|
||
// Table A-10: Self Test Defines
|
||
static const uint8_t SELF_TEST_OFF = 0x00;
|
||
static const uint8_t SELF_TEST_ALL = 0xFF;
|
||
|
||
// Table A-11: Power State Defines
|
||
static const uint8_t POWER_STATE_FULL_OFF = 0x00;
|
||
static const uint8_t POWER_STATE_SHUTDOWN = 0x01;
|
||
static const uint8_t POWER_STATE_STANDBY = 0x02;
|
||
static const uint8_t POWER_STATE_NORMAL = 0xFF;
|
||
|
||
// Table A-12: Sensor Type Defines
|
||
static const uint8_t SENS_TEMPERATURE = 0x00;
|
||
static const uint8_t SENS_VOLTAGE = 0x01;
|
||
static const uint8_t SENS_CURRENT = 0x02;
|
||
static const uint8_t SENS_FREQUENCY = 0x03;
|
||
static const uint8_t SENS_RESISTANCE = 0x04;
|
||
static const uint8_t SENS_POWER = 0x05;
|
||
static const uint8_t SENS_MASS = 0x06;
|
||
static const uint8_t SENS_LENGTH = 0x07;
|
||
static const uint8_t SENS_AREA = 0x08;
|
||
static const uint8_t SENS_VOLUME = 0x09;
|
||
static const uint8_t SENS_DENSITY = 0x0a;
|
||
static const uint8_t SENS_VELOCITY = 0x0b;
|
||
static const uint8_t SENS_ACCELERATION = 0x0c;
|
||
static const uint8_t SENS_FORCE = 0x0d;
|
||
static const uint8_t SENS_ENERGY = 0x0e;
|
||
static const uint8_t SENS_PRESSURE = 0x0f;
|
||
static const uint8_t SENS_TIME = 0x10;
|
||
static const uint8_t SENS_ANGLE = 0x11;
|
||
static const uint8_t SENS_POSITION_X = 0x12;
|
||
static const uint8_t SENS_POSITION_Y = 0x13;
|
||
static const uint8_t SENS_POSITION_Z = 0x14;
|
||
static const uint8_t SENS_ANGULAR_VELOCITY = 0x15;
|
||
static const uint8_t SENS_LUMINOUS_INTENSITY = 0x16;
|
||
static const uint8_t SENS_LUMINOUS_FLUX = 0x17;
|
||
static const uint8_t SENS_ILLUMINANCE = 0x18;
|
||
static const uint8_t SENS_CHROMINANCE_RED = 0x19;
|
||
static const uint8_t SENS_CHROMINANCE_GREEN = 0x1a;
|
||
static const uint8_t SENS_CHROMINANCE_BLUE = 0x1b;
|
||
static const uint8_t SENS_CONTACTS = 0x1c;
|
||
static const uint8_t SENS_MEMORY = 0x1d;
|
||
static const uint8_t SENS_ITEMS = 0x1e;
|
||
static const uint8_t SENS_HUMIDITY = 0x1f;
|
||
static const uint8_t SENS_COUNTER_16BIT = 0x20;
|
||
static const uint8_t SENS_OTHER = 0x7f;
|
||
|
||
// Tables A-13 thru A-16 are in parameterdescription.h
|
||
std::string SiUnitName(const uint8_t unit);
|
||
std::string SiUnitSymbol(const uint8_t unit);
|
||
std::string SiUnitSymbolASCII(const uint8_t unit);
|
||
std::string SiPrefixName(const uint8_t prefix);
|
||
std::string SiPrefixSymbol(const uint8_t prefix);
|
||
std::string SiPrefixSymbolASCII(const uint8_t prefix);
|
||
int SiPrefixBase10Exponent(const uint8_t prefix);
|
||
|
||
std::string NackReasonDescription(const uint16_t NR);
|
||
// Table A-17: Response NACK Reason Code
|
||
static const uint16_t NR_UNKNOWN_PID = 0x0000;
|
||
static const uint16_t NR_FORMAT_ERROR = 0x0001;
|
||
static const uint16_t NR_HARDWARE_FAULT = 0x0002;
|
||
static const uint16_t NR_PROXY_REJECT = 0x0003;
|
||
static const uint16_t NR_WRITE_PROTECT = 0x0004;
|
||
static const uint16_t NR_UNSUPPORTED_COMMAND_CLASS = 0x0005;
|
||
static const uint16_t NR_DATA_OUT_OF_RANGE = 0x0006;
|
||
static const uint16_t NR_BUFFER_FULL = 0x0007;
|
||
static const uint16_t NR_PACKET_SIZE_UNSUPPORTED = 0x0008;
|
||
static const uint16_t NR_SUB_DEVICE_OUT_OF_RANGE = 0x0009;
|
||
static const uint16_t NR_PROXY_BUFFER_FULL = 0x000A;
|
||
|
||
std::string StatusMessageDescription(const uint16_t status,
|
||
std::string label = std::string(),
|
||
int data1 = 0, int data2 = 0);
|
||
/// Appendix B: Status Message ID’s (Normative)
|
||
/// %d Decimal Number -- as decimal number
|
||
/// %x Hexadecimal Number -- as hexadecimal number
|
||
/// %L Slot Label Code -- as text description of Slot Label Code
|
||
static const uint16_t STS_CAL_FAIL = 0x0001; //!< “%L failed calibration”
|
||
static const uint16_t STS_SENS_NOT_FOUND = 0x0002; //!< “%L sensor not found”
|
||
static const uint16_t STS_SENS_ALWAYS_ON = 0x0003; //!< “%L sensor always on”
|
||
static const uint16_t STS_LAMP_DOUSED = 0x0011; //!< “Lamp doused”
|
||
static const uint16_t STS_LAMP_STRIKE = 0x0012; //!< “Lamp failed to strike”
|
||
static const uint16_t STS_OVERTEMP = 0x0021; //!< “Sensor %d over temp at %d degrees C”
|
||
static const uint16_t STS_UNDERTEMP = 0x0022; //!< “Sensor %d under temp at %d degrees C”
|
||
static const uint16_t STS_SENS_OUT_RANGE = 0x0023; //!< “Sensor %d out of range”
|
||
static const uint16_t STS_OVERVOLTAGE_PHASE = 0x0031; //!< “Phase %d over voltage at %d V.”
|
||
static const uint16_t STS_UNDERVOLTAGE_PHASE = 0x0032; //!< “Phase %d under voltage at %d V.”
|
||
static const uint16_t STS_OVERCURRENT = 0x0033; //!< “Phase %d over current at %d A.”
|
||
static const uint16_t STS_UNDERCURRENT = 0x0034; //!< “Phase %d under current at %d A.”
|
||
static const uint16_t STS_PHASE = 0x0035; //!< “Phase %d is at %d degrees”
|
||
static const uint16_t STS_PHASE_ERROR = 0x0036; //!< “Phase %d Error.”
|
||
static const uint16_t STS_AMPS = 0x0037; //!< “%d Amps”
|
||
static const uint16_t STS_VOLTS = 0x0038; //!< “%d Volts”
|
||
static const uint16_t STS_DIMSLOT_OCCUPIED = 0x0041; //!< “No Dimmer”
|
||
static const uint16_t STS_BREAKER_TRIP = 0x0042; //!< “Tripped Breaker”
|
||
static const uint16_t STS_WATTS = 0x0043; //!< “%d Watts”
|
||
static const uint16_t STS_DIM_FAILURE = 0x0044; //!< “Dimmer Failure”
|
||
static const uint16_t STS_DIM_PANIC = 0x0045; //!< “Panic Mode”
|
||
static const uint16_t STS_READY = 0x0050; //!< “%L ready”
|
||
static const uint16_t STS_NOT_READY = 0x0051; //!< “%L not ready”
|
||
static const uint16_t STS_LOW_FLUID = 0x0052; //!< “%L low fluid”
|
||
|
||
|
||
// Appendix C: Slot Info (Normative)
|
||
|
||
// Table C-1: Slot Type
|
||
static const uint8_t ST_PRIMARY = 0x00; //!< Slot directly controls parameter (represents Coarse for 16-bit parameters)
|
||
static const uint8_t ST_SEC_FINE = 0x01; //!< Fine, for 16-bit parameters
|
||
static const uint8_t ST_SEC_TIMING = 0x02; //!< Slot sets timing value for associated parameter
|
||
static const uint8_t ST_SEC_SPEED = 0x03; //!< Slot sets speed/velocity for associated parameter
|
||
static const uint8_t ST_SEC_CONTROL = 0x04; //!< Slot provides control/mode info for parameter
|
||
static const uint8_t ST_SEC_INDEX = 0x05; //!< Slot sets index position for associated parameter
|
||
static const uint8_t ST_SEC_ROTATION = 0x06; //!< Slot sets rotation speed for associated parameter
|
||
static const uint8_t ST_SEC_INDEX_ROTATE = 0x07; //!< Combined index/rotation control
|
||
static const uint8_t ST_SEC_UNDEFINED = 0xff; //!< Undefined secondary type
|
||
|
||
// Table C-2: Slot ID Definitions
|
||
// Intensity Functions
|
||
static const uint16_t SD_INTENSITY = 0x0001;
|
||
static const uint16_t SD_INTENSITY_MASTER = 0x0002;
|
||
// Movement Functions
|
||
static const uint16_t SD_PAN = 0x0101;
|
||
static const uint16_t SD_TILT = 0x0102;
|
||
// Color Functions
|
||
static const uint16_t SD_COLOR_WHEEL = 0x0201;
|
||
static const uint16_t SD_COLOR_SUB_CYAN = 0x0202;
|
||
static const uint16_t SD_COLOR_SUB_YELLOW = 0x0203;
|
||
static const uint16_t SD_COLOR_SUB_MAGENTA = 0x0204;
|
||
static const uint16_t SD_COLOR_ADD_RED = 0x0205;
|
||
static const uint16_t SD_COLOR_ADD_GREEN = 0x0206;
|
||
static const uint16_t SD_COLOR_ADD_BLUE = 0x0207;
|
||
static const uint16_t SD_COLOR_CORRECTION = 0x0208;
|
||
static const uint16_t SD_COLOR_SCROLL = 0x0209;
|
||
static const uint16_t SD_COLOR_SEMAPHORE = 0x0210;
|
||
// Image Functions
|
||
static const uint16_t SD_STATIC_GOBO_WHEEL = 0x0301;
|
||
static const uint16_t SD_ROTO_GOBO_WHEEL = 0x0302;
|
||
static const uint16_t SD_PRISM_WHEEL = 0x0303;
|
||
static const uint16_t SD_EFFECTS_WHEEL = 0x0304;
|
||
// Beam Functions
|
||
static const uint16_t SD_BEAM_SIZE_IRIS = 0x0401;
|
||
static const uint16_t SD_EDGE = 0x0402;
|
||
static const uint16_t SD_FROST = 0x0403;
|
||
static const uint16_t SD_STROBE = 0x0404;
|
||
static const uint16_t SD_ZOOM = 0x0405;
|
||
static const uint16_t SD_FRAMING_SHUTTER = 0x0406;
|
||
static const uint16_t SD_SHUTTER_ROTATE = 0x0407;
|
||
static const uint16_t SD_DOUSER = 0x0408;
|
||
static const uint16_t SD_BARN_DOOR = 0x0409;
|
||
// Control Functions
|
||
static const uint16_t SD_LAMP_CONTROL = 0x0501;
|
||
static const uint16_t SD_FIXTURE_CONTROL = 0x0502;
|
||
static const uint16_t SD_FIXTURE_SPEED = 0x0503;
|
||
static const uint16_t SD_MACRO = 0x0504;
|
||
static const uint16_t SD_UNDEFINED = 0xffff;
|
||
|
||
} // namespace RDM
|