def set_user_information_array(info=nil)
      @user_information = [
        [ITEM_MAX_LENGTH, "UL", @max_package_size],
        [ITEM_IMPLEMENTATION_UID, "STR", UID_ROOT],
        [ITEM_IMPLEMENTATION_VERSION, "STR", NAME]
      ]
      # A bit of a hack to include "asynchronous operations window negotiation" and/or "role negotiation",
      # in cases where this has been included in the association request:
      if info
        if info[:maxnum_operations_invoked]
          @user_information.insert(2, [ITEM_MAX_OPERATIONS_INVOKED, "HEX", "00010001"])
        end
        if info[:role_negotiation]
          pos = 3
          info[:role_negotiation].each do |role|
            msg = Stream.new('', @net_endian)
            uid = role[:sop_uid]
            # Length of UID (2 bytes):
            msg.encode_first(uid.length, "US")
            # SOP UID being negotiated (Variable length):
            msg.encode_last(uid, "STR")
            # SCU Role (Always accept SCU) (1 byte):
            if role[:scu] == 1
              msg.encode_last(1, "BY")
            else
              msg.encode_last(0, "BY")
            end
            # SCP Role (Never accept SCP) (1 byte):
            if role[:scp] == 1
              msg.encode_last(0, "BY")
            else
              msg.encode_last(1, "BY")
            end
            @user_information.insert(pos, [ITEM_ROLE_NEGOTIATION, "STR", msg.string])
            pos += 1
          end
        end
      end
    end
def set_user_information_array(info=nil)
      @user_information = [
        [ITEM_MAX_LENGTH, "UL", @max_package_size],
        [ITEM_IMPLEMENTATION_UID, "STR", UID_ROOT],
        [ITEM_IMPLEMENTATION_VERSION, "STR", NAME]
      ]
      # A bit of a hack to include "asynchronous operations window negotiation" and/or "role negotiation",
      # in cases where this has been included in the association request:
      if info
        if info[:maxnum_operations_invoked]
          @user_information.insert(2, [ITEM_MAX_OPERATIONS_INVOKED, "HEX", "00010001"])
        end
        if info[:role_negotiation]
          pos = 3
          info[:role_negotiation].each do |role|
            msg = Stream.new('', @net_endian)
            uid = role[:sop_uid]
            # Length of UID (2 bytes):
            msg.encode_first(uid.length, "US")
            # SOP UID being negotiated (Variable length):
            msg.encode_last(uid, "STR")
            # SCU Role (Always accept SCU) (1 byte):
            if role[:scu] == 1
              msg.encode_last(1, "BY")
            else
              msg.encode_last(0, "BY")
            end
            # SCP Role (Never accept SCP) (1 byte):
            if role[:scp] == 1
              msg.encode_last(0, "BY")
            else
              msg.encode_last(1, "BY")
            end
            @user_information.insert(pos, [ITEM_ROLE_NEGOTIATION, "STR", msg.string])
            pos += 1
          end
        end
      end
    end
Sets the @user_information items instance array.

 === Notes

 Each user information item is a three element array consisting of: item type code, VR & value.

 === Parameters

 * <tt>info</tt> -- An association information hash.