<commit_before>
# The SMPP Transmitter is the shizzle

class Smpp::Transmitter < Smpp::Base

  attr_reader :ack_ids

  # Send an MT SMS message. Delegate will receive message_accepted callback when SMSC
  # acknowledges, or the message_rejected callback upon error
  def send_mt(message_id, source_addr, destination_addr, short_message, options={})
    logger.debug "Sending MT: #{short_message}"
    if @state == :bound
      pdu = Pdu::SubmitSm.new(source_addr, destination_addr, short_message, options)
      write_pdu(pdu)
      
      # keep the message ID so we can associate the SMSC message ID with our message
      # when the response arrives.      
      @ack_ids[pdu.sequence_number] = message_id
    else
      raise InvalidStateException, "Transmitter is unbound. Cannot send MT messages."
    end<commit_msg>Addded transmitter file header.<commit_after># The SMPP Transmitter maintains a unidirectional connection to an SMSC.
# Provide a config hash with connection options to get started.
# See the sample_gateway.rb for examples of config values.

class Smpp::Transmitter < Smpp::Base

  attr_reader :ack_ids

  # Send an MT SMS message. Delegate will receive message_accepted callback when SMSC
  # acknowledges, or the message_rejected callback upon error
  def send_mt(message_id, source_addr, destination_addr, short_message, options={})
    logger.debug "Sending MT: #{short_message}"
    if @state == :bound
      pdu = Pdu::SubmitSm.new(source_addr, destination_addr, short_message, options)
      write_pdu(pdu)

      # keep the message ID so we can associate the SMSC message ID with our message
      # when the response arrives.
      @ack_ids[pdu.sequence_number] = message_id
    else
      raise InvalidStateException, "Transmitter is unbound. Cannot send MT messages."
    end
{'fraction_non_alphanumeric': 0.06799336650082918, 'fraction_numerical': 0.0, 'mean_word_length': 3.9453551912568305, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5074510', 'n_tokens_mistral': 533, 'n_tokens_neox': 510, 'n_words': 190}