Class: Ucp::Pdu::Ucp31Operation
- Inherits:
-
UCP31
- Object
- UCPMessage
- UCP31
- Ucp::Pdu::Ucp31Operation
- Defined in:
- lib/ucp/pdu/ucp31_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
- #basic_alert(recipient, pid) ⇒ Object
-
#initialize(fields = nil) ⇒ Ucp31Operation
constructor
A new instance of Ucp31Operation.
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) ⇒ Ucp31Operation
Returns a new instance of Ucp31Operation.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/ucp/pdu/ucp31_operation.rb', line 23 def initialize(fields=nil) super() @operation_type="O" @fields=[:adc,:pid] if fields.nil? return end @trn=fields[0] @operation_type=fields[2] @operation=fields[3] # *02/00035/O/31/0234765439845/0139/A0# for i in 4..(fields.length-1) field=@fields[i-4] @h[field]=fields[i] end end |
Instance Method Details
#basic_alert(recipient, pid) ⇒ Object
46 47 48 |
# File 'lib/ucp/pdu/ucp31_operation.rb', line 46 def basic_alert(recipient,pid) @h={:adc=>recipient, :pid=>pid} end |