Class: Ansible::KNX::DPTFrame
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- Ansible::KNX::DPTFrame
- Defined in:
- lib/ansible/knx/knx_dpt.rb
Overview
a base class for DPT data structures. derives from BinData::Record, implements some common stuff
Direct Known Subclasses
Ansible::KNX::DPT10::DPT10_Frame, Ansible::KNX::DPT11::DPT11_Frame, Ansible::KNX::DPT12::DPT12_Frame, Ansible::KNX::DPT13::DPT13_Frame, Ansible::KNX::DPT15::DPT15_Frame, Ansible::KNX::DPT16::DPT16_Frame, Ansible::KNX::DPT17::DPT17_Frame, Ansible::KNX::DPT18::DPT18_Frame, Ansible::KNX::DPT19::DPT19_Frame, Ansible::KNX::DPT1::DPT1_Frame, Ansible::KNX::DPT2::DPT2_Frame, Ansible::KNX::DPT3::DPT3_Frame, Ansible::KNX::DPT4::DPT4_Frame, Ansible::KNX::DPT5::DPT5_Frame, Ansible::KNX::DPT6::DPT6_Frame, Ansible::KNX::DPT7::DPT7_Frame, Ansible::KNX::DPT8::DPT8_Frame, Ansible::KNX::DPT9::DPT9_Frame
Instance Method Summary collapse
-
#validate_ranges ⇒ Object
make sure all frame fields are valid (within min,max range).
Instance Method Details
#validate_ranges ⇒ Object
make sure all frame fields are valid (within min,max range)
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/ansible/knx/knx_dpt.rb', line 39 def validate_ranges() # range checking is global: applies to all subtypes field_names.each { |fieldname| # skip padding fields next if /pad/.match(fieldname) field = self.send(fieldname) if range = field.get_parameter(:range) then raise "#{self}: field #{fieldname} value (#{field.value}) out of range #{range}" unless range === field.value end } end |