Class: Empp::MsgActiveTest

Inherits:
EmppBase show all
Defined in:
lib/empp/msg_active_test.rb

Instance Attribute Summary

Attributes inherited from EmppBase

#command_id, #sequence_id, #total_length

Instance Method Summary collapse

Constructor Details

#initializeMsgActiveTest

Returns a new instance of MsgActiveTest.



8
9
10
11
12
# File 'lib/empp/msg_active_test.rb', line 8

def initialize
  @command_id = Constants::EMPP_ACTIVE_TEST
  @total_length = 12
  setSequenceId
end

Instance Method Details

#packageObject



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/empp/msg_active_test.rb', line 14

def package

  buf = Utils::ByteBuffer.new
  # add header
  buf.append_uint_be(@total_length)

  buf.append_uint_be(@command_id)
  buf.append_uint_be(@sequence_id)

  buf.data
end