Module: Alula::DeviceHelpers::AttributeTranslationsHelper
- Included in:
- Alula::Device
- Defined in:
- lib/alula/helpers/device_helpers/attribute_translations_helper.rb
Overview
Relies on the implementing class having reader properties of ‘auto_cfg`. Translates it into a usable string
Constant Summary collapse
- PANEL_NAME_MAP =
{ 0 => 'Honeywell/Vista', 1 => 'Honeywell/Vista+Passive', 2 => 'Honeywell/Lynx', 3 => 'Honeywell/Lynx+Passive', 4 => 'DSC/Depricated', 5 => 'GE-Interlogix/Caddx', 6 => 'DSC/Alexor', 7 => 'DSC/PowerSeries', 8 => 'Dialer Capture or Keyswitch', 9 => 'GE-Interlogix/Concord', 10 => '', 11 => 'Gateway', 12 => 'GE Simon XT/XTi', 13 => 'Cinch', 14 => 'Helix', 15 => 'Clare D3', 19 => 'No Panel' }.freeze
Instance Method Summary collapse
-
#panel_name ⇒ Object
autoCfg contains multiple pieces of information depending on how you examine it.
Instance Method Details
#panel_name ⇒ Object
autoCfg contains multiple pieces of information depending on how you examine it. Doing a bitwise operation with 0xff takes the last 8 bits, which is the connected panel ID. ipdatatel.atlassian.net/wiki/spaces/SYS/pages/16482314/auto+cfg
34 35 36 37 |
# File 'lib/alula/helpers/device_helpers/attribute_translations_helper.rb', line 34 def panel_name panel_id = auto_cfg.to_i & 0xff self.class::PANEL_NAME_MAP[panel_id] || "Unknown (#{panel_id})" end |