PyQT——蓝牙收发数据(上位机案例-小车控制器)

实现功能

由于本人水平有限,仅用了最简单的进行实现,主要功能:

  • 蓝牙设备扫描以及刷新
  • 蓝牙连接
  • 蓝牙数据发送
  • 蓝牙数据接收
页面实现效果

代码目录结构
代码案例
  • 代码已经全部添加注释,故不再做单独解释。
Main.py 
ble_control_widget.py
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
import sys
import threading
sys.path.append('..')
from ui.Ui_ble_control_widget import *
from drivers.driver_bluetooth import BluetoothDataTransferclass BleControlWidget(QWidget):# 信号定义# 蓝牙列表刷新refresh_signal = pyqtSignal()receive_data_signal = pyqtSignal(bytes)update_connection_signal = pyqtSignal()def __init__(self, parent=None):super().__init__(parent)self.ui = Ui_BleControlWidget()self.ui.setupUi(self)# 按钮槽函数调用self.init_ui()# 实例化属性便于全局调用self.device_list = [] # 蓝牙设备列表self.bd = None# 进入界面默认调用# 刷新蓝牙列表self.refreshBtn_subthread()def init_ui(self):'''按钮与槽函数连接'''# 刷新按钮槽函数绑定self.ui.refreshBtn.clicked.connect(self.refreshBtn_slot)# 连接蓝牙槽函数绑定self.ui.connectBtn.clicked.connect(self.connectBtn_slot)# 蓝牙列表更新信号与槽函数连接self.refresh_signal.connect(self.refresh_signal_slot)# 接收到的数据展示信号与槽函数连接self.receive_data_signal.connect(self.receive_data_signal_slot)# 更新蓝牙的状态槽函数绑定self.update_connection_signal.connect(self.update_connection_signal_slot)# 各控制按钮槽函数绑定self.ui.buzzerOnBtn.clicked.connect(self.contorl_btn_slot)self.ui.distanceBtn.clicked.connect(self.contorl_btn_slot)self.ui.downBtn.clicked.connect(self.contorl_btn_slot)self.ui.leftBtn.clicked.connect(self.contorl_btn_slot)self.ui.lightOffBtn.clicked.connect(self.contorl_btn_slot)self.ui.lightOnBtn.clicked.connect(self.contorl_btn_slot)self.ui.rightBtn.clicked.connect(self.contorl_btn_slot)self.ui.rotateBtn.clicked.connect(self.contorl_btn_slot)self.ui.stopBtn.clicked.connect(self.contorl_btn_slot)self.ui.trackOffBtn.clicked.connect(self.contorl_btn_slot)self.ui.trackOnBtn.clicked.connect(self.contorl_btn_slot)self.ui.upBtn.clicked.connect(self.contorl_btn_slot)def contorl_btn_slot(self):if not self.bp:QMessageBox.warning(self, "蓝牙未连接", "请先连接蓝牙")returnsender = self.sender()if sender is self.ui.buzzerOnBtn:res,msg = self.bd.send_data(b"\x01")elif sender is self.ui.distanceBtn:res,msg = self.bd.send_data(b"\x02")elif sender is self.ui.downBtn:res,msg = self.bd.send_data(b"\x03")elif sender is self.ui.leftBtn:res,msg = self.bd.send_data(b"\x04")elif sender is self.ui.lightOffBtn:res,msg = self.bd.send_data(b"\x05")elif sender is self.ui.lightOnBtn:res,msg = self.bd.send_data(b"\x06")elif sender is self.ui.rightBtn:res,msg = self.bd.send_data(b"\x07")elif sender is self.ui.rotateBtn:res,msg = self.bd.send_data(b"\x08")elif sender is self.ui.stopBtn:res,msg = self.bd.send_data(b"\x09")elif sender is self.ui.trackOffBtn:res,msg = self.bd.send_data(b"\x0a")elif sender is self.ui.trackOnBtn:res,msg = self.bd.send_data(b"\x0b")elif sender is self.ui.upBtn:res,msg = self.bd.send_data(b"\x0c")if res:QMessageBox.information(self, '提示', msg)else:QMessageBox.warning(self, '警告', msg)def update_connection_signal_slot(self):self.ui.connectBtn.setText("已连接")self.ui.connectBtn.setIcon(QIcon(":/icon/disc"))def receive_data_signal_slot(self, data):QMessageBox.information(self, '提示', f'接收到数据:{data}')def refresh_signal_slot(self):if len(self.device_list)>0:for addr,bluetooth in self.device_list:self.ui.comboBox.addItem(bluetooth)def refreshBtn_slot(self):# 如果在刷新前有数据,清空下拉列表,否则会增加多倍数据在下拉框中导致索引超出if self.device_list:self.ui.comboBox.clear()self.device_list = []'''刷新按钮槽函数定义'''# 刷新很耗时间,需要开子线程处理,否则页面卡死t = threading.Thread(target=self.refreshBtn_subthread,daemon=True)t.start()def refreshBtn_subthread(self):'''搜索蓝牙并展示在选择下拉列表中'''self.device_list = BluetoothDataTransfer.scan_devices()# 展示在下拉列表中需要用到信号,子线程中无法直接更新ui页面,会报错print(self.device_list)# 发送信号self.refresh_signal.emit()def connectBtn_slot(self):if self.bd:self.bd.disconnect()self.bd = []self.ui.connectBtn.setText("连接蓝牙")self.ui.connectBtn.setIcon(QIcon(":/icon/connect"))return'''连接蓝牙按钮槽函数定义'''# 连接很耗时间,需要开子线程处理,否则页面卡死t = threading.Thread(target=self.connectBtn_subthread,daemon=True)t.start()def connectBtn_subthread(self):# 获取蓝牙选项index = self.ui.comboBox.currentIndex()address = self.device_list[index][0]name = self.ui.comboBox.currentText()# 连接蓝牙self.bd = BluetoothDataTransfer(address, name)  # 替换为目标设备的蓝牙地址和端口号flag = self.bd.connect()print(flag)if not flag:return# 更新蓝牙连接状态文字和图标self.update_connection_signal.emit()# 开始接受数据while True:data = self.bd.receive_data(1024)if data:# 发送数据到页面弹窗显示print(data)#self.receive_data_signal.emit(data)if __name__ == '__main__':app = QApplication(sys.argv)widget = BleControlWidget()widget.show()sys.exit(app.exec_())
driver_bluetooth.py(来自开源工具)
import bluetooth# 扫描所有设备
class BluetoothDataTransfer:def __init__(self, target_address, target_name, port=1):self.target_address = target_addressself.target_name = target_nameself.port = portself.socket = Nonedef connect(self):"""连接蓝牙设备:return:"""try:self.socket = bluetooth.BluetoothSocket(bluetooth.RFCOMM)self.socket.connect((self.target_address, self.port))print("Connected successfully. {} ({})".format(self.target_name, self.target_address))return Trueexcept (bluetooth.BluetoothError, OSError) as e:self.socket = Noneprint("Connection failed:", str(e))return Falsedef disconnect(self):"""断开蓝牙连接:return:"""if self.socket is not None:self.socket.close()print("Disconnected.")def send_data(self, data):"""发送数据:param data::return:"""if self.socket is not None:try:self.socket.send(data)print("Data sent:", data)return True,"sent succeed"except bluetooth.BluetoothError as e:print("Failed to send data:", str(e))return False,str(e)else:print("Not connected.")return False,"Not connected."def receive_data(self, buffer_size=2048):"""接收数据:param buffer_size::return:"""if self.socket is None:print("Not connected.")returntry:data = self.socket.recv(buffer_size)# print("Data received:", data.decode())return dataexcept bluetooth.BluetoothError as e:print("Failed to receive data:", str(e))@staticmethoddef scan_devices():"""扫描所有蓝牙设备:return:"""devices = bluetooth.discover_devices()print("Scanning devices...")device_list = []for addr in devices:name = bluetooth.lookup_name(addr)print("Found device:", name, "(", addr, ")")device_list.append((addr, name))return device_listif __name__ == '__main__':# print("=========================================开始扫描")# devices = BluetoothDataTransfer.scan_devices()# for device in devices:#     print(device)# print("=========================================结束扫描")# 示例用法bd = BluetoothDataTransfer("FA:34:0A:92:71:42", 'JDY-33-SPP-kkkkkkk')  # 替换为目标设备的蓝牙地址和端口号flag = bd.connect()print(flag)if flag:# bd.send_data("Hello, Bluetooth!")  # 发送数据bd.send_data(b"\x12")  # 发送数据recv_data = bd.receive_data()  # 接收数据print("接收到的数据:", recv_data)bd.disconnect()
Ui_ble_control_widget.py(由QT页面编译而成)
# -*- coding: utf-8 -*-# Form implementation generated from reading ui file 'c:\Users\Windows10\Desktop\02上课代码步骤\小车实战 copy\ui\ble_control_widget.ui'
#
# Created by: PyQt5 UI code generator 5.15.9
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again.  Do not edit this file unless you know what you are doing.from PyQt5 import QtCore, QtGui, QtWidgetsclass Ui_BleControlWidget(object):def setupUi(self, BleControlWidget):BleControlWidget.setObjectName("BleControlWidget")BleControlWidget.resize(411, 276)self.verticalLayout_2 = QtWidgets.QVBoxLayout(BleControlWidget)self.verticalLayout_2.setObjectName("verticalLayout_2")self.setLayout = QtWidgets.QHBoxLayout()self.setLayout.setObjectName("setLayout")self.label = QtWidgets.QLabel(BleControlWidget)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(10)font.setBold(True)font.setWeight(75)self.label.setFont(font)self.label.setObjectName("label")self.setLayout.addWidget(self.label)self.comboBox = QtWidgets.QComboBox(BleControlWidget)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.comboBox.sizePolicy().hasHeightForWidth())self.comboBox.setSizePolicy(sizePolicy)self.comboBox.setMinimumSize(QtCore.QSize(0, 25))self.comboBox.setObjectName("comboBox")self.setLayout.addWidget(self.comboBox)self.refreshBtn = QtWidgets.QPushButton(BleControlWidget)self.refreshBtn.setText("")icon = QtGui.QIcon()icon.addPixmap(QtGui.QPixmap(":/icon/refresh"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.refreshBtn.setIcon(icon)self.refreshBtn.setFlat(True)self.refreshBtn.setObjectName("refreshBtn")self.setLayout.addWidget(self.refreshBtn)self.connectBtn = QtWidgets.QPushButton(BleControlWidget)icon1 = QtGui.QIcon()icon1.addPixmap(QtGui.QPixmap(":/icon/connect"), QtGui.QIcon.Normal, QtGui.QIcon.Off)self.connectBtn.setIcon(icon1)self.connectBtn.setObjectName("connectBtn")self.setLayout.addWidget(self.connectBtn)self.setLayout.setStretch(0, 1)self.setLayout.setStretch(1, 4)self.setLayout.setStretch(2, 1)self.setLayout.setStretch(3, 2)self.verticalLayout_2.addLayout(self.setLayout)self.frame = QtWidgets.QFrame(BleControlWidget)self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)self.frame.setFrameShadow(QtWidgets.QFrame.Raised)self.frame.setObjectName("frame")self.verticalLayout = QtWidgets.QVBoxLayout(self.frame)self.verticalLayout.setContentsMargins(0, 0, 0, 0)self.verticalLayout.setSpacing(0)self.verticalLayout.setObjectName("verticalLayout")self.btnLayout = QtWidgets.QGridLayout()self.btnLayout.setSpacing(10)self.btnLayout.setObjectName("btnLayout")self.lightOnBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.lightOnBtn.sizePolicy().hasHeightForWidth())self.lightOnBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.lightOnBtn.setFont(font)self.lightOnBtn.setObjectName("lightOnBtn")self.btnLayout.addWidget(self.lightOnBtn, 4, 0, 1, 1)self.upBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.upBtn.sizePolicy().hasHeightForWidth())self.upBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.upBtn.setFont(font)self.upBtn.setObjectName("upBtn")self.btnLayout.addWidget(self.upBtn, 0, 1, 1, 1)self.stopBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.stopBtn.sizePolicy().hasHeightForWidth())self.stopBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.stopBtn.setFont(font)self.stopBtn.setObjectName("stopBtn")self.btnLayout.addWidget(self.stopBtn, 2, 1, 1, 1)self.leftBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.leftBtn.sizePolicy().hasHeightForWidth())self.leftBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.leftBtn.setFont(font)self.leftBtn.setObjectName("leftBtn")self.btnLayout.addWidget(self.leftBtn, 2, 0, 1, 1)self.rotateBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.rotateBtn.sizePolicy().hasHeightForWidth())self.rotateBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.rotateBtn.setFont(font)self.rotateBtn.setObjectName("rotateBtn")self.btnLayout.addWidget(self.rotateBtn, 5, 1, 1, 1)self.downBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.downBtn.sizePolicy().hasHeightForWidth())self.downBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.downBtn.setFont(font)self.downBtn.setObjectName("downBtn")self.btnLayout.addWidget(self.downBtn, 4, 1, 1, 1)self.lightOffBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.lightOffBtn.sizePolicy().hasHeightForWidth())self.lightOffBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.lightOffBtn.setFont(font)self.lightOffBtn.setObjectName("lightOffBtn")self.btnLayout.addWidget(self.lightOffBtn, 4, 2, 1, 1)self.trackOffBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.trackOffBtn.sizePolicy().hasHeightForWidth())self.trackOffBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.trackOffBtn.setFont(font)self.trackOffBtn.setObjectName("trackOffBtn")self.btnLayout.addWidget(self.trackOffBtn, 5, 2, 1, 1)self.trackOnBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.trackOnBtn.sizePolicy().hasHeightForWidth())self.trackOnBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.trackOnBtn.setFont(font)self.trackOnBtn.setObjectName("trackOnBtn")self.btnLayout.addWidget(self.trackOnBtn, 5, 0, 1, 1)self.rightBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.rightBtn.sizePolicy().hasHeightForWidth())self.rightBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.rightBtn.setFont(font)self.rightBtn.setObjectName("rightBtn")self.btnLayout.addWidget(self.rightBtn, 2, 2, 1, 1)self.distanceBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.distanceBtn.sizePolicy().hasHeightForWidth())self.distanceBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.distanceBtn.setFont(font)self.distanceBtn.setObjectName("distanceBtn")self.btnLayout.addWidget(self.distanceBtn, 0, 2, 1, 1)self.buzzerOnBtn = QtWidgets.QPushButton(self.frame)sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)sizePolicy.setHorizontalStretch(0)sizePolicy.setVerticalStretch(0)sizePolicy.setHeightForWidth(self.buzzerOnBtn.sizePolicy().hasHeightForWidth())self.buzzerOnBtn.setSizePolicy(sizePolicy)font = QtGui.QFont()font.setFamily("Agency FB")font.setPointSize(22)self.buzzerOnBtn.setFont(font)self.buzzerOnBtn.setObjectName("buzzerOnBtn")self.btnLayout.addWidget(self.buzzerOnBtn, 0, 0, 1, 1)self.verticalLayout.addLayout(self.btnLayout)self.verticalLayout_2.addWidget(self.frame)self.verticalLayout_2.setStretch(0, 1)self.verticalLayout_2.setStretch(1, 3)self.retranslateUi(BleControlWidget)QtCore.QMetaObject.connectSlotsByName(BleControlWidget)def retranslateUi(self, BleControlWidget):_translate = QtCore.QCoreApplication.translateBleControlWidget.setWindowTitle(_translate("BleControlWidget", "小车蓝牙控制器"))self.label.setText(_translate("BleControlWidget", "蓝牙选择:"))self.connectBtn.setText(_translate("BleControlWidget", "连接蓝牙"))self.lightOnBtn.setText(_translate("BleControlWidget", "开灯"))self.upBtn.setText(_translate("BleControlWidget", "上"))self.stopBtn.setText(_translate("BleControlWidget", "停止"))self.leftBtn.setText(_translate("BleControlWidget", "左"))self.rotateBtn.setText(_translate("BleControlWidget", "旋转"))self.downBtn.setText(_translate("BleControlWidget", "下"))self.lightOffBtn.setText(_translate("BleControlWidget", "关灯"))self.trackOffBtn.setText(_translate("BleControlWidget", "关寻迹"))self.trackOnBtn.setText(_translate("BleControlWidget", "开寻迹"))self.rightBtn.setText(_translate("BleControlWidget", "右"))self.distanceBtn.setText(_translate("BleControlWidget", "测距"))self.buzzerOnBtn.setText(_translate("BleControlWidget", "开喇叭"))
from ui import resource_rc

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

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Open CASCADE学习|拓扑变换

目录 平移变换 旋转变换 组合变换 通用变换 平移变换 TopoDS_Shape out;gp_Trsf theTransformation;gp_Vec theVectorOfTranslation(0., 0.125 / 2, 0.);theTransformation.SetTranslation(theVectorOfTranslation);BRepBuilderAPI_Transform myBRepTransformation(out, th…

C++继承_C++回顾

什么是继承 继承是面向对象中使代码可以复用的最重要的手段,它允许在保持原有类特性的基础上进行扩展,增加功能,这样就会产生新的类,即派生类。继承呈现了面向对象的层次结构,体现了由简单到复杂的认知过程。与函数复…

MySQL运维实战(5.3) MySQL数据乱码的一些情况

作者:俊达 表数据乱码 表数据出现乱码的情况通常是由于数据的真实编码与相关参数不一致引起的,其中包括常见的参数如character_set_client、character_set_results、字段编码以及终端编码等。确保这些参数保持一致,可以有效预防和解决乱码问…

vit细粒度图像分类(十)TransFG学习笔记

1.摘要 细粒度视觉分类(FGVC)是一项非常具有挑战性的任务,它旨在从子类别中识别对象,这是由于类间固有的微妙差异。现有的大部分工作主要是通过重用骨干网络提取检测到的判别区域的特征来解决这一问题。然而,这种策略不可避免地使管道变得复…

git 如何修改仓库地址

问题背景:组内更换大部门之后,代码仓的地址也迁移了,所以原来的git仓库地址失效了。 虽然重新建一个新的文件夹,再把每个项目都git clone一遍也可以。但是有点繁琐,而且有的项目本地还有已经开发一半的代码&#xff0c…

网络原理-TCP/IP(5)

TCP协议 延迟应答 它也是基于滑动窗口,提高效率的一种机制,结合滑动窗口以及流量控制,能够以延迟应答ACK的方式,把反馈的窗口,搞大.核心在于允许范围内,让窗口尽可能大. 如果接收数据的主机立刻返回ACK应答,这时候返回的窗口可能比较小. 1.假设接收端缓冲区为1M.一次收到了5…

centos 7.6 安装cas 对接ldap 单点登录实战

centos 7.6 安装cas 对ldap 单点登录实战 1、安装前准备工作1.1、centos 7.6 安装JDK 1.81.2、centos 7 安装tomcat 9.0.841.3、windows10 安装JDK 1.81.4、windows10 安装打包工具 maven 3.9.6 2、下载cas 5.3 并打包成war包3、部署cas到tomcat4、centos 7.6 安装ldap5、cas对…

天津政采入围流程?

天津政采入围流程如下: 企业资料提交:申请企业需要提交相关的企业资料,包括企业营业执照、税务登记证、组织机构代码证等。这些资料需要提交给天津政采中心进行审核。 自营商城资料提交:申请企业需要提交自营商城的资料&#xff0…

RocketMQ问题篇01 | NameServer告警异常分析

RocketMQ问题篇01 | NameServer告警异常分析 1、问题描述2、初步分析2.1 mqcloud源代码分析2.2 NameServer源码分析2.3 NameServer源码分析2(源码出错概率太低)2.4 大流量分析 3、堆栈分析3.1 wait response on the channel3.2 connect to failed3.3 sen…

Avalonia学习(二十二)-数据库操作端

开始项目式的例子,但是不方便给大家贴代码了。 内容很多,只能演示一个界面,例子上传。 我不擅长界面美化和配色,有兴趣的可以继续完善,当前实现mysql。 最近所有样例的地址: GitHub - jinyuttt/Avalonia…

Kubernetes 1.24 serviceaccount Token问题

一. secret 官网说明 从 Kubernetes 版本 1.24 开始,不再自动创建服务帐户的机密,对于需要使用服务帐户访问 Kubernetes API 服务器的开发人员(例如,在使用管道时)来说,这可能是一个问题,连接…

FANUC机器人PROF-017从机断开故障报警处理方法总结

FANUC机器人PROF-017从机断开故障报警处理方法总结 情况说明: 机器人安装的是PROFINET板卡,按照手册进行PROFINET配置之后,重启控制柜,此时系统提示:PROF-017 从机断开, 如下图所示, 打电话咨…