enum.js

'use strict';

/**
 * Turn an enum into a string suitable for debugging.
 * If value is not found in the enum the value itself is returned as string
 *
 * @param {object} group
 *   Enum group, e.g. bacnet.enum.ConfirmedServiceChoice.
 *
 * @param {number} value
 *   Enum value, e.g. 1.  Note that this *must* be an integer value, so you may
 *   need to use parseInt().  Non-integer values will result in an exception.
 *
 * @param {boolean} [addNumberValue]
 *   Boolean if the numeric number should be appended or not, default is true
 *
 * @param {string} [undefinedFallbackValue]
 *   String to return if the given value is not found in the Enum object
 *
 * @example
 * const s = bacnet.enum.getEnumName(
 *   bacnet.enum.PropertyIdentifier,
 *   bacnet.enum.PropertyIdentifier.PRESENT_VALUE
 * );
 * console.log(s); // "PRESENT_VALUE(85)"
 */

const usc = require('underscore');
const debug = require('debug')('bacnet:enum:debug');
const trace = require('debug')('bacnet:enum:trace');

module.exports.getEnumName = function(group, value, addNumberValue = true, undefinedFallbackValue = undefined) {
  if (!Number.isInteger(value)) {
    throw new Error('getEnumName() can only be passed an integer value, was given "' + value + '"');
  }
  let foundEntry = null;
  try {
    const invertedGroup = usc.invert(group);
    foundEntry = invertedGroup[value];
    if (foundEntry === undefined && undefinedFallbackValue) {
      foundEntry = undefinedFallbackValue;
    }
    if (foundEntry === undefined) {
      foundEntry = value.toString();
    } else if (addNumberValue) {
      foundEntry += '(' + value + ')';
    }
  } catch (e) {
    trace(e.message);
    foundEntry = null;
  }
  return foundEntry;
};

module.exports.PDU_TYPE_MASK = 0xF0;
module.exports.ASN1_MAX_OBJECT = 0x3FF;
module.exports.ASN1_INSTANCE_BITS = 22;
module.exports.ASN1_MAX_INSTANCE = 0x3FFFFF;
module.exports.ASN1_MAX_BITSTRING_BYTES = 15;
module.exports.ASN1_ARRAY_ALL = 0xFFFFFFFF;
module.exports.ASN1_NO_PRIORITY = 0;
module.exports.ASN1_MIN_PRIORITY = 1;
module.exports.ASN1_MAX_PRIORITY = 16;
module.exports.ASN1_MAX_APPLICATION_TAG = 16;
module.exports.ASN1_MAX_OBJECT_TYPE = 1024;
module.exports.ASN1_MAX_PROPERTY_ID = 4194303;
module.exports.BVLL_TYPE_BACNET_IP = 0x81;
module.exports.BVLC_HEADER_LENGTH = 4;

// ASHRE 135-2016 - 21 FORMAL DESCRIPTION OF APPLICATION PROTOCOL DATA UNITS - Enumerators
module.exports.ConfirmedServiceChoice = {
  ACKNOWLEDGE_ALARM: 0,
  CONFIRMED_COV_NOTIFICATION: 1,
  CONFIRMED_EVENT_NOTIFICATION: 2,
  GET_ALARM_SUMMARY: 3,
  GET_ENROLLMENT_SUMMARY: 4,
  SUBSCRIBE_COV: 5,
  ATOMIC_READ_FILE: 6,
  ATOMIC_WRITE_FILE: 7,
  ADD_LIST_ELEMENT: 8,
  REMOVE_LIST_ELEMENT: 9,
  CREATE_OBJECT: 10,
  DELETE_OBJECT: 11,
  READ_PROPERTY: 12,
  READ_PROPERTY_MULTIPLE: 14,
  WRITE_PROPERTY: 15,
  WRITE_PROPERTY_MULTIPLE: 16,
  DEVICE_COMMUNICATION_CONTROL: 17,
  CONFIRMED_PRIVATE_TRANSFER: 18,
  CONFIRMED_TEXT_MESSAGE: 19,
  REINITIALIZE_DEVICE: 20,
  VT_OPEN: 21,
  VT_CLOSE: 22,
  VT_DATA: 23,
  READ_RANGE: 26,
  LIFE_SAFETY_OPERATION: 27,
  SUBSCRIBE_COV_PROPERTY: 28,
  GET_EVENT_INFORMATION: 29,
  SUBSCRIBE_COV_PROPERTY_MULTIPLE: 30,
  CONFIRMED_COV_NOTIFICATION_MULTIPLE: 31
};

module.exports.ConfirmedServiceChoiceName = usc.invert(module.exports.ConfirmedServiceChoice);

module.exports.UnconfirmedServiceChoice = {
  I_AM: 0,
  I_HAVE: 1,
  UNCONFIRMED_COV_NOTIFICATION: 2,
  UNCONFIRMED_EVENT_NOTIFICATION: 3,
  UNCONFIRMED_PRIVATE_TRANSFER: 4,
  UNCONFIRMED_TEXT_MESSAGE: 5,
  TIME_SYNCHRONIZATION: 6,
  WHO_HAS: 7,
  WHO_IS: 8,
  UTC_TIME_SYNCHRONIZATION: 9,
  WRITE_GROUP: 10,
  UNCONFIRMED_COV_NOTIFICATION_MULTIPLE: 11
};

module.exports.UnconfirmedServiceChoiceName = usc.invert(module.exports.UnconfirmedServiceChoice);

module.exports.AbortReason = {
  OTHER: 0,
  BUFFER_OVERFLOW: 1,
  INVALID_APDU_IN_THIS_STATE: 2,
  PREEMPTED_BY_HIGHER_PRIORITY_TASK: 3,
  SEGMENTATION_NOT_SUPPORTED: 4,
  SECURITY_ERROR: 5,
  INSUFFICIENT_SECURITY: 6,
  WINDOW_SIZE_OUT_OF_RANGE: 7,
  APPLICATION_EXCEEDED_REPLY_TIME: 8,
  OUT_OF_RESOURCES: 9,
  TSM_TIMEOUT: 10,
  APDU_TOO_LONG: 11
};

module.exports.AbortReasonName = usc.invert(module.exports.AbortReason);

module.exports.RejectReason = {
  OTHER: 0,
  BUFFER_OVERFLOW: 1,
  INCONSISTENT_PARAMETERS: 2,
  INVALID_PARAMETER_DATA_TYPE: 3,
  INVALID_TAG: 4,
  MISSING_REQUIRED_PARAMETER: 5,
  PARAMETER_OUT_OF_RANGE: 6,
  TOO_MANY_ARGUMENTS: 7,
  UNDEFINED_ENUMERATION: 8,
  UNRECOGNIZED_SERVICE: 9
};

module.exports.RejectReasonName = usc.invert(module.exports.RejectReason);

module.exports.ErrorClass = {
  DEVICE: 0,
  OBJECT: 1,
  PROPERTY: 2,
  RESOURCES: 3,
  SECURITY: 4,
  SERVICES: 5,
  VT: 6,
  COMMUNICATION: 7
};

module.exports.ErrorClassName = usc.invert(module.exports.ErrorClass);

module.exports.ErrorCode = {
  ABORT_APDU_TOO_LONG: 123,
  ABORT_APPLICATION_EXCEEDED_REPLY_TIME: 124,
  ABORT_BUFFER_OVERFLOW: 51,
  ABORT_INSUFFICIENT_SECURITY: 135,
  ABORT_INVALID_APDU_IN_THIS_STATE: 52,
  ABORT_OTHER: 56,
  ABORT_OUT_OF_RESOURCES: 125,
  ABORT_PREEMPTED_BY_HIGHER_PRIORITY_TASK: 53,
  ABORT_PROPRIETARY: 55,
  ABORT_SECURITY_ERROR: 136,
  ABORT_SEGMENTATION_NOT_SUPPORTED: 54,
  ABORT_TSM_TIMEOUT: 126,
  ABORT_WINDOW_SIZE_OUT_OF_RANGE: 127,
  ACCESS_DENIED: 85,
  ADDRESSING_ERROR: 115,
  BAD_DESTINATION_ADDRESS: 86,
  BAD_DESTINATION_DEVICE_ID: 87,
  BAD_SIGNATURE: 88,
  BAD_SOURCE_ADDRESS: 89,
  BAD_TIMESTAMP: 90,
  BUSY: 82,
  CANNOT_USE_KEY: 91,
  CANNOT_VERIFY_MESSAGE_ID: 92,
  CHARACTER_SET_NOT_SUPPORTED: 41,
  COMMUNICATION_DISABLED: 83,
  CONFIGURATION_IN_PROGRESS: 2,
  CORRECT_KEY_REVISION: 93,
  COV_SUBSCRIPTION_FAILED: 43,
  DATATYPE_NOT_SUPPORTED: 47,
  DELETE_FDT_ENTRY_FAILED: 120,
  DESTINATION_DEVICE_ID_REQUIRED: 94,
  DEVICE_BUSY: 3,
  DISTRIBUTE_BROADCAST_FAILED: 121,
  DUPLICATE_ENTRY: 137,
  DUPLICATE_MESSAGE: 95,
  DUPLICATE_NAME: 48,
  DUPLICATE_OBJECT_ID: 49,
  DYNAMIC_CREATION_NOT_SUPPORTED: 4,
  ENCRYPTION_NOT_CONFIGURED: 96,
  ENCRYPTION_REQUIRED: 97,
  FILE_ACCESS_DENIED: 5,
  FILE_FULL: 128,
  INCONSISTENT_CONFIGURATION: 129,
  INCONSISTENT_OBJECT_TYPE: 130,
  INCONSISTENT_PARAMETERS: 7,
  INCONSISTENT_SELECTION_CRITERION: 8,
  INCORRECT_KEY: 98,
  INTERNAL_ERROR: 131,
  INVALID_ARRAY_INDEX: 42,
  INVALID_CONFIGURATION_DATA: 46,
  INVALID_DATA_TYPE: 9,
  INVALID_EVENT_STATE: 73,
  INVALID_FILE_ACCESS_METHOD: 10,
  INVALID_FILE_START_POSITION: 11,
  INVALID_KEY_DATA: 99,
  INVALID_PARAMETER_DATA_TYPE: 13,
  INVALID_TAG: 57,
  INVALID_TIMESTAMP: 14,
  INVALID_VALUE_IN_THIS_STATE: 138,
  KEY_UPDATE_IN_PROGRESS: 100,
  LIST_ELEMENT_NOT_FOUND: 81,
  LOG_BUFFER_FULL: 75,
  LOGGED_VALUE_PURGED: 76,
  MALFORMED_MESSAGE: 101,
  MESSAGE_TOO_LONG: 113,
  MISSING_REQUIRED_PARAMETER: 16,
  NETWORK_DOWN: 58,
  NO_ALARM_CONFIGURED: 74,
  NO_OBJECTS_OF_SPECIFIED_TYPE: 17,
  NO_PROPERTY_SPECIFIED: 77,
  NO_SPACE_FOR_OBJECT: 18,
  NO_SPACE_TO_ADD_LIST_ELEMENT: 19,
  NO_SPACE_TO_WRITE_PROPERTY: 20,
  NO_VT_SESSIONS_AVAILABLE: 21,
  NOT_CONFIGURED: 132,
  NOT_CONFIGURED_FOR_TRIGGERED_LOGGING: 78,
  NOT_COV_PROPERTY: 44,
  NOT_KEY_SERVER: 102,
  NOT_ROUTER_TO_DNET: 110,
  OBJECT_DELETION_NOT_PERMITTED: 23,
  OBJECT_IDENTIFIER_ALREADY_EXISTS: 24,
  OPERATIONAL_PROBLEM: 25,
  OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED: 45,
  OTHER: 0,
  OUT_OF_MEMORY: 133,
  PARAMETER_OUT_OF_RANGE: 80,
  PASSWORD_FAILURE: 26,
  PROPERTY_IS_NOT_A_LIST: 22,
  PROPERTY_IS_NOT_AN_ARRAY: 50,
  READ_ACCESS_DENIED: 27,
  READ_BDT_FAILED: 117,
  READ_FDT_FAILED: 119,
  REGISTER_FOREIGN_DEVICE_FAILED: 118,
  REJECT_BUFFER_OVERFLOW: 59,
  REJECT_INCONSISTENT_PARAMETERS: 60,
  REJECT_INVALID_PARAMETER_DATA_TYPE: 61,
  REJECT_INVALID_TAG: 62,
  REJECT_MISSING_REQUIRED_PARAMETER: 63,
  REJECT_OTHER: 69,
  REJECT_PARAMETER_OUT_OF_RANGE: 64,
  REJECT_PROPRIETARY: 68,
  REJECT_TOO_MANY_ARGUMENTS: 65,
  REJECT_UNDEFINED_ENUMERATION: 66,
  REJECT_UNRECOGNIZED_SERVICE: 67,
  ROUTER_BUSY: 111,
  SECURITY_ERROR: 114,
  SECURITY_NOT_CONFIGURED: 103,
  SERVICE_REQUEST_DENIED: 29,
  SOURCE_SECURITY_REQUIRED: 104,
  SUCCESS: 84,
  TIMEOUT: 30,
  TOO_MANY_KEYS: 105,
  UNKNOWN_AUTHENTICATION_TYPE: 106,
  UNKNOWN_DEVICE: 70,
  UNKNOWN_FILE_SIZE: 122,
  UNKNOWN_KEY: 107,
  UNKNOWN_KEY_REVISION: 108,
  UNKNOWN_NETWORK_MESSAGE: 112,
  UNKNOWN_OBJECT: 31,
  UNKNOWN_PROPERTY: 32,
  UNKNOWN_ROUTE: 71,
  UNKNOWN_SOURCE_MESSAGE: 109,
  UNKNOWN_SUBSCRIPTION: 79,
  UNKNOWN_VT_CLASS: 34,
  UNKNOWN_VT_SESSION: 35,
  UNSUPPORTED_OBJECT_TYPE: 36,
  VALUE_NOT_INITIALIZED: 72,
  VALUE_OUT_OF_RANGE: 37,
  VALUE_TOO_LONG: 134,
  VT_SESSION_ALREADY_CLOSED: 38,
  VT_SESSION_TERMINATION_FAILURE: 39,
  WRITE_ACCESS_DENIED: 40,
  WRITE_BDT_FAILED: 116
};

module.exports.ErrorCodeName = usc.invert(module.exports.ErrorCode);

module.exports.AccessAuthenticationFactorDisable = {
  NONE: 0,
  DISABLED: 1,
  DISABLED_LOST: 2,
  DISABLED_STOLEN: 3,
  DISABLED_DAMAGED: 4,
  DISABLED_DESTROYED: 5
};

module.exports.AccessAuthenticationFactorDisableName = usc.invert(module.exports.AccessAuthenticationFactorDisable);

module.exports.AccessCredentialDisable = {
  NONE: 0,
  DISABLE: 1,
  DISABLE_MANUAL: 2,
  DISABLE_LOCKOUT: 3
};

module.exports.AccessCredentialDisableName = usc.invert(module.exports.AccessCredentialDisable);

module.exports.AccessCredentialDisableReason = {
  DISABLED: 0,
  DISABLED_NEEDS_PROVISIONING: 1,
  DISABLED_UNASSIGNED: 2,
  DISABLED_NOT_YET_ACTIVE: 3,
  DISABLED_EXPIRED: 4,
  DISABLED_LOCKOUT: 5,
  DISABLED_MAX_DAYS: 6,
  DISABLED_MAX_USES: 7,
  DISABLED_INACTIVITY: 8,
  DISABLED_MANUAL: 9
};

module.exports.AccessCredentialDisableReasonName = usc.invert(module.exports.AccessCredentialDisableReason);

module.exports.AccessEvent = {
  NONE: 0,
  GRANTED: 1,
  MUSTER: 2,
  PASSBACK_DETECTED: 3,
  DURESS: 4,
  TRACE: 5,
  LOCKOUT_MAX_ATTEMPTS: 6,
  LOCKOUT_OTHER: 7,
  LOCKOUT_RELINQUISHED: 8,
  LOCKED_BY_HIGHER_PRIORITY: 9,
  OUT_OF_SERVICE: 10,
  OUT_OF_SERVICE_RELINQUISHED: 11,
  ACCOMPANIMENT_BY: 12,
  AUTHENTICATION_FACTOR_READ: 13,
  AUTHORIZATION_DELAYED: 14,
  VERIFICATION_REQUIRED: 15,
  NO_ENTRY_AFTER_GRANTED: 16,
  DENIED_DENY_ALL: 128,
  DENIED_UNKNOWN_CREDENTIAL: 129,
  DENIED_AUTHENTICATION_UNAVAILABLE: 130,
  DENIED_AUTHENTICATION_FACTOR_TIMEOUT: 131,
  DENIED_INCORRECT_AUTHENTICATION_FACTOR: 132,
  DENIED_ZONE_NO_ACCESS_RIGHTS: 133,
  DENIED_POINT_NO_ACCESS_RIGHTS: 134,
  DENIED_NO_ACCESS_RIGHTS: 135,
  DENIED_OUT_OF_TIME_RANGE: 136,
  DENIED_THREAT_LEVEL: 137,
  DENIED_PASSBACK: 138,
  DENIED_UNEXPECTED_LOCATION_USAGE: 139,
  DENIED_MAX_ATTEMPTS: 140,
  DENIED_LOWER_OCCUPANCY_LIMIT: 141,
  DENIED_UPPER_OCCUPANCY_LIMIT: 142,
  DENIED_AUTHENTICATION_FACTOR_LOST: 143,
  DENIED_AUTHENTICATION_FACTOR_STOLEN: 144,
  DENIED_AUTHENTICATION_FACTOR_DAMAGED: 145,
  DENIED_AUTHENTICATION_FACTOR_DESTROYED: 146,
  DENIED_AUTHENTICATION_FACTOR_DISABLED: 147,
  DENIED_AUTHENTICATION_FACTOR_ERROR: 148,
  DENIED_CREDENTIAL_UNASSIGNED: 149,
  DENIED_CREDENTIAL_NOT_PROVISIONED: 150,
  DENIED_CREDENTIAL_NOT_YET_ACTIVE: 151,
  DENIED_CREDENTIAL_EXPIRED: 152,
  DENIED_CREDENTIAL_MANUAL_DISABLE: 153,
  DENIED_CREDENTIAL_LOCKOUT: 154,
  DENIED_CREDENTIAL_MAX_DAYS: 155,
  DENIED_CREDENTIAL_MAX_USES: 156,
  DENIED_CREDENTIAL_INACTIVITY: 157,
  DENIED_CREDENTIAL_DISABLED: 158,
  DENIED_NO_ACCOMPANIMENT: 159,
  DENIED_INCORRECT_ACCOMPANIMENT: 160,
  DENIED_LOCKOUT: 161,
  DENIED_VERIFICATION_FAILED: 162,
  DENIED_VERIFICATION_TIMEOUT: 163,
  DENIED_OTHER: 164
};

module.exports.AccessEventName = usc.invert(module.exports.AccessEvent);

module.exports.AccessPassbackMode = {
  PASSBACK_OFF: 0,
  HARD_PASSBACK: 1,
  SOFT_PASSBACK: 2
};

module.exports.AccessPassbackModeName = usc.invert(module.exports.AccessPassbackMode);

module.exports.AccessUserType = {
  ASSET: 0,
  GROUP: 1,
  PERSON: 2
};

module.exports.AccessUserTypeName = usc.invert(module.exports.AccessUserType);

module.exports.AccessZoneOccupancyState = {
  NORMAL: 0,
  BELOW_LOWER_LIMIT: 1,
  AT_LOWER_LIMIT: 2,
  AT_UPPER_LIMIT: 3,
  ABOVE_UPPER_LIMIT: 4,
  DISABLED: 5,
  NOT_SUPPORTED: 6
};

module.exports.AccessZoneOccupancyStateName = usc.invert(module.exports.AccessZoneOccupancyState);

module.exports.Action = {
  DIRECT: 0,
  REVERSE: 1
};

module.exports.ActionName = usc.invert(module.exports.Action);

module.exports.AuthenticationFactorType = {
  UNDEFINED: 0,
  ERROR: 1,
  CUSTOM: 2,
  SIMPLE_NUMBER16: 3,
  SIMPLE_NUMBER32: 4,
  SIMPLE_NUMBER56: 5,
  SIMPLE_ALPHA_NUMERIC: 6,
  ABA_TRACK2: 7,
  WIEGAND26: 8,
  WIEGAND37: 9,
  WIEGAND37_FACILITY: 10,
  FACILITY16_CARD32: 11,
  FACILITY32_CARD32: 12,
  FASC_N: 13,
  FASC_N_BCD: 14,
  FASC_N_LARGE: 15,
  FASC_N_LARGE_BCD: 16,
  GSA75: 17,
  CHUID: 18,
  CHUID_FULL: 19,
  GUID: 20,
  CBEFF_A: 21,
  CBEFF_B: 22,
  CBEFF_C: 23,
  USER_PASSWORD: 24
};

module.exports.AuthenticationFactorTypeName = usc.invert(module.exports.AuthenticationFactorType);

module.exports.AuthenticationStatus = {
  NOT_READY: 0,
  READY: 1, DISABLED: 2,
  WAITING_FOR_AUTHENTICATION_FACTOR: 3,
  WAITING_FOR_ACCOMPANIMENT: 4,
  WAITING_FOR_VERIFICATION: 5,
  IN_PROGRESS: 6
};

module.exports.AuthenticationStatusName = usc.invert(module.exports.AuthenticationStatus);

module.exports.AuthorizationExemption = {
  PASSBACK: 0,
  OCCUPANCY_CHECK: 1,
  ACCESS_RIGHTS: 2,
  LOCKOUT: 3,
  DENY: 4,
  VERIFICATION: 5,
  AUTHORIZATION_DELAY: 6
};

module.exports.AuthorizationExemptionName = usc.invert(module.exports.AuthorizationExemption);

module.exports.AuthorizationMode = {
  AUTHORIZE: 0,
  GRANT_ACTIVE: 1,
  DENY_ALL: 2,
  VERIFICATION_REQUIRED: 3,
  AUTHORIZATION_DELAYED: 4,
  NONE: 5
};

module.exports.AuthorizationModeName = usc.invert(module.exports.AuthorizationMode);

module.exports.BackupState = {
  IDLE: 0,
  PREPARING_FOR_BACKUP: 1,
  PREPARING_FOR_RESTORE: 2,
  PERFORMING_A_BACKUP: 3,
  PERFORMING_A_RESTORE: 4,
  BACKUP_FAILURE: 5,
  RESTORE_FAILURE: 6
};

module.exports.BackupStateName = usc.invert(module.exports.BackupState);

module.exports.BinaryLightingPV = {
  OFF: 0,
  ON: 1,
  WARN: 2,
  WARN_OFF: 3,
  WARN_RELINQUISH: 4,
  STOP: 5
};

module.exports.BinaryLightingPVName = usc.invert(module.exports.BinaryLightingPV);

module.exports.BinaryPV = {
  INACTIVE: 0,
  ACTIVE: 1
};

module.exports.BinaryPVName = usc.invert(module.exports.BinaryPV);

module.exports.DeviceStatus = {
  OPERATIONAL: 0,
  OPERATIONAL_READ_ONLY: 1,
  DOWNLOAD_REQUIRED: 2,
  DOWNLOAD_IN_PROGRESS: 3,
  NON_OPERATIONAL: 4,
  BACKUP_IN_PROGRESS: 5
};

module.exports.DeviceStatusName = usc.invert(module.exports.DeviceStatus);

module.exports.DoorAlarmState = {
  NORMAL: 0,
  ALARM: 1,
  DOOR_OPEN_TOO_LONG: 2,
  FORCED_OPEN: 3,
  TAMPER: 4,
  DOOR_FAULT: 5,
  LOCK_DOWN: 6,
  FREE_ACCESS: 7,
  EGRESS_OPEN: 8
};

module.exports.DoorAlarmStateName = usc.invert(module.exports.DoorAlarmState);

module.exports.DoorSecuredStatus = {
  SECURED: 0,
  UNSECURED: 1,
  UNKNOWN: 2
};

module.exports.DoorSecuredStatusName = usc.invert(module.exports.DoorSecuredStatus);

module.exports.DoorStatus = {
  CLOSED: 0,
  OPENED: 1,
  UNKNOWN: 2,
  DOOR_FAULT: 3,
  UNUSED: 4,
  NONE: 5,
  CLOSING: 6,
  OPENING: 7,
  SAFETY_LOCKED: 8,
  LIMITED_OPENED: 9
};

module.exports.DoorStatusName = usc.invert(module.exports.DoorStatus);

module.exports.DoorValue = {
  LOCK: 0,
  UNLOCK: 1,
  PULSE_UNLOCK: 2,
  EXTENDED_PULSE_UNLOCK: 3
};

module.exports.DoorValueName = usc.invert(module.exports.DoorValue);

module.exports.EngineeringUnits = {
  METERS_PER_SECOND_PER_SECOND: 166,
  SQUARE_METERS: 0,
  SQUARE_CENTIMETERS: 116,
  SQUARE_FEET: 1,
  SQUARE_INCHES: 115,
  CURRENCY1: 105,
  CURRENCY2: 106,
  CURRENCY3: 107,
  CURRENCY4: 108,
  CURRENCY5: 109,
  CURRENCY6: 110,
  CURRENCY7: 111,
  CURRENCY8: 112,
  CURRENCY9: 113,
  CURRENCY10: 114,
  MILLIAMPERES: 2,
  AMPERES: 3,
  AMPERES_PER_METER: 167,
  AMPERES_PER_SQUARE_METER: 168,
  AMPERE_SQUARE_METERS: 169,
  DECIBELS: 199,
  DECIBELS_MILLIVOLT: 200,
  DECIBELS_VOLT: 201,
  FARADS: 170,
  HENRYS: 171,
  OHMS: 4,
  OHM_METER_SQUARED_PER_METER: 237,
  OHM_METERS: 172,
  MILLIOHMS: 145,
  KILOHMS: 122,
  MEGOHMS: 123,
  MICROSIEMENS: 190,
  MILLISIEMENS: 202,
  SIEMENS: 173,
  SIEMENS_PER_METER: 174,
  TESLAS: 175,
  VOLTS: 5,
  MILLIVOLTS: 124,
  KILOVOLTS: 6,
  MEGAVOLTS: 7,
  VOLT_AMPERES: 8,
  KILOVOLT_AMPERES: 9,
  MEGAVOLT_AMPERES: 10,
  VOLT_AMPERES_REACTIVE: 11,
  KILOVOLT_AMPERES_REACTIVE: 12,
  MEGAVOLT_AMPERES_REACTIVE: 13,
  VOLTS_PER_DEGREE_KELVIN: 176,
  VOLTS_PER_METER: 177,
  DEGREES_PHASE: 14,
  POWER_FACTOR: 15,
  WEBERS: 178,
  AMPERE_SECONDS: 238,
  VOLT_AMPERE_HOURS: 239,
  KILOVOLT_AMPERE_HOURS: 240,
  MEGAVOLT_AMPERE_HOURS: 241,
  VOLT_AMPERE_HOURS_REACTIVE: 242,
  KILOVOLT_AMPERE_HOURS_REACTIVE: 243,
  MEGAVOLT_AMPERE_HOURS_REACTIVE: 244,
  VOLT_SQUARE_HOURS: 245,
  AMPERE_SQUARE_HOURS: 246,
  JOULES: 16,
  KILOJOULES: 17,
  KILOJOULES_PER_KILOGRAM: 125,
  MEGAJOULES: 126,
  WATT_HOURS: 18,
  KILOWATT_HOURS: 19,
  MEGAWATT_HOURS: 146,
  WATT_HOURS_REACTIVE: 203,
  KILOWATT_HOURS_REACTIVE: 204,
  MEGAWATT_HOURS_REACTIVE: 205,
  BTUS: 20,
  KILO_BTUS: 147,
  MEGA_BTUS: 148,
  THERMS: 21,
  TON_HOURS: 22,
  JOULES_PER_KILOGRAM_DRY_AIR: 23,
  KILOJOULES_PER_KILOGRAM_DRY_AIR: 149,
  MEGAJOULES_PER_KILOGRAM_DRY_AIR: 150,
  BTUS_PER_POUND_DRY_AIR: 24,
  BTUS_PER_POUND: 117,
  JOULES_PER_DEGREE_KELVIN: 127,
  KILOJOULES_PER_DEGREE_KELVIN: 151,
  MEGAJOULES_PER_DEGREE_KELVIN: 152,
  JOULES_PER_KILOGRAM_DEGREE_KELVIN: 128,
  NEWTON: 153,
  CYCLES_PER_HOUR: 25,
  CYCLES_PER_MINUTE: 26,
  HERTZ: 27,
  KILOHERTZ: 129,
  MEGAHERTZ: 130,
  PER_HOUR: 131,
  GRAMS_OF_WATER_PER_KILOGRAM_DRY_AIR: 28,
  PERCENT_RELATIVE_HUMIDITY: 29,
  MICROMETERS: 194,
  MILLIMETERS: 30,
  CENTIMETERS: 118,
  KILOMETERS: 193,
  METERS: 31,
  INCHES: 32,
  FEET: 33,
  CANDELAS: 179,
  CANDELAS_PER_SQUARE_METER: 180,
  WATTS_PER_SQUARE_FOOT: 34,
  WATTS_PER_SQUARE_METER: 35,
  LUMENS: 36,
  LUXES: 37,
  FOOT_CANDLES: 38,
  MILLIGRAMS: 196,
  GRAMS: 195,
  KILOGRAMS: 39,
  POUNDS_MASS: 40,
  TONS: 41,
  GRAMS_PER_SECOND: 154,
  GRAMS_PER_MINUTE: 155,
  KILOGRAMS_PER_SECOND: 42,
  KILOGRAMS_PER_MINUTE: 43,
  KILOGRAMS_PER_HOUR: 44,
  POUNDS_MASS_PER_SECOND: 119,
  POUNDS_MASS_PER_MINUTE: 45,
  POUNDS_MASS_PER_HOUR: 46,
  TONS_PER_HOUR: 156,
  MILLIWATTS: 132,
  WATTS: 47,
  KILOWATTS: 48,
  MEGAWATTS: 49,
  BTUS_PER_HOUR: 50,
  KILO_BTUS_PER_HOUR: 157,
  JOULE_PER_HOURS: 247,
  HORSEPOWER: 51,
  TONS_REFRIGERATION: 52,
  PASCALS: 53,
  HECTOPASCALS: 133,
  KILOPASCALS: 54,
  MILLIBARS: 134,
  BARS: 55,
  POUNDS_FORCE_PER_SQUARE_INCH: 56,
  MILLIMETERS_OF_WATER: 206,
  CENTIMETERS_OF_WATER: 57,
  INCHES_OF_WATER: 58,
  MILLIMETERS_OF_MERCURY: 59,
  CENTIMETERS_OF_MERCURY: 60,
  INCHES_OF_MERCURY: 61,
  DEGREES_CELSIUS: 62,
  DEGREES_KELVIN: 63,
  DEGREES_KELVIN_PER_HOUR: 181,
  DEGREES_KELVIN_PER_MINUTE: 182,
  DEGREES_FAHRENHEIT: 64,
  DEGREE_DAYS_CELSIUS: 65,
  DEGREE_DAYS_FAHRENHEIT: 66,
  DELTA_DEGREES_FAHRENHEIT: 120,
  DELTA_DEGREES_KELVIN: 121,
  YEARS: 67,
  MONTHS: 68,
  WEEKS: 69,
  DAYS: 70,
  HOURS: 71,
  MINUTES: 72,
  SECONDS: 73,
  HUNDREDTHS_SECONDS: 158,
  MILLISECONDS: 159,
  NEWTON_METERS: 160,
  MILLIMETERS_PER_SECOND: 161,
  MILLIMETERS_PER_MINUTE: 162,
  METERS_PER_SECOND: 74,
  METERS_PER_MINUTE: 163,
  METERS_PER_HOUR: 164,
  KILOMETERS_PER_HOUR: 75,
  FEET_PER_SECOND: 76,
  FEET_PER_MINUTE: 77,
  MILES_PER_HOUR: 78,
  CUBIC_FEET: 79,
  CUBIC_METERS: 80,
  IMPERIAL_GALLONS: 81,
  MILLILITERS: 197,
  LITERS: 82,
  US_GALLONS: 83,
  CUBIC_FEET_PER_SECOND: 142,
  CUBIC_FEET_PER_MINUTE: 84,
  MILLION_STANDARD_CUBIC_FEET_PER_MINUTE: 254,
  CUBIC_FEET_PER_HOUR: 191,
  CUBIC_FEET_PER_DAY: 248,
  STANDARD_CUBIC_FEET_PER_DAY: 47808,
  MILLION_STANDARD_CUBIC_FEET_PER_DAY: 47809,
  THOUSAND_CUBIC_FEET_PER_DAY: 47810,
  THOUSAND_STANDARD_CUBIC_FEET_PER_DAY: 47811,
  POUNDS_MASS_PER_DAY: 47812,
  CUBIC_METERS_PER_SECOND: 85,
  CUBIC_METERS_PER_MINUTE: 165,
  CUBIC_METERS_PER_HOUR: 135,
  CUBIC_METERS_PER_DAY: 249,
  IMPERIAL_GALLONS_PER_MINUTE: 86,
  MILLILITERS_PER_SECOND: 198,
  LITERS_PER_SECOND: 87,
  LITERS_PER_MINUTE: 88,
  LITERS_PER_HOUR: 136,
  US_GALLONS_PER_MINUTE: 89,
  US_GALLONS_PER_HOUR: 192,
  DEGREES_ANGULAR: 90,
  DEGREES_CELSIUS_PER_HOUR: 91,
  DEGREES_CELSIUS_PER_MINUTE: 92,
  DEGREES_FAHRENHEIT_PER_HOUR: 93,
  DEGREES_FAHRENHEIT_PER_MINUTE: 94,
  JOULE_SECONDS: 183,
  KILOGRAMS_PER_CUBIC_METER: 186,
  KILOWATT_HOURS_PER_SQUARE_METER: 137,
  KILOWATT_HOURS_PER_SQUARE_FOOT: 138,
  WATT_HOURS_PER_CUBIC_METER: 250,
  JOULES_PER_CUBIC_METER: 251,
  MEGAJOULES_PER_SQUARE_METER: 139,
  MEGAJOULES_PER_SQUARE_FOOT: 140,
  MOLE_PERCENT: 252,
  NO_UNITS: 95,
  NEWTON_SECONDS: 187,
  NEWTONS_PER_METER: 188,
  PARTS_PER_MILLION: 96,
  PARTS_PER_BILLION: 97,
  PASCAL_SECONDS: 253,
  PERCENT: 98,
  PERCENT_OBSCURATION_PER_FOOT: 143,
  PERCENT_OBSCURATION_PER_METER: 144,
  PERCENT_PER_SECOND: 99,
  PER_MINUTE: 100,
  PER_SECOND: 101,
  PSI_PER_DEGREE_FAHRENHEIT: 102,
  RADIANS: 103,
  RADIANS_PER_SECOND: 184,
  REVOLUTIONS_PER_MINUTE: 104,
  SQUARE_METERS_PER_NEWTON: 185,
  WATTS_PER_METER_PER_DEGREE_KELVIN: 189,
  WATTS_PER_SQUARE_METER_DEGREE_KELVIN: 141,
  PER_MILLE: 207,
  GRAMS_PER_GRAM: 208,
  KILOGRAMS_PER_KILOGRAM: 209,
  GRAMS_PER_KILOGRAM: 210,
  MILLIGRAMS_PER_GRAM: 211,
  MILLIGRAMS_PER_KILOGRAM: 212,
  GRAMS_PER_MILLILITER: 213,
  GRAMS_PER_LITER: 214,
  MILLIGRAMS_PER_LITER: 215,
  MICROGRAMS_PER_LITER: 216,
  GRAMS_PER_CUBIC_METER: 217,
  MILLIGRAMS_PER_CUBIC_METER: 218,
  MICROGRAMS_PER_CUBIC_METER: 219,
  NANOGRAMS_PER_CUBIC_METER: 220,
  GRAMS_PER_CUBIC_CENTIMETER: 221,
  BECQUERELS: 222,
  KILOBECQUERELS: 223,
  MEGABECQUERELS: 224,
  GRAY: 225,
  MILLIGRAY: 226,
  MICROGRAY: 227,
  SIEVERTS: 228,
  MILLISIEVERTS: 229,
  MICROSIEVERTS: 230,
  MICROSIEVERTS_PER_HOUR: 231,
  MILLIREMS: 47814,
  MILLIREMS_PER_HOUR: 47815,
  DECIBELS_A: 232,
  NEPHELOMETRIC_TURBIDITY_UNIT: 233,
  PH: 234,
  GRAMS_PER_SQUARE_METER: 235,
  MINUTES_PER_DEGREE_KELVIN: 236
};

module.exports.EngineeringUnitsName = usc.invert(module.exports.EngineeringUnits);

module.exports.EscalatorFault = {
  CONTROLLER_FAULT: 0,
  DRIVE_AND_MOTOR_FAULT: 1,
  MECHANICAL_COMPONENT_FAULT: 2,
  OVERSPEED_FAULT: 3,
  POWER_SUPPLY_FAULT: 4,
  SAFETY_DEVICE_FAULT: 5,
  CONTROLLER_SUPPLY_FAULT: 6,
  DRIVE_TEMPERATURE_EXCEEDED: 7,
  COMB_PLATE_FAULT: 8
};

module.exports.EscalatorFaultName = usc.invert(module.exports.EscalatorFault);

module.exports.EscalatorMode = {
  UNKNOWN: 0,
  STOP: 1,
  UP: 2,
  DOWN: 3,
  INSPECTION: 4,
  OUT_OF_SERVICE: 5
};

module.exports.EscalatorModeName = usc.invert(module.exports.EscalatorMode);

module.exports.EscalatorOperationDirection = {
  UNKNOWN: 0,
  STOPPED: 1,
  UP_RATED_SPEED: 2,
  UP_REDUCED_SPEED: 3,
  DOWN_RATED_SPEED: 4,
  DOWN_REDUCED_SPEED: 5
};

module.exports.EscalatorOperationDirectionName = usc.invert(module.exports.EscalatorOperationDirection);

module.exports.EventState = {
  NORMAL: 0,
  FAULT: 1,
  OFFNORMAL: 2,
  HIGH_LIMIT: 3,
  LOW_LIMIT: 4,
  LIFE_SAFETY_ALARM: 5
};

module.exports.EventStateName = usc.invert(module.exports.EventState);

module.exports.EventType = {
  CHANGE_OF_BITSTRING: 0,
  CHANGE_OF_STATE: 1,
  CHANGE_OF_VALUE: 2,
  COMMAND_FAILURE: 3,
  FLOATING_LIMIT: 4,
  OUT_OF_RANGE: 5,
  COMPLEX_EVENT_TYPE: 6,
  CHANGE_OF_LIFE_SAFETY: 8,
  EXTENDED: 9,
  BUFFER_READY: 10,
  UNSIGNED_RANGE: 11,
  ACCESS_EVENT: 13,
  DOUBLE_OUT_OF_RANGE: 14,
  SIGNED_OUT_OF_RANGE: 15,
  UNSIGNED_OUT_OF_RANGE: 16,
  CHANGE_OF_CHARACTERSTRING: 17,
  CHANGE_OF_STATUS_FLAGS: 18,
  CHANGE_OF_RELIABILITY: 19,
  NONE: 20,
  CHANGE_OF_DISCRETE_VALUE: 21,
  CHANGE_OF_TIMER: 22
};

module.exports.EventTypeName = usc.invert(module.exports.EventType);

module.exports.FaultType = {
  NONE: 0,
  FAULT_CHARACTERSTRING: 1,
  FAULT_EXTENDED: 2,
  FAULT_LIFE_SAFETY: 3,
  FAULT_STATE: 4,
  FAULT_STATUS_FLAGS: 5,
  FAULT_OUT_OF_RANGE: 6,
  FAULT_LISTED: 7
};

module.exports.FaultTypeName = usc.invert(module.exports.FaultType);

module.exports.FileAccessMethod = {
  RECORD_ACCESS: 0,
  STREAM_ACCESS: 1
};

module.exports.FileAccessMethodName = usc.invert(module.exports.FileAccessMethod);

module.exports.IPMode = {
  NORMAL: 0,
  FOREIGN: 1,
  BBMD: 2
};

module.exports.IPModeName = usc.invert(module.exports.IPMode);

module.exports.LifeSafetyMode = {
  OFF: 0,
  ON: 1,
  TEST: 2,
  MANNED: 3,
  UNMANNED: 4,
  ARMED: 5,
  DISARMED: 6,
  PREARMED: 7,
  SLOW: 8,
  FAST: 9,
  DISCONNECTED: 10,
  ENABLED: 11,
  DISABLED: 12,
  AUTOMATIC_RELEASE_DISABLED: 13,
  DEFAULT: 14
};

module.exports.LifeSafetyModeName = usc.invert(module.exports.LifeSafetyMode);

module.exports.LifeSafetyOperation = {
  NONE: 0,
  SILENCE: 1,
  SILENCE_AUDIBLE: 2,
  SILENCE_VISUAL: 3,
  RESET: 4,
  RESET_ALARM: 5,
  RESET_FAULT: 6,
  UNSILENCE: 7,
  UNSILENCE_AUDIBLE: 8,
  UNSILENCE_VISUAL: 9
};

module.exports.LifeSafetyOperationName = usc.invert(module.exports.LifeSafetyOperation);

module.exports.LifeSafetyState = {
  QUIET: 0,
  PRE_ALARM: 1,
  ALARM: 2,
  FAULT: 3,
  FAULT_PRE_ALARM: 4,
  FAULT_ALARM: 5,
  NOT_READY: 6,
  ACTIVE: 7,
  TAMPER: 8,
  TEST_ALARM: 9,
  TEST_ACTIVE: 10,
  TEST_FAULT: 11,
  TEST_FAULT_ALARM: 12,
  HOLDUP: 13,
  DURESS: 14,
  TAMPER_ALARM: 15,
  ABNORMAL: 16,
  EMERGENCY_POWER: 17,
  DELAYED: 18,
  BLOCKED: 19,
  LOCAL_ALARM: 20,
  GENERAL_ALARM: 21,
  SUPERVISORY: 22,
  TEST_SUPERVISORY: 23
};

module.exports.LifeSafetyStateName = usc.invert(module.exports.LifeSafetyState);

module.exports.LiftCarDirection = {
  UNKNOWN: 0,
  NONE: 1,
  STOPPED: 2,
  UP: 3,
  DOWN: 4,
  UP_AND_DOWN: 5
};

module.exports.LiftCarDirectionName = usc.invert(module.exports.LiftCarDirection);

module.exports.LiftCarDoorCommand = {
  NONE: 0,
  OPEN: 1,
  CLOSE: 2
};

module.exports.LiftCarDoorCommandName = usc.invert(module.exports.LiftCarDoorCommand);

module.exports.LiftCarDriveStatus = {
  UNKNOWN: 0,
  STATIONARY: 1,
  BRAKING: 2,
  ACCELERATE: 3,
  DECELERATE: 4,
  RATED_SPEED: 5,
  SINGLE_FLOOR_JUMP: 6,
  TWO_FLOOR_JUMP: 7,
  THREE_FLOOR_JUMP: 8,
  MULTI_FLOOR_JUMP: 9
};

module.exports.LiftCarDriveStatusName = usc.invert(module.exports.LiftCarDriveStatus);

module.exports.LiftCarMode = {
  UNKNOWN: 0,
  NORMAL: 1,
  VIP: 2,
  HOMING: 3,
  PARKING: 4,
  ATTENDANT_CONTROL: 5,
  FIREFIGHTER_CONTROL: 6,
  EMERGENCY_POWER: 7,
  INSPECTION: 8,
  CABINET_RECALL: 9,
  EARTHQUAKE_OPERATION: 10,
  FIRE_OPERATION: 11,
  OUT_OF_SERVICE: 12,
  OCCUPANT_EVACUATION: 13
};

module.exports.LiftCarModeName = usc.invert(module.exports.LiftCarMode);

module.exports.LiftFault = {
  CONTROLLER_FAULT: 0,
  DRIVE_AND_MOTOR_FAULT: 1,
  GOVERNOR_AND_SAFETY_GEAR_FAULT: 2,
  LIFT_SHAFT_DEVICE_FAULT: 3,
  POWER_SUPPLY_FAULT: 4,
  SAFETY_INTERLOCK_FAULT: 5,
  DOOR_CLOSING_FAULT: 6,
  DOOR_OPENING_FAULT: 7,
  CAR_STOPPED_OUTSIDE_LANDING_ZONE: 8,
  CALL_BUTTON_STUCK: 9,
  START_FAILURE: 10,
  CONTROLLER_SUPPLY_FAULT: 11,
  SELF_TEST_FAILURE: 12,
  RUNTIME_LIMIT_EXCEEDED: 13,
  POSITION_LOST: 14,
  DRIVE_TEMPERATURE_EXCEEDED: 15,
  LOAD_MEASUREMENT_FAULT: 16
};

module.exports.LiftFaultName = usc.invert(module.exports.LiftFault);

module.exports.LiftGroupMode = {
  UNKNOWN: 0,
  NORMAL: 1,
  DOWN_PEAK: 2,
  TWO_WAY: 3,
  FOUR_WAY: 4,
  EMERGENCY_POWER: 5,
  UP_PEAK: 6
};

module.exports.LiftGroupModeName = usc.invert(module.exports.LiftGroupMode);

module.exports.LightingInProgress = {
  IDLE: 0,
  FADE_ACTIVE: 1,
  RAMP_ACTIVE: 2,
  NOT_CONTROLLED: 3,
  OTHER: 4
};

module.exports.LightingInProgressName = usc.invert(module.exports.LightingInProgress);

module.exports.LightingOperation = {
  NONE: 0,
  FADE_TO: 1,
  RAMP_TO: 2,
  STEP_UP: 3,
  STEP_DOWN: 4,
  STEP_ON: 5,
  STEP_OFF: 6,
  WARN: 7,
  WARN_OFF: 8,
  WARN_RELINQUISH: 9,
  STOP: 10
};

module.exports.LightingOperationName = usc.invert(module.exports.LightingOperation);

module.exports.LightingTransition = {
  NONE: 0,
  FADE: 1,
  RAMP: 2
};

module.exports.LightingTransitionName = usc.invert(module.exports.LightingTransition);

module.exports.LockStatus = {
  LOCKED: 0,
  UNLOCKED: 1,
  LOCK_FAULT: 2,
  UNUSED: 3,
  UNKNOWN: 4
};

module.exports.LockStatusName = usc.invert(module.exports.LockStatus);

module.exports.LoggingType = {
  POLLED: 0,
  COV: 1,
  TRIGGERED: 2
};

module.exports.LoggingTypeName = usc.invert(module.exports.LoggingType);

module.exports.Maintenance = {
  NONE: 0,
  PERIODIC_TEST: 1,
  NEED_SERVICE_OPERATIONAL: 2,
  NEED_SERVICE_INOPERATIVE: 3
};

module.exports.MaintenanceName = usc.invert(module.exports.Maintenance);

module.exports.NetworkNumberQuality = {
  UNKNOWN: 0,
  LEARNED: 1,
  LEARNED_CONFIGURED: 2,
  CONFIGURED: 3
};

module.exports.NetworkNumberQualityName = usc.invert(module.exports.NetworkNumberQuality);

module.exports.NetworkPortCommand = {
  IDLE: 0,
  DISCARD_CHANGES: 1,
  RENEW_FD_REGISTRATION: 2,
  RESTART_SLAVE_DISCOVERY: 3,
  RENEW_DHCP: 4,
  RESTART_AUTONEGOTIATION: 5,
  DISCONNECT: 6,
  RESTART_PORT: 7
};

module.exports.NetworkPortCommandName = usc.invert(module.exports.NetworkPortCommand);

module.exports.NetworkType = {
  ETHERNET: 0,
  ARCNET: 1,
  MSTP: 2,
  PTP: 3,
  LONTALK: 4,
  IPV4: 5,
  ZIGBEE: 6,
  VIRTUAL: 7,
  IPV6: 9,
  SERIAL: 10
};

module.exports.NetworkTypeName = usc.invert(module.exports.NetworkType);

module.exports.NodeType = {
  UNKNOWN: 0,
  SYSTEM: 1,
  NETWORK: 2,
  DEVICE: 3,
  ORGANIZATIONAL: 4,
  AREA: 5,
  EQUIPMENT: 6,
  POINT: 7,
  COLLECTION: 8,
  PROPERTY: 9,
  FUNCTIONAL: 10,
  OTHER: 11,
  SUBSYSTEM: 12,
  BUILDING: 13,
  FLOOR: 14,
  SECTION: 15,
  MODULE: 16,
  TREE: 17,
  MEMBER: 18,
  PROTOCOL: 19,
  ROOM: 20,
  ZONE: 21
};

module.exports.NodeTypeName = usc.invert(module.exports.NodeType);

module.exports.NotifyType = {
  ALARM: 0,
  EVENT: 1,
  ACK_NOTIFICATION: 2
};

module.exports.NotifyTypeName = usc.invert(module.exports.NotifyType);

module.exports.ObjectType = {
  ACCESS_CREDENTIAL: 32,
  ACCESS_DOOR: 30,
  ACCESS_POINT: 33,
  ACCESS_RIGHTS: 34,
  ACCESS_USER: 35,
  ACCESS_ZONE: 36,
  ACCUMULATOR: 23,
  ALERT_ENROLLMENT: 52,
  ANALOG_INPUT: 0,
  ANALOG_OUTPUT: 1,
  ANALOG_VALUE: 2,
  AVERAGING: 18,
  BINARY_INPUT: 3,
  BINARY_LIGHTING_OUTPUT: 55,
  BINARY_OUTPUT: 4,
  BINARY_VALUE: 5,
  BITSTRING_VALUE: 39,
  CALENDAR: 6,
  CHANNEL: 53,
  CHARACTERSTRING_VALUE: 40,
  COMMAND: 7,
  CREDENTIAL_DATA_INPUT: 37,
  DATEPATTERN_VALUE: 41,
  DATE_VALUE: 42,
  DATETIMEPATTERN_VALUE: 43,
  DATETIME_VALUE: 44,
  DEVICE: 8,
  ELEVATOR_GROUP: 57,
  ESCALATOR: 58,
  EVENT_ENROLLMENT: 9,
  EVENT_LOG: 25,
  FILE: 10,
  GLOBAL_GROUP: 26,
  GROUP: 11,
  INTEGER_VALUE: 45,
  LARGE_ANALOG_VALUE: 46,
  LIFE_SAFETY_POINT: 21,
  LIFE_SAFETY_ZONE: 22,
  LIFT: 59,
  LIGHTING_OUTPUT: 54,
  LOAD_CONTROL: 28,
  LOOP: 12,
  MULTI_STATE_INPUT: 13,
  MULTI_STATE_OUTPUT: 14,
  MULTI_STATE_VALUE: 19,
  NETWORK_PORT: 56,
  NETWORK_SECURITY: 38,
  NOTIFICATION_CLASS: 15,
  NOTIFICATION_FORWARDER: 51,
  OCTETSTRING_VALUE: 47,
  POSITIVE_INTEGER_VALUE: 48,
  PROGRAM: 16,
  PULSE_CONVERTER: 24,
  SCHEDULE: 17,
  STRUCTURED_VIEW: 29,
  TIMEPATTERN_VALUE: 49,
  TIME_VALUE: 50,
  TIMER: 31,
  TREND_LOG: 20,
  TREND_LOG_MULTIPLE: 27
};

module.exports.ObjectTypeName = usc.invert(module.exports.ObjectType);

module.exports.Polarity = {
  NORMAL: 0,
  REVERSE: 1
};

module.exports.PolarityName = usc.invert(module.exports.Polarity);

module.exports.ProgramError = {
  NORMAL: 0,
  LOAD_FAILED: 1,
  INTERNAL: 2,
  PROGRAM: 3,
  OTHER: 4
};

module.exports.ProgramErrorName = usc.invert(module.exports.ProgramError);

module.exports.ProgramRequest = {
  READY: 0,
  LOAD: 1,
  RUN: 2,
  HALT: 3,
  RESTART: 4,
  UNLOAD: 5
};

module.exports.ProgramRequestName = usc.invert(module.exports.ProgramRequest);

module.exports.ProgramState = {
  IDLE: 0,
  LOADING: 1,
  RUNNING: 2,
  WAITING: 3,
  HALTED: 4,
  UNLOADING: 5
};

module.exports.ProgramStateName = usc.invert(module.exports.ProgramState);

module.exports.PropertyIdentifier = {
  ABSENTEE_LIMIT: 244,
  ACCEPTED_MODES: 175,
  ACCESS_ALARM_EVENTS: 245,
  ACCESS_DOORS: 246,
  ACCESS_EVENT: 247,
  ACCESS_EVENT_AUTHENTICATION_FACTOR: 248,
  ACCESS_EVENT_CREDENTIAL: 249,
  ACCESS_EVENT_TAG: 322,
  ACCESS_EVENT_TIME: 250,
  ACCESS_TRANSACTION_EVENTS: 251,
  ACCOMPANIMENT: 252,
  ACCOMPANIMENT_TIME: 253,
  ACK_REQUIRED: 1,
  ACKED_TRANSITIONS: 0,
  ACTION: 2,
  ACTION_TEXT: 3,
  ACTIVATION_TIME: 254,
  ACTIVE_AUTHENTICATION_POLICY: 255,
  ACTIVE_COV_MULTIPLE_SUBSCRIPTIONS: 481,
  ACTIVE_COV_SUBSCRIPTIONS: 152,
  ACTIVE_TEXT: 4,
  ACTIVE_VT_SESSIONS: 5,
  ACTUAL_SHED_LEVEL: 212,
  ADJUST_VALUE: 176,
  ALARM_VALUE: 6,
  ALARM_VALUES: 7,
  ALIGN_INTERVALS: 193,
  ALL: 8,
  ALL_WRITES_SUCCESSFUL: 9,
  ALLOW_GROUP_DELAY_INHIBIT: 365,
  APDU_LENGTH: 399,
  APDU_SEGMENT_TIMEOUT: 10,
  APDU_TIMEOUT: 11,
  APPLICATION_SOFTWARE_VERSION: 12,
  ARCHIVE: 13,
  ASSIGNED_ACCESS_RIGHTS: 256,
  ASSIGNED_LANDING_CALLS: 447,
  ATTEMPTED_SAMPLES: 124,
  AUTHENTICATION_FACTORS: 257,
  AUTHENTICATION_POLICY_LIST: 258,
  AUTHENTICATION_POLICY_NAMES: 259,
  AUTHENTICATION_STATUS: 260,
  AUTHORIZATION_EXEMPTIONS: 364,
  AUTHORIZATION_MODE: 261,
  AUTO_SLAVE_DISCOVERY: 169,
  AVERAGE_VALUE: 125,
  BACKUP_AND_RESTORE_STATE: 338,
  BACKUP_FAILURE_TIMEOUT: 153,
  BACKUP_PREPARATION_TIME: 339,
  BACNET_IP_GLOBAL_ADDRESS: 407,
  BACNET_IP_MODE: 408,
  BACNET_IP_MULTICAST_ADDRESS: 409,
  BACNET_IP_NAT_TRAVERSAL: 410,
  BACNET_IP_UDP_PORT: 412,
  BACNET_IPV6_MODE: 435,
  BACNET_IPV6_UDP_PORT: 438,
  BACNET_IPV6_MULTICAST_ADDRESS: 440,
  BBMD_ACCEPT_FD_REGISTRATIONS: 413,
  BBMD_BROADCAST_DISTRIBUTION_TABLE: 414,
  BBMD_FOREIGN_DEVICE_TABLE: 415,
  BELONGS_TO: 262,
  BIAS: 14,
  BIT_MASK: 342,
  BIT_TEXT: 343,
  BLINK_WARN_ENABLE: 373,
  BUFFER_SIZE: 126,
  CAR_ASSIGNED_DIRECTION: 448,
  CAR_DOOR_COMMAND: 449,
  CAR_DOOR_STATUS: 450,
  CAR_DOOR_TEXT: 451,
  CAR_DOOR_ZONE: 452,
  CAR_DRIVE_STATUS: 453,
  CAR_LOAD: 454,
  CAR_LOAD_UNITS: 455,
  CAR_MODE: 456,
  CAR_MOVING_DIRECTION: 457,
  CAR_POSITION: 458,
  CHANGE_OF_STATE_COUNT: 15,
  CHANGE_OF_STATE_TIME: 16,
  CHANGES_PENDING: 416,
  CHANNEL_NUMBER: 366,
  CLIENT_COV_INCREMENT: 127,
  COMMAND: 417,
  COMMAND_TIME_ARRAY: 430,
  CONFIGURATION_FILES: 154,
  CONTROL_GROUPS: 367,
  CONTROLLED_VARIABLE_REFERENCE: 19,
  CONTROLLED_VARIABLE_UNITS: 20,
  CONTROLLED_VARIABLE_VALUE: 21,
  COUNT: 177,
  COUNT_BEFORE_CHANGE: 178,
  COUNT_CHANGE_TIME: 179,
  COV_INCREMENT: 22,
  COV_PERIOD: 180,
  COV_RESUBSCRIPTION_INTERVAL: 128,
  COVU_PERIOD: 349,
  COVU_RECIPIENTS: 350,
  CREDENTIAL_DISABLE: 263,
  CREDENTIAL_STATUS: 264,
  CREDENTIALS: 265,
  CREDENTIALS_IN_ZONE: 266,
  CURRENT_COMMAND_PRIORITY: 431,
  DATABASE_REVISION: 155,
  DATE_LIST: 23,
  DAYLIGHT_SAVINGS_STATUS: 24,
  DAYS_REMAINING: 267,
  DEADBAND: 25,
  DEFAULT_FADE_TIME: 374,
  DEFAULT_RAMP_RATE: 375,
  DEFAULT_STEP_INCREMENT: 376,
  DEFAULT_SUBORDINATE_RELATIONSHIP: 490,
  DEFAULT_TIMEOUT: 393,
  DEPLOYED_PROFILE_LOCATION: 484,
  DERIVATIVE_CONSTANT: 26,
  DERIVATIVE_CONSTANT_UNITS: 27,
  DESCRIPTION: 28,
  DESCRIPTION_OF_HALT: 29,
  DEVICE_ADDRESS_BINDING: 30,
  DEVICE_TYPE: 31,
  DIRECT_READING: 156,
  DISTRIBUTION_KEY_REVISION: 328,
  DO_NOT_HIDE: 329,
  DOOR_ALARM_STATE: 226,
  DOOR_EXTENDED_PULSE_TIME: 227,
  DOOR_MEMBERS: 228,
  DOOR_OPEN_TOO_LONG_TIME: 229,
  DOOR_PULSE_TIME: 230,
  DOOR_STATUS: 231,
  DOOR_UNLOCK_DELAY_TIME: 232,
  DUTY_WINDOW: 213,
  EFFECTIVE_PERIOD: 32,
  EGRESS_ACTIVE: 386,
  EGRESS_TIME: 377,
  ELAPSED_ACTIVE_TIME: 33,
  ELEVATOR_GROUP: 459,
  ENABLE: 133,
  ENERGY_METER: 460,
  ENERGY_METER_REF: 461,
  ENTRY_POINTS: 268,
  ERROR_LIMIT: 34,
  ESCALATOR_MODE: 462,
  EVENT_ALGORITHM_INHIBIT: 354,
  EVENT_ALGORITHM_INHIBIT_REF: 355,
  EVENT_DETECTION_ENABLE: 353,
  EVENT_ENABLE: 35,
  EVENT_MESSAGE_TEXTS: 351,
  EVENT_MESSAGE_TEXTS_CONFIG: 352,
  EVENT_PARAMETERS: 83,
  EVENT_STATE: 36,
  EVENT_TIME_STAMPS: 130,
  EVENT_TYPE: 37,
  EXCEPTION_SCHEDULE: 38,
  EXECUTION_DELAY: 368,
  EXIT_POINTS: 269,
  EXPECTED_SHED_LEVEL: 214,
  EXPIRATION_TIME: 270,
  EXTENDED_TIME_ENABLE: 271,
  FAILED_ATTEMPT_EVENTS: 272,
  FAILED_ATTEMPTS: 273,
  FAILED_ATTEMPTS_TIME: 274,
  FAULT_HIGH_LIMIT: 388,
  FAULT_LOW_LIMIT: 389,
  FAULT_PARAMETERS: 358,
  FAULT_SIGNALS: 463,
  FAULT_TYPE: 359,
  FAULT_VALUES: 39,
  FD_BBMD_ADDRESS: 418,
  FD_SUBSCRIPTION_LIFETIME: 419,
  FEEDBACK_VALUE: 40,
  FILE_ACCESS_METHOD: 41,
  FILE_SIZE: 42,
  FILE_TYPE: 43,
  FIRMWARE_REVISION: 44,
  FLOOR_TEXT: 464,
  FULL_DUTY_BASELINE: 215,
  GLOBAL_IDENTIFIER: 323,
  GROUP_ID: 465,
  GROUP_MEMBER_NAMES: 346,
  GROUP_MEMBERS: 345,
  GROUP_MODE: 467,
  HIGH_LIMIT: 45,
  HIGHER_DECK: 468,
  IN_PROCESS: 47,
  IN_PROGRESS: 378,
  INACTIVE_TEXT: 46,
  INITIAL_TIMEOUT: 394,
  INPUT_REFERENCE: 181,
  INSTALLATION_ID: 469,
  INSTANCE_OF: 48,
  INSTANTANEOUS_POWER: 379,
  INTEGRAL_CONSTANT: 49,
  INTEGRAL_CONSTANT_UNITS: 50,
  INTERFACE_VALUE: 387,
  INTERVAL_OFFSET: 195,
  IP_ADDRESS: 400,
  IP_DEFAULT_GATEWAY: 401,
  IP_DHCP_ENABLE: 402,
  IP_DHCP_LEASE_TIME: 403,
  IP_DHCP_LEASE_TIME_REMAINING: 404,
  IP_DHCP_SERVER: 405,
  IP_DNS_SERVER: 406,
  IP_SUBNET_MASK: 411,
  IPV6_ADDRESS: 436,
  IPV6_AUTO_ADDRESSING_ENABLE: 442,
  IPV6_DEFAULT_GATEWAY: 439,
  IPV6_DHCP_LEASE_TIME: 443,
  IPV6_DHCP_LEASE_TIME_REMAINING: 444,
  IPV6_DHCP_SERVER: 445,
  IPV6_DNS_SERVER: 441,
  IPV6_PREFIX_LENGTH: 437,
  IPV6_ZONE_INDEX: 446,
  IS_UTC: 344,
  KEY_SETS: 330,
  LANDING_CALL_CONTROL: 471,
  LANDING_CALLS: 470,
  LANDING_DOOR_STATUS: 472,
  LAST_ACCESS_EVENT: 275,
  LAST_ACCESS_POINT: 276,
  LAST_COMMAND_TIME: 432,
  LAST_CREDENTIAL_ADDED: 277,
  LAST_CREDENTIAL_ADDED_TIME: 278,
  LAST_CREDENTIAL_REMOVED: 279,
  LAST_CREDENTIAL_REMOVED_TIME: 280,
  LAST_KEY_SERVER: 331,
  LAST_NOTIFY_RECORD: 173,
  LAST_PRIORITY: 369,
  LAST_RESTART_REASON: 196,
  LAST_RESTORE_TIME: 157,
  LAST_STATE_CHANGE: 395,
  LAST_USE_TIME: 281,
  LIFE_SAFETY_ALARM_VALUES: 166,
  LIGHTING_COMMAND: 380,
  LIGHTING_COMMAND_DEFAULT_PRIORITY: 381,
  LIMIT_ENABLE: 52,
  LIMIT_MONITORING_INTERVAL: 182,
  LINK_SPEED: 420,
  LINK_SPEED_AUTONEGOTIATE: 422,
  LINK_SPEEDS: 421,
  LIST_OF_GROUP_MEMBERS: 53,
  LIST_OF_OBJECT_PROPERTY_REFERENCES: 54,
  LOCAL_DATE: 56,
  LOCAL_FORWARDING_ONLY: 360,
  LOCAL_TIME: 57,
  LOCATION: 58,
  LOCK_STATUS: 233,
  LOCKOUT: 282,
  LOCKOUT_RELINQUISH_TIME: 283,
  LOG_BUFFER: 131,
  LOG_DEVICE_OBJECT_PROPERTY: 132,
  LOG_INTERVAL: 134,
  LOGGING_OBJECT: 183,
  LOGGING_RECORD: 184,
  LOGGING_TYPE: 197,
  LOW_DIFF_LIMIT: 390,
  LOW_LIMIT: 59,
  LOWER_DECK: 473,
  MAC_ADDRESS: 423,
  MACHINE_ROOM_ID: 474,
  MAINTENANCE_REQUIRED: 158,
  MAKING_CAR_CALL: 475,
  MANIPULATED_VARIABLE_REFERENCE: 60,
  MANUAL_SLAVE_ADDRESS_BINDING: 170,
  MASKED_ALARM_VALUES: 234,
  MAX_ACTUAL_VALUE: 382,
  MAX_APDU_LENGTH_ACCEPTED: 62,
  MAX_FAILED_ATTEMPTS: 285,
  MAX_INFO_FRAMES: 63,
  MAX_MASTER: 64,
  MAX_PRES_VALUE: 65,
  MAX_SEGMENTS_ACCEPTED: 167,
  MAXIMUM_OUTPUT: 61,
  MAXIMUM_VALUE: 135,
  MAXIMUM_VALUE_TIMESTAMP: 149,
  MEMBER_OF: 159,
  MEMBER_STATUS_FLAGS: 347,
  MEMBERS: 286,
  MIN_ACTUAL_VALUE: 383,
  MIN_PRES_VALUE: 69,
  MINIMUM_OFF_TIME: 66,
  MINIMUM_ON_TIME: 67,
  MINIMUM_OUTPUT: 68,
  MINIMUM_VALUE: 136,
  MINIMUM_VALUE_TIMESTAMP: 150,
  MODE: 160,
  MODEL_NAME: 70,
  MODIFICATION_DATE: 71,
  MUSTER_POINT: 287,
  NEGATIVE_ACCESS_RULES: 288,
  NETWORK_ACCESS_SECURITY_POLICIES: 332,
  NETWORK_INTERFACE_NAME: 424,
  NETWORK_NUMBER: 425,
  NETWORK_NUMBER_QUALITY: 426,
  NETWORK_TYPE: 427,
  NEXT_STOPPING_FLOOR: 476,
  NODE_SUBTYPE: 207,
  NODE_TYPE: 208,
  NOTIFICATION_CLASS: 17,
  NOTIFICATION_THRESHOLD: 137,
  NOTIFY_TYPE: 72,
  NUMBER_OF_APDU_RETRIES: 73,
  NUMBER_OF_AUTHENTICATION_POLICIES: 289,
  NUMBER_OF_STATES: 74,
  OBJECT_IDENTIFIER: 75,
  OBJECT_LIST: 76,
  OBJECT_NAME: 77,
  OBJECT_PROPERTY_REFERENCE: 78,
  OBJECT_TYPE: 79,
  OCCUPANCY_COUNT: 290,
  OCCUPANCY_COUNT_ADJUST: 291,
  OCCUPANCY_COUNT_ENABLE: 292,
  OCCUPANCY_LOWER_LIMIT: 294,
  OCCUPANCY_LOWER_LIMIT_ENFORCED: 295,
  OCCUPANCY_STATE: 296,
  OCCUPANCY_UPPER_LIMIT: 297,
  OCCUPANCY_UPPER_LIMIT_ENFORCED: 298,
  OPERATION_DIRECTION: 477,
  OPERATION_EXPECTED: 161,
  OPTIONAL: 80,
  OUT_OF_SERVICE: 81,
  OUTPUT_UNITS: 82,
  PACKET_REORDER_TIME: 333,
  PASSBACK_MODE: 300,
  PASSBACK_TIMEOUT: 301,
  PASSENGER_ALARM: 478,
  POLARITY: 84,
  PORT_FILTER: 363,
  POSITIVE_ACCESS_RULES: 302,
  POWER: 384,
  POWER_MODE: 479,
  PRESCALE: 185,
  PRESENT_VALUE: 85,
  PRIORITY: 86,
  PRIORITY_ARRAY: 87,
  PRIORITY_FOR_WRITING: 88,
  PROCESS_IDENTIFIER: 89,
  PROCESS_IDENTIFIER_FILTER: 361,
  PROFILE_LOCATION: 485,
  PROFILE_NAME: 168,
  PROGRAM_CHANGE: 90,
  PROGRAM_LOCATION: 91,
  PROGRAM_STATE: 92,
  PROPERTY_LIST: 371,
  PROPORTIONAL_CONSTANT: 93,
  PROPORTIONAL_CONSTANT_UNITS: 94,
  PROTOCOL_LEVEL: 482,
  PROTOCOL_OBJECT_TYPES_SUPPORTED: 96,
  PROTOCOL_REVISION: 139,
  PROTOCOL_SERVICES_SUPPORTED: 97,
  PROTOCOL_VERSION: 98,
  PULSE_RATE: 186,
  READ_ONLY: 99,
  REASON_FOR_DISABLE: 303,
  REASON_FOR_HALT: 100,
  RECIPIENT_LIST: 102,
  RECORD_COUNT: 141,
  RECORDS_SINCE_NOTIFICATION: 140,
  REFERENCE_PORT: 483,
  REGISTERED_CAR_CALL: 480,
  RELIABILITY: 103,
  RELIABILITY_EVALUATION_INHIBIT: 357,
  RELINQUISH_DEFAULT: 104,
  REPRESENTS: 491,
  REQUESTED_SHED_LEVEL: 218,
  REQUESTED_UPDATE_INTERVAL: 348,
  REQUIRED: 105,
  RESOLUTION: 106,
  RESTART_NOTIFICATION_RECIPIENTS: 202,
  RESTORE_COMPLETION_TIME: 340,
  RESTORE_PREPARATION_TIME: 341,
  ROUTING_TABLE: 428,
  SCALE: 187,
  SCALE_FACTOR: 188,
  SCHEDULE_DEFAULT: 174,
  SECURED_STATUS: 235,
  SECURITY_PDU_TIMEOUT: 334,
  SECURITY_TIME_WINDOW: 335,
  SEGMENTATION_SUPPORTED: 107,
  SERIAL_NUMBER: 372,
  SETPOINT: 108,
  SETPOINT_REFERENCE: 109,
  SETTING: 162,
  SHED_DURATION: 219,
  SHED_LEVEL_DESCRIPTIONS: 220,
  SHED_LEVELS: 221,
  SILENCED: 163,
  SLAVE_ADDRESS_BINDING: 171,
  SLAVE_PROXY_ENABLE: 172,
  START_TIME: 142,
  STATE_CHANGE_VALUES: 396,
  STATE_DESCRIPTION: 222,
  STATE_TEXT: 110,
  STATUS_FLAGS: 111,
  STOP_TIME: 143,
  STOP_WHEN_FULL: 144,
  STRIKE_COUNT: 391,
  STRUCTURED_OBJECT_LIST: 209,
  SUBORDINATE_ANNOTATIONS: 210,
  SUBORDINATE_LIST: 211,
  SUBORDINATE_NODE_TYPES: 487,
  SUBORDINATE_RELATIONSHIPS: 489,
  SUBORDINATE_TAGS: 488,
  SUBSCRIBED_RECIPIENTS: 362,
  SUPPORTED_FORMAT_CLASSES: 305,
  SUPPORTED_FORMATS: 304,
  SUPPORTED_SECURITY_ALGORITHMS: 336,
  SYSTEM_STATUS: 112,
  TAGS: 486,
  THREAT_AUTHORITY: 306,
  THREAT_LEVEL: 307,
  TIME_DELAY: 113,
  TIME_DELAY_NORMAL: 356,
  TIME_OF_ACTIVE_TIME_RESET: 114,
  TIME_OF_DEVICE_RESTART: 203,
  TIME_OF_STATE_COUNT_RESET: 115,
  TIME_OF_STRIKE_COUNT_RESET: 392,
  TIME_SYNCHRONIZATION_INTERVAL: 204,
  TIME_SYNCHRONIZATION_RECIPIENTS: 116,
  TIMER_RUNNING: 397,
  TIMER_STATE: 398,
  TOTAL_RECORD_COUNT: 145,
  TRACE_FLAG: 308,
  TRACKING_VALUE: 164,
  TRANSACTION_NOTIFICATION_CLASS: 309,
  TRANSITION: 385,
  TRIGGER: 205,
  UNITS: 117,
  UPDATE_INTERVAL: 118,
  UPDATE_KEY_SET_TIMEOUT: 337,
  UPDATE_TIME: 189,
  USER_EXTERNAL_IDENTIFIER: 310,
  USER_INFORMATION_REFERENCE: 311,
  USER_NAME: 317,
  USER_TYPE: 318,
  USES_REMAINING: 319,
  UTC_OFFSET: 119,
  UTC_TIME_SYNCHRONIZATION_RECIPIENTS: 206,
  VALID_SAMPLES: 146,
  VALUE_BEFORE_CHANGE: 190,
  VALUE_CHANGE_TIME: 192,
  VALUE_SET: 191,
  VALUE_SOURCE: 433,
  VALUE_SOURCE_ARRAY: 434,
  VARIANCE_VALUE: 151,
  VENDOR_IDENTIFIER: 120,
  VENDOR_NAME: 121,
  VERIFICATION_TIME: 326,
  VIRTUAL_MAC_ADDRESS_TABLE: 429,
  VT_CLASSES_SUPPORTED: 122,
  WEEKLY_SCHEDULE: 123,
  WINDOW_INTERVAL: 147,
  WINDOW_SAMPLES: 148,
  WRITE_STATUS: 370,
  ZONE_FROM: 320,
  ZONE_MEMBERS: 165,
  ZONE_TO: 321
};

module.exports.PropertyIdentifierName = usc.invert(module.exports.PropertyIdentifier);

module.exports.ProtocolLevel = {
  PHYSICAL: 0,
  PROTOCOL: 1,
  BACNET_APPLICATION: 2,
  NON_BACNET_APPLICATION: 3
};

module.exports.ProtocolLevelName = usc.invert(module.exports.ProtocolLevel);

module.exports.Relationship = {
  UNKNOWN: 0,
  DEFAULT: 1,
  CONTAINS: 2,
  CONTAINED_BY: 3,
  USES: 4,
  USED_BY: 5,
  COMMANDS: 6,
  COMMANDED_BY: 7,
  ADJUSTS: 8,
  ADJUSTED_BY: 9,
  INGRESS: 10,
  EGRESS: 11,
  SUPPLIES_AIR: 12,
  RECEIVES_AIR: 13,
  SUPPLIES_HOT_AIR: 14,
  RECEIVES_HOT_AIR: 15,
  SUPPLIES_COOL_AIR: 16,
  RECEIVES_COOL_AIR: 17,
  SUPPLIES_POWER: 18,
  RECEIVES_POWER: 19,
  SUPPLIES_GAS: 20,
  RECEIVES_GAS: 21,
  SUPPLIES_WATER: 22,
  RECEIVES_WATER: 23,
  SUPPLIES_HOT_WATER: 24,
  RECEIVES_HOT_WATER: 25,
  SUPPLIES_COOL_WATER: 26,
  RECEIVES_COOL_WATER: 27,
  SUPPLIES_STEAM: 28,
  RECEIVES_STEAM: 29
};

module.exports.RelationshipName = usc.invert(module.exports.Relationship);

module.exports.Reliability = {
  NO_FAULT_DETECTED: 0,
  NO_SENSOR: 1,
  OVER_RANGE: 2,
  UNDER_RANGE: 3,
  OPEN_LOOP: 4,
  SHORTED_LOOP: 5,
  NO_OUTPUT: 6,
  UNRELIABLE_OTHER: 7,
  PROCESS_ERROR: 8,
  MULTI_STATE_FAULT: 9,
  CONFIGURATION_ERROR: 10,
  COMMUNICATION_FAILURE: 12,
  MEMBER_FAULT: 13,
  MONITORED_OBJECT_FAULT: 14,
  TRIPPED: 15,
  LAMP_FAILURE: 16,
  ACTIVATION_FAILURE: 17,
  RENEW_DHCP_FAILURE: 18,
  RENEW_FD_REGISTRATION_FAILURE: 19,
  RESTART_AUTO_NEGOTIATION_FAILURE: 20,
  RESTART_FAILURE: 21,
  PROPRIETARY_COMMAND_FAILURE: 22,
  FAULTS_LISTED: 23,
  REFERENCED_OBJECT_FAULT: 24
};

module.exports.ReliabilityName = usc.invert(module.exports.Reliability);

module.exports.RestartReason = {
  UNKNOWN: 0,
  COLDSTART: 1,
  WARMSTART: 2,
  DETECTED_POWER_LOST: 3,
  DETECTED_POWERED_OFF: 4,
  HARDWARE_WATCHDOG: 5,
  SOFTWARE_WATCHDOG: 6,
  SUSPENDED: 7,
  ACTIVATE_CHANGES: 8
};

module.exports.ReliabilityName = usc.invert(module.exports.Reliability);

module.exports.SecurityLevel = {
  INCAPABLE: 0,
  PLAIN: 1,
  SIGNED: 2,
  ENCRYPTED: 3,
  SIGNED_END_TO_END: 4,
  ENCRYPTED_END_TO_END: 5
};

module.exports.ReliabilityName = usc.invert(module.exports.Reliability);

module.exports.SecurityPolicy = {
  PLAIN_NON_TRUSTED: 0,
  PLAIN_TRUSTED: 1,
  SIGNED_TRUSTED: 2,
  ENCRYPTED_TRUSTED: 3
};

module.exports.SecurityPolicyName = usc.invert(module.exports.SecurityPolicy);

module.exports.Segmentation = {
  SEGMENTED_BOTH: 0,
  SEGMENTED_TRANSMIT: 1,
  SEGMENTED_RECEIVE: 2,
  NO_SEGMENTATION: 3
};

module.exports.SegmentationName = usc.invert(module.exports.Segmentation);

module.exports.ShedState = {
  SHED_INACTIVE: 0,
  SHED_REQUEST_PENDING: 1,
  SHED_COMPLIANT: 2,
  SHED_NON_COMPLIANT: 3
};

module.exports.ShedStateName = usc.invert(module.exports.ShedState);

module.exports.SilencedState = {
  UNSILENCED: 0,
  AUDIBLE_SILENCED: 1,
  VISIBLE_SILENCED: 2,
  ALL_SILENCED: 3
};

module.exports.SilencedStateName = usc.invert(module.exports.SilencedState);

module.exports.TimerState = {
  IDLE: 0,
  RUNNING: 1,
  EXPIRED: 2
};

module.exports.TimerStateName = usc.invert(module.exports.TimerState);

module.exports.TimerTransition = {
  NONE: 0,
  IDLE_TO_RUNNING: 1,
  RUNNING_TO_IDLE: 2,
  RUNNING_TO_RUNNING: 3,
  RUNNING_TO_EXPIRED: 4,
  FORCED_TO_EXPIRED: 5,
  EXPIRED_TO_IDLE: 6,
  EXPIRED_TO_RUNNING: 7
};

module.exports.TimerTransitionName = usc.invert(module.exports.TimerTransition);

module.exports.VTClass = {
  DEFAULT_TERMINAL: 0,
  ANSI_X3_64: 1,
  DEC_VT52: 2,
  DEC_VT100: 3,
  DEC_VT220: 4,
  HP_700_94: 5,
  IBM_3130: 6
};

module.exports.VTClassName = usc.invert(module.exports.VTClass);

module.exports.WriteStatus = {
  IDLE: 0,
  IN_PROGRESS: 1,
  SUCCESSFUL: 2,
  FAILED: 3
};

module.exports.WriteStatusName = usc.invert(module.exports.WriteStatus);

// ASHRE 135-2016 - 21 FORMAL DESCRIPTION OF APPLICATION PROTOCOL DATA UNITS - Bitstrings
module.exports.DaysOfWeek = {
  MONDAY: 0,
  TUESDAY: 1,
  WEDNESDAY: 2,
  THURSDAY: 3,
  FRIDAY: 4,
  SATURDAY: 5,
  SUNDAY: 6
};

module.exports.DaysOfWeekName = usc.invert(module.exports.DaysOfWeek);

module.exports.EventTransitionBits = {
  TO_OFFNORMAL: 0,
  TO_FAULT: 1,
  TO_NORMAL: 2
};

module.exports.EventTransitionBitsName = usc.invert(module.exports.EventTransitionBits);

module.exports.LimitEnable = {
  LOW_LIMIT_ENABLE: 0,
  HIGH_LIMIT_ENABLE: 1
};

module.exports.LimitEnableName = usc.invert(module.exports.LimitEnable);

module.exports.LogStatus = {
  LOG_DISABLED: 0,
  BUFFER_PURGED: 1,
  LOG_INTERRUPTED: 2
};

module.exports.LogStatusName = usc.invert(module.exports.LogStatus);

module.exports.ObjectTypesSupported = {
  ANALOG_INPUT: 0,
  ANALOG_OUTPUT: 1,
  ANALOG_VALUE: 2,
  BINARY_INPUT: 3,
  BINARY_OUTPUT: 4,
  BINARY_VALUE: 5,
  CALENDAR: 6,
  COMMAND: 7,
  DEVICE: 8,
  EVENT_ENROLLMENT: 9,
  FILE: 10,
  GROUP: 11,
  LOOP: 12,
  MULTI_STATE_INPUT: 13,
  MULTI_STATE_OUTPUT: 14,
  NOTIFICATION_CLASS: 15,
  PROGRAM: 16,
  SCHEDULE: 17,
  AVERAGING: 18,
  MULTI_STATE_VALUE: 19,
  TREND_LOG: 20,
  LIFE_SAFETY_POINT: 21,
  LIFE_SAFETY_ZONE: 22,
  ACCUMULATOR: 23,
  PULSE_CONVERTER: 24,
  EVENT_LOG: 25,
  GLOBAL_GROUP: 26,
  TREND_LOG_MULTIPLE: 27,
  LOAD_CONTROL: 28,
  STRUCTURED_VIEW: 29,
  ACCESS_DOOR: 30,
  TIMER: 31,
  ACCESS_CREDENTIAL: 32,
  ACCESS_POINT: 33,
  ACCESS_RIGHTS: 34,
  ACCESS_USER: 35,
  ACCESS_ZONE: 36,
  CREDENTIAL_DATA_INPUT: 37,
  NETWORK_SECURITY: 38,
  BITSTRING_VALUE: 39,
  CHARACTERSTRING_VALUE: 40,
  DATEPATTERN_VALUE: 41,
  DATE_VALUE: 42,
  DATETIMEPATTERN_VALUE: 43,
  DATETIME_VALUE: 44,
  INTEGER_VALUE: 45,
  LARGE_ANALOG_VALUE: 46,
  OCTETSTRING_VALUE: 47,
  POSITIVE_INTEGER_VALUE: 48,
  TIMEPATTERN_VALUE: 49,
  TIME_VALUE: 50,
  NOTIFICATION_FORWARDER: 51,
  ALERT_ENROLLMENT: 52,
  CHANNEL: 53,
  LIGHTING_OUTPUT: 54,
  BINARY_LIGHTING_OUTPUT: 55,
  NETWORK_PORT: 56,
  ELEVATOR_GROUP: 57,
  ESCALATOR: 58,
  LIFT: 59
};

module.exports.ObjectTypesSupportedName = usc.invert(module.exports.ObjectTypesSupported);

module.exports.ResultFlags = {
  FIRST_ITEM: 0,
  LAST_ITEM: 1,
  MORE_ITEMS: 2
};

module.exports.ResultFlagsName = usc.invert(module.exports.ResultFlags);

module.exports.ServicesSupported = {
  ACKNOWLEDGE_ALARM: 0,
  CONFIRMED_COV_NOTIFICATION: 1,
  CONFIRMED_EVENT_NOTIFICATION: 2,
  GET_ALARM_SUMMARY: 3,
  GET_ENROLLMENT_SUMMARY: 4,
  SUBSCRIBE_COV: 5,
  ATOMIC_READ_FILE: 6,
  ATOMIC_WRITE_FILE: 7,
  ADD_LIST_ELEMENT: 8,
  REMOVE_LIST_ELEMENT: 9,
  CREATE_OBJECT: 10,
  DELETE_OBJECT: 11,
  READ_PROPERTY: 12,
  READ_PROPERTY_MULTIPLE: 14,
  WRITE_PROPERTY: 15,
  WRITE_PROPERTY_MULTIPLE: 16,
  DEVICE_COMMUNICATION_CONTROL: 17,
  CONFIRMED_PRIVATE_TRANSFER: 18,
  CONFIRMED_TEXT_MESSAGE: 19,
  REINITIALIZE_DEVICE: 20,
  VT_OPEN: 21,
  VT_CLOSE: 22,
  VT_DATA: 23,
  READ_PROPERTY_CONDITIONAL: 13,
  AUTHENTICATE: 24,
  REQUEST_KEY: 25,
  I_AM: 26,
  I_HAVE: 27,
  UNCONFIRMED_COV_NOTIFICATION: 28,
  UNCONFIRMED_EVENT_NOTIFICATION: 29,
  UNCONFIRMED_PRIVATE_TRANSFER: 30,
  UNCONFIRMED_TEXT_MESSAGE: 31,
  TIME_SYNCHRONIZATION: 32,
  WHO_HAS: 33,
  WHO_IS: 34,
  READ_RANGE: 35,
  UTC_TIME_SYNCHRONIZATION: 36,
  LIFE_SAFETY_OPERATION: 37,
  SUBSCRIBE_COV_PROPERTY: 38,
  GET_EVENT_INFORMATION: 39,
  WRITE_GROUP: 40,
  SUBSCRIBE_COV_PROPERTY_MULTIPLE: 41,
  CONFIRMED_COV_NOTIFICATION_MULTIPLE: 42,
  UNCONFIRMED_COV_NOTIFICATION_MULTIPLE: 43
};

module.exports.ServicesSupportedName = usc.invert(module.exports.ServicesSupported);

module.exports.StatusFlags = {
  IN_ALARM: 0,
  FAULT: 1,
  OVERRIDDEN: 2,
  OUT_OF_SERVICE: 3
};

module.exports.StatusFlagsName = usc.invert(module.exports.StatusFlags);

// ASHRE 135-2016 - 20.2.1.4 Application Tags - Enumerators
/**
 * @readonly
 * @enum {ApplicationTag}
 */
module.exports.ApplicationTag  = {
  NULL: 0,
  BOOLEAN: 1,
  UNSIGNED_INTEGER: 2,
  SIGNED_INTEGER: 3,
  REAL: 4,
  DOUBLE: 5,
  OCTET_STRING: 6,
  CHARACTER_STRING: 7,
  BIT_STRING: 8,
  ENUMERATED: 9,
  DATE: 10,
  TIME: 11,
  OBJECTIDENTIFIER: 12,
  // Application Tags - Internal
  EMPTYLIST: 100,
  WEEKNDAY: 101,
  DATERANGE: 102,
  DATETIME: 103,
  TIMESTAMP: 104,
  ERROR: 105,
  DEVICE_OBJECT_PROPERTY_REFERENCE: 106,
  DEVICE_OBJECT_REFERENCE: 107,
  OBJECT_PROPERTY_REFERENCE: 108,
  DESTINATION: 109,
  RECIPIENT: 110,
  COV_SUBSCRIPTION: 111,
  CALENDAR_ENTRY: 112,
  WEEKLY_SCHEDULE: 113,
  SPECIAL_EVENT: 114,
  READ_ACCESS_SPECIFICATION: 115,
  READ_ACCESS_RESULT: 116,
  LIGHTING_COMMAND: 117,
  CONTEXT_SPECIFIC_DECODED: 118,
  CONTEXT_SPECIFIC_ENCODED: 119,
  LOG_RECORD: 120
};

module.exports.ApplicationTagName = usc.invert(module.exports.ApplicationTag);

// ASHRE 135-2016 - J.2.1.1 BVLC-Result: Format - Enumerators
module.exports.BvlcResultFormat = {
  SUCCESSFUL_COMPLETION: 0x0000,
  WRITE_BROADCAST_DISTRIBUTION_TABLE_NAK: 0x0010,
  READ_BROADCAST_DISTRIBUTION_TABLE_NAK: 0x0020,
  REGISTER_FOREIGN_DEVICE_NAK: 0x0030,
  READ_FOREIGN_DEVICE_TABLE_NAK: 0x0040,
  DELETE_FOREIGN_DEVICE_TABLE_ENTRY_NAK: 0x0050,
  DISTRIBUTE_BROADCAST_TO_NETWORK_NAK: 0x0060
};

module.exports.BvlcResultFormatName = usc.invert(module.exports.BvlcResultFormat);

// ASHRE 135-2016 - J.2.1 BVLC-Result: Purpose - Enumerators
module.exports.BvlcResultPurpose = {
  BVLC_RESULT: 0x00,
  WRITE_BROADCAST_DISTRIBUTION_TABLE: 0x01,
  READ_BROADCAST_DISTRIBUTION_TABLE: 0x02,
  READ_BROADCAST_DISTRIBUTION_TABLE_ACK: 0x03,
  FORWARDED_NPDU: 0x04,
  REGISTER_FOREIGN_DEVICE: 0x05,
  READ_FOREIGN_DEVICE_TABLE: 0x06,
  READ_FOREIGN_DEVICE_TABLE_ACK: 0x07,
  DELETE_FOREIGN_DEVICE_TABLE_ENTRY: 0x08,
  DISTRIBUTE_BROADCAST_TO_NETWORK: 0x09,
  ORIGINAL_UNICAST_NPDU: 0x0A,
  ORIGINAL_BROADCAST_NPDU: 0x0B,
  SECURE_BVLL: 0x0C
};

module.exports.BvlcResultPurposeName = usc.invert(module.exports.BvlcResultPurpose);

// ASHRE 135-2016 - 20.2.9 Encoding of a Character String Value - Enumerators
module.exports.CharacterStringEncoding = {
  UTF_8: 0,
  MICROSOFT_DBCS: 1,
  JIS_X_0208: 2,
  UCS_4: 3,
  UCS_2: 4,
  ISO_8859_1: 5
};

module.exports.CharacterStringEncodingName = usc.invert(module.exports.CharacterStringEncoding);

// ASHRE 135-2016 - 13.3.3 CHANGE_OF_VALUE Event Algorithm - Internal
module.exports.CovType = {
  REAL: 0,
  BIT_STRING: 1
};

module.exports.CovTypeName = usc.invert(module.exports.CovType);

// ASHRE 135-2016 - 16.1.1.1.2 Enable/Disable - Enumerators
/**
 * @readonly
 * @enum {EnableDisable}
 */
module.exports.EnableDisable = {
  ENABLE: 0,
  DISABLE: 1,
  DISABLE_INITIATION: 2
};

module.exports.EnableDisableName = usc.invert(module.exports.EnableDisable);

// ASHRE 135-2016 - 20.1.2.5 max-apdu-length-accepted - Enumerators
/**
 * @readonly
 * @enum {MaxApduLengthAccepted}
 */
module.exports.MaxApduLengthAccepted = {
  OCTETS_50: 0b0000,
  OCTETS_128: 0b0001,
  OCTETS_206: 0b0010,
  OCTETS_480: 0b0011,
  OCTETS_1024: 0b0100,
  OCTETS_1476: 0b0101
};

module.exports.MaxApduLengthAcceptedName = usc.invert(module.exports.MaxApduLengthAccepted);

// ASHRE 135-2016 - 20.1.2.4 max-segments-accepted - Enumerators
/**
 * @readonly
 * @enum {MaxSegmentsAccepted}
 */
module.exports.MaxSegmentsAccepted = {
  SEGMENTS_0: (0b000 << 4),
  SEGMENTS_2: (0b001 << 4),
  SEGMENTS_4: (0b010 << 4),
  SEGMENTS_8: (0b011 << 4),
  SEGMENTS_16: (0b100 << 4),
  SEGMENTS_32: (0b101 << 4),
  SEGMENTS_64: (0b110 << 4),
  SEGMENTS_65: (0b111 << 4)
};

module.exports.MaxSegmentsAcceptedName = usc.invert(module.exports.MaxSegmentsAccepted);

// ASHRE 135-2016 - 6.2.4 Network Layer Message Type - Enumerators
module.exports.NetworkLayerMessageType = {
  WHO_IS_ROUTER_TO_NETWORK: 0x00,
  I_AM_ROUTER_TO_NETWORK: 0x01,
  I_COULD_BE_ROUTER_TO_NETWORK: 0x02,
  REJECT_MESSAGE_TO_NETWORK: 0x03,
  ROUTER_BUSY_TO_NETWORK: 0x04,
  ROUTER_AVAILABLE_TO_NETWORK: 0x05,
  INITIALIZE_ROUTING_TABLE: 0x06,
  INITIALIZE_ROUTING_TABLE_ACK: 0x07,
  ESTABLISH_CONNECTION_TO_NETWORK: 0x08,
  DISCONNECT_CONNECTION_TO_NETWORK: 0x09,
  CHALLENGE_REQUEST: 0x0A,
  SECURITY_PAYLOAD: 0x0B,
  SECURITY_RESPONSE: 0x0C,
  REQUEST_KEY_UPDATE: 0x0D,
  UPDATE_KEY_SET: 0x0E,
  UPDATE_DISTRIBUTION_KEY: 0x0F,
  REQUEST_MASTER_KEY: 0x10,
  SET_MASTER_KEY: 0x11,
  WHAT_IS_NETWORK_NUMBER: 0x12,
  NETWORK_NUMBER_IS: 0x13
};

module.exports.NetworkLayerMessageTypeName = usc.invert(module.exports.NetworkLayerMessageType);

// ASHRE 135-2016 - 6.2.2 Network Layer Protocol Control Information - Enumerators
module.exports.NpduControlBit = {
  EXPECTING_REPLY: (1 << 2),
  SOURCE_SPECIFIED: (1 << 3),
  DESTINATION_SPECIFIED: (1 << 5),
  NETWORK_LAYER_MESSAGE: (1 << 7)
};

module.exports.NpduControlBitName = usc.invert(module.exports.NpduControlBit);

// ASHRE 135-2016 - 6.2.2 Network Layer Protocol Control Information - Enumerators
module.exports.NpduControlPriority = {
  NORMAL_MESSAGE: 0b00,
  URGENT_MESSAGE: 0b01,
  CRITICAL_EQUIPMENT_MESSAGE: 0b10,
  LIFE_SAFETY_MESSAGE: 0b11
};

module.exports.NpduControlPriorityName = usc.invert(module.exports.NpduControlPriority);

// ASHRE 135-2016 - 20.1.2.11 Format of the BACnet-Confirmed-Request-PDU - Enumerators
module.exports.PduConReqBit = {
  SEGMENTED_RESPONSE_ACCEPTED: (1 << 1),
  MORE_FOLLOWS: (1 << 2),
  SEGMENTED_MESSAGE: (1 << 3)
};

module.exports.PduConReqBitName = usc.invert(module.exports.PduConReqBit);

// ASHRE 135-2016 - 20.1.6.6 Format of the BACnet-SegmentACK-PDU - Enumerators
module.exports.PduSegAckBit = {
  SERVER: (1 << 0),
  NEGATIVE_ACK: (1 << 1)
};

module.exports.PduSegAckBitName = usc.invert(module.exports.PduSegAckBit);

// ASHRE 135-2016 - 21 FORMAL DESCRIPTION OF APPLICATION PROTOCOL DATA UNITS - Enumerators
module.exports.PduType = {
  CONFIRMED_REQUEST: (0 << 4),
  UNCONFIRMED_REQUEST: (1 << 4),
  SIMPLE_ACK: (2 << 4),
  COMPLEX_ACK: (3 << 4),
  SEGMENT_ACK: (4 << 4),
  ERROR: (5 << 4),
  REJECT: (6 << 4),
  ABORT: (7 << 4)
};

module.exports.PduTypeName = usc.invert(module.exports.PduType);

// ASHRE 135-2016 - 21 FORMAL DESCRIPTION OF APPLICATION PROTOCOL DATA UNITS - Enumerators
module.exports.PropertyStates = {
  BOOLEAN_VALUE: 0,
  BINARY_VALUE: 1,
  EVENT_TYPE: 2,
  POLARITY: 3,
  PROGRAM_CHANGE: 4,
  PROGRAM_STATE: 5,
  REASON_FOR_HALT: 6,
  RELIABILITY: 7,
  STATE: 8,
  SYSTEM_STATUS: 9,
  UNITS: 10,
  UNSIGNED_VALUE: 11,
  LIFE_SAFETY_MODE: 12,
  LIFE_SAFETY_STATE: 13,
  RESTART_REASON: 14,
  DOOR_ALARM_STATE: 15,
  ACTION: 16,
  DOOR_SECURED_STATUS: 17,
  DOOR_STATUS: 18,
  DOOR_VALUE: 19,
  FILE_ACCESS_METHOD: 20,
  LOCK_STATUS: 21,
  LIFE_SAFETY_OPERATION: 22,
  MAINTENANCE: 23,
  NODE_TYPE: 24,
  NOTIFY_TYPE: 25,
  SECURITY_LEVEL: 26,
  SHED_STATE: 27,
  SILENCED_STATE: 28,
  ACCESS_EVENT: 30,
  ZONE_OCCUPANCY_STATE: 31,
  ACCESS_CREDENTIAL_DISABLE_REASON: 32,
  ACCESS_CREDENTIAL_DISABLE: 33,
  AUTHENTICATION_STATUS: 34,
  BACKUP_STATE: 36,
  WRITE_STATUS: 37,
  LIGHTING_IN_PROGRESS: 38,
  LIGHTING_OPERATION: 39,
  LIGHTING_TRANSITION: 40,
  INTEGER_VALUE: 41,
  BINARY_LIGHTING_VALUE: 42,
  TIMER_STATE: 43,
  TIMER_TRANSITION: 44,
  BACNET_IP_MODE: 45,
  NETWORK_PORT_COMMAND: 46,
  NETWORK_TYPE: 47,
  NETWORK_NUMBER_QUALITY: 48,
  ESCALATOR_OPERATION_DIRECTION: 49,
  ESCALATOR_FAULT: 50,
  ESCALATOR_MODE: 51,
  LIFT_CAR_DIRECTION: 52,
  LIFT_CAR_DOOR_COMMAND: 53,
  LIFT_CAR_DRIVE_STATUS: 54,
  LIFT_CAR_MODE: 55,
  LIFT_GROUP_MODE: 56,
  LIFT_FAULT: 57,
  PROTOCOL_LEVEL: 58,
  EXTENDED_VALUE: 63
};

module.exports.PropertyStatesName = usc.invert(module.exports.PropertyStates);

// ASHRE 135-2016 - 15.8.1.1.4 Range - Internal
module.exports.ReadRangeType = {
  BY_POSITION: 0,
  BY_SEQUENCE_NUMBER: 1,
  BY_TIME_REFERENCE_TIME_COUNT: 2
};

module.exports.ReadRangeTypeName = usc.invert(module.exports.ReadRangeType);

// ASHRE 135-2016 - 16.4.1.1.1 Reinitialized State of Device - Enumerators
/**
 * @readonly
 * @enum {ReinitializedState}
 */
module.exports.ReinitializedState = {
  COLDSTART: 0,
  WARMSTART: 1,
  STARTBACKUP: 2,
  ENDBACKUP: 3,
  STARTRESTORE: 4,
  ENDRESTORE: 5,
  ABORTRESTORE: 6,
  ACTIVATE_CHANGES: 7
};

module.exports.ReinitializedStateName = usc.invert(module.exports.ReinitializedState);

// ASHRE 135-2016 - 21 FORMAL DESCRIPTION OF APPLICATION PROTOCOL DATA UNITS - Internal
module.exports.TimeStamp = {
  TIME: 0,
  SEQUENCE_NUMBER: 1,
  DATETIME: 2
};

module.exports.TimeStampName = usc.invert(module.exports.TimeStamp);