Module: GreenButtonData::Enumerations

Included in:
ApplicationInformation, Authorization, Parser::ApplicationInformation, Parser::IntervalReading, Parser::ReadingType, Parser::SummaryMeasurement, Parser::UsagePoint, Parser::UsageSummary, ReadingType, UsagePoint, UsageSummary
Defined in:
lib/green-button-data/enumerations.rb,
lib/green-button-data/enumerations/service.rb,
lib/green-button-data/enumerations/currency.rb,
lib/green-button-data/enumerations/commodity.rb,
lib/green-button-data/enumerations/phase_code.rb,
lib/green-button-data/enumerations/measurement.rb,
lib/green-button-data/enumerations/unit_symbol.rb,
lib/green-button-data/enumerations/accumulation.rb,
lib/green-button-data/enumerations/data_qualifier.rb,
lib/green-button-data/enumerations/flow_direction.rb,
lib/green-button-data/enumerations/time_attribute.rb,
lib/green-button-data/enumerations/unit_multiplier.rb,
lib/green-button-data/enumerations/quality_of_reading.rb,
lib/green-button-data/enumerations/espi_service_status.rb,
lib/green-button-data/enumerations/authorization_status.rb,
lib/green-button-data/enumerations/time_period_of_interest.rb,
lib/green-button-data/enumerations/third_party_application_use.rb,
lib/green-button-data/enumerations/third_party_application_type.rb,
lib/green-button-data/enumerations/third_party_application_status.rb,
lib/green-button-data/enumerations/data_custodian_application_status.rb

Constant Summary collapse

SERVICE =
{
  0 => :electricity,
  1 => :gas,
  2 => :water,
  3 => :time,
  4 => :heat,
  5 => :refuse,
  6 => :sewerage,
  7 => :rates,
  8 => :tv_license,
  9 => :internet
}
CURRENCY =
{
    0 => :other,
   36 => :aud,
  124 => :cad,
  156 => :cny,
  208 => :dkk,
  356 => :inr,
  392 => :jpy,
  578 => :nok,
  643 => :rub,
  752 => :sek,
  756 => :chf,
  826 => :gbp,
  840 => :usd,
  978 => :eur
}
COMMODITY =
{
   0 => :none,                          # NA
   1 => :electricity_secondary_metered, # Secondary electricity meter
   2 => :electricity_primary_metered,   # Primary electricity meter
   3 => :communication,                 # A measurement of the communication infrastructure itself
   4 => :air,                           # Air
   5 => :insulative_gas,                # SF6 is found below (ID: 22)
   6 => :insulative_oil,                # Oil for insulation
   7 => :natural_gas,                   # Natural gas (LNG)
   8 => :propane,                       # Propane gas (LPG)
   9 => :potable_water,                 # Drinkable water (drinking fountains)
  10 => :steam,                         # Water in steam form; usually for heating
  11 => :waste_water,                   # Sewerage
  12 => :heating_fluid,                 # Fluid for heating in liquid form
  13 => :cooling_fluid,                 # Cooling fluid; returns warmer than sent
  14 => :nonpotable_water,              # Reclaimed water
  15 => :nox,                           # Nitrous Oxides
  16 => :so2,                           # Sulfur Dioxide SO₂
  17 => :ch4,                           # Methane CH₄
  18 => :co2,                           # Carbon Dioxide CO₂
  19 => :carbon,                        # Carbon
  20 => :hch,                           # Hexachlorocyclohexane HCH
  21 => :pfc,                           # Perfluorocarbons PFC
  22 => :sf6,                           # Sulfurhexafluoride SF₆
  23 => :tv_license,                    # Television
  24 => :internet,                      # Internet service
  25 => :refuse                         # Trash
}
PHASE_CODE =
{
  0 => :none,
  16 => :n,
  17 => :n_g,
  32 => :c,
  33 => :c_n,
  40 => :c_av,
  41 => :ca_n,
  64 => :b,
  65 => :b_n,
  66 => :b_c,
  72 => :b_av,
  97 => :b_c_n,  # TODO: Check with GB XML schema maintainers? https://github.com/energyos/OpenESPI-Common-java/blob/master/etc/espiDerived.xsd
  128 => :a,
  129 => :a_n,
  132 => :a_b,
  136 => :a_to_av,
  193 => :a_b_n,
  224 => :a_b_c,
  225 => :a_b_c_n,
  272 => :s2_n,
  512 => :s1,
  528 => :s1_n,
  768 => :s1_2,
  769 => :s12_n,
  784 => :s1_2_n
}
MEASUREMENT =
{
    0 => :none,
    2 => :apparent_power_factor,
    3 => :currency,
    4 => :current,
    5 => :current_angle,
    6 => :current_imbalance,
    7 => :date,
    8 => :demand,
    9 => :distance,
   10 => :distortion_volt_amperes,
   11 => :energization,
   12 => :energy,
   13 => :energization_load_side,
   14 => :fan,
   15 => :frequency,
   16 => :funds,
   17 => :ieee1366asai,
   18 => :ieee1366asidi,
   19 => :ieee1366asifi,
   20 => :ieee1366caidi,
   21 => :ieee1366caifi,
   22 => :ieee1366cemin,
   23 => :ieee1366cemsmin,
   24 => :ieee1366ctaidi,
   25 => :ieee1366maifi,
   26 => :ieee1366maifie,
   27 => :ieee1366saidi,
   28 => :ieee1366saifi,
   31 => :line_losses,
   32 => :losses,
   33 => :negative_sequence,
   34 => :phasor_power_factor,
   35 => :phasor_reactive_power,
   36 => :positive_sequence,
   37 => :power,
   38 => :power_factor,
   40 => :quantity_power,
   41 => :sag,
   42 => :swell,
   43 => :switch_position,
   44 => :tap_position,
   45 => :tariff_rate,
   46 => :temperature,
   47 => :total_harmonic_distortion,
   48 => :transformer_losses,
   49 => :unipede_voltage_dip_10_to_15,
   50 => :unipede_voltage_dip_15_to_30,
   51 => :unipede_voltage_dip_30_to_60,
   52 => :unipede_voltage_dip_60_to_90,
   53 => :unipede_voltage_dip_90_to_100,
   54 => :voltage,
   55 => :voltage_angle,
   56 => :voltage_excursion,
   57 => :voltage_imbalance,
   58 => :volume,
   59 => :zero_flow_duration,
   60 => :zero_sequence,
   64 => :distortion_power_factor,
   81 => :frequency_excursion,
   90 => :application_context,
   91 => :ap_title,
   92 => :asset_number,
   93 => :bandwidth,
   94 => :battery_voltage,
   95 => :broadcast_address,
   96 => :device_address_type_1,
   97 => :device_address_type_2,
   98 => :device_address_type_3,
   99 => :device_address_type_4,
  100 => :device_class,
  101 => :electronic_serial_number,
  102 => :end_device_id,
  103 => :group_address_type_1,
  104 => :group_address_type_2,
  105 => :group_address_type_3,
  106 => :group_address_type_4,
  107 => :ip_address,
  108 => :mac_address,
  109 => :mfg_assigned_configuration_id,
  110 => :mfg_assigned_physical_serial_number,
  111 => :mfg_assigned_product_number,
  112 => :mfg_assigned_unique_communication_address,
  113 => :multi_cast_address,
  114 => :one_way_address,
  115 => :signal_strength,
  116 => :two_way_address,
  117 => :signal_to_noise_ratio,
  118 => :alarm,
  119 => :battery_carry_over,
  120 => :data_overflow_alarm,
  121 => :demand_limit,
  122 => :demand_reset,
  123 => :diagnostic,
  124 => :emergency_limit,
  125 => :encoder_tamper,
  126 => :ieee1366_momentary_interruption,
  127 => :ieee1366_momentary_interruption_event,
  128 => :ieee1366_sustained_interruption,
  129 => :interruption_behaviour,
  130 => :inversion_tamper,
  131 => :load_interrupt,
  132 => :load_shed,
  133 => :maintenance,
  134 => :physical_tamper,
  135 => :power_loss_tamper,
  136 => :power_outage,
  137 => :power_quality,
  138 => :power_restoration,
  139 => :programmed,
  140 => :push_button,
  141 => :relay_activation,
  142 => :relay_cycle,
  143 => :removal_tamper,
  144 => :reprogramming_tamper,
  145 => :reverse_rotation_tamper,
  146 => :switch_armed,
  147 => :switch_disabled,
  148 => :tamper,
  150 => :bill_last_period,
  151 => :bill_to_date,
  152 => :bill_carryover,
  153 => :connection_fee,
  154 => :audible_volume,
  155 => :volumetric_flow
}
UNIT_SYMBOL =
{
    0 => :none,
    2 => :m,
    3 => :g,
    4 => :rev_per_sec,
    5 => :A,
    6 => :K,
    7 => :mol,
    8 => :cd,
    9 => :deg,
   10 => :rad,
   11 => :sr,
   21 => :gy,
   22 => :bq,
   23 => :deg_C,
   24 => :sv,
   25 => :F,
   27 => :sec,
   28 => :H,
   29 => :V,
   30 => :ohm,
   31 => :J,
   33 => :Hz,
   34 => :lx,
   35 => :lm,
   36 => :wb,
   37 => :t,
   38 => :W,
   41 => :m2,
   42 => :m3,
   43 => :m_per_sec,
   44 => :m_per_sec2,
   45 => :m3_per_sec,
   46 => :m_per_m3,
   47 => :kg_m,
   48 => :kg_per_m3,
   49 => :m2_per_sec,
   50 => :w_per_mK,
   51 => :J_per_kg,
   53 => :siemens,
   54 => :rad_per_sec,
   61 => :VA,
   63 => :VAr,
   66 => :Vs,
   67 => :V2,
   68 => :As,
   69 => :A2,
   70 => :A2s,
   71 => :VAh,
   72 => :Wh,
   73 => :VAhr,
   74 => :V_per_Hz,
   75 => :Hz_per_sec,
   76 => :char,
   77 => :char_per_sec,
   78 => :gM2,
   79 => :b,
   80 => :money,
   81 => :W_per_sec,
   82 => :litre_per_sec,
  100 => :q,
  101 => :qh,
  102 => :ohm_m,
  103 => :A_per_m,
  104 => :V2h,
  105 => :A2h,
  106 => :Ah,
  107 => :Wh_per_m3,
  108 => :time_stamp,
  109 => :status,
  111 => :count,
  113 => :bm,
  114 => :code,
  115 => :Wh_per_rev,
  116 => :VArh_per_rev,
  117 => :VAh_per_rev,
  118 => :me_code,
  119 => :ft3,
  120 => :ft3_compensated,
  123 => :ft3_compensated_per_h,
  125 => :m3_per_h,
  126 => :m3_compensated_per_h,
  127 => :m3_uncompensated_per_h,
  128 => :us_gal,
  129 => :us_gal_per_h,
  130 => :imperial_gal,
  131 => :imperial_gal_per_h,
  132 => :btu,
  133 => :btu_per_h,
  134 => :litre,
  137 => :litre_per_h,
  138 => :litre_compensated_per_h,
  139 => :litre_uncompensated_per_h,
  140 => :paG,
  141 => :psiA,
  142 => :psiG,
  143 => :litre_per_litre,
  144 => :g_per_G,
  145 => :mol_per_m3,
  146 => :mol_per_mol,
  147 => :mol_per_kg,
  148 => :m_per_m,
  149 => :sec_per_sec,
  150 => :Hz_per_Hz,
  151 => :V_per_V,
  152 => :A_per_A,
  153 => :W_per_VA,
  154 => :rev,
  155 => :paA,
  156 => :litre_uncompensated,
  157 => :litre_compensated,
  158 => :kat,
  159 => :min,
  160 => :h,
  161 => :q45,
  162 => :q60,
  163 => :q45h,
  164 => :q60h,
  166 => :m3_uncompensated,
  167 => :m3_compensated,
  168 => :W_per_W,
  169 => :them
}
ACCUMULATION =
{
   0 => :none,
   1 => :bulk_quantity,
   2 => :continuous_cumulative,
   3 => :cumulative,
   4 => :delta_data,
   6 => :indicating,
   9 => :summation,
  10 => :time_delay,
  12 => :instantaneous,
  13 => :latching_quantity,
  14 => :bounded_quantity
}
DATA_QUALIFIER =
{
   0 => :none,
   2 => :average,
   4 => :excess,
   5 => :high_threshold,
   7 => :low_threshold,
   8 => :maximum,
   9 => :minimum,
  11 => :nominal,
  12 => :normal,
  16 => :second_maximum,
  17 => :second_minimum,
  23 => :third_maximum,
  24 => :fourth_maximum,
  25 => :fifth_maximum,
  26 => :sum
}
FLOW_DIRECTION =
{
   0 => :none,
   1 => :forward,
   2 => :lagging,
   3 => :leading,
   4 => :net,
   5 => :q1plus_q2,
   7 => :q1plus_q3,
   8 => :q1plus_q4,
   9 => :q1minus_q4,
  10 => :q2plus_q3,
  11 => :q2plus_q4,
  12 => :q2minus_q3,
  13 => :q3plus_q4,
  14 => :q3minus_q2,
  15 => :quadrant1,
  16 => :quadrant2,
  17 => :quadrant3,
  18 => :quadrant4,
  19 => :reverse,
  20 => :total,
  21 => :total_by_phase
}
TIME_ATTRIBUTE =
{
   0 => :none,
   1 => :ten_minute,
   2 => :fifteen_minute,
   3 => :one_minute,
   4 => :twenty_four_hour,
   5 => :thirty_minute,
   6 => :five_minute,
   7 => :sixty_minute,
  10 => :two_minute,
  14 => :three_minute,
  15 => :present,
  16 => :previous,
  31 => :twenty_minute,
  50 => :fixed_block_60_min,
  51 => :fixed_block_30_min,
  52 => :fixed_block_20_min,
  53 => :fixed_block_15_min,
  54 => :fixed_block_10_min,
  55 => :fixed_block_5_min,
  56 => :fixed_block_1_min,
  57 => :rolling_block_60_min_interval_30_min_sub_interval,
  58 => :rolling_block_60_min_interval_20_min_sub_interval,
  59 => :rolling_block_60_min_interval_15_min_sub_interval,
  60 => :rolling_block_60_min_interval_12_min_sub_interval,
  61 => :rolling_block_60_min_interval_10_min_sub_interval,
  62 => :rolling_block_60_min_interval_6_min_sub_interval,
  63 => :rolling_block_60_min_interval_5_min_sub_interval,
  64 => :rolling_block_60_min_interval_4_min_sub_interval,
  65 => :rolling_block_30_min_interval_15_min_sub_interval,
  66 => :rolling_block_30_min_interval_10_min_sub_interval,
  67 => :rolling_block_30_min_interval_6_min_sub_interval,
  68 => :rolling_block_30_min_interval_5_min_sub_interval,
  69 => :rolling_block_30_min_interval_3_min_sub_interval,
  70 => :rolling_block_30_min_interval_2_min_sub_interval,
  71 => :rolling_block_15_min_interval_5_min_sub_interval,
  72 => :rolling_block_15_min_interval_3_min_sub_interval,
  73 => :rolling_block_15_min_interval_1_min_sub_interval,
  74 => :rolling_block_10_min_interval_5_min_sub_interval,
  75 => :rolling_block_10_min_interval_2_min_sub_interval,
  76 => :rolling_block_10_min_interval_1_min_sub_interval,
  77 => :rolling_block_5_min_interval_1_min_sub_interval
}
UNIT_MULTIPLIER =
{
  -12 => :p,      # Pico: 10^-12
   -9 => :n,      # Nano: 10^-9
   -6 => :micro,  # Micro: 10^-6
   -3 => :m,      # Milli: 10^-3
   -1 => :d,      # Deci: 10^-1
    0 => :none,   # N/A
    1 => :da,     # Deca: 10^1
    2 => :h,      # Hecto: 10^2
    3 => :k,      # Kilo: 10^3
    6 => :M,      # Mega: 10^6
    9 => :G,      # Giga: 10^9
   12 => :T,      # Tera: 10^12
}
QUALITY_OF_READING =
{
   0 => :valid,
   7 => :manually_edited,
   8 => :estimated_using_reference_day,
   9 => :estimated_using_linear_interpolation,
  10 => :questionable,
  11 => :derived,
  12 => :projected_forecast,
  13 => :mixed,
  14 => :raw,
  15 => :normalized_for_weather,
  16 => :other,
  17 => :validated,
  18 => :verified,
  19 => :revenue_quality
}
ESPI_SERVICE_STATUS =
{
  0 => :unavailable,
  1 => :normal
}
AUTHORIZATION_STATUS =
{
  0 => :revoked,
  1 => :active,
  2 => :denied
}
TIME_PERIOD_OF_INTEREST =
{
   0 => :none,
   8 => :billing_period,
  11 => :daily,
  13 => :monthly,
  22 => :seasonal,
  24 => :weekly,
  32 => :specified_period
}
THIRD_PARTY_APPLICATION_USE =
{
  1 => :energy_management,
  2 => :comparisons,
  3 => :government,
  4 => :academic,
  5 => :law_enforcement
}
THIRD_PARTY_APPLICATION_TYPE =
{
  1 => :web,
  2 => :desktop,
  3 => :mobile,
  4 => :device
}
THIRD_PARTY_APPLICATION_STATUS =
{
  1 => :development,
  2 => :review_test,
  3 => :production,
  4 => :retired
}
DATA_CUSTODIAN_APPLICATION_STATUS =
{
  1 => :review,
  2 => :production,
  3 => :on_hold,
  4 => :revoked
}