Class: RubyVolt::DataType::AppDataType
- Inherits:
-
Byte
- Object
- RubyVolt::DataType
- Basic
- FixedSize
- IntegerType
- Byte
- RubyVolt::DataType::AppDataType
- Extended by:
- Extensions::CodeValuesHash
- Defined in:
- lib/ruby_volt/data_type/app_data_type.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Byte
Byte::DIRECTIVE, Byte::LENGTH, Byte::NULL_INDICATOR
Instance Attribute Summary
Attributes included from Extensions::CodeValuesHash
Class Method Summary collapse
Methods included from Extensions::CodeValuesHash
Methods inherited from Basic
Methods inherited from RubyVolt::DataType
classifyDataType, testpacking, voltDataType
Class Method Details
.pack(val) ⇒ Object
7 8 9 10 |
# File 'lib/ruby_volt/data_type/app_data_type.rb', line 7 def pack(val) val = val.is_a?(::Integer) ? val : code_values[val] super(val) end |
.unpack(bytes) ⇒ Object
12 13 14 15 16 |
# File 'lib/ruby_volt/data_type/app_data_type.rb', line 12 def unpack(bytes) if unpacked = super(bytes) codes[unpacked] end end |