<commit_before>/*
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * RDMENUMS.h
 * Provide a generic RDM ENUMS that can use different implementations.
 * Copyright (C) 2010 <NAME>
 */

/**
 * @addtogroup rdm_helpers
 * @{
 * @file RDMEnums.h
 * @brief Various constants used in RDM.
 * @}
 */

#ifndef INCLUDE_OLA_RDM_RDMENUMS_H_
#define INCLUDE_OLA_RDM_RDMENUMS_H_

#include <stdint.h>

namespace ola {
namespace rdm {

static const uint16_t ROOT_RDM_DEVICE = 0;
static const uint16_t ALL_RDM_SUBDEVICES = 0xffff;
static const uint16_t MAX_SUBDEVICE_NUMBER = 0x0200;
static const uint8_t MAX_RDM_STRING_LENGTH = 32;
static const uint16_t ZERO_FOOTPRINT_DMX_ADDRESS = 0xffff;
static const uint8_t MAX_QUEUED_MESSAGE_COUNT = 255;
// This is separated out because we never propagate OVERFLOWs up to the
// clients.
static const uint8_t ACK_OVERFLOW = 3;

typedef enum {
  RDM_VERSION_1_0 = 0x100,
} rdm_protocol_version;

typedef enum {
  // discovery
  PID_DISC_UNIQUE_BRANCH = 0x0001,
  PID_DISC_MUTE = 0x0002,
  PID_DISC_UN_MUTE = 0x0003,
  // network managment
  PID_PROXIED_DEVICES = 0x0010,
  PID_PROXIED_DEVICE_COUNT = 0x0011,
  PID_COMMS_STATUS = 0x0015,
  // status collection
  PID_QUEUED_MESSAGE = 0x0020,
  PID_STATUS_MESSAGES = 0x0030,
  PID_STATUS_ID_DESCRIPTION = 0x0031,
  PID_CLEAR_STATUS_ID = 0x0032,
  PID_SUB_DEVICE_STATUS_REPORT_THRESHOLD = 0x0033,
  // RDM information
  PID_SUPPORTED_PARAMETERS = 0x0050,
  PID_PARAMETER_DESCRIPTION = 0x0051,
  // production information
  PID_DEVICE_INFO = 0x0060,
  PID_PRODUCT_DETAIL_ID_LIST = 0x0070,
  PID_DEVICE_MODEL_DESCRIPTION = 0x0080,
  PID_MANUFACTURER_LABEL = 0x0081,
  PID_DEVICE_LABEL = 0x0082,
  PID_FACTORY_DEFAULTS = 0x0090,
  PID_LANGUAGE_CAPABILITIES = 0x00A0,
  PID_LANGUAGE = 0x00B0,
  PID_SOFTWARE_VERSION_LABEL = 0x00C0,
  PID_BOOT_SOFTWARE_VERSION_ID = 0x00C1,
  PID_BOOT_SOFTWARE_VERSION_LABEL = 0x00C2,
  // dmx512
  PID_DMX_PERSONALITY = 0x00E0,
  PID_DMX_PERSONALITY_DESCRIPTION = 0x00E1,
  PID_DMX_START_ADDRESS = 0x00F0,
  PID_SLOT_INFO = 0x0120,
  PID_SLOT_DESCRIPTION = 0x0121,
  PID_DEFAULT_SLOT_VALUE = 0x0122,
  // sensors
  PID_SENSOR_DEFINITION = 0x0200,
  PID_SENSOR_VALUE = 0x0201,
  PID_RECORD_SENSORS = 0x0202,
  // power/lamp settings
  PID_DEVICE_HOURS = 0x0400,
  PID_LAMP_HOURS = 0x0401,
  PID_LAMP_STRIKES = 0x0402,
  PID_LAMP_STATE =  0x0403,
  PID_LAMP_ON_MODE = 0x0404,
  PID_DEVICE_POWER_CYCLES = 0x0405,
  // display settings
  PID_DISPLAY_INVERT = 0x0500,
  PID_DISPLAY_LEVEL = 0x0501,
  // configuration
  PID_PAN_INVERT = 0x0600,
  PID_TILT_INVERT = 0x0601,
  PID_PAN_TILT_SWAP = 0x0602,
  PID_REAL_TIME_CLOCK = 0x0603,
  // control
  PID_IDENTIFY_DEVICE = 0x1000,
  PID_RESET_DEVICE = 0x1001,
  PID_POWER_STATE = 0x1010,
  PID_PERFORM_SELFTEST = 0x1020,
  PID_SELF_TEST_DESCRIPTION = 0x1021,
  PID_CAPTURE_PRESET = 0x1030,
  PID_PRESET_PLAYBACK = 0x1031,

  // E1.37-1 PIDS
  // Dmx512 setup
  PID_DMX_BLOCK_ADDRESS = 0x0140,
  PID_DMX_FAIL_MODE = 0x0141,
  PID_DMX_STARTUP_MODE = 0x0142,

  // Dimmer Settings
  PID_DIMMER_INFO = 0x0340,
  PID_MINIMUM_LEVEL = 0x0341,
  PID_MAXIMUM_LEVEL = 0x0342,
  PID_CURVE = 0x0343,
  PID_CURVE_DESCRIPTION = 0x0344,

  // Control
  PID_OUTPUT_RESPONSE_TIME = 0x0345,
  PID_OUTPUT_RESPONSE_TIME_DESCRIPTION = 0x0346,
  PID_MODULATION_FREQUENCY = 0x0347,
  PID_MODULATION_FREQUENCY_DESCRIPTION = 0x0348,

  // Power/Lamp Settings
  PID_BURN_IN = 0x0440,

  // Configuration
  PID_LOCK_PIN = 0x0640,
  PID_LOCK_STATE = 0x0641,
  PID_LOCK_STATE_DESCRIPTION = 0x0642,
  PID_IDENTIFY_MODE = 0x1040,
  PID_PRESET_INFO = 0x1041,
  PID_PRESET_STATUS = 0x1042,
  PID_PRESET_MERGEMODE = 0x1043,
  PID_POWER_ON_SELF_TEST = 0x1044,

  // Draft E1.33 PIDs - DO NOT USE
  PID_ENDPOINT_LIST = 0x7fe0,
  PID_ENDPOINT_LIST_CHANGE = 0x7fee,
  PID_ENDPOINT_IDENTIFY = 0x7fe9,
  PID_ENDPOINT_TO_UNIVERSE = 0x7fe1,
  PID_RDM_TRAFFIC_ENABLE = 0x7ef2,
  PID_ENDPOINT_MODE = 0x7fe3,
  PID_ENDPOINT_LABEL = 0x7fe4,
  PID_DISCOVERY_STATE = 0x7fe5,
  PID_BACKGROUND_DISCOVERY = 0x7fea,
  PID_ENDPOINT_TIMING = 0x7fe6,
  PID_ENDPOINT_TIMING_DESCRIPTION = 0x7fe7,
  PID_ENDPOINT_DEVICE_LIST_CHANGE = 0x7feb,
  PID_ENDPOINT_DEVICES = 0x7fec,
  PID_BINDING_CONTROL_FIELDS = 0x7fe8,
  PID_TCP_COMMS_STATUS = 0x7fed,
  PID_BACKGROUND_QUEUED_STATUS_POLICY = 0x7fd0,
  PID_BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION = 0x7fd1,
  PID_BACKGROUND_STATUS_TYPE = 0x7fd2,
  PID_QUEUED_STATUS_ENDPOINT_COLLECTION = 0x7fd3,
  PID_QUEUED_STATUS_UID_COLLECTION = 0x7fd4,
} rdm_pid;


typedef enum {
  STATUS_NONE = 0x0,
  STATUS_GET_LAST_MESSAGE = 0x1,
  STATUS_ADVISORY = 0x2,
  STATUS_WARNING = 0x3,
  STATUS_ERROR = 0x4,
  STATUS_ADVISORY_CLEARED = 0x12,
  STATUS_WARNING_CLEARED = 0x13,
  STATUS_ERROR_CLEARED = 0x14,
} rdm_status_type;


typedef enum {
  SENSOR_TEMPERATURE = 0x00,
  SENSOR_VOLTAGE = 0x01,
  SENSOR_CURRENT = 0x02,
  SENSOR_FREQUENCY = 0x03,
  SENSOR_RESISTANCE = 0x04,
  SENSOR_POWER = 0x05,
  SENSOR_MASS = 0x06,
  SENSOR_LENGTH = 0x07,
  SENSOR_AREA = 0x08,
  SENSOR_VOLUME = 0x09,
  SENSOR_DENSITY = 0x0A,<commit_msg>Minor tidy of RDMEnums, in preparation for an auto-generated version<commit_after>/*
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * RDMEnums.h
 * Provide a generic RDM ENUMS that can use different implementations.
 * Copyright (C) 2010 <NAME>
 */

/**
 * @addtogroup rdm_helpers
 * @{
 * @file RDMEnums.h
 * @brief Various constants used in RDM.
 * @}
 */

#ifndef INCLUDE_OLA_RDM_RDMENUMS_H_
#define INCLUDE_OLA_RDM_RDMENUMS_H_

#include <stdint.h>

namespace ola {
namespace rdm {

static const uint16_t ROOT_RDM_DEVICE = 0;
static const uint16_t ALL_RDM_SUBDEVICES = 0xffff;
static const uint16_t MAX_SUBDEVICE_NUMBER = 0x0200;
static const uint8_t MAX_RDM_STRING_LENGTH = 32;
static const uint16_t ZERO_FOOTPRINT_DMX_ADDRESS = 0xffff;
static const uint8_t MAX_QUEUED_MESSAGE_COUNT = 255;
// This is separated out because we never propagate OVERFLOWs up to the
// clients.
static const uint8_t ACK_OVERFLOW = 3;

typedef enum {
  RDM_VERSION_1_0 = 0x100,
} rdm_protocol_version;

typedef enum {
  // discovery
  PID_DISC_UNIQUE_BRANCH = 0x0001,
  PID_DISC_MUTE = 0x0002,
  PID_DISC_UN_MUTE = 0x0003,
  // network management
  PID_PROXIED_DEVICES = 0x0010,
  PID_PROXIED_DEVICE_COUNT = 0x0011,
  PID_COMMS_STATUS = 0x0015,
  // status collection
  PID_QUEUED_MESSAGE = 0x0020,
  PID_STATUS_MESSAGES = 0x0030,
  PID_STATUS_ID_DESCRIPTION = 0x0031,
  PID_CLEAR_STATUS_ID = 0x0032,
  PID_SUB_DEVICE_STATUS_REPORT_THRESHOLD = 0x0033,
  // RDM information
  PID_SUPPORTED_PARAMETERS = 0x0050,
  PID_PARAMETER_DESCRIPTION = 0x0051,
  // production information
  PID_DEVICE_INFO = 0x0060,
  PID_PRODUCT_DETAIL_ID_LIST = 0x0070,
  PID_DEVICE_MODEL_DESCRIPTION = 0x0080,
  PID_MANUFACTURER_LABEL = 0x0081,
  PID_DEVICE_LABEL = 0x0082,
  PID_FACTORY_DEFAULTS = 0x0090,
  PID_LANGUAGE_CAPABILITIES = 0x00A0,
  PID_LANGUAGE = 0x00B0,
  PID_SOFTWARE_VERSION_LABEL = 0x00C0,
  PID_BOOT_SOFTWARE_VERSION_ID = 0x00C1,
  PID_BOOT_SOFTWARE_VERSION_LABEL = 0x00C2,
  // DMX512
  PID_DMX_PERSONALITY = 0x00E0,
  PID_DMX_PERSONALITY_DESCRIPTION = 0x00E1,
  PID_DMX_START_ADDRESS = 0x00F0,
  PID_SLOT_INFO = 0x0120,
  PID_SLOT_DESCRIPTION = 0x0121,
  PID_DEFAULT_SLOT_VALUE = 0x0122,
  // sensors
  PID_SENSOR_DEFINITION = 0x0200,
  PID_SENSOR_VALUE = 0x0201,
  PID_RECORD_SENSORS = 0x0202,
  // power/lamp settings
  PID_DEVICE_HOURS = 0x0400,
  PID_LAMP_HOURS = 0x0401,
  PID_LAMP_STRIKES = 0x0402,
  PID_LAMP_STATE = 0x0403,
  PID_LAMP_ON_MODE = 0x0404,
  PID_DEVICE_POWER_CYCLES = 0x0405,
  // display settings
  PID_DISPLAY_INVERT = 0x0500,
  PID_DISPLAY_LEVEL = 0x0501,
  // configuration
  PID_PAN_INVERT = 0x0600,
  PID_TILT_INVERT = 0x0601,
  PID_PAN_TILT_SWAP = 0x0602,
  PID_REAL_TIME_CLOCK = 0x0603,
  // control
  PID_IDENTIFY_DEVICE = 0x1000,
  PID_RESET_DEVICE = 0x1001,
  PID_POWER_STATE = 0x1010,
  PID_PERFORM_SELFTEST = 0x1020,
  PID_SELF_TEST_DESCRIPTION = 0x1021,
  PID_CAPTURE_PRESET = 0x1030,
  PID_PRESET_PLAYBACK = 0x1031,

  // E1.37-1 PIDS
  // Dmx512 setup
  PID_DMX_BLOCK_ADDRESS = 0x0140,
  PID_DMX_FAIL_MODE = 0x0141,
  PID_DMX_STARTUP_MODE = 0x0142,

  // Dimmer Settings
  PID_DIMMER_INFO = 0x0340,
  PID_MINIMUM_LEVEL = 0x0341,
  PID_MAXIMUM_LEVEL = 0x0342,
  PID_CURVE = 0x0343,
  PID_CURVE_DESCRIPTION = 0x0344,

  // Control
  PID_OUTPUT_RESPONSE_TIME = 0x0345,
  PID_OUTPUT_RESPONSE_TIME_DESCRIPTION = 0x0346,
  PID_MODULATION_FREQUENCY = 0x0347,
  PID_MODULATION_FREQUENCY_DESCRIPTION = 0x0348,

  // Power/Lamp Settings
  PID_BURN_IN = 0x0440,

  // Configuration
  PID_LOCK_PIN = 0x0640,
  PID_LOCK_STATE = 0x0641,
  PID_LOCK_STATE_DESCRIPTION = 0x0642,
  PID_IDENTIFY_MODE = 0x1040,
  PID_PRESET_INFO = 0x1041,
  PID_PRESET_STATUS = 0x1042,
  PID_PRESET_MERGEMODE = 0x1043,
  PID_POWER_ON_SELF_TEST = 0x1044,

  // Draft E1.33 PIDs - DO NOT USE
  PID_ENDPOINT_LIST = 0x7FE0,
  PID_ENDPOINT_TO_UNIVERSE = 0x7FE1,
  PID_RDM_TRAFFIC_ENABLE = 0x7FE2,
  PID_ENDPOINT_MODE = 0x7FE3,
  PID_ENDPOINT_LABEL = 0x7FE4,
  PID_DISCOVERY_STATE = 0x7FE5,
  PID_ENDPOINT_TIMING = 0x7FE6,
  PID_ENDPOINT_TIMING_DESCRIPTION = 0x7FE7,
  PID_BINDING_CONTROL_FIELDS = 0x7FE8,
  PID_ENDPOINT_IDENTIFY = 0x7FE9,
  PID_BACKGROUND_DISCOVERY = 0x7FEA,
  PID_ENDPOINT_DEVICE_LIST_CHANGE = 0x7FEB,
  PID_ENDPOINT_DEVICES = 0x7FEC,
  PID_TCP_COMMS_STATUS = 0x7FED,
  PID_ENDPOINT_LIST_CHANGE = 0x7FEE,
  PID_BACKGROUND_QUEUED_STATUS_POLICY = 0x7FD0,
  PID_BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION = 0x7FD1,
  PID_BACKGROUND_STATUS_TYPE = 0x7FD2,
  PID_QUEUED_STATUS_ENDPOINT_COLLECTION = 0x7FD3,
  PID_QUEUED_STATUS_UID_COLLECTION = 0x7FD4,
} rdm_pid;


typedef enum {
  STATUS_NONE = 0x0,
  STATUS_GET_LAST_MESSAGE = 0x1,
  STATUS_ADVISORY = 0x2,
  STATUS_WARNING = 0x3,
  STATUS_ERROR = 0x4,
  STATUS_ADVISORY_CLEARED = 0x12,
  STATUS_WARNING_CLEARED = 0x13,
  STATUS_ERROR_CLEARED = 0x14,
} rdm_status_type;


typedef enum {
  SENSOR_TEMPERATURE = 0x00,
  SENSOR_VOLTAGE = 0x01,
  SENSOR_CURRENT = 0x02,
  SENSOR_FREQUENCY = 0x03,
  SENSOR_RESISTANCE = 0x04,
  SENSOR_POWER = 0x05,
  SENSOR_MASS = 0x06,
  SENSOR_LENGTH = 0x07,
  SENSOR_AREA = 0x08,
  SENSOR_VOLUME = 0x09,
  SENSOR_DENSITY = 0x0A,
{'fraction_non_alphanumeric': 0.06522681932517999, 'fraction_numerical': 0.09142163240523896, 'mean_word_length': 4.646425073457395, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6581876', 'n_tokens_mistral': 5776, 'n_tokens_neox': 4882, 'n_words': 948}