Class: Ucp::Pdu::UCP01

Inherits:
UCPMessage show all
Defined in:
lib/ucp/pdu/ucp01.rb

Overview

Ruby library implementation of EMI/UCP protocol v4.6 for SMS Copyright © 2011, Sergio Freire <[email protected]>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Direct Known Subclasses

Ucp01Operation, Ucp01Result

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, #to_s

Constructor Details

#initializeUCP01

Returns a new instance of UCP01.



22
23
24
25
# File 'lib/ucp/pdu/ucp01.rb', line 22

def initialize()
  super()
  @operation="01"
end

Instance Method Details

#initialize_message(ucpfields = {}) ⇒ Object



31
32
33
34
# File 'lib/ucp/pdu/ucp01.rb', line 31

def initialize_message(ucpfields={})
  super()
  @h=@h.merge ucpfields
end

#set_fields(ucpfields = {}) ⇒ Object



27
28
29
# File 'lib/ucp/pdu/ucp01.rb', line 27

def set_fields(ucpfields={})
  @h=@h.merge ucpfields
end