Module: Ansible::ZWave::ValueType_Int
- Defined in:
- lib/ansible/zwave/openzwave/types/valuetype_int.rb
Overview
integer (32-bit) value type for OpenZWave
Instance Method Summary collapse
- #as_canonical_value ⇒ Object
-
#explain ⇒ Object
return a human-readable representation of a ZWave frame.
-
#read_operation ⇒ Object
define type-specific OZW::Manager API calls.
- #to_protocol_value(new_val) ⇒ Object
- #write_operation ⇒ Object
Instance Method Details
#as_canonical_value ⇒ Object
42 43 44 45 |
# File 'lib/ansible/zwave/openzwave/types/valuetype_int.rb', line 42 def as_canonical_value() puts 'TODO:: zwave_int: as_canonical' return (current_value > 0) end |
#explain ⇒ Object
return a human-readable representation of a ZWave frame
57 58 |
# File 'lib/ansible/zwave/openzwave/types/valuetype_int.rb', line 57 def explain end |
#read_operation ⇒ Object
define type-specific OZW::Manager API calls
33 34 35 |
# File 'lib/ansible/zwave/openzwave/types/valuetype_int.rb', line 33 def read_operation return :GetValueAsInt end |
#to_protocol_value(new_val) ⇒ Object
48 49 50 51 52 53 54 |
# File 'lib/ansible/zwave/openzwave/types/valuetype_int.rb', line 48 def to_protocol_value(new_val) puts 'TODO:: zwave_int: to_protocol' result = nil if [TrueClass, FalseClass].include?(new_val.class) result = new_val ? 1 : 0 end end |
#write_operation ⇒ Object
37 38 39 |
# File 'lib/ansible/zwave/openzwave/types/valuetype_int.rb', line 37 def write_operation return :SetValue_Int32 end |