def append_association_header(pdu, called_ae)
      # Big endian encoding:
      @outgoing.endian = @net_endian
      # Header will be encoded in opposite order, where the elements are being put first in the outgoing binary string.
      # Build last part of header first. This is necessary to be able to assess the length value.
      # Reserved (32 bytes)
      @outgoing.encode_first("00"*32, "HEX")
      # Calling AE title (16 bytes)
      calling_ae = @outgoing.encode_string_with_trailing_spaces(@ae, 16)
      @outgoing.add_first(calling_ae) # (pre-encoded value)
      # Called AE title (16 bytes) (return the name that the SCU used in the association request)
      formatted_called_ae = @outgoing.encode_string_with_trailing_spaces(called_ae, 16)
      @outgoing.add_first(formatted_called_ae) # (pre-encoded value)
      # Reserved (2 bytes)
      @outgoing.encode_first("0000", "HEX")
      # Protocol version (2 bytes)
      @outgoing.encode_first("0001", "HEX")
      append_header(pdu)
    end
def append_association_header(pdu, called_ae)
      # Big endian encoding:
      @outgoing.endian = @net_endian
      # Header will be encoded in opposite order, where the elements are being put first in the outgoing binary string.
      # Build last part of header first. This is necessary to be able to assess the length value.
      # Reserved (32 bytes)
      @outgoing.encode_first("00"*32, "HEX")
      # Calling AE title (16 bytes)
      calling_ae = @outgoing.encode_string_with_trailing_spaces(@ae, 16)
      @outgoing.add_first(calling_ae) # (pre-encoded value)
      # Called AE title (16 bytes) (return the name that the SCU used in the association request)
      formatted_called_ae = @outgoing.encode_string_with_trailing_spaces(called_ae, 16)
      @outgoing.add_first(formatted_called_ae) # (pre-encoded value)
      # Reserved (2 bytes)
      @outgoing.encode_first("0000", "HEX")
      # Protocol version (2 bytes)
      @outgoing.encode_first("0001", "HEX")
      append_header(pdu)
    end
Builds the binary string that makes up the header part the association request/response.

 === Parameters

 * <tt>pdu</tt> -- The command fragment's PDU string.
 * <tt>called_ae</tt> -- Application entity (name) of the SCP (host).