MiniGUI移植总结

2024-01-05 09:58
文章标签 总结 移植 minigui

本文主要是介绍MiniGUI移植总结,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

需准备的软件包:
libminigui-1.6.x-linux.tar.gz           //开发库
minigui-res-1.6.tar.gz                  //资源文件,如bmp,font,icon
minigui-dev-1.6.2-for-win32          // 用于在 windows VC 开发的程序包
下载地址: www.minigui.org
参考文献:
1 Hily Jiang. MiniGUI 源码走读 .http://hily.iyi.cn
2 uClinux 下显示驱动移植及 minigui 的移植
感谢:
qq . 嵌入式技术交流 02. 小鹤
1 开启uClinuxFrameBuffer支持
1.1 修改 /uClinux-dist/vendors/Samsung/44B0/config.linux-2.4.x
确定 CONFIG_VT=y    //VT 应该是Virtual Terminal
1.2 修改/uClinux-dist/linux-2.4.x/drivers/video/s3c44b0xfb.c
默认情况下是支持16灰度屏的,如果是256色屏,则需要将#define    LCD_GRAY_16 注释掉。
1.3 增加fb0设备
修改vendors/Samsung/44B0/Makefile
1.4 驱动确定
linux-2.4.x/drivers/video/Config.in
if [ "$CONFIG_CPU_S3C44B0X" = "y" ]; then
      tristate ' Samsung S3C44B0X built-in LCD controller frame buffer support' CONFIG_FB_S3C44B0X
fi
linux-2.4.x/drivers/video/Makefile
obj-$(CONFIG_FB_S3C44B0X)          +=s3c44b0xfb.o
linux-2.4.x/drivers/video/fbmem.c
extern int s3c44b0xfb_init(void);
extern int s3c44b0xfb_setup(void);
#ifdef CONFIG_FB_S3C44B0X
         {“s3c44b0xfb”,s3c440xfb_init,s3c44b0xfb_setup},
#endif
DEVICES = /
         fb0,c,29,0
1.5 编译uClinux
FrameBuffer部分配置的选择
/********************************************************************************
*
* Console drivers
*
VGA text console (CONFIG_VGA_CONSOLE) [N/y/?] (NEW) n
Support Frame buffer devices (CONFIG_FB) [N/y/?] (NEW) y
*
* Frame-buffer support
*
Support for frame buffer devices (EXPERIMENTAL) (CONFIG_FB) [Y/n/?]
Acorn VIDC support (CONFIG_FB_ACORN) [N/y/?] (NEW) n
  CLPS711X LCD support (CONFIG_FB_CLPS711X) [N/y/?] (NEW) n
  Cyber2000 support (CONFIG_FB_CYBER2000) [N/y/?] (NEW) n
  SA-1100 LCD support (CONFIG_FB_SA1100) [N/y/?] (NEW) n
  Advanced low level driver options (CONFIG_FBCON_ADVANCED) [N/y/?] (NEW) y
  Monochrome support (CONFIG_FBCON_MFB) [N/y/?] (NEW) n
  2 bpp packed pixels support (CONFIG_FBCON_CFB2) [N/y/?] (NEW) n
  4 bpp packed pixels support (CONFIG_FBCON_CFB4) [N/y/?] (NEW) n
  8 bpp packed pixels support (CONFIG_FBCON_CFB8) [N/y/?] (NEW) y
  16 bpp packed pixels support (CONFIG_FBCON_CFB16) [N/y/?] (NEW) n
  24 bpp packed pixels support (CONFIG_FBCON_CFB24) [N/y/?] (NEW) n
  32 bpp packed pixels support (CONFIG_FBCON_CFB32) [N/y/?] (NEW) n
  Amiga bitplanes support (CONFIG_FBCON_AFB) [N/y/?] (NEW) n
  Amiga interleaved bitplanes support (CONFIG_FBCON_ILBM) [N/y/?] (NEW) n
  Atari interleaved bitplanes (2 planes) support (CONFIG_FBCON_IPLAN2P2) [N/y/?] (NEW) n
  Atari interleaved bitplanes (4 planes) support (CONFIG_FBCON_IPLAN2P4) [N/y/?] (NEW) n
  Atari interleaved bitplanes (8 planes) support (CONFIG_FBCON_IPLAN2P8) [N/y/?] (NEW) n
  Amiga bitplanes support (CONFIG_FBCON_AFB) [N/y/?] (NEW) n
  Amiga interleaved bitplanes support (CONFIG_FBCON_ILBM) [N/y/?] (NEW) n
  Atari interleaved bitplanes (2 planes) support (CONFIG_FBCON_IPLAN2P2) [N/y/?] (NEW) n
  Atari interleaved bitplanes (4 planes) support (CONFIG_FBCON_IPLAN2P4) [N/y/?] (NEW) n
  Atari interleaved bitplanes (8 planes) support (CONFIG_FBCON_IPLAN2P8) [N/y/?] (NEW) n
  Mac variable bpp packed pixels support (CONFIG_FBCON_MAC) [N/y/?] (NEW) n
  VGA 16-color planar support (CONFIG_FBCON_VGA_PLANES) [N/y/?] (NEW) n
  VGA characters/attributes support (CONFIG_FBCON_VGA) [N/y/?] (NEW) n
  HGA monochrome support (EXPERIMENTAL) (CONFIG_FBCON_HGA) [N/y/?] (NEW) n
  Support only 8 pixels wide fonts (CONFIG_FBCON_FONTWIDTH8_ONLY) [N/y/?] (NEW) n
  Select compiled-in fonts (CONFIG_FBCON_FONTS) [N/y/?] (NEW) y
  VGA 8x8 font (CONFIG_FONT_8x8) [N/y/?] (NEW) y
  VGA 8x16 font (CONFIG_FONT_8x16) [N/y/?] (NEW) y
  Sparc console 8x16 font (CONFIG_FONT_SUN8x16) [N/y/?] (NEW) n
  Pearl (old m68k) console 8x8 font (CONFIG_FONT_PEARL_8x8) [N/y/?] (NEW) n
  Acorn console 8x8 font (CONFIG_FONT_ACORN_8x8) [N/y/?] (NEW) n
 
Virtual terminal (CONFIG_VT) [Y/n/?]
  Support for console on virtual terminal (CONFIG_VT_CONSOLE) [N/y/?] (NEW) n
*********************************************************************************/
因为LCD256色的,所以选择下项
8 bpp packed pixels support (CONFIG_FBCON_CFB8) [N/y/?] (NEW) y
如果下载内核后进不去系统,则Virtual Terminal 不选,如果进去后fb0不能用,则要选,因为不选的话会屏蔽Support Frame buffer devices (CONFIG_FB) [N/y/?] (NEW) y的设置Virtual Terminal 意思是超级终端显示的数据在LCD上显示,同时超级终端也显示。
1.6 测试/dev/fb0
1测度程序 test1.c
测试/dev/fb0 有没存在,以及其属性
/*******************************************************************************
#include <linux/fb.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
int main ()
{
int fp=0;
struct fb_var_screeninfo vinfo;
struct fb_fix_screeninfo finfo;
fp = open ("/dev/fb0",O_RDWR);
if (fp < 0){
printf("Error : Can not open framebuffer device/n");
return 0;
}
if (ioctl(fp,FBIOGET_FSCREENINFO,&finfo)){
printf("Error reading fixed information/n");
return 0;
}
if (ioctl(fp,FBIOGET_VSCREENINFO,&vinfo)){
printf("Error reading variable information/n");
return 0;
}
printf("The mem is :%d/n",finfo.smem_len);
printf("The line_length is :%d/n",finfo.line_length);
printf("The xres is :%d/n",vinfo.xres);
printf("The yres is :%d/n",vinfo.yres);
printf("bits_per_pixel is :%d/n",vinfo.bits_per_pixel);
close (fp);
return 0;
}
*******************************************************************************/
2) 测试程序test2.c
LCD上显示一张图片
/**********************************************************************************
#include <linux/fb.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
const unsigned char gImage_bmp[76560]={……}
//该数组可能过Image2LCD软件生成,该软件可在www.baidu.com找到
int main()
{
 int framebuffer_device;
 int line_size,buffer_size,i;
 char *screen_memory;
 struct fb_var_screeninfo var_info;
 struct fb_fix_screeninfo fix_info;
 
 framebuffer_device=open("/dev/fb0",O_RDWR);
 ioctl(framebuffer_device,FBIOGET_VSCREENINFO,&var_info);
 ioctl(framebuffer_device,FBIOGET_FSCREENINFO,&fix_info);
 line_size=var_info.xres*var_info.bits_per_pixel/8;
 buffer_size=line_size*var_info.yres;
 var_info.xoffset=0;
 var_info.yoffset=0;
 screen_memory=(char*)mmap(0,buffer_size,PROT_READ|PROT_WRITE,0,framebuffer_device,0);
 for(i=0;i<buffer_size;i++)
 {
    *(screen_memory+i)=gImage_bmp[i];
 }
 sleep(2);
 return 0;
}
**********************************************************************************/
3) 将程序编译进内核
uClinux-dist/romfs/ 里的文件是最终生成的内核文件,也是开发板上系统能看到的文件,要将文件编译进内核,只需把文件放到这里就行,然后make
arm-elf-gcc –elf2flt –o test1 test1.c
arm-elf-gcc –elf2flt –o test2 test.c
test1 test2 放到uClinux-dist/romfs/usr/
Make 两次,我发现make一次没装进去。
内核编译后下载进开发板,进入系统,运行程序就可测出/dev/fb0有没存在,FrameBuffer有没配置成功。
2 minigui移植
2.1 安装库和资源
1) 解压 minigui-res-1.6.tar.gz , 设置config.linux文件,将编译器设置为arm-elf-gcc。并将安装路径设置为arm-elf-gcc所在的目录。
tar –zxvf minigui-res-1.6.tar.gz
修改config.linux
prefix = $(TOPDIR)/usr/local/
CC     = arm-elf-gcc
然后
Make install
安装到/usr/local/lib/minigui/res
该res 是MiniGUI.cfg 里面资源引用的位置,也是进行移植的资源。
prefix = $(TOPDIR)/usr/local/arm-elf
CC     = arm-elf-gcc
然后
Make install
安装到/usr/local/arm-elf/lib/minigui/res 编译器库里的资源
2) 解压 libminigui-1.6.x-linux.tar.gz, 修改编译参数
tar –zxvf libminigui-1.6.x-linux.tar.gz
修改 libminigui-1.6.2-linux/scripts/mkconfig
if check_value "CONFIG_COMPILER_ARM_ELF"; then
   # CFLAGS="$CFLAGS -D__PIC__ -fpic -msingle-pic-base"
     CFLAGS="$CFLAGS -D__PIC__ -fno-pic -fno-PIC"
Fi
不然在开发板运行程序时会出现如下错误码:
Unhandled fault:external abort on linefetch (F4) at 0x00000001
Fault-common.c(97):start_code=0xc2b9ca0,start_stack=0xc63ff98)
Pid 28:failed 7
3) 配置编译环境
make menuconfig

System wid option
选择
Clipboard support
Unit of timer is 10ms
Mouse button can do double click 

Gal engine option

选择

GAL and its engines:NEWGAL

Include Advanced 2D Graphics APIs

NEWGAL dummy engine

NEWGAL engine on Linux FrameBuffer console

Have console on

IAL engine options

选择

Dummy IAL engine

Font options

选择

Raw bitmap font

Image option

选择

GIF file support

Appearance options

选择

Flat

Ext library options

选择

TreeView control

ListView control

MonthCalendor control

SpinBox control

CoolBar control

Animation control

IconView control

Grid control

Development environment options

The target operating system:uClinux

Compiler:arm-elf-gcc

Libc:uClibc

uClinux-dist directory:/opt/uClinux-dist         //uClinux-dist 的位置

Path prefix:/usr/local/arm-elf                              //arm-elf-gcc 的位置

CFLAGSLDFLAGS I 不填。

Tarball baler options

选择

uClinux

保存退出

make

make install

安装到/usr/local/arm-elf-gcc/

2.2 移植配置文件和资源

1) 配置文件 MiniGUI.cfg

配置文件的名称必需是MiniGUI.cfg,放在/etc/ 下。

由于DRAM的大小限制,我对MiniGUI的资源进行了裁减,主要是字体部分。fbcon 表示采用Framebufferdummy表示没有输入设备,如触摸屏。

[varbitmapfonts]

font_number=0

表示没有varbitmapfonts,会忽略该字段下的资源引用。

/******************************************************************************

[system]

# GAL engine

gal_engine=fbcon

# IAL engine

ial_engine=dummy

mdev=none

mtype=none

[fbcon]

defaultmode=320x240-8bpp

[qvfb]

defaultmode=320x240-8bpp

display=0

# The first system font must be a logical font using RBF device font.

[systemfont]

font_number=1

font0=rbf-fixed-rrncnn-8-16-ISO8859-1

#font1=*-fixed-rrncnn-*-16-GB2312

#font2=*-Courier-rrncnn-*-16-GB2312

#font3=*-Times-rrncnn-*-16-GB2312

#font4=*-Helvetica-rrncnn-*-16-GB2312

default=0

wchar_def=0

fixed=0

caption=0

menu=0

control=0

[rawbitmapfonts]

font_number=1

name0=rbf-fixed-rrncnn-8-16-ISO8859-1

fontfile0=/usr/res/font/8x16-iso8859-1.bin

#name1=rbf-fixed-rrncnn-16-16-GB2312.1980-0

#fontfile1=/usr/res/font/song-16-gb2312.bin

[varbitmapfonts]

font_number=0

name0=vbf-Courier-rrncnn-10-15-ISO8859-1

fontfile0=/usr/res/font/Courier-rr-10-15.vbf

name1=vbf-Helvetica-rrncnn-15-16-ISO8859-1

fontfile1=/usr/res/font/Helvetica-rr-15-16.vbf

name2=vbf-Times-rrncnn-13-15-ISO8859-1

fontfile2=/usr/res/font/Times-rr-13-15.vbf

[mouse]

dblclicktime=300

[event]

timeoutusec=300000

repeatusec=50000

[cursorinfo]

# Edit following line to specify cursor files path

cursorpath=/usr/res/cursor/

cursornumber=4

cursor0=d_arrow.cur

cursor1=d_beam.cur

cursor2=d_pencil.cur

cursor3=d_cross.cur

[iconinfo]

# Edit following line to specify icon files path

iconpath=/usr/res/icon/

# Note that max number defined in source code is 5.

iconnumber=5

icon0=form.ico

icon1=w95mbx01.ico

icon2=w95mbx02.ico

icon3=w95mbx03.ico

icon4=w95mbx04.ico

[bitmapinfo]

# Edit following line to specify bitmap files path

bitmappath=/usr/res/bmp/

# Note that max number defined in source code is 7

bitmapnumber=2

bitmap0=capbtns.bmp

# bitmap1=arrows.bmp

# use large bitmap if your default font is 16 pixel height.

bitmap1=arrows16.bmp

bitmap2=none

bitmap3=none

bitmap4=none

bitmap5=none

# background picture, use your favirate photo

bitmap6=none

# bitmap used by BUTTON control

button=button.bmp

pushbutton=none

pushedbutton=none

# bitmap used by LISTBOX control

checkmark=checkmark.bmp

# bitmap used by COMBOBOX control

downarrow=downarrow.bmp

updownarrow=updownarrow.bmp

leftrightarrow=leftrightarrow.bmp

# bitmap used by IME window

IMEctrlbtn=shurufa.bmp

# bitmap used by About dialog box

logo=MiniGUI256.bmp

# logo=MiniGUI16.bmp

[bgpicture]

position=center

# position=upleft

# position=downleft

# position=upright

# position=downright

# position=upcenter

# position=downcenter

# position=vcenterleft

# position=vcenterright

# position=none

[mainwinmetrics]

minwidth=50

minheight=50

border=2

thickframe=2

thinframe=1

captiony=+4

iconx=16

icony=16

menubary=+0

menubaroffx=8

menubaroffy=5

menuitemy=+0

intermenuitemx=12

intermenuitemy=2

menuitemoffx=18

menutopmargin=4

menubottommargin=4

menuleftmargin=4

menurightmargin=4

menuitemminx=64

menuseparatory=4

menuseparatorx=4

sb_height=14

sb_width=16

sb_interx=2

cxvscroll=16

cyvscroll=16

cxhscroll=16

cyhscroll=16

minbarlen=9

defbarlen=18

[windowelementcolors]

bkc_caption_normal=0x00808080

fgc_caption_normal=0x 00C 0C 0C 0

bkc_caption_actived=0x00800000

fgc_caption_actived=0x00FFFFFF

bkc_caption_disabled=0x00808080

fgc_caption_disabled=0x 00C 0C 0C 0

wec_frame_normal=0x00000000

wec_frame_actived=0x00FF0000

wec_frame_disabled=0x00000000

bkc_menubar_normal=0x 00C 0C 0C 0

fgc_menubar_normal=0x00000000

bkc_menubar_hilite=0x00800000

fgc_menubar_hilite=0x00FFFFFF

fgc_menubar_disabled=0x00808080

bkc_menuitem_normal=0x 00C 0C 0C 0

fgc_menuitem_normal=0x00000000

bkc_menuitem_hilite=0x00800000

fgc_menuitem_hilite=0x00FFFFFF

fgc_menuitem_disabled=0x00808080

bkc_pppmenutitle=0x 00C 0C 0C 0

fgc_pppmenutitle=0x00FF0000

fgc_menuitem_frame=0x 00C 66931

wec_3dbox_normal=0x 00C 0C 0C 0

wec_3dbox_reverse=0x00000000

wec_3dbox_light=0x00FFFFFF

wec_3dbox_dark=0x00808080

wec_flat_border=0x00808080

bkc_control_def=0x 00C 0C 0C 0

fgc_control_normal=0x00000000

fgc_control_disabled=0x 00C 0C 0C 0

bkc_hilight_normal=0x00FF0000

bkc_hilight_lostfocus=0x00BDA 69C

fgc_hilight_normal=0x00FFFFFF

fgc_hilight_disabled=0x 00C 0C 0C 0

bkc_desktop=0x00FF0000

bkc_dialog=0x 00C 0C 0C 0

bkc_tip=0x 00C 8FCF8

[imeinfo]

imetabpath=/usr/res/imetab/

imenumber=0

ime0=pinyin

[appinfo]

apprespath=/usr/local/lib/shared/miniguiapps/

********************************************************************/

2) 资源包 res

res/ 放在/usr/ 下。

RES/

BMP/              包含位图文件

CURSOR/              包含光标文件

FONT/             包含字体文件

ICON/             包含图标文件

IMETAB/              包含输入法文件

FONT/ 里只放8x16-iso8859-1.bin文件,由于字体只有一种,所以下面都选0.

default=0

wchar_def=0

fixed=0

caption=0

menu=0

control=0

资源文件不要配置得太多,如果DRAM不够,而配置资源多的话,会出现如下错误:

Allocation of length 1259251 from process 16 failed

Buffer memory: 356kB

Cache memory: 344kB

Free pages: 2384kB ( 0kB HighMem)

Zone:DMA freepages: 0kB

Zone: Normal freepages: 2384kB

Zone:HighMem freepages: 0kB

( Active: 138, inactive: 37, free: 596 )

= 0kB)

0*4kB 0*8kB 1*16kB 0*32kB 1*64kB 0*128kB 1*256kB 0*512kB 0*1024kB 1*2048kB = 23)= 0kB)

Unable to allocate RAM for process text/data, errno 12

或者

pid 16: failed 4

或者

直接重启

3 测试程序

Hello.c

/**********************************************************************************

#include <minigui/common.h>

#include <minigui/minigui.h>

#include <minigui/gdi.h>

#include <minigui/window.h>

#include <minigui/control.h>

 

//#pragma comment(lib,"minigui.lib")

//#pragma comment(lib,"pthreadVC1.lib") 用于VC编译

 

 

static int MainWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lParam)

 

{

 

    HDC           hdc;

    switch (message)

         {

        case MSG_CREATE:   

            break;

        case MSG_PAINT:

            hdc = BeginPaint (hWnd);//得到绘图设备                     

            EndPaint (hWnd, hdc);//结束绘图

                            break;

        case MSG_CLOSE://当窗口关闭时该消息产生

                       DestroyMainWindow (hWnd);//注销窗口

            PostQuitMessage (hWnd);

            return 0;

    }

    return DefaultMainWinProc(hWnd, message, wParam, lParam);//未处理的函数在此默认处理

}

 

int MiniGUIMain (int argc, const char* argv[])//main函数对应WindowsWinMaincmain

 

{

 

    MSG Msg;//定义消息

    HWND hMainWnd;//生成主窗口句柄

    MAINWINCREATE CreateInfo;//定义主窗口结构

 

#ifdef _LITE_VERSION//预处理:判断是否Lite版本

 

    SetDesktopRect(0, 0, 1024, 768);

 

#endif

 

    CreateInfo.dwStyle = WS_VISIBLE| WS_BORDER | WS_CAPTION;//设置主窗口风格

    CreateInfo.dwExStyle = WS_EX_NONE;//设置主窗口扩展风格

    CreateInfo.spCaption = "Sk.";//设置主窗口标题

    CreateInfo.hMenu = 0; //设置主窗口菜单

    CreateInfo.hCursor = GetSystemCursor(0); //设置主窗口鼠标光标

    CreateInfo.hIcon = 0; //设置主窗口图标

    CreateInfo.MainWindowProc = MainWinProc; //设置主窗口消息处理函数过程

    CreateInfo.lx = 0; //设置主窗口位置x坐标

    CreateInfo.ty = 0; //设置主窗口位置y坐标

    CreateInfo.rx = 320; //设置主窗口宽度

    CreateInfo.by = 240; //设置主窗口高度

    CreateInfo.iBkColor = COLOR_green; //设置主窗口客户区背景色

    CreateInfo.dwAddData = 0; //设置主窗口的附加数据,通常不需要

    CreateInfo.hHosting = NULL; //设置主窗口的托管窗口,通常为桌面DESKTOP

 

    hMainWnd = CreateMainWindow (&CreateInfo);//创建主窗口 

    if (hMainWnd == HWND_INVALID)//失败则退出

        return -1;

 

    ShowWindow(hMainWnd, SW_SHOWNORMAL);//显示主窗口

 

    while (GetMessage(&Msg, hMainWnd))

         {//进入消息处理

        TranslateMessage(&Msg);

        DispatchMessage(&Msg);

    }

 

    MainWindowThreadCleanup (hMainWnd);

    return 0;

}

**********************************************************************************/

编译 arm-elf-gcc –elf2flt –fno-pic –fno-PIC –o hello hello.c –lminigui –lpthread –lm

在配置minigui采用newgal方式 时,编译程序必须加上-lm,不然会出现 sin ,cos 之类没定义的错误。

-l lmnl

 

 

 

 

 

 

 

这篇关于MiniGUI移植总结的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/572494

相关文章

SQL中JOIN操作的条件使用总结与实践

《SQL中JOIN操作的条件使用总结与实践》在SQL查询中,JOIN操作是多表关联的核心工具,本文将从原理,场景和最佳实践三个方面总结JOIN条件的使用规则,希望可以帮助开发者精准控制查询逻辑... 目录一、ON与WHERE的本质区别二、场景化条件使用规则三、最佳实践建议1.优先使用ON条件2.WHERE用

Nginx Location映射规则总结归纳与最佳实践

《NginxLocation映射规则总结归纳与最佳实践》Nginx的location指令是配置请求路由的核心机制,其匹配规则直接影响请求的处理流程,下面给大家介绍NginxLocation映射规则... 目录一、Location匹配规则与优先级1. 匹配模式2. 优先级顺序3. 匹配示例二、Proxy_pa

Android学习总结之Java和kotlin区别超详细分析

《Android学习总结之Java和kotlin区别超详细分析》Java和Kotlin都是用于Android开发的编程语言,它们各自具有独特的特点和优势,:本文主要介绍Android学习总结之Ja... 目录一、空安全机制真题 1:Kotlin 如何解决 Java 的 NullPointerExceptio

MySQL基本查询示例总结

《MySQL基本查询示例总结》:本文主要介绍MySQL基本查询示例总结,本文通过实例代码给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友参考下吧... 目录Create插入替换Retrieve(读取)select(确定列)where条件(确定行)null查询order by语句li

Linux区分SSD和机械硬盘的方法总结

《Linux区分SSD和机械硬盘的方法总结》在Linux系统管理中,了解存储设备的类型和特性是至关重要的,不同的存储介质(如固态硬盘SSD和机械硬盘HDD)在性能、可靠性和适用场景上有着显著差异,本文... 目录一、lsblk 命令简介基本用法二、识别磁盘类型的关键参数:ROTA查询 ROTA 参数ROTA

Qt实现网络数据解析的方法总结

《Qt实现网络数据解析的方法总结》在Qt中解析网络数据通常涉及接收原始字节流,并将其转换为有意义的应用层数据,这篇文章为大家介绍了详细步骤和示例,感兴趣的小伙伴可以了解下... 目录1. 网络数据接收2. 缓冲区管理(处理粘包/拆包)3. 常见数据格式解析3.1 jsON解析3.2 XML解析3.3 自定义

Python实现图片分割的多种方法总结

《Python实现图片分割的多种方法总结》图片分割是图像处理中的一个重要任务,它的目标是将图像划分为多个区域或者对象,本文为大家整理了一些常用的分割方法,大家可以根据需求自行选择... 目录1. 基于传统图像处理的分割方法(1) 使用固定阈值分割图片(2) 自适应阈值分割(3) 使用图像边缘检测分割(4)

Windows Docker端口占用错误及解决方案总结

《WindowsDocker端口占用错误及解决方案总结》在Windows环境下使用Docker容器时,端口占用错误是开发和运维中常见且棘手的问题,本文将深入剖析该问题的成因,介绍如何通过查看端口分配... 目录引言Windows docker 端口占用错误及解决方案汇总端口冲突形成原因解析诊断当前端口情况解

java常见报错及解决方案总结

《java常见报错及解决方案总结》:本文主要介绍Java编程中常见错误类型及示例,包括语法错误、空指针异常、数组下标越界、类型转换异常、文件未找到异常、除以零异常、非法线程操作异常、方法未定义异常... 目录1. 语法错误 (Syntax Errors)示例 1:解决方案:2. 空指针异常 (NullPoi

QT移植到RK3568开发板的方法步骤

《QT移植到RK3568开发板的方法步骤》本文主要介绍了QT移植到RK3568开发板的方法步骤,文中通过图文示例介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 目录前言一、获取SDK1. 安装依赖2. 获取SDK资源包3. SDK工程目录介绍4. 获取补丁包二