Class: Simms::GlobalConfigBeacon
- Inherits:
-
Beacon
- Object
- Beacon
- Simms::GlobalConfigBeacon
show all
- Defined in:
- lib/simms/global_config_beacon.rb
Constant Summary
Constants inherited
from Beacon
Beacon::CG_ELECTRIC, Beacon::CG_GLOBAL, Beacon::CG_HVAC, Beacon::CG_IRRIGATION, Beacon::CG_PULSER, Beacon::CG_SENSOR, Beacon::DC_CONFIG, Beacon::DC_DATA, Beacon::DC_GLOBAL_CONFIG
Instance Attribute Summary
Attributes inherited from Beacon
#command_group_id, #device_command_id, #timestamp, #uuid
Instance Method Summary
collapse
Methods inherited from Beacon
class_for, #config?, #data?, #group, #initialize, #type
Constructor Details
This class inherits a constructor from Simms::Beacon
Instance Method Details
#device_name ⇒ Object
22
23
24
25
26
|
# File 'lib/simms/global_config_beacon.rb', line 22
def device_name
name = ''
@bytes.slice(24,16).data.collect {|b| b.hex}.each {|c| name << c if c > 0}
name
end
|
#firmware_version ⇒ Object
14
15
16
|
# File 'lib/simms/global_config_beacon.rb', line 14
def firmware_version
"#{version_high}.#{version_low}"
end
|
#local_devices ⇒ Object
18
19
20
|
# File 'lib/simms/global_config_beacon.rb', line 18
def local_devices
@bytes.uint16(10)
end
|
#version_high ⇒ Object
6
7
8
|
# File 'lib/simms/global_config_beacon.rb', line 6
def version_high
@bytes.uint16(6)
end
|
#version_low ⇒ Object
10
11
12
|
# File 'lib/simms/global_config_beacon.rb', line 10
def version_low
@bytes.uint16(8)
end
|