module MaxCube::Messages::TCP::Parser::MessageS

Response to send command message.

Constants

KEYS

Mandatory hash keys.

LENGTHS

Private Instance Methods

parse_tcp_s(body) click to toggle source
# File lib/maxcube/messages/tcp/type/s.rb, line 19
def parse_tcp_s(body)
  values = body.split(',')
  check_msg_part_lengths(LENGTHS, *values)
  values = to_ints(16, 'duty cycle, command result,' \
                       ' free memory slots', *values)
  values[1] = values[1].zero?
  KEYS.zip(values).to_h
end