Class: Ucp::Pdu::Ucp61Operation

Inherits:
UCP61 show all
Defined in:
lib/ucp/pdu/ucp61_operation.rb

Constant Summary

Constants inherited from UCPMessage

Ucp::Pdu::UCPMessage::DELIMITER, Ucp::Pdu::UCPMessage::ETX, Ucp::Pdu::UCPMessage::STX

Instance Attribute Summary

Attributes inherited from UCPMessage

#dcs, #message_ref, #operation, #operation_type, #part_nr, #total_parts, #trn

Instance Method Summary collapse

Methods inherited from UCPMessage

#checksum, #get_field, #is_ack?, #is_nack?, #is_operation?, #is_result?, #length, #set_field, #set_fields, #to_s

Constructor Details

#initialize(fields = nil) ⇒ Ucp61Operation

Returns a new instance of Ucp61Operation.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ucp/pdu/ucp61_operation.rb', line 23

def initialize(fields=nil)
  super()
  @operation_type="O"
  @fields=[:oadc,:oton,:onpi,:styp,:pwd,:npwd,:vers,:ladc,:lton,:lnpi,:res1,:res2]

  if fields.nil?
    return
  end


  @trn=fields[0]
  @operation_type=fields[2]
  @operation=fields[3]

  # 00/00058/O/61/04568768///2///0100/1920870340094000//5///06


   for i in 4..(fields.length-1)
     field=@fields[i-4]
     @h[field]=fields[i]
   end

end