Delphi TCP服务端监听端口获取客户端RFID网络读卡器上传的刷卡数据

本示例使用设备介绍:液显WIFI无线网络HTTP协议RFID云读卡器可编程实时可控开关TTS语-淘宝网 (taobao.com) 

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, ScktComp, StdCtrls, ScktComp7, ExtCtrls,Clipbrd;

type
  TForm1 = class(TForm)
    ServerSocket1: TServerSocket;
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    ListBox1: TListBox;
    ListBox2: TListBox;
    Button3: TButton;
    CheckBox1: TCheckBox;
    Panel1: TPanel;
    RadioButton1: TRadioButton;
    RadioButton2: TRadioButton;
    RadioButton3: TRadioButton;
    RadioButton4: TRadioButton;
    Label6: TLabel;
    Label2: TLabel;
    Edit3: TEdit;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    Button7: TButton;
    RichEdit10: TRichEdit;
    UpDown7: TUpDown;
    ComboBox1: TComboBox;
    ComboBox3: TComboBox;
    RichEdit1: TRichEdit;
    UpDown1: TUpDown;
    RichEdit2: TRichEdit;
    UpDown2: TUpDown;
    Label3: TLabel;
    Label5: TLabel;
    Label7: TLabel;
    RadioButton5: TRadioButton;
    RadioButton6: TRadioButton;
    Label8: TLabel;
    Label9: TLabel;
    Label10: TLabel;
    CheckBox2: TCheckBox;
    Label4: TLabel;
    Button8: TButton;
    Button9: TButton;
    procedure ServerSocket1ClientConnect(Sender: TObject; Socket: TCustomWinSocket);
    procedure ServerSocket1ClientDisconnect(Sender: TObject;Socket: TCustomWinSocket);
    procedure ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket);
    procedure Button1Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
    procedure Button5Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure Button7Click(Sender: TObject);
    procedure Button8Click(Sender: TObject);
    procedure Button9Click(Sender: TObject);
    procedure CheckBox1MouseUp(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
  private
    { Private declarations }
    procedure Responsedata();
    procedure GetSenddata(respcode:integer);
    procedure ButtonSend(sendcode:integer);
  public
    { Public declarations }

    ResponseBuff:Array of Byte;
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.ServerSocket1ClientConnect(Sender: TObject;  Socket: TCustomWinSocket);
begin
  Button3.Click();
end;

procedure TForm1.ServerSocket1ClientDisconnect(Sender: TObject;  Socket: TCustomWinSocket);
begin
   Button3.Click();
end;

procedure TForm1.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket);
var
  RemotAddPort,DispStr,HexStr:String;
  i,GetDataLen:integer;
  GetBuff:Array of Byte;
  SendBuff:Array of Byte;
  respcode:integer;
begin
  try
      RemotAddPort:=Socket.RemoteAddress+':'+inttostr(Socket.RemotePort);
      GetDataLen:= Socket.ReceiveLength;
      SetLength(GetBuff, GetDataLen);
      Socket.ReceiveBuf(GetBuff[0],GetDataLen);   //Socket.ReceiveText;
      DispStr:='';
      for i:=0 to GetDataLen-1 do
      begin
         DispStr:=DispStr+inttohex(GetBuff[i],2)+' ';
      end;
      if ListBox2.Count >100 then ListBox2.Clear();
      ListBox2.Items.Add('Get Data From  '+RemotAddPort+' : '+DispStr);

      case GetBuff[0] of
           $C1,$CF:
           begin
                if GetBuff[0]= $C1 then
                    DispStr:='数据解析:IC读卡器上传卡号,'
                else
                    DispStr:='数据解析:IC卡离开读卡器,';

                DispStr := DispStr+'设备IP['+IntToStr(GetBuff[1]) + '.' + IntToStr(GetBuff[2]) + '.' + IntToStr(GetBuff[3]) + '.' + IntToStr(GetBuff[4])+'],';
                DispStr := DispStr+'机号['+IntToStr(GetBuff[5] + GetBuff[6]*256)+'],';
                DispStr := DispStr+'数据包号['+IntToStr(GetBuff[7] + GetBuff[8]*256)+'],';
                DispStr := DispStr+'卡号长度['+IntToStr(GetBuff[9])+'],';
                HexStr:='';
                for i:=10 to 10+GetBuff[9]-1 do
                    HexStr:=HexStr+inttohex(GetBuff[i],2);
                DispStr := DispStr+'16进制卡号['+HexStr+'],';

                HexStr:='';
                for i:=10+GetBuff[9] to GetDataLen-1 do
                    HexStr:=HexStr+inttohex(GetBuff[i],2);
                DispStr := DispStr+'唯一硬件序号['+HexStr+']';

                ListBox2.Items.Add(DispStr);
                ListBox2.Items.Add('');
                listbox2.ItemIndex :=listbox2.Items.Count-1;

                if CheckBox1.Checked then
                begin
                    Responsedata() ;
                    Socket.SendBuf(ResponseBuff[0],Length(ResponseBuff));
                    DispStr:='Send Data To  '+RemotAddPort+' : ';
                    for i:=0 to Length(ResponseBuff)-1 do
                        DispStr:=DispStr+inttohex(ResponseBuff[i],2)+' ';
                    ListBox2.Items.Add(DispStr);
                    ListBox2.Items.Add('');
                    listbox2.ItemIndex :=listbox2.Items.Count-1;
                end;
           end;

           $D1,$DF:
           begin
                if GetBuff[0]= $D1 then
                    DispStr:='数据解析:ID读卡器上传卡号,'
                else
                    DispStr:='数据解析:ID卡离开读卡器,';

                DispStr := DispStr+'设备IP['+IntToStr(GetBuff[1]) + '.' + IntToStr(GetBuff[2]) + '.' + IntToStr(GetBuff[3]) + '.' + IntToStr(GetBuff[4])+'],';
                DispStr := DispStr+'机号['+IntToStr(GetBuff[5] + GetBuff[6]*256)+'],';
                DispStr := DispStr+'数据包号['+IntToStr(GetBuff[7] + GetBuff[8]*256)+'],';
                HexStr:='';
                for i:=9 to 13 do
                    HexStr:=HexStr+inttohex(GetBuff[i],2);
                DispStr := DispStr+'16进制卡号['+HexStr+'],';

                HexStr:='';
                for i:=14 to GetDataLen-1 do
                    HexStr:=HexStr+inttohex(GetBuff[i],2);
                DispStr := DispStr+'唯一硬件序号['+HexStr+']';

                ListBox2.Items.Add(DispStr);
                ListBox2.Items.Add('');
                listbox2.ItemIndex :=listbox2.Items.Count-1;

                if CheckBox1.Checked then
                begin
                    Responsedata() ;
                    Socket.SendBuf(ResponseBuff[0],Length(ResponseBuff));
                    DispStr:='Send Data To  '+RemotAddPort+' : ';
                    for i:=0 to Length(ResponseBuff)-1 do
                        DispStr:=DispStr+inttohex(ResponseBuff[i],2)+' ';
                    ListBox2.Items.Add(DispStr);
                    ListBox2.Items.Add('');
                    listbox2.ItemIndex :=listbox2.Items.Count-1;
                end;
           end;

           $F3:
           begin
                DispStr:='数据解析:读卡器心跳包,';
                DispStr := DispStr+'设备IP['+IntToStr(GetBuff[1]) + '.' + IntToStr(GetBuff[2]) + '.' + IntToStr(GetBuff[3]) + '.' + IntToStr(GetBuff[4])+'],';
                DispStr := DispStr+'机号['+IntToStr(GetBuff[5] + GetBuff[6]*256)+'],';
                DispStr := DispStr+'数据包号['+IntToStr(GetBuff[7] + GetBuff[8]*256)+'],';
                DispStr := DispStr+'心跳包标识['+inttohex(GetBuff[9],2)+'],';
                DispStr := DispStr+'长度['+IntToStr(GetBuff[10])+'],';
                DispStr := DispStr+'继电器状态['+inttohex(GetBuff[11],2)+'],';
                DispStr := DispStr+'输入口状态['+inttohex(GetBuff[12],2)+'],';
                DispStr := DispStr+'随机校验码['+inttohex(GetBuff[13],2)+inttohex(GetBuff[14],2)+inttohex(GetBuff[15],2)+inttohex(GetBuff[16],2)+'],';
                HexStr:='';
                HexStr:='';
                for i:=17 to GetDataLen-1 do
                    HexStr:=HexStr+inttohex(GetBuff[i],2);
                DispStr := DispStr+'唯一硬件序号['+HexStr+']';

                ListBox2.Items.Add(DispStr);
                ListBox2.Items.Add('');
                listbox2.ItemIndex :=listbox2.Items.Count-1;  
           end;
      end;
   except

   end;
end;

procedure TForm1.Responsedata();           //根据选择的回应方式生成回应数据缓冲
begin
  if RadioButton1.Checked then
       GetSenddata(0)
  else
      if RadioButton2.Checked then
          GetSenddata(1)
      else
          if RadioButton3.Checked then
                GetSenddata(2)
          else
                GetSenddata(3);
end;

procedure TForm1.GetSenddata(respcode:integer);         //根据发送方式生成发送数据缓冲
var
delaytime,i,voicelen,displen:integer;
strls,voicestr:string;
begin
  case respcode of
      0:
      begin
           SetLength(ResponseBuff, 39);
           ResponseBuff[0]:=$5A;   //命令字:驱动显示文字+蜂鸣器响声
           ResponseBuff[1]:=$00;   //机号低
           ResponseBuff[2]:=$00;   //机号高,0000表示任意机号
           if(CheckBox2.Checked) then
           begin
               ResponseBuff[3]:=ComboBox1.ItemIndex;   //蜂鸣器响声代码
               if RadioButton6.Checked then  ResponseBuff[3]:=ResponseBuff[3] xor 128; //背光灯状态不改变
           end
           else
           begin
               ResponseBuff[3]:=$ff;          //不响声
               if RadioButton6.Checked then  ResponseBuff[3]:=ResponseBuff[3] xor 127; //背光灯状态不改变
           end;
           delaytime:=StrToInt(RichEdit10.Lines[0]);
           ResponseBuff[4] := delaytime mod 256;    //显示时长
           strls := Edit1.Text + '                                        ';
           for i := 1 to 34 do
               ResponseBuff[4+i] := Byte(strls[i]);
      end;

      1:
      begin
           voicestr:='[v'+ trim(RichEdit2.Lines[0])+']';   //本次播报TTS语音的音量大小,取值范围v0 到 v16
           voicestr:= voicestr+trim(edit3.Text);
           voicelen:=length(voicestr); //语音长度

           displen:=34;             //满屏显示长度

           SetLength(ResponseBuff, 11+displen+voicelen+4);
           ResponseBuff[0]:=$5C;   //命令字:驱动显示文字+蜂鸣器响声+开启继电器+播报TTS语音
           ResponseBuff[1]:=$00;   //机号低
           ResponseBuff[2]:=$00;   //机号高,0000表示任意机号
           if(CheckBox2.Checked) then
           begin
               ResponseBuff[3]:=ComboBox1.ItemIndex;   //蜂鸣器响声代码
               if RadioButton6.Checked then  ResponseBuff[3]:=ResponseBuff[3] xor 128; //背光灯状态不改变
           end
           else
           begin
               ResponseBuff[3]:=$ff;          //不响声
               if RadioButton6.Checked then  ResponseBuff[3]:=ResponseBuff[3] xor 127; //背光灯状态不改变
           end;

           case ComboBox3.ItemIndex of       //开启的继电器号
                 1: ResponseBuff[4]:=$f1;
                 2: ResponseBuff[4]:=$f2;
                 3: ResponseBuff[4]:=$f3;
                 4: ResponseBuff[4]:=$f4;
                 5: ResponseBuff[4]:=$f5;
                 6: ResponseBuff[4]:=$f6;
                 7: ResponseBuff[4]:=$f7;
                 8: ResponseBuff[4]:=$f8;
                 else ResponseBuff[4]:=$f0;
           end;
           delaytime:=StrToInt(RichEdit1.Lines[0]);
           ResponseBuff[5] := delaytime mod 256;
           ResponseBuff[6] := (delaytime div 256) mod 256;

           delaytime:=StrToInt(RichEdit10.Lines[0]);
           ResponseBuff[7] := delaytime mod 256;    //显示时长
           ResponseBuff[8] :=0;
           ResponseBuff[9] :=displen;
           ResponseBuff[10] :=voicelen;

           strls := Edit1.Text + '                                        ';
           for i := 1 to displen do
               ResponseBuff[10+i] := Byte(strls[i]);

           for i := 1 to voicelen do
               ResponseBuff[10+displen+i] := Byte(voicestr[i]);

           ResponseBuff[10+displen+voicelen+1]:=$55; //防干扰固定后缀
           ResponseBuff[10+displen+voicelen+2]:=$aa;
           ResponseBuff[10+displen+voicelen+3]:=$66;
           ResponseBuff[10+displen+voicelen+4]:=$99;
      end;

      2:
      begin
            SetLength(ResponseBuff, 4);
            ResponseBuff[0]:=$96;   //命令字:驱动蜂鸣器响
            ResponseBuff[1]:=$00;   //机号低
            ResponseBuff[2]:=$00;   //机号高,0000表示任意机号
            ResponseBuff[3]:=ComboBox1.ItemIndex;   //蜂鸣器响声代码
      end;

      3:
      begin
            SetLength(ResponseBuff, 6);
            ResponseBuff[0]:=$78;   //命令字:驱动开启继电器
            ResponseBuff[1]:=$00;   //机号低
            ResponseBuff[2]:=$00;   //机号高,0000表示任意机号
            case ComboBox3.ItemIndex of       //开启的继电器号
                 1: ResponseBuff[3]:=$f1;
                 2: ResponseBuff[3]:=$f2;
                 3: ResponseBuff[3]:=$f3;
                 4: ResponseBuff[3]:=$f4;
                 5: ResponseBuff[3]:=$f5;
                 6: ResponseBuff[3]:=$f6;
                 7: ResponseBuff[3]:=$f7;
                 8: ResponseBuff[3]:=$f8;
                 else ResponseBuff[3]:=$f0;
            end;
            delaytime:=StrToInt(RichEdit1.Lines[0]);
            ResponseBuff[4] := delaytime mod 256;
            ResponseBuff[5] := (delaytime div 256) mod 256;
      end;
      4:
      begin
            SetLength(ResponseBuff, 6);
            ResponseBuff[0]:=$78;   //命令字:驱动关闭已开启继电器
            ResponseBuff[1]:=$00;   //机号低
            ResponseBuff[2]:=$00;   //机号高,0000表示任意机号
            case ComboBox3.ItemIndex of       //继电器号
                 1: ResponseBuff[3]:=$e1;
                 2: ResponseBuff[3]:=$e2;
                 3: ResponseBuff[3]:=$e3;
                 4: ResponseBuff[3]:=$e4;
                 5: ResponseBuff[3]:=$e5;
                 6: ResponseBuff[3]:=$e6;
                 7: ResponseBuff[3]:=$e7;
                 8: ResponseBuff[3]:=$e8;
                 else ResponseBuff[3]:=$e0;
            end;
            delaytime:=StrToInt(RichEdit1.Lines[0]);
            ResponseBuff[4] := delaytime mod 256;
            ResponseBuff[5] := (delaytime div 256) mod 256;
      end;
  end;
end;

procedure TForm1.ButtonSend(sendcode:integer);
var
i:integer;
RemotAddPort,DispStr:string;
begin
   if ServerSocket1.Active then
   begin
      i:=ListBox1.ItemIndex ;
      if i>=0 then
      begin
          try
              GetSenddata(sendcode);
              ServerSocket1.Socket.Connections[i].SendBuf(ResponseBuff[0],Length(ResponseBuff));
              RemotAddPort:= ServerSocket1.Socket.Connections[i].RemoteAddress+':'+inttostr(ServerSocket1.Socket.Connections[i].RemotePort);
              DispStr:='Send Data To  '+RemotAddPort+' : ';
              for i:=0 to Length(ResponseBuff)-1 do
                  DispStr:=DispStr+inttohex(ResponseBuff[i],2)+' ';
              ListBox2.Items.Add(DispStr);
              ListBox2.Items.Add('');
              listbox2.ItemIndex :=listbox2.Items.Count-1;
          except
          end;
      end
      else
          Application.MessageBox('请先选择要向其发送指令的在线客户端!', '警告', MB_OK+MB_ICONSTOP);
   end
   else
          Application.MessageBox('请先启动TCP服务监听!', '警告', MB_OK+MB_ICONSTOP);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  ButtonSend(0);
end;

procedure TForm1.FormActivate(Sender: TObject);
begin
if ServerSocket1.Active then
  begin
    Button2.Caption := '停止';
  end
else
  begin
    Button2.Click();
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
if not ServerSocket1.Active then
  begin
    try
        ServerSocket1.Port := StrToInt(Edit2.Text);
        ServerSocket1.Active := True;
        Button2.Caption := '停止';
        Edit2.Enabled := False;
     except
         Application.MessageBox('启动TCP服务监听失败!可能端口已被其他应用占用。', '警告', MB_OK+MB_ICONSTOP);
     end;
  end
  else
  begin
    ServerSocket1.Active := False;
    Button2.Caption := '启动TCP服务监听';
    Edit2.Enabled := True;
    ListBox1.Items.Clear();
    ListBox2.Items.Clear();
  end;

end;

procedure TForm1.Button3Click(Sender: TObject);
var
  i,links:integer;
begin
  ListBox1.Items.Clear();
  links:=ServerSocket1.Socket.ActiveConnections;
  for i:=0 to links-1 do
  begin
    ListBox1.Items.Add(inttostr(i)+'|'+ServerSocket1.Socket.Connections[i].RemoteAddress+':'+inttostr(ServerSocket1.Socket.Connections[i].RemotePort));
  end;
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
  ButtonSend(3);
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
  ButtonSend(2);
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  ButtonSend(1);
end;

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if ServerSocket1.Active  then ServerSocket1.Active := False;
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
  ButtonSend(4);
end;

procedure TForm1.Button8Click(Sender: TObject);
var
 liststr:string;
 i:integer;
begin
  if listbox2.Count <1 then exit;

  liststr:='';
  for i:=0 to ListBox2.Count-1 do
  begin
      ListBox2.ItemIndex:=i;
      liststr:=liststr+ListBox2.Items.Strings[ListBox2.ItemIndex]+#13#10;
  end;
  Clipboard.SetTextBuf(PChar(liststr));
  Application.MessageBox('TCP通讯报文日志已拷贝!', '提示', MB_OK+MB_ICONASTERISK );
end;

procedure TForm1.Button9Click(Sender: TObject);
begin
  ListBox2.Clear();
end;

procedure TForm1.CheckBox1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if checkbox1.Checked then Panel1.Visible :=true else Panel1.Visible :=false;
end;

end.

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/130516.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

机器学习——实践

目录 一、数据集划分 1、交叉验证 2、不平衡数据的处理 代价敏感学习 二、评价指标 三、正则化、偏差和方差 为什么要标准化/归一化&#xff1f; 过拟合的处理——Dropout 过拟合的处理——Early stopping 过拟合的处理——数据增强 偏差和方差 ​编辑 一、数据集划分…

【Android】画面卡顿优化列表流畅度三之RecyclerView刷新机制notifyItemRangeInserted

经过长达一个多星期的反复渲染耗时记录&#xff0c;大致上有以下几个方面的地方可以优化&#xff1a; 列表组件RecyclerView刷新机制由notifyDataSetChanged()优化为notifyItemRangeInserted&#xff08;&#xff09;&#xff0c;后期有必要也会使用notifyItemRangeRemoved、n…

Qt 自定义全局悬浮置顶按钮

Qt 自定义全局悬浮置顶按钮 效果 使用示例 ResetButton* resetBtn; resetBtn new ResetButton(); resetBtn->show(); resetBtn->move(QPoint(1000, 800)); connect(resetBtn, &ResetButton::clicked, this, &MainWindow::Reset);自行加入图片&#xff0c;透明…

Python---练习:把8名讲师随机分配到3个教室

案例&#xff1a;把8名讲师随机分配到3个教室 列表嵌套&#xff1a;有3个教室[[],[],[]]&#xff0c;8名讲师[A,B,C,D,E,F,G,H]&#xff0c;将8名讲师随机分配到3个教室中。 分析&#xff1a; 思考1&#xff1a;我们第一间教室、第二间教室、第三间教室&#xff0c;怎么表示…

【系统救援】 Ubuntu重启失败,报错:UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

问题定位及处理 查看错误信息&#xff1a;/dev/sda3 contains a file system with errors, check forced. /dev/sda3: Inodes that were part of a corrupted orphan linked list found. /dev/sda3: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY. (i.e., without -a or -p o…

Javaweb之javascript的BOM对象的详细解析

1.5.2 BOM对象 接下来我们学习BOM对象&#xff0c;BOM的全称是Browser Object Model,翻译过来是浏览器对象模型。也就是JavaScript将浏览器的各个组成部分封装成了对象。我们要操作浏览器的部分功能&#xff0c;可以通过操作BOM对象的相关属性或者函数来完成。例如&#xff1a…

无线充,大功率小家电,智能家居,无人机快速充电等产品供电 LDR6328S芯片TYUPE-C PD诱骗电压 USB-C解决PD电源取电问题

LDR6328S 是乐得瑞科技有限公司开发的一款兼容 USB PD、QC 和 AFC 协议的 Sink 控制器。 LDR6328S 从支持 USB PD、QC 和 AFC 协议的适配器取电&#xff0c;然后供电给设备。比如可以配置适配器输 出需要的功率&#xff0c;给无线充电器设备供电。LDR6328S 也兼容传统 USB 电源…

Windows上基于Tesseract OCR5.0官方语言库的LSTM字库训练

系列文章目录 Tesseract OCR引擎 文章目录 系列文章目录前言一、LSTM字库训练是什么&#xff1f;二、使用步骤1. 环境准备1.1下载Tesseract 程序并安装1.2下载Tesseract 训练字库1.3下载工具jTessBoxEditor 2. LSTM训练2.1 将要训练的图片(jpg/tif)合并成一个文件2.2 生成box文…

【Python】AppUI自动化—appium自动化元素定位、元素事件操作(17)下

文章目录 前言一.Appium 元素定位1.定位方式种类2.如何定位2.1 id定位2.2 className定位2.3 content-desc 定位2.4 Android Uiautomator定位4.1 text定位4.2 text模糊定位4.3 text正则匹配定位4.4 resourceId定位4.5 resourceId正则匹配定位4.6 className定位4.7 className正则…

QT项目|时间服务器架构

目录 一、 创建新UI界面的标题 二、 创建服务器运行图标 2.1 查找图标&#xff0c;并截图 2.2 加入QT资源库 三、编辑UI界面 3.1 根据要求&#xff0c;绘制UI界面 3.2 对控件进行命名 3.3 加入Group Box进行美化 四、 按钮操作设置 4.1 QT加入网络 4.2 转到槽&…

NetCore独立发布部署到Linux服务器

1、准备一台服务器 2核2G服务器足够 系统环境&#xff1a;Alibaba Cloud 3 或者其他版本的Linux操作系统都行 2、安装宝塔 yum install -y wget && wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec 安装后…

高德地图添加信息弹窗,信息弹窗是单独的组件

//弹窗组件 <template><el-card class"box-card" ref"boxCard" v-if"showCard"><div slot"header" class"clearfix"><div class"title">{{ model.pointName }}</div><div class…

Nacos使用指南

Nacos使用指南 1.认识Nacos Nacos是SpringCloudAlibaba的一个组件&#xff0c;遵循SpringCloud规范 2.Nacos的优势 1.支持服务端主动检测服务提供者状态。临时实例采用心跳检测&#xff0c;非临时实例采用主动检测 2.Nacos支持服务列表变更消息推送&#xff0c;消息更加及…

CCLink转Modbus TCP网关_CCLINK参数配置

CCLink转Modbus TCP网关&#xff08;XD-ETHCL20&#xff09;&#xff0c;具有CCLINK主从站功能。主要用途是将各种MODBUS-TCP设备接入到CCLINK总线中。它可以作为从站连接到CCLINK总线上&#xff0c;也可以作为主站或从站连接到MODBUS-MTP总线上。 1、 配置网关的CCLINK参数&am…

Docker 安装与优化

一、安装Docker 1、关闭防火墙 systemctl stop firewalld systemctl disable firewalld setenforce 02、安装依赖包 yum -y install yum-utils device-mapper-persistent-data lvm2#解释 yum-utils #提供了yum-config-manager工具 device mapper #是linux内核中支持逻辑卷…

阿里巴巴将开源720亿参数大模型;开源语言大模型演进史

&#x1f989; AI新闻 &#x1f680; 阿里巴巴将开源720亿参数大模型 摘要&#xff1a;在2023世界互联网大会乌镇峰会上&#xff0c;阿里巴巴集团CEO吴泳铭透露&#xff0c;阿里巴巴即将开源720亿参数大模型&#xff0c;这将是国内参数规模最大的开源大模型。目前&#xff0c…

华为eNSP实验-QinQ基本实验

1.拓扑图如下 PC1的设置如下&#xff1a; 在未配置VLAN之前&#xff0c;PC1可以ping通PC3&#xff0c;PC2可以ping通PC4&#xff08;因为同一网段&#xff09; 2.SW1和SW4配置VLAN <Huawei>system-view [Huawei]undo info-center enable //关闭提示信息 [Huawei]sysn…

基于springboot实现协同过滤算法商品推荐系统项目【项目源码】计算机毕业设计

基于springboot实现协同过滤算法商品推荐系统演示 Java语言简介 Java是由SUN公司推出&#xff0c;该公司于2010年被oracle公司收购。Java本是印度尼西亚的一个叫做爪洼岛的英文名称&#xff0c;也因此得来java是一杯正冒着热气咖啡的标识。Java语言在移动互联网的大背景下具备…

Pydantic:数据类型确认和解析神器

大家好&#xff0c;数据验证和解析是软件开发中的重要任务&#xff0c;特别是在处理用户输入或外部数据源时尤为重要&#xff0c;Python凭借其简洁性和多功能性&#xff0c;在这些任务中提供了各种库的帮助。在本文中将探讨Pydantic&#xff0c;介绍其特点&#xff0c;并提供一…

基于VPLC711的曲面外观检测XYR运动控制解决方案

市场应用背景 随着消费升级&#xff0c;产品形态正在朝着多样性和精细化方向迅速发展。这导致了对于复杂曲面轨迹加工的需求&#xff0c;包括外观检测、打磨抛光和点胶工艺控制&#xff0c;要求更高的精密度。企业必须主动满足市场需求&#xff0c;不断改进工艺&#xff0c;以…