Class: PlcUtil::Awl::ArrayType
- Inherits:
-
Object
- Object
- PlcUtil::Awl::ArrayType
- Defined in:
- lib/plcutil/siemens/awl/array_type.rb
Instance Attribute Summary collapse
-
#element_type ⇒ Object
Returns the value of attribute element_type.
-
#range ⇒ Object
Returns the value of attribute range.
Instance Method Summary collapse
- #end_address(start_addr) ⇒ Object
-
#initialize(element_type, range) ⇒ ArrayType
constructor
A new instance of ArrayType.
- #skip_padding(addr) ⇒ Object
Constructor Details
#initialize(element_type, range) ⇒ ArrayType
Returns a new instance of ArrayType.
6 7 8 |
# File 'lib/plcutil/siemens/awl/array_type.rb', line 6 def initialize(element_type, range) @range, @element_type = range, element_type end |
Instance Attribute Details
#element_type ⇒ Object
Returns the value of attribute element_type.
4 5 6 |
# File 'lib/plcutil/siemens/awl/array_type.rb', line 4 def element_type @element_type end |
#range ⇒ Object
Returns the value of attribute range.
4 5 6 |
# File 'lib/plcutil/siemens/awl/array_type.rb', line 4 def range @range end |
Instance Method Details
#end_address(start_addr) ⇒ Object
14 15 16 |
# File 'lib/plcutil/siemens/awl/array_type.rb', line 14 def end_address(start_addr) start_addr.skip type.bit_size * range.count end |
#skip_padding(addr) ⇒ Object
10 11 12 |
# File 'lib/plcutil/siemens/awl/array_type.rb', line 10 def skip_padding(addr) addr.next_word end |