uniapp 小程序低功耗藍牙配網 ble配網 物聯網

?1.獲取藍牙列表 ?bleList.vue

<template><view><button @touchstart="startSearch">獲取藍牙列表</button><scroll-view :scroll-top="scrollTop" scroll-y class="content-pop"><viewclass="bluetoothItem"v-for="(item, index) in bluetoohList":key="index"@click="openControl(item)"><view class="textItem">藍牙:{{ item.name }}</view><view>{{ item.deviceId }}</view></view></scroll-view></view>
</template><script>
export default {data() {return {bluetoohList: [],};},onLoad: function (options) {this.startSearch();},methods: {// 連接藍牙startSearch() {let that = this;that.$ble.openBluetoothAdapter((res) => {that.$ble.getBluetoothAdapterState((res) => {if (res.available) {if (res.discovering) {that.$ble.stopBluetoothDevicesDiscovery();} else {that.getBluetoothDevices();}that.checkPemission();} else {that.$tip.toast("本機藍牙不可用");}});},(err) => {that.openSetting();});},openSetting() {let params = {title: "檢測到您沒打開藍牙權限,是否去設置打開?",showCancel: true,};this.$tip.showModal(params, (res) => {if (res.confirm) {this.$ble.openSetting();}});},checkPemission() {//android 6.0以上需授權地理位置權限var that = this;const sys = uni.getSystemInfoSync();if (sys.platform == "ios") {that.getBluetoothDevices();} else if (sys.platform == "android") {console.log(app.getSystem().substring(app.getSystem().length - (app.getSystem().length - 8),app.getSystem().length - (app.getSystem().length - 8) + 1));if (app.globalData.getSystem().substring(app.globalData.getSystem().length -(app.globalData.getSystem().length - 8),app.globalData.getSystem().length -(app.globalData.getSystem().length - 8) +1) > 5) {uni.getSetting({success: (res) => {console.log(res);if (!res.authSetting["scope.userLocation"]) {uni.authorize({scope: "scope.userLocation",complete: (res) => {that.getBluetoothDevices();},});} else {that.getBluetoothDevices();}},});}}},//獲取藍牙設備信息getBluetoothDevices() {that.$tip.loading("藍牙搜索中");this.$ble.getBluetoothDevices((res) => {this.bluetoohList = res;this.$tip.loaded();});},// 連接藍牙 跳轉到連接頁面openControl(item) {let params = {list: this.bluetoohList,info: item,};this.$tip.redirectTo("/pages/ble/ble", params);},},
};
</script><style scoped>
.content-pop {width: 100vw;max-height: 55vh;padding: 0 30rpx;
}
.bluetoothItem {padding: 20rpx 0;font-weight: 400;font-size: 28rpx;border-bottom: 1rpx solid #f4f4f4;text-align: left;
}
.textItem {display: block;margin-bottom: 10rpx;
}
</style>

2.選擇藍牙進行連接? ble.vue

<script>
export default {data() {return {bluInfo: {},services: [],bleServiceId: "",serviceId: 0,writeCharacter: false,readCharacter: false,notifyCharacter: false,BLEInformation: {serveiceId: "",config_write_char_id: "",cmd_write_char_id: "",config_read_char_id: "",cmd_read_char_id: "",},};},onLoad(option) {// 接收頁面傳遞的數據this.bluInfo = JSON.parse(decodeURIComponent(option.info));this.bluetooh(this.bluInfo.info.deviceId);},methods: {bluetooh(deviceId) {var that = this;that.$ble.stopBluetoothDevicesDiscovery();that.$ble.createBLEConnection(deviceId,(res) => {that.getSeviceId(deviceId);},(err) => {console.log(err);that.bluetoothFail();});},// 連接成功后保存連接狀態getSeviceId(deviceId) {var that = this;that.$ble.getBLEDeviceServices(deviceId,(res) => {that.services = res.services;that.bleServiceId = res.services[0].uuid;this.BLEInformation.serveiceId = res.services[0].uuid;that.getCharacteristics(deviceId);},(err) => {console.log(err);that.bluetoothFail();});},getCharacteristics(deviceId) {var that = this;var list = that.services;var num = that.serviceId;var write = that.writeCharacter;var read = that.readCharacter;var notify = that.notifyCharacter;that.$ble.getBLEDeviceCharacteristics(deviceId,that.bleServiceId,(res) => {for (var i = 0; i < res.characteristics.length; ++i) {var properties = res.characteristics[i].properties;if (!notify) {if (properties.notify) {notify = true;}}if (!write) {if (properties.write) {this.BLEInformation.config_write_char_id =res.characteristics[2].uuid;this.BLEInformation.cmd_write_char_id =res.characteristics[0].uuid;write = true;}}if (!read) {if (properties.read) {this.BLEInformation.config_read_char_id =res.characteristics[3].uuid;this.BLEInformation.cmd_read_char_id =res.characteristics[1].uuid;read = true;}}}if (!write || !notify || !read) {num++;(that.writeCharacter = write),(that.readCharacter = read),(that.notifyCharacter = notify),(that.serviceId = num);if (num == list.length) {// console.log("找不到該讀寫的特征值")that.bluetoothFail();} else {that.getCharacteristics(deviceId);}} else {that.bluetoothSuccess(res);}},(err) => {console.log(err);that.bluetoothFail();});},// 藍牙連接打印機bluetoothSuccess(res) {uni.setStorageSync("blefiInfo", this.BLEInformation);let params = {title: "連接成功",confirmText: "繼續",showCancel: false,};this.$tip.showModal(params, (res) => {if (res.confirm) {// 藍牙連接成功this.$tip.redirectTo("/pages/ble/bleWifi");}});},bluetoothFail() {// 藍牙連接失敗this.$tip.redirectTo("/pages/ble/bleFail");},},
};
</script><style scoped>
.zai-box {padding: 0;margin: 0;height: 100%;background-color: #fff;
}.container {padding: 30rpx;margin: 0;font-size: 28rpx;color: #20212b;background-color: #fff;text-align: left;font-weight: 400;
}image {width: 362rpx;height: 362rpx;margin-top: 30rpx;
}.textTitle {display: block;font-size: 36rpx;font-weight: bold;color: #20212b;display: block;margin-bottom: 30rpx;
}.textItem {display: block;font-size: 24rpx;font-weight: 400;color: #999999;line-height: 36rpx;
}
</style>

3. 藍牙連接WiFi? bleWifi.vue

<template><view><text>{{ SSID }}</text><input type="text" placeholder="請輸入密碼" v-model="password" /><button @click="settiing">連接</button></view></template><script>import APToast from "@/util/APToast.js";export default {data() {return {SSID: "your SSID",password: "",connected: true,wifiCountDown: 0,wifiCountInterval: null, // 定時器blefiInfo: {},};},// 二級頁面清除onUnload() {this.$ble.offBLEConnectionStateChange();this.clearIntervalWifi();},onLoad(options) {this.blefiInfo = uni.getStorageSync("blefiInfo");let sys = uni.getStorageSync("phoneInfo");if (sys.platform == "android") {// this.$ble.onBLEMTUChange((res) => {//   console.log(res, "androidMTU");// });// this.$ble.getBLEMTU(this.blefiInfo.deviceId, (res) => {//   console.log(res, "mtu");// });// 安卓要手動更改MTU值const mtu = 512;this.$ble.setBLEMTU(this.blefiInfo.deviceId,mtu,(res) => {console.log(res);},(err) => {console.log(err);});}this.$ble.getBLEDeviceServices(this.blefiInfo.deviceId, (res) => {this.$ble.getBLEDeviceCharacteristics(this.blefiInfo.deviceId,this.blefiInfo.serveiceId,(res) => {this.$ble.notifyBLECharacteristicValueChange(true,this.blefiInfo.deviceId,this.blefiInfo.serveiceId,this.blefiInfo.readCharId,(res) => {console.log("啟用notify成功");});});});this.$ble.onBLEConnectionStateChange((res) => {this.connected = res.connected;if (!res.connected) {this.$tip.loaded();// 藍牙連接失敗,跳轉到失敗頁面this.$tip.redirectTo("/pages/ble/bleFail");}});// 接收配網打印機回傳的數據this.$ble.onBLECharacteristicValueChange((res) => {if (!res || res.value.byteLength == 0) return;this.clearIntervalWifi();this.$tip.loaded();let num = new Int32Array(res.value)[0];console.log(num, "NUM");// 失敗原因let tip = APToast.find((item) => item.id == num);if (num == 0) {// 連接wifi成功this.$tip.redirectTo("/pages/ble/WifiSuccess");} else {// 連接WiFi失敗this.$tip.redirectTo("/pages/ble/WifiFile",tip);}});},methods: {settiing() {this.startSMSTimer("60");this.$tip.loading("連接中");if (this.connected) {this.sendWifi();} else {this.$tip.loaded();// 藍牙連接失敗,跳轉到失敗頁面this.$tip.redirectTo("/pages/ble/bleFail");}},// 轉UTF-8sendWifi() {let msg = {event: "network",data: { ssid: this.SSID, password: this.password, authmode: 4 },};let buffer = this.stringToUint8Array(JSON.stringify(msg));this.bleSendWifi(buffer);},// json字符串數據轉Uint8ArraystringToUint8Array(str) {// 方法一// var arr = [];// for (var i = 0, j = str.length; i < j; ++i) {//   arr.push(str.charCodeAt(i));// }// var tmpUint8Array = new Uint8Array(arr);// return tmpUint8Array.buffer;// 方法二let buffer = new ArrayBuffer(str.length);let dataView = new DataView(buffer);for (var i = 0; i < str.length; i++) {dataView.setUint8(i, str.charCodeAt(i));}return buffer;},bleSendWifi(payload) {if (this.connected) {this.$ble.writeBLECharacteristicValueOnce(this.blefiInfo.deviceId,this.blefiInfo.serveiceId,this.blefiInfo.writecharId,payload);if (this.blefiInfo.readCharId) {this.$ble.readBLECharacteristicValue(this.blefiInfo.deviceId,this.blefiInfo.serveiceId,this.blefiInfo.readCharId);}}},startSMSTimer(val) {this.wifiCountDown = val;this.wifiCountInterval = setInterval(() => {this.wifiCountDown--;// console.log(this.wifiCountDown);if (this.wifiCountDown <= 0) {clearInterval(this.wifiCountInterval);this.wifiCountInterval = null;this.$tip.loaded();// 連接WiFi失敗this.$tip.redirectTo("/pages/ble/WifiFile");}}, 1000);},clearIntervalWifi() {this.wifiCountDown = 0;if (this.wifiCountInterval) {clearInterval(this.wifiCountInterval);this.wifiCountInterval = null;}},},};</script>

4. 手機連接藍牙失敗、藍牙連接WiFi成功/失敗(關閉藍牙連接)

<script>
export default {onLoad() {// 使用完成后在合適的時機斷開連接和關閉藍牙適配器this.$ble.closeBLEConnection(this.deviceId);this.$ble.closeBluetoothAdapter();},
};
</script>

5.ble.js

class ble {openBluetoothAdapter(success, failure) {uni.openBluetoothAdapter({success: (res) => {success(res);},fail: (err) => {failure(err);},});}getBluetoothAdapterState(success) {uni.getBluetoothAdapterState({success: (res) => {success(res);},});}//停止搜尋附近的藍牙外圍設備stopBluetoothDevicesDiscovery() {uni.stopBluetoothDevicesDiscovery();}//獲取藍牙設備信息getBluetoothDevices(success) {// 開始搜尋附近的藍牙外圍設備uni.startBluetoothDevicesDiscovery({success: (res) => {setTimeout(() => {// 獲取搜索到的設備信息uni.getBluetoothDevices({success: (res) => {let bluetoohList = [];var num = 0;for (var i = 0; i < res.devices.length; ++i) {if (res.devices[i].name != "未知設備") {bluetoohList[num] = res.devices[i];num++;}}this.stopBluetoothDevicesDiscovery();success(bluetoohList);},});}, 5000);// that.onBluetoothDeviceFound();},});}openSetting() {uni.openSetting({//opensetting是調起設置頁面的success: (res) => {if (res.authSetting == true) {//判斷res.authsetting的值是true還是falseuni.openBluetoothAdapter();}},});}//斷開與低功耗藍牙設備的連接closeBLEConnection(deviceId) {uni.closeBLEConnection({deviceId: deviceId,});}offBLEConnectionStateChange() {wx.offBLEConnectionStateChange();}//連接低功耗藍牙設備createBLEConnection(deviceId, success, failure) {uni.createBLEConnection({deviceId: deviceId,success: (res) => {success(res);},fail: (err) => {failure(err);},});}//獲取藍牙設備所有服務getBLEDeviceServices(deviceId, success, failure) {wx.getBLEDeviceServices({deviceId: deviceId,success: (res) => {success(res);},fail(err) {failure(err);},});}//獲取藍牙設備某個服務中所有特征值getBLEDeviceCharacteristics(deviceId, serviceId, success, failure) {wx.getBLEDeviceCharacteristics({deviceId: deviceId,serviceId: serviceId,success: (res) => {success(res);},fail(err) {failure(err);},});}notifyBLECharacteristicValueChange(state,deviceId,serviceId,characteristicId,success) {wx.notifyBLECharacteristicValueChange({state: state,deviceId: deviceId,serviceId: serviceId,characteristicId: characteristicId,success: function (res) {success(res);},});}onBLEConnectionStateChange(success) {wx.onBLEConnectionStateChange((res) => {success(res);});}// 接收配網打印機回傳的數據onBLECharacteristicValueChange(success) {wx.onBLECharacteristicValueChange((res) => {success(res);});}//關閉藍牙模塊closeBluetoothAdapter() {wx.closeBluetoothAdapter();}// 不分包寫入藍牙writeBLECharacteristicValueOnce(deviceId,serviceId,characteristicId,value) {wx.writeBLECharacteristicValue({deviceId: deviceId,serviceId: serviceId,characteristicId: characteristicId,value: value,});}readBLECharacteristicValue(deviceId, serviceId, characteristicId) {wx.readBLECharacteristicValue({deviceId: deviceId,serviceId: serviceId,characteristicId: characteristicId,});}getBLEMTU(deviceId, success) {wx.getBLEMTU({deviceId: deviceId,writeType: "write",success(res) {success(res.mtu);},});}onBLEMTUChange(success) {wx.onBLEMTUChange(function (res) {success(res.mtu);});}setBLEMTU(deviceId, mtu, success, failure) {wx.setBLEMTU({deviceId: deviceId,mtu: mtu,success: (res) => {success(res);},fail: (res) => {failure(res);},});}
}
const bleDevice = new ble();
export default bleDevice;

6.APToast.js

const message = [{id:0,type:"WIFI_REASON_SUCCESS",message:"打印機連接成功"},{id:2,type:"WIFI_REASON_AUTH_EXPIRE",message:"身份驗證超時"},{id:3,type:"WIFI_REASON_AUTH_LEAVE",message:"連接中斷"},{id:8,type:"WIFI_REASON_ASSOC_LEAVE",message:"連接中斷"},{id:15,type:"WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT",message:"密碼錯誤"},{id:201,type:"WIFI_REASON_NO_AP_FOUND",message:"未找到可用的網絡"},{id:202,type:"WIFI_REASON_AUTH_FAIL",message:"密碼錯誤或身份驗證超時"},{id:203,type:"WIFI_REASON_ASSOC_FAIL",message:"設備無法與WiFi成功關聯"},{id:204,type:"WIFI_REASON_HANDSHAKE_TIMEOUT",message:"密碼錯誤"},{id:205,type:"WIFI_REASON_CONNECTION_FAIL",message:"連接失敗"}, 
]export default message;

7.tip.js

export default class Tips { /*** 彈出提示框*/static success(title, duration = 1000) {setTimeout(() => {uni.showToast({title: title,icon: "success",mask: true,duration: duration,});}, 300);if (duration > 0) {return new Promise((resolve, reject) => {setTimeout(() => {resolve();}, duration);});}}/*** 彈出加載提示*/static loading(title = "加載中") {if (Tips.isLoading) {return;}Tips.isLoading = true;uni.showLoading({title: title,mask: true,});}/*** 加載完畢*/static loaded() {if (Tips.isLoading) {Tips.isLoading = false;uni.hideLoading();}}/*** 關閉當前頁面,跳轉到新頁面*/static redirectTo(urls, item) {uni.redirectTo({url: item? urls + "?info=" + encodeURIComponent(JSON.stringify(item)): urls, //  JSON.parse(decodeURIComponent(option.info));});}/*** 彈出確認窗口*/static showModal(val, success) {uni.showModal({title: val.title ? val.title : "",content: val.content ? val.content : "",showCancel: val.showCancel,confirmText: val.confirmText ? val.confirmText : "確定",cancelText: val.cancelText ? val.cancelText : "取消",cancelColor: "#999999", //取消按鈕顏色confirmColor: "#00A0E9", //確定按鈕顏色success: (res) => {success(res);},});}
}/*** 靜態變量,是否加載中*/
Tips.isLoading = false;

8.main.js

import ble from "./common/util/ble.js";
import tip from "./common/util/tip.js";// ble
Vue.prototype.$ble = ble;
// tip
Vue.prototype.$tip = tip;

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/diannao/12745.shtml
繁體地址,請注明出處:http://hk.pswp.cn/diannao/12745.shtml
英文地址,請注明出處:http://en.pswp.cn/diannao/12745.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

java多線程——線程池

概述 線程池是管理java線程生命周期的工具 降低資源消耗。通過池化技術能夠重復利用已創建的線程&#xff0c;降低線程頻繁創建和銷毀造成的資源消耗提高線程的可管理性。無需程序員手動銷毀線程&#xff0c;控制線程創建的數量&#xff0c;避免無限制的創建影響系統穩定性 …

找不到kotlin.Pair的類文件

需要添加kotlin的依賴&#xff1a; implementation "org.jetbrains.kotlin:kotlin-stdlib:1.8.22"

OpenHarmony上移植memtester

1. 下載源碼&#xff1a; wget https://pyropus.ca./software/memtester/old-versions/memtester-4.6.0.tar.gz 2. 解壓并指定交叉編譯方式 解壓 tar -xvf memtester-4.6.0.tar.gz 修改conf-cc和conf-ld&#xff0c;指定交叉編譯方式 conf-cc conf-ld 3. 編譯 直接運行m…

Ubuntu安裝ZLMediaKit

方式一 1、安裝vcpkg 在Ubuntu上安裝vcpkg的步驟如下&#xff1a; 安裝必要的依賴&#xff1a; 首先&#xff0c;你可能需要安裝cmake和ninja-build。你可以使用apt包管理器來安裝它們&#xff1a; bash復制代碼sudo apt install cmake ninja-build下載vcpkg源碼&#xff1a;…

后端開發面經系列 -- 阿里C++二面面經

阿里C二面面經 公眾號&#xff1a;阿Q技術站 來源&#xff1a;https://www.nowcoder.com/feed/main/detail/fc4a48403b534aafa6a6bce14b542c4e?sourceSSRsearch 1、智能指針&#xff1f; std::shared_ptr&#xff1a; 原理&#xff1a;std::shared_ptr是基于引用計數的智能指…

Stable Diffusion入門使用技巧及個人實例分享--大模型及lora篇

大家好&#xff0c;近期使用Stable Diffusion比較多&#xff0c;積累整理了一些內容&#xff0c;得空分享給大家。如果你近期正好在關注AI繪畫領域&#xff0c;可以看看哦。 本文比較適合已經解決了安裝問題&#xff0c;&#xff08;沒有安裝的在文末領取&#xff09; 在尋找合…

【RAG】Linux系統下ppt轉pptx,讀取解析pptx文本數據

前情提要 檢索增強生成&#xff08;RAG&#xff09;技術&#xff0c;作為 AI 領域的尖端技術&#xff0c;能夠提供可靠且最新的外部知識&#xff0c;極大地便利了各種任務。在 AI 內容生成的浪潮中&#xff0c;RAG 通過其強大的檢索能力為生成式 AI 提供了額外的知識&#xff…

vue3 動態加載頁面

首先&#xff0c;通過下面代碼告訴編譯器要編譯哪些頁面 static modules import.meta.glob(./views/**/*.vue);然后動態加載函數這樣寫&#xff1a; static asyncLoadView (path: string) > {return defineAsyncComponent({loader: <any>Global.modules[./views/${…

Redis的跳表:高效實現有序集合

在 Redis 中&#xff0c;跳表&#xff08;Skip List&#xff09;是一種常用的數據結構&#xff0c;用于實現有序集合&#xff08;Sorted Set&#xff09;。跳表是一種基于鏈表的數據結構&#xff0c;具有快速的查找、插入和刪除操作&#xff0c;適用于有序集合的實現。 本文將…

分布式搜索——ElasticSeach簡介

一般都用數據庫存儲數據&#xff0c;然后對數據庫進行查詢獲取數據&#xff0c;但是當數據量很大時&#xff0c;查詢效率就會很慢&#xff08;具體下面會講到&#xff09;&#xff0c;所以這種情況下就會使用到ElasticSeach ElasticSeach的基本介紹 ElasticSeach是一 款非常強…

2024重慶高等教育博覽會|2024重慶高教展|全國高等教育博覽會

2024重慶高等教育博覽會|2024重慶高教展|全國高等教育博覽會 第62屆全國高等教育博覽會&#xff08;2024.秋季重慶&#xff09; 時間&#xff1a;2024年11月15-17日 地點&#xff1a;重慶國際博覽中心 組織機構 主辦單位&#xff1a;中國高等教育學會 承辦單位&#xff1a;國藥…

杰發科技AC7801——ADC之Bandgap和內部溫度計算

0. 參考 電流模架構Bandgap設計與仿真 bandgap的理解&#xff08;內部帶隙電壓基準&#xff09; ? ? 雖然看不懂這些公式&#xff0c;但是比較重要的一句應該是這個&#xff1a;因為傳統帶隙基準的輸出值為1.2V ? 1. 使用 參考示例代碼。 40002000是falsh控制器寄…

NXP RT1176(一)——二級BootLoader開發(安全引導加載程序SBL)

目錄 1. 開發環境 2. 二級BOOT的功能 3. 步驟 3.1 配置源碼 3.2 構建項目 3.2.1 MDK 3.2.2 IAR&#xff08;IAR也編譯一下工程看看&#xff0c;這樣兩個平臺都可以支持了&#xff09; 單核M7的開發&#xff01;&#xff01; 1. 開發環境 本文Windows下開發&#xff1a;…

【無標題】vo dto

在Java中&#xff0c;VO、PO、DTO都是常用的數據對象模型。 VO&#xff08;Value Object&#xff09;是值對象&#xff0c;通常用于表示一個業務實體或者頁面展示的內容。VO通常包含了多個屬性&#xff0c;并且這些屬性的類型和名稱與業務相關。VO并不一定與數據庫中的表結構相…

MHD、MQA、GQA注意力機制詳解

MHD、MQA、GQA注意力機制詳解 注意力機制詳解及代碼前言&#xff1a;MHAMQAGQA 注意力機制詳解及代碼 前言&#xff1a; 自回歸解碼器推理是 Transformer 模型的 一個嚴重瓶頸&#xff0c;因為在每個解碼步驟中加 載解碼器權重以及所有注意鍵和值會產生 內存帶寬開銷 下圖為三…

鞏固學習8

在 Pandas 中&#xff0c;sep參數用于指定數據中字段之間的分隔符。常見的參數包括&#xff1a; 逗號&#xff1a;,&#xff0c;常用于CSV文件。 制表符&#xff1a;\t&#xff0c;常用于TSV文件。 空格&#xff1a;’ &#xff0c;用于空格分隔的數據。 分號&#xff1a;;&…

【合成孔徑雷達】合成孔徑雷達的多視角理解和時/頻成像算法的統一解釋

文章目錄 一、什么是雷達成像&#xff08;1&#xff09;主要的遙感探測手段&#xff1a;光學、紅外和雷達&#xff08;2&#xff09;從數學的角度&#xff1a;雷達成像主要研究什么&#xff1f;數據采集&#xff1a; y T x n yTxn yTxn信息提取&#xff1a; y ? > x ? y…

編譯錯誤:stray ‘\357’ in program的解決方法

目錄 把報錯文件更換編碼格式&#xff0c;我試的utf-8 bom編碼就可以了&#xff0c;可以多換幾種試試。 網友的另一種案例&#xff1a; 編譯錯誤&#xff1a;stray ‘\357’ in program的解決方法 把報錯文件更換編碼格式&#xff0c;我試的utf-8 bom編碼就可以了&#xff0c…

LabVIEW做儀器測試不知道是否適用

LabVIEW&#xff08;Laboratory Virtual Instrument Engineering Workbench&#xff09;是一個用于系統工程和測量系統的圖形編程平臺&#xff0c;由National Instruments開發。它非常適用于儀器控制、數據采集、信號處理以及自動化測試與測量系統的開發。如果您的工作涉及到這…

如何同步管理1000個設備的VLAN數據?

什么是VLAN&#xff1f; VLAN&#xff0c;也就是虛擬局域網&#xff0c;是通過為子網提供數據鏈路連接來抽象出局域網的概念。在企業網中&#xff0c;一個企業級交換機一般是24口或者是48口&#xff0c;連接這些接口的終端在物理上形成一個廣播域。廣播域過大&#xff0c;就會導…