Class: LibSL::LLU16
Instance Attribute Summary
Attributes inherited from LLNumber
#value
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from LLNumber
endianness, #initialize
Class Method Details
.decode(data) ⇒ Object
164
165
166
|
# File 'lib/types.rb', line 164
def self.decode(data)
LLNumber.decode(data, 'v1a*', LLU16)
end
|
Instance Method Details
#encode ⇒ Object
168
169
170
171
|
# File 'lib/types.rb', line 168
def encode()
raise ArgumentError, "Value out of range: #{@value}" if @value < 0 or @value > 0xffff
super('v1')
end
|