Class: LXP::Packet::ReadInput
Overview
Input packets are a stream of values related to energy flows (inputs?)
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ReadInput
constructor
A new instance of ReadInput.
Methods inherited from Base
#bytes, #data_length, #data_length=, #datalog_serial, #datalog_serial=, #device_function, #device_function=, #inverter_serial, #inverter_serial=, #packet_length, #packet_length=, #protocol, #protocol=, #register, #register=, #tcp_function, #tcp_function=, #to_bin, #update_checksum, #value=, #value_length, #values
Constructor Details
#initialize ⇒ ReadInput
Returns a new instance of ReadInput.
9 10 11 12 13 14 15 16 |
# File 'lib/lxp/packet/read_input.rb', line 9 def initialize super self.tcp_function = TcpFunctions::TRANSLATED_DATA self.device_function = DeviceFunctions::READ_INPUT self.data_length = 18 end |
Class Method Details
.parse(ascii) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/lxp/packet/read_input.rb', line 18 def self.parse(ascii) i = super if i.packet_length != 111 || i.data_length != 97 raise 'unexpected packet length' end i end |