1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003 |
- /* eslint-disable node/no-deprecated-api */
- /* eslint-disable no-undef */
- 'use strict'
- // import AsyncLock from 'async-lock';
- import {
- app,
- BrowserWindow,
- Menu
- } from 'electron'
- import '../renderer/store'
- const fs = require('fs')
- const ipcMain = require('electron').ipcMain
- // const SerialPort = require('serialport')
- // const SerialPort = require('serialport')
- const SerialPort = require('serialport')
- const WebSocketServer = require('ws').Server
- // 安装thrift
- const thrift = require('thrift')
- const printService = require('./HrUtilService.js')
- // const cp = require('child_process')
- const exec = require('child_process').exec
- const execFile = require('child_process').execFile
- const RingBuffer = require('ringbufferjs')
- const dgram = require('dgram')
- let server = dgram.createSocket('udp4')
- const cmd = require('node-cmd')
- // var lock = new AsyncLock();
- let ceshi = []
- // SerialPort.list().then(
- // ports => {
- // console.log(ports)
- // }
- // )
- const ring = new RingBuffer(1024)
- // const portName = 'COM4'
- let portName = 'COM1'
- let serialPort
- const smallPackageLen = 8
- const bigPackageLen = 36
- let working = false
- const minPackageLen = 11
- // 轴加速度
- //控制传输数据的开关
- let wssSwitch = true;
- // 温度
- let Temperature = 0
- let arrCom = []
- let mainWindow
- let loadingWindow
- //设置访问路径
- //打包访问的路径
- // let serveUrl = "./resources/exe"
- // let serveUrlJar = '\\resources\\exe'
- //本地访问的路径
- let serveUrl = "./exe"
- let serveUrlJar = '\\exe'
- /**
- * Set `__static` path to static files in production
- * https://simulatedgreg.gitbooks.io/electron-vue/content/en/using-static-assets.html
- */
- if (process.env.NODE_ENV !== 'development') {
- global.__static = require('path').join(__dirname, '/static').replace(/\\/g, '\\\\')
- }
- const winURL = process.env.NODE_ENV === 'development' ? `http://localhost:9080` : `file://${__dirname}/index.html`
- const loadingURL =
- process.env.NODE_ENV === "development" //加载loading.html页面地址
- ? require("path").join(__static, "loading.html")
- : `file://${__static}/loading.html`;
- function createLoadingWindow() { //加载页面窗口
- loadingWindow = new BrowserWindow({
- height: 300,
- useContentSize: true,
- width: 400,
- show: true,
- transparent: false,
- maximizable: false, //禁止双击放大
- frame: false, // 去掉顶部操作栏
- webPreferences: {
- contextIsolation: false, // 设置此项为false后,才可在渲染进程中使用electron api
- nodeIntegration: true
- }
- })
- loadingWindow.loadURL(loadingURL)
- Menu.setApplicationMenu(null)
- loadingWindow.on('closed', () => {
- loadingWindow = null
- })
- }
- // eslint-disable-next-line space-before-function-paren
- function createWindow() {
- /**
- * Initial window options
- */
- mainWindow = new BrowserWindow({
- height: 720,
- useContentSize: true,
- center: true,
- width: 1280,
- icon: require('path').join(__dirname, '/static/icon.ico'), // icon
- // webPreferences: {
- // contextIsolation: false, // 设置此项为false后,才可在渲染进程中使用electron api
- // nodeIntegration: true
- // }
- frame: false,
- webPreferences: {
- contextIsolation: false,
- nodeIntegration: true,
- // allowRendererProcessReuse: true
- // 禁用窗口同源策略
- webSecurity: false
- }
- })
- mainWindow.setMinimumSize(1280, 720)
- //mainWindow.loadURL(loadingURL)
- mainWindow.loadURL(winURL)
- mainWindow.setMenu(null)
- // mainWindow.webContents.openDevTools();
- mainWindow.on('closed', () => {
- mainWindow = null
- })
- }
- const gotTheLock = app.requestSingleInstanceLock()
- if (!gotTheLock) {
- app.quit()
- } else {
- app.on('second-instance', (event, commandLine, workingDirectory) => {
- // 当运行第二个实例时,将会聚焦到mainWindow这个窗口
- if (loadingWindow) {
- if (loadingWindow.isMinimized()) loadingWindow.restore()
- loadingWindow.focus()
- loadingWindow.show()
- }
- if (mainWindow) {
- if (mainWindow.isMinimized()) mainWindow.restore()
- mainWindow.focus()
- mainWindow.show()
- }
- // if (mainWindow) {
- // if (mainWindow.isMinimized()) mainWindow.restore()
- // mainWindow.focus()
- // mainWindow.show()
- // }
- })
- }
- // app.on('ready', () => {
- // createLoadingWindow()
- // createWindow()
- // mainWindow.hide()
- // })
- app.on('ready', () => {
- createLoadingWindow()
- createWindow()
- mainWindow.hide()
- })
- ipcMain.on('close-loading-window', (e, res) => {
- if (res.isClose) {
- if (loadingWindow === null) {
- } else {
- loadingWindow.close()
- }
- mainWindow.show()
- }
- })
- //
- // ipcMain.on('window-close', function () {
- // if (process.platform !== 'darwin') {
- // wssSwitch = false
- // cmd.runSync('taskkill /f /im javaw.exe')
- // app.quit()
- // }
- // // mainWindow.close();
- // })
- // app.on('activate', () => {
- // if (mainWindow === null) {
- // createWindow()
- // }
- // })
- // setTimeout(() => {
- // console.log("123")
- // console.log(loadingWindow)
- // loadingWindow.close()
- // mainWindow.show()
- // }, 4500);
- // 打开websocket服务
- let ws_public = null;
- // 查询54378 端口是否开了,开了的话就不调用了
- let pluseStart = cmd.runSync('netstat -ano|findstr 54378')
- // 没开的话就调用//防止二次点击时报错
- if (pluseStart.data === null || pluseStart.data.trim().toUpperCase().indexOf('LISTENING') <= 0) {
- const wss = new WebSocketServer({
- port: 54378
- })
- wss.on('connection', (ws) => {
- // 有客户端连接时, 打印一条日志
- // 并且创建'message'监听
- ws.on('message', (message) => {
- // 直接将消息打印出来
- // console.log(message)
- if (wssSwitch) {
- mainWindow.webContents.send('asynchronous-message', message)
- }
- })
- ws_public = ws
- // setTimeout(() => {
- //
- // }, 1000);
- // setInterval(()=>{
- // ws.send('PULSE-STOP')
- // },1000)
- })
- }
- ipcMain.on('pulse-message-stop', function (event, arg) {
- // console.log(arg) // prints "ping"
- ws_public.send('PULSE-STOP')
- // 返回值后向渲染进程传输数据
- // eslint-disable-next-line eol-last
- })
- // sendStop(
- // ws.send('PULSE-STOP')
- // )
- // 测试虚拟AR数据
- server.on('error', (err) => {
- console.log(err)
- })
- server.on('listening', () => {
- console.log('socket正在监听...')
- })
- server.on('message', (msg, rinfo) => {
- let buf = msg
- let bufto = buf.toString()
- // server.send(`welcome ${rinfo.address}:${rinfo.port}`, rinfo.port, rinfo.address)
- // 将指令发送到渲染进程,渲染进程保持一个全局状态
- mainWindow.webContents.send('send-message-to-render-vr', bufto)
- // mainWindow.webContents.on('did-finish-load', () => {
- // mainWindow.webContents.send('send-message-to-render-vr', bufto)
- // })
- })
- server.bind(4960)
- // 加速度代码
- // 创建
- // 创建
- // creatSerialPort()
- // serialPortOpen(serialPort)
- // 向渲染进程发送数据
- // eslint-disable-next-line space-before-function-paren
- // eslint-disable-next-line space-before-function-paren
- // mainWindow.webContents.send('accelerationData-message', a)
- // setInterval(aac, 10000)
- // // eslint-disable-next-line space-before-function-paren
- // function aac() {
- // console.log('长度')
- // console.log(ceshi.length)
- // let myDate = new Date()
- // myDate.toLocaleString()
- // console.log(myDate)
- // }
- // 打印文件
- // //写方法把a传过去到渲染进程
- // function accelerationData() {
- // }
- // 在缓冲数据中找到第一个包的起始位置
- // eslint-disable-next-line space-before-function-paren
- function getComList() {
- arrCom = []
- // eslint-disable-next-line padded-blocks
- SerialPort.list().then(ports => {
- ports.forEach(function (port) {
- // console.log(port.path)
- // 获取到com端口后将数据告诉主进程
- arrCom.push(port.path)
- console.log(arrCom)
- // 等待渲染进程执行完成才往渲染进程发送数据
- })
- mainWindow.webContents.send('send-message-to-render-test', arrCom)
- })
- }
- //启动后再进行初始化
- const host = '0.0.0.0';
- const port = 50300;
- var connection = null;
- var client = null;
- // 启动操作
- const starServer = function () {
- let syncData = cmd.runSync('netstat -ano|findstr 50300')
- if (syncData.data === null || syncData.data.trim().toUpperCase().indexOf('LISTENING') <= 0) {
- let cp = require('child_process')
- //execFile('./resources/exe/rpc_thrift.exe', function (err, data) {
- // cp.spawn(serveUrl +'/rpc_thrift.exe', [])
- console.log(process.cwd() + serveUrlJar)
- let path = process.cwd() + serveUrlJar;
- cp.spawn('start', ['/b', 'rpc_thrift.exe'], { cwd: path, shell: true, windowsHide: true })
- //cmd.runSync('powershell.exe Start-Process -FilePath "./resources/exe/mysql/mysql-5.7.24-winx64/bin/mysql_init.bat" -WindowStyle Hidden -Verb runAs')
- // let startSS = 'powershell.exe Start-Process -FilePath "' + serveUrl + '/rpc_thrift.exe" -WindowStyle Hidden -Verb runAs'
- // cmd.runSync(startSS)
- // cp.spawn('start',['rpc_thrift.exe'], {cwd:path,shell:true,windowsHide:true,windowsVerbatimArguments: true})
- // cp.spawn('start',['rpc_thrift.exe'], {cwd:path,shell:true,windowsHide:true,windowsVerbatimArguments: true})
- // execute_path(
- // "start rpc_thrift.exe",
- // 3,
- // process.cwd() +
- // serveUrlJar
- // );
- // execute_path(
- // "start rpc_thrift.exe",
- // 3,
- // process.cwd() +
- // serveUrlJar
- // );
- // cp.spawn(serveUrl + '/rpc_thrift.exe', [])
- // execFile(serveUrl + '/rpc_thrift.exe', function (err, data) {
- // console.log(err)
- // console.log(data.toString())
- // })
- do {
- syncData = cmd.runSync('netstat -ano|findstr 50300')
- // console.log('find')
- } while (syncData.data === null || syncData.data.trim().toUpperCase().indexOf('LISTENING') <= 0)
- console.log('OK')
- } else {
- console.log('50300')
- }
- loadingWindow.webContents.send('main-windows-python-exe-run', {
- type: "exe",
- })
- connection = thrift.createConnection(host, port, 0)
- client = thrift.createClient(printService, connection)
- connection.on('error', function (e) {
- console.log(e)
- })
- }
- // 配置thrift的connection信息
- // eslint-disable-next-line no-undef
- //-----------------------------------
- // const host = '0.0.0.0'
- // const port = 50300
- // var connection = thrift.createConnection(host, port, 0)
- // // 根据配置的connection创建client
- // var client = thrift.createClient(printService, connection)
- // 3秒以后执行这个方法块
- //----------------------------------------
- // connection =
- // client = thrift.createClient(printService, connection)
- //监听connection是否error
- const rawData = [33145, 33174, 33156, 33239, 33177, 33139, 33201, 33197, 33232, 33187, 33290, 33223, 33276, 33281, 33277, 33378, 33327, 33384, 33396, 33411, 33505, 33439, 33531, 33500, 33586, 33699, 33600, 33707, 33644, 33732, 33720, 33801, 33840, 33817, 33861, 33896, 33920, 33904, 33922, 33942, 33890, 33797, 33735, 33674, 33676, 33605, 33513, 33435, 33428, 33444, 33317, 33368, 33337, 33374, 33369, 33353, 33351, 33324, 33363, 33337, 33393, 33331, 33432, 33456, 33442, 33520, 33476, 33409, 33488, 33471, 33538, 33553, 33601, 33601, 33555, 33613, 33521, 33644, 33684, 33657, 33705, 33671, 33775, 33827, 33817, 33828, 33870, 33889, 33900, 33986, 33973, 34018, 34122, 34054, 34140, 34203, 34155, 34246, 34160, 34261, 34271, 34302, 34354, 34351, 34384, 34377, 34356, 34406, 34354, 34366, 34327, 34221, 34244, 34101, 34041, 34045, 34044, 34017, 33908, 34006, 34000, 33986, 33943, 33991, 33927, 33934, 33984, 34010, 33972, 34102, 34059, 34079, 34144, 34165, 34206, 34228, 34218, 34256, 34199, 34302, 34266, 34285, 34285, 34307, 34384, 34385, 34374, 34412, 34344, 34466, 34453, 34495, 34593, 34514, 34588, 34694, 34650, 34788, 34706, 34757, 34820, 34759, 34809, 34880, 34922, 34905, 34982, 35080, 35009, 35117, 35069, 35090, 35166, 35137, 35125, 35183, 35084, 35124, 35022, 35027, 34931, 34811, 34867, 34771, 34793, 34798, 34726, 34753, 34751, 34740, 34723, 34631, 34691, 34693, 34686, 34821, 34783, 34805, 34785, 34827, 34895, 34785, 34895, 34926, 34903, 34978, 34905, 34958, 34966, 34978, 34984, 34970, 35005, 35017, 35013, 35057, 35064, 35061, 35069, 35102, 35170, 35155, 35173, 35305, 35203, 35304, 35223, 35294, 35261, 35270, 35294, 35256, 35309, 35330, 35370, 35355, 35355, 35362, 35356, 35410, 35337, 35314, 35331, 35364, 35283, 35350, 35242, 35221, 35189, 35129, 35128, 35100, 35053, 35146, 35088, 35136, 35095, 35055, 35071, 35035, 35097, 35120, 35126, 35035, 35093, 35074, 35158, 35097, 35144, 35157, 35165, 35263, 35211, 35171, 35222, 35221, 35310, 35290, 35256, 35292, 35306, 35308, 35293, 35343, 35315, 35316, 35332, 35258, 35257, 35337, 35339, 35425, 35397, 35397, 35450, 35406, 35473, 35507, 35432, 35486, 35421, 35466, 35485, 35463, 35499, 35464, 35482, 35468, 35359, 35436, 35265, 35229, 35170, 35058, 35012, 34883, 34846, 34845, 34714, 34709, 34597, 34694, 34662, 34547, 34552, 34535, 34611, 34512, 34509, 34523, 34578, 34569, 34543, 34547, 34647, 34577, 34631, 34632, 34629, 34559, 34569, 34542, 34641, 34625, 34568, 34542, 34466, 34392, 34316, 34322, 34259, 34191, 34092, 34084, 34074, 34073, 34025, 33955, 34059, 34078, 34043, 34086, 34116, 34131, 34164, 34266, 34368, 34389, 34416, 34477, 34557, 34632, 34685, 34679, 34708, 34801, 34714, 34736, 34758, 34702, 34720, 34613, 34566, 34594, 34470, 34435, 34426, 34399, 34416, 34285, 34322, 34292, 34383, 34335, 34327, 34352, 34301, 34304, 34348, 34315, 34403, 34286, 34357, 34325, 34332, 34292, 34269, 34326, 34318, 34352, 34358, 34327, 34390, 34359, 34346, 34378, 34358, 34445, 34404, 34454, 34522, 34500, 34551, 34420, 34573, 34588, 34598, 34632, 34574, 34621, 34659, 34585, 34682, 34640, 34630, 34502, 34492, 34468, 34332, 34335, 34255, 34149, 34215, 34058, 34007, 34011, 33910, 33940, 33874, 33958, 33922, 33825, 33843, 33841, 33909, 33930, 33856, 33895, 33948, 33940, 33939, 33927, 33951, 33948, 34015, 33950, 33934, 33897, 33968, 34010, 34014, 33985, 34033, 34032, 34075, 34068, 34019, 34139, 34080, 34128, 34145, 34077, 34172, 34114, 34256, 34222, 34280, 34329, 34344, 34368, 34366, 34436, 34445, 34411, 34484, 34404, 34425, 34462, 34256, 34223, 34207, 34122, 34031, 33927, 33891, 33859, 33825, 33783, 33743, 33761, 33662, 33719, 33745, 33647, 33655, 33718, 33710, 33721, 33763, 33760, 33723, 33803, 33717, 33717, 33802, 33793, 33726, 33755, 33811, 33803, 33744, 33844, 33834, 33914, 33991, 34057, 34166, 34250, 34418, 34582, 34741, 34896, 35004, 35220, 35434, 35580, 35791, 35848, 36177, 36348, 36486, 36757, 36928, 37188, 37352, 37526, 37611, 37596, 37614, 37603, 37516, 37428, 37270, 37099, 36859, 36928, 36880, 36780, 36576, 36586, 36445, 36405, 36386, 36352, 36320, 36293, 36396, 36332, 36395, 36433, 36441, 36567, 36573, 36665, 36758, 36757, 36926, 36898, 36992, 37013, 37015, 37166, 37150, 37192, 37253, 37259, 37296, 37268, 37370, 37310, 37309, 37261, 37199, 37288, 37190, 37021, 36989, 36866, 36818, 36715, 36565, 36648, 36491, 36500, 36450, 36374, 36343, 36317, 36258, 36132, 36067, 36004, 35807, 35678, 35526, 35395, 35354, 35149, 35125, 35036, 34892, 34811, 34762, 34750, 34582, 34699, 34546, 34476, 34527, 34412, 34372, 34369, 34372, 34388, 34332, 34334, 34330, 34278, 34317, 34264, 34333, 34346, 34370, 34327, 34299, 34299, 34298, 34375, 34388, 34295, 34319, 34384, 34381, 34420, 34421, 34483, 34441, 34498, 34583, 34500, 34492, 34548, 34570, 34642, 34692, 34708, 34723, 34727, 34774, 34736, 34828, 34698, 34694, 34684, 34565, 34558, 34408, 34377, 34368, 34238, 34223, 34142, 34065, 34033, 34069, 34074, 34064, 34044, 34067, 33961, 34026, 34130, 34062, 34041, 33955, 34148, 34031, 34045, 34148, 34012, 34101, 34051, 34096, 34068, 33994, 34046, 34116, 34042, 34145, 34070, 34136, 34066, 34074, 34197, 34137, 34212, 34182, 34120, 34238, 34171, 34215, 34181, 34235, 34313, 34270, 34383, 34302, 34424, 34386, 34314, 34410, 34410, 34548, 34409, 34351, 34326, 34292, 34265, 34169, 34067, 34058, 33951, 33870, 33865, 33855, 33728, 33701, 33713, 33634, 33694, 33656, 33679, 33739, 33662, 33711, 33659, 33698, 33719, 33724, 33788, 33760, 33771, 33755, 33700, 33728, 33671, 33739, 33670, 33732, 33774, 33732, 33763, 33749, 33789, 33834, 33836, 33788, 33875, 33937, 33920, 33863, 33889, 33896, 33985, 33967, 33983, 34039, 33958, 34049, 34060, 34007, 34088, 34054, 34094, 34118, 34136, 34157, 34075, 33998, 33956, 33822, 33857, 33679, 33638, 33655, 33457, 33479, 33403, 33298, 33301, 33227, 33237, 33209, 33192, 33194, 33154, 33192, 33129, 33135, 33187, 33114, 33120, 33162, 33071, 33116, 33085, 33128, 33114, 33042, 33121, 33081, 33110, 33178, 33123, 33204, 33146, 33186, 33171, 33091, 33223, 33254, 33197, 33273, 33235, 33351, 33281, 33331, 33332, 33369, 33443, 33417, 33501, 33463, 33583, 33591, 33561, 33668, 33677, 33711, 33734, 33707, 33712, 33621, 33598, 33566, 33433, 33411, 33346, 33319, 33264, 33201, 33179, 33180, 33171, 33204, 33155, 33192, 33178, 33197, 33194, 33163, 33220, 33208, 33265, 33275, 33261, 33320, 33292, 33263, 33284, 33242, 33295, 33241, 33340, 33221, 33261, 33293, 33277, 33363, 33312, 33325, 33420, 33360, 33370, 33382, 33391, 33482, 33515, 33531, 33508, 33542, 33489, 33584, 33564, 33547, 33660, 33553, 33608, 33706, 33626, 33690, 33658, 33615, 33686, 33537, 33540, 33421, 33404, 33297, 33184, 33204, 33135, 33101, 33034, 32926, 33019, 32915, 32959, 32904, 32885, 32930, 32907, 32932, 32914, 32941, 32941, 32913, 33007, 32899, 32910, 32967, 32948, 32968, 32956, 32984, 32938, 32926, 32995, 32915, 32983, 32978, 32996, 33006, 32935, 33054, 32954, 33061, 33020, 32967, 33019, 32981, 33057, 33122, 33172, 33158, 33106, 33249, 33233, 33237, 33343, 33195, 33325, 33286, 33315, 33266, 33231, 33247, 33068, 33072, 33045, 32942, 32833, 32736, 32718, 32678, 32646, 32684, 32512, 32611, 32643, 32550, 32621, 32558, 32659, 32618, 32567, 32675, 32677, 32655, 32714, 32693, 32700, 32678, 32643, 32652, 32555, 32636, 32553, 32638, 32608, 32604, 32653, 32649, 32677, 32634, 32655, 32643, 32695, 32721, 32718, 32664, 32719, 32762, 32875, 32828, 32806, 32940, 32845, 32905, 32890, 32884, 33004, 32924, 32940, 32933, 32845, 32756, 32682, 32584, 32490, 32470, 32437, 32303, 32274, 32237, 32140, 32146, 32131, 32129, 32169, 32068, 32118, 32098, 32032, 32124, 32088, 32126, 32072, 32209, 32182, 32103, 32133, 32151, 32151, 32169, 32172, 32134, 32235, 32168, 32244, 32125, 32242, 32265, 32236, 32326, 32266, 32353, 32368, 32272, 32407, 32356, 32391, 32413, 32481, 32489, 32443, 32478, 32542, 32557, 32626, 32600, 32698, 32648, 32711, 32689, 32589, 32541, 32445, 32377, 32310, 32271, 32191, 32175, 32103, 32155, 32037, 32022, 32078, 32056, 32102, 32010, 32104, 32050, 32083, 32118, 32083, 32137, 32231, 32146, 32246, 32206, 32227, 32263, 32237, 32272, 32334, 32321, 32316, 32337, 32418, 32402, 32353, 32430, 32348, 32407, 32525, 32433, 32493, 32539, 32600, 32584, 32616, 32634, 32670, 32718, 32755, 32797, 32797, 32814, 32860, 32870, 32868, 32918, 32947, 32814, 32858, 32804, 32796, 32711, 32664, 32581, 32482, 32428, 32424, 32302, 32342, 32320, 32294, 32327, 32291, 32312, 32275, 32314, 32341, 32328, 32444, 32418, 32409, 32472, 32433, 32517, 32431, 32446, 32542, 32507, 32524, 32540, 32472, 32618, 32556, 32526, 32626, 32541, 32630, 32641, 32698, 32681, 32689, 32755, 32761, 32811, 32840, 32798, 32911, 32896, 32974, 33012, 32987, 33070, 33045, 33142, 33115, 33082, 33198, 33064, 33136, 33129, 33112, 33013, 32889, 32894, 32726, 32712, 32677, 32674, 32678, 32645, 32608, 32535, 32598, 32562, 32589, 32615, 32631, 32730, 32719, 32646, 32720, 32725, 32713, 32789, 32762, 32774, 32802, 32755, 32790, 32780, 32835, 32821, 32806, 32868, 32882, 32927, 32962, 32920, 33025, 32999, 33072, 33029, 33061, 33116, 33113, 33188, 33249, 33131, 33267, 33307, 33227, 33357, 33380, 33359, 33408, 33395, 33389, 33290, 33420, 33325, 33196, 33149, 33104, 33052, 32950, 32927, 32920, 32795, 32871, 32852, 32832, 32889, 32816, 32816, 32873, 32838, 32843, 32845, 32969, 33021, 33052, 33050, 33048, 33045, 33099, 33110, 33188, 33131, 33135, 33128, 33158, 33162, 33177, 33207, 33283, 33207, 33283, 33380, 33359, 33422, 33405, 33438, 33474, 33454, 33531, 33572, 33576, 33679, 33669, 33703, 33673, 33666, 33809, 33730, 33772, 33760, 33716, 33645, 33606, 33523, 33488, 33462, 33405, 33343, 33279, 33314, 33313, 33257, 33189, 33295, 33199, 33218, 33266, 33194, 33252, 33233, 33341, 33349, 33330, 33374, 33363, 33392, 33389, 33436, 33403, 33381, 33477, 33456, 33491, 33414, 33517, 33549, 33532, 33602, 33540, 33639, 33669, 33709, 33659, 33686, 33760, 33786, 33867, 33841, 33863, 33926, 33959, 34008, 33975, 34019,
- 34075, 34111, 34134, 34136, 34126, 34093, 34102, 34069, 34052, 33940, 33840, 33887, 33737, 33763, 33736, 33791, 33749, 33674, 33702, 33643, 33694, 33726, 33730, 33739, 33742, 33787, 33778, 33849, 33894, 33876, 33915, 33923, 33968, 33984, 33986, 33969, 34023, 34031, 33976, 34065, 34049, 34065, 34136, 34051, 34116, 34159, 34233, 34184, 34182, 34288, 34245, 34385, 34410, 34363, 34481, 34430, 34535, 34538, 34594, 34657, 34580, 34665, 34692, 34795, 34741, 34645, 34676, 34560, 34633, 34557, 34542, 34427, 34383, 34369, 34369, 34297, 34352, 34370, 34341, 34316, 34387, 34326, 34354, 34366, 34357, 34442, 34400, 34450, 34519, 34446, 34504, 34496, 34581, 34570, 34621, 34611, 34570, 34624, 34675, 34675, 34626, 34636, 34716, 34836, 34682, 34799, 34807, 34785, 34856, 34875, 34875, 34980, 34939, 34975, 35031, 35092, 35098, 35086, 35080, 35120, 35161, 35196, 35238, 35191, 35265, 35247, 35207, 35172, 35069, 35036, 35009, 34970, 34950, 34873, 34926, 34865, 34859, 34822, 34816, 34904, 34853, 34916, 34880, 34912, 34937, 34898, 34980, 34914, 35068, 35023, 35006, 35021, 34988, 35083, 35025, 34995, 35058, 35021, 35123, 35063, 35150, 35125, 35081, 35225, 35184, 35192, 35213, 35208, 35252, 35268, 35331, 35302, 35310, 35435, 35388, 35458, 35460, 35535, 35543, 35572, 35562, 35548, 35561, 35651, 35628, 35677, 35646, 35619, 35589, 35500, 35444, 35385, 35411, 35305, 35238, 35263, 35247, 35201, 35185, 35153, 35239, 35167, 35221, 35232, 35139, 35248, 35234, 35236, 35275, 35263, 35282, 35331, 35417, 35355, 35328, 35310, 35374, 35404, 35373, 35339, 35365, 35348, 35418, 35366, 35415, 35518, 35494, 35570, 35464, 35562, 35509, 35535, 35569, 35586, 35678, 35666, 35674, 35724, 35678, 35733, 35703, 35801, 35797, 35770, 35875, 35802, 35866, 35845, 35825, 35840, 35726, 35752, 35666, 35607, 35544, 35449, 35463, 35388, 35383, 35401, 35366, 35399, 35333, 35374, 35387, 35359, 35434, 35355, 35411, 35405, 35432, 35428, 35379, 35457, 35385, 35402, 35405, 35424, 35382, 35458, 35559, 35537, 35457, 35448, 35417, 35500, 35482, 35504, 35470, 35496, 35560, 35579, 35541, 35616, 35585, 35694, 35633, 35688, 35704, 35619, 35732, 35684, 35788, 35804, 35766, 35819, 35786, 35852, 35803, 35835, 35804, 35738, 35717, 35561, 35547, 35546, 35466, 35478, 35388, 35367, 35365, 35321, 35314, 35278, 35289, 35252, 35261, 35294, 35237, 35313, 35225, 35227, 35258, 35292, 35313, 35230, 35268, 35303, 35286, 35283, 35306, 35286, 35312, 35274, 35299, 35272, 35326, 35251, 35290, 35336, 35273, 35373, 35379, 35401, 35423, 35429, 35492, 35421, 35432, 35482, 35498, 35554, 35580, 35661, 35619, 35573, 35645, 35620, 35555, 35553, 35546, 35485, 35476, 35427, 35251, 35281, 35136, 35139, 35078, 34936, 35032, 35004, 35074, 34972, 34888, 34983, 34978, 34989, 34986, 35015, 35063, 35029, 35097, 35014, 35040, 35046, 34990, 35032, 34944, 34969, 34864, 34850, 34895, 34889, 34933, 34882, 34873, 34953, 34869, 34922, 34906, 34953, 34975, 35026, 35029, 35003, 35013, 35106, 35027, 35103, 35182, 35171, 35239, 35172, 35245, 35143, 35251, 35189, 35239, 35342, 35283, 35158, 34889, 34325, 33573, 32975, 32143, 31117, 30859, 30572, 30424, 30320, 30183, 30104, 30079, 29904, 29936, 29868, 29868, 29812, 29781, 29808, 29794, 29855, 29918, 30003, 30015, 30055, 30074, 29937, 30082, 30052, 30224, 30607, 30892, 31540, 32376, 34313, 36340, 39184, 40746, 42378, 44281, 45973, 46831, 46977, 46679, 46371, 46022, 45927, 45746, 45551, 45494, 45397, 45357, 45295, 45261, 45162, 45186, 45236, 45192, 45164, 45339, 45496, 45578, 45753, 47180, 32685, 32348, 32550, 32896, 33116, 33328, 33518, 33675, 33826, 33981, 34059, 34224, 34469, 34715, 34915, 35156, 35310, 35543, 35867, 36044, 36304, 36595, 36780, 37139, 37340, 37573, 37706, 37838, 37975, 38076, 38123, 38197, 38279, 38339, 38387, 38395, 38238, 38289, 38190, 38170, 37939, 37853, 37855, 37734, 37667, 37603, 37471, 37512, 37533, 37579, 37539, 37545, 37628, 37779, 37800, 37988, 38200, 38325, 38563, 38694, 38830, 38938, 39010, 39093, 39085, 39045, 38949, 38945, 38777, 38659, 38459, 38322, 38158, 38001, 37959, 37831, 37802, 37776, 37749, 37765, 37743, 37815, 37817, 37803, 37858, 37893, 37964, 38063, 38165, 38168, 38238, 38273, 38341, 38397, 38352, 38403, 38470, 38540, 38478, 38561, 38585, 38519, 38614, 38563, 38596, 38621, 38624, 38582, 38658, 38555, 38530, 38602, 38569, 38669, 38574, 38589, 38559, 38586, 38622, 38639, 38590, 38529, 38517, 38426, 38328, 38282, 38220, 38130, 38073, 38050, 38009, 37996, 37914, 37863, 37974, 37838, 37900, 37885, 37854, 37830, 37847, 37871, 37784, 37830, 37869, 37899, 37893, 37841, 37833, 37802, 37855, 37771, 37770, 37773, 37774, 37762, 37750, 37820, 37818, 37876, 37882, 37905, 37891, 37878, 37920, 37920, 37972, 37930, 38002, 37986, 37992, 37989, 37998, 38005, 37921, 37986, 37934, 37909, 37976, 37798, 37802, 37699, 37698, 37600, 37561, 37515, 37457, 37529, 37470, 37511, 37455, 37422, 37452, 37421, 37442, 37429, 37411, 37427, 37505, 37481, 37415, 37447, 37489, 37494, 37458, 37520, 37524, 37525, 37544, 37538, 37511, 37627, 37596, 37617, 37586, 37667, 37664, 37634, 37620, 37695, 37664, 37777, 37755, 37767, 37768, 37862, 37854, 37867, 37898, 37937, 37940, 37914, 37950, 38046, 37981, 38061, 38055, 38146, 38052, 38045, 37921, 37882, 37817, 37766, 37717, 37668, 37561, 37535, 37484, 37511, 37439, 37443, 37387, 37376, 37442, 37371, 37435, 37431, 37481, 37504, 37465, 37499, 37552, 37578, 37533, 37481, 37532, 37578, 37573, 37523, 37567, 37552, 37508, 37656, 37578, 37609, 37603, 37666, 37664, 37689, 37674, 37793, 37759, 37808, 37833, 37879, 37777, 37881, 37881, 37939, 37912, 37967, 37976, 38072, 38059, 37976, 38059, 38067, 38051, 38007, 37943, 37905, 37730, 37733, 37691, 37647, 37564, 37450, 37469, 37426, 37438, 37499, 37380, 37469, 37278, 37318, 37364, 37333, 37342, 37326, 37339, 37351, 37413, 37370, 37385, 37375, 37309, 37367, 37322, 37370, 37290, 37316, 37286, 37282, 37317, 37336, 37243, 37347, 37361, 37347, 37330, 37442, 37393, 37447, 37479, 37433, 37460, 37383, 37552, 37512, 37523, 37639, 37527, 37623, 37645, 37631, 37676, 37619, 37639, 37561, 37544, 37459, 37293, 37277, 37234, 37078, 37124, 37028, 36958, 36919, 36977, 36893, 36855, 36940, 36874, 36831, 36835, 36860, 36869, 36754, 36882, 36825, 36846, 36893, 36839, 37013, 36908, 36926, 36910, 36948, 36978, 36911, 36976, 36925, 36947, 36952, 36992, 37043, 37012, 37049, 37087, 37123, 37136, 37106, 37177, 37187, 37257, 37262, 37254, 37253, 37275, 37326, 37332, 37346, 37425, 37392, 37497, 37432, 37492, 37478, 37471, 37372, 37333, 37256, 37198, 37141, 37064, 36966, 36936, 36920, 36879, 36839, 36809, 36829, 36777, 36763, 36789, 36838, 36924, 36777, 36826, 36907, 36856, 36902, 36934, 37022, 37008, 36993, 37043, 37037, 37100, 37125, 37060, 37176, 37185, 37324, 37475, 37663, 37737, 37912, 38159, 38327, 38518, 38695, 38896, 39085, 39264, 39435, 39581, 39747, 39795, 39883, 39952, 39950, 40099, 40191, 40315, 40353, 40459, 40541, 40555, 40586, 40594, 40640, 40584, 40516, 40524, 40513, 40439, 40447, 40378, 40404, 40422, 40434, 40401, 40417, 40455, 40462, 40544, 40566, 40660, 40628, 40694, 40732, 40776, 40859, 40861, 40873, 40953, 40936, 40992, 41010, 41074, 41120, 41146, 41240, 41200, 41233, 41306, 41329, 41403, 41419, 41436, 41545, 41593, 41618, 41617, 41754, 41748, 41765, 41869, 41899, 41991, 41918, 42079, 42093, 42042, 42171, 42219, 42230, 42273, 42302, 42303, 42258, 42267, 42254, 42216, 42136, 42037, 42037, 41876, 41824, 41787, 41694, 41683, 41649, 41611, 41613, 41589, 41637, 41480, 41526, 41562, 41523, 41562, 41490, 41503, 41491, 41497, 41541, 41616, 41600, 41535, 41586, 41603, 41484, 41576, 41465, 41528, 41592, 41571, 41593, 41501, 41600, 41575, 41605, 41670, 41600, 41606, 41624, 41675, 41752, 41675, 41708, 41759, 41730, 41789, 41830, 41825, 41789, 41809, 41859, 41844, 41926, 41898, 41962, 41951, 41890, 41879, 41860, 41758, 41719, 41673, 41628, 41480, 41416, 41372, 41302, 41250, 41226, 41240, 41164, 41098, 41193, 41053, 41160, 41130, 41106, 41061, 41078, 41057, 41152, 41127, 41142, 41171, 41164, 41156, 41045, 41144, 41134, 41038, 41006, 41093, 41094, 41121, 41103, 41029, 41121, 41147, 41155, 41171, 41158, 41147, 41169, 41216, 41240, 41344, 41389, 41328, 41343, 41402, 41367, 41391, 41376, 41484, 41438, 41510, 41553, 41550, 41654, 41572, 41634, 41574, 41569, 41476, 41446, 41329, 41330, 41200, 41176, 41108, 41042, 40969, 40959, 40934, 40889, 40898, 40815, 40852, 40811, 40855, 40849, 40796, 40858, 40883, 40841, 40945, 40814, 40947, 40901, 40933, 40980, 40930, 40929, 40911, 40927, 40951, 40908, 40908, 40907, 40894, 40979, 40945, 41006, 40945, 40943, 41003, 40995, 41048, 40989, 41025, 41098, 41134, 41179, 41050, 41154, 41190, 41080, 41216, 41193, 41311, 41278, 41304, 41313, 41345, 41336, 41312, 41320, 41264, 41220, 41237, 41159, 41105, 40981, 40857, 40865, 40699, 40780, 40719, 40642, 40698, 40602, 40596, 40610, 40592, 40684, 40596, 40716, 40662, 40639, 40670, 40633, 40709, 40664, 40743, 40734, 40694, 40718, 40695, 40731, 40691, 40601, 40735, 40647, 40670, 40687, 40689, 40840, 40749, 40765, 40830, 40788, 40856, 40864, 40985, 40907, 40979, 40986, 40960, 40953, 41006, 40962, 41060, 41024, 40990, 41107, 41126, 41190, 41148, 41133, 41125, 41109, 41109, 40989, 40893, 40875, 40687, 40691, 40656, 40551, 40558, 40464, 40363, 40344, 40316, 40364, 40286, 40285, 40285, 40260, 40257, 40255, 40320, 40336, 40244, 40247, 40302, 40272, 40226, 40260, 40303, 40177, 40267, 40151, 40173, 40184, 40167, 40284, 40134, 40224, 40172, 40135, 40212, 40190, 40225, 40200, 40272, 40345, 40218, 40313, 40333, 40280, 40277, 40308, 40341, 40350, 40352, 40290, 40371, 40378, 40391, 40438, 40376, 40366, 40325, 40248, 40184, 40100, 40082, 39883, 39862, 39711, 39677, 39631, 39580, 39524, 39561, 39497, 39476, 39460, 39487, 39407, 39507, 39449, 39475, 39474, 39420, 39491, 39488, 39517, 39453, 39539, 39466, 39389, 39517, 39453, 39453, 39423, 39467, 39499, 39366, 39427, 39427, 39427, 39489, 39514, 39541, 39468, 39577, 39550, 39617, 39641, 39647, 39642, 39672, 39704, 39689, 39726, 39727, 39747, 39806, 39866, 39787, 39800, 39797,
- 39842, 39796, 39683, 39612, 39571, 39458, 39318, 39292, 39381, 39129, 39039, 39017, 39031, 38983, 38932, 38882, 38848, 38877, 38849, 38870, 38936, 38883, 38897, 38804, 38868, 38892, 38933, 38972, 38920, 38953, 38951, 38951, 38963, 38874, 38946, 38861, 38976, 38931, 38938, 39058, 39014, 39051, 39054, 39058, 39147, 39141, 39186, 39198, 39182, 39177, 39170, 39351, 39222, 39284, 39368, 39352, 39367, 39342, 39384, 39489, 39445, 39521, 39528, 39506, 39438, 39389, 39428, 39250, 39220, 39110, 38985, 39015, 38898, 38856, 38781, 38781, 38791, 38694, 38742, 38701, 38739, 38706, 38642, 38731, 38653, 38711, 38766, 38726, 38814, 38786, 38840, 38840, 38861, 38836, 38826, 38860, 38839, 38820, 38895, 38801, 38897, 38880, 38869, 38983, 38891, 38978, 38987, 39036, 39091, 39059, 39126, 39102, 39120, 39210, 39171, 39296, 39181, 39285, 39303, 39330, 39354, 39320, 39407, 39455, 39450, 39478, 39488, 39537, 39405, 39335, 39220, 39183, 39158, 38955, 38939, 38962, 38860, 38858, 38767, 38881, 38856, 38847, 38812, 38780, 38804, 38790, 38859, 38911, 38937, 38948, 38892, 38997, 39018, 38993, 39034, 38990, 39011, 39009, 38963, 39024, 39067, 39120, 39112, 39049, 39209, 39095, 39217, 39131, 39226, 39267, 39302, 39376, 39313, 39333, 39347, 39438, 39467, 39426, 39462, 39501, 39560, 39577, 39551, 39658, 39676, 39715, 39727, 39685, 39802, 39713, 39687, 39644, 39637, 39489, 39415, 39412, 39332, 39282, 39260, 39161, 39186, 39146, 39156, 39103, 39063, 39166, 39079, 39126, 39135, 39184, 39222, 39287, 39272, 39314, 39323, 39325, 39372, 39341, 39249, 39297, 39292, 39380, 39398, 39377, 39376, 39383, 39339, 39373, 39426, 39474, 39489, 39416, 39586, 39592, 39546, 39572, 39627, 39646, 39683, 39681, 39764, 39711, 39850, 39853, 39802, 39884, 39850, 39966, 39883, 39934, 40033, 39972, 40001, 39935, 39864, 39821, 39679, 39630, 39578, 39519, 39479, 39387, 39449, 39355, 39384, 39332, 39356, 39304, 39306, 39307, 39332, 39332, 39257, 39320, 39297, 39347, 39321, 39271, 39353, 39333, 39367, 39285, 39335, 39240, 39317, 39347, 39227, 39182, 39251, 39254, 39227, 39158, 39152, 39108, 39200, 39139, 39139, 39137, 39097, 39141, 39006, 39110, 38960, 38944, 38956, 38900, 38911, 38930, 38911, 38938, 38849, 38899, 38800, 38768, 38709, 38585, 38580, 38402, 38363, 38220, 38160, 38019, 37950, 37918, 37779, 37786, 37706, 37658, 37625, 37499, 37521, 37496, 37482, 37482, 37396, 37388, 37390, 37379, 37264, 37221, 37243, 37237, 37251, 37218, 37228, 37110, 37107, 37142, 37128, 37114, 37038, 37036, 37020, 36989, 37057, 37048, 37116, 37082, 37090, 37063, 37111, 37153, 37073, 37077, 37004, 37057, 37071, 37064, 37141, 37110, 37104, 37088, 37172, 37117, 37105, 37108, 36996, 36974, 36913, 36807, 36763, 36705, 36542, 36439, 36462, 36341, 36315, 36286, 36184, 36218, 36081, 36143, 36077, 36028, 36096, 36080, 36105, 36104, 36060, 36080, 36025, 36092, 35977, 36065, 36011, 35977, 35980, 35988, 35996, 35984, 35950, 35984, 35981, 36036, 36024, 35906, 36038, 35925, 35991, 35984, 35974, 36079, 35984, 36067, 36026, 35975, 36084, 36003, 36155, 36143, 36156, 36135, 36174, 36204, 36133, 36203, 36110, 36023, 36008, 35887, 35863, 35722, 35681, 35699, 35526, 35498, 35431, 35456, 35383, 35362, 35329, 35360, 35249, 35253, 35269, 35269, 35227, 35308, 35294, 35397, 35314, 35392, 35389, 35359, 35388, 35384, 35333, 35428, 35389, 35320, 35313, 35371, 35422, 35412, 35412, 35392, 35428, 35419, 35435, 35526, 35423, 35539, 35524, 35531, 35536, 35570, 35580, 35531, 35586, 35640, 35637, 35709, 35706, 35772, 35743, 35649, 35738, 35559, 35575, 35474, 35409, 35341, 35253, 35229, 35135, 35126, 35073, 34959, 34970, 34910, 34927, 34995, 34975, 34972, 34886, 35020, 35010, 34975, 35014, 35052, 35030, 35052, 34986, 35063, 34973, 34946, 35004, 34999, 34979, 34952, 35014, 34995, 34991, 35036, 35024, 35084, 35013, 35080, 35108, 35093, 35196, 35160, 35227, 35180, 35153, 35159, 35254, 35091, 35276, 35297, 35341, 35355, 35492, 35470, 35570, 35658, 35611, 35628, 35514, 35484, 35336, 35422, 35410, 35331, 35276, 35205, 35229, 35162, 35204, 35199, 35151, 35176, 35200, 35129, 35126, 35109, 35217, 35257, 35296, 35396, 35442, 35416, 35353, 35447, 35414, 35383, 35449, 35398, 35484, 35538, 35495, 35568, 35594, 35622, 35582, 35649, 35735, 35649, 35775, 35755, 35760, 35852, 35804, 35788, 35867, 35889, 35900, 35850, 35945, 35900, 35961, 36032, 36018, 36063, 36113, 36046, 36082, 36014, 35965, 35972, 35839, 35804, 35682, 35723, 35581, 35596, 35613, 35500, 35465, 35507, 35493, 35511, 35505, 35498, 35543, 35497, 35599, 35534, 35628, 35685, 35578, 35708, 35702, 35724, 35832, 35701, 35760, 35691, 35833, 35800, 35715, 35798, 35863, 35878, 35844, 35845, 35904, 35861, 35877, 35951, 35894, 35879, 35808, 35668, 35732, 35701, 35861, 35815, 35909, 35929, 36041, 36089, 36089, 36305, 36262, 36408, 36496, 36528, 36551, 36524, 36556, 36519, 36507, 36545, 36526, 36631, 36603, 36637, 36623, 36626, 36637, 36518, 36547, 36594, 36455, 36490, 36479, 36479, 36452, 36454, 36469, 36532, 36551, 36576, 36664, 36624, 36558, 36564, 36502, 36534, 36592, 36558, 36551, 36516, 36608, 36544, 36555, 36561, 36547, 36613, 36545, 36492, 36625, 36560, 36527, 36570, 36548, 36584, 36579, 36652, 36630, 36694, 36674, 36706, 36749, 36695, 36736, 36770, 36748, 36758, 36722, 36661, 36611, 36511, 36471, 36430, 36301, 36186, 36212, 36193, 36114, 36071, 36038, 36050, 36042, 35937, 35956, 35929, 35883, 35998, 35910, 35961, 35943, 35899, 35967, 35952, 35980, 35923, 35947, 35965, 35943, 35954, 35823, 35896, 35888, 35901, 35982, 35860, 35851, 35866, 35935, 35886, 35894, 35968, 35965, 35950, 36026, 36059, 36049, 36044, 36097, 36119, 36162, 36150, 36148, 36151, 36190, 36152, 36184, 36217, 36207, 36221, 36223, 36196, 36067, 36066, 36027, 35981, 35884, 35852, 35770, 35723, 35671, 35658, 35544, 35612, 35561, 35522, 35512, 35466, 35387, 35455, 35423, 35402, 35479, 35478, 35441, 35516, 35466, 35525, 35519, 35555, 35572, 35525, 35536, 35538, 35483, 35569, 35497, 35539, 35549, 35631, 35569, 35636, 35641, 35647, 35734, 35680, 35652, 35739, 35699, 35738, 35767, 35833, 35815, 35955, 35900, 35930, 35982, 35978, 35993, 36090, 36061, 36057, 36102, 36123, 36074, 36101, 36028, 35943, 36001, 35858, 35856, 35770, 35760, 35733, 35763, 35687, 35649, 35678, 35610, 35701, 35684, 35738, 35745, 35716, 35738, 35738, 35753, 35787, 35763, 35802, 35799, 35811, 35851, 35835, 35819, 35756, 35841, 35812, 35853, 35817, 35806, 35841, 35858, 35851, 35815, 35722, 35726, 35835, 35622, 35760, 35815, 35817, 35860, 35981, 36001, 36047, 36108, 36211, 36254, 36345, 36384, 36369, 36476, 36506, 36531, 36614, 36675, 36708, 36611, 36701, 36668, 36702, 36661, 36705, 36754, 36654, 36765, 36755, 36807, 36893, 36831, 36897, 36878, 36901, 36911, 36782, 36682, 36584, 36620, 36702, 36676, 36674, 36687, 36824, 36856, 36920, 37035, 37076, 37128, 37112, 37185, 37244, 37359, 37508, 37590, 37733, 37781, 37930, 38012, 38169, 38087, 38107, 38109, 38028, 38076, 38037, 38140, 38052, 38128, 38164, 38151, 38190, 38110, 38198, 38094, 38168, 38104, 38142, 38105, 37999, 37968, 37881, 37795, 37701, 37759, 37668, 37560, 37549, 37461, 37372, 37323, 37292, 37311, 37272, 37258, 37189, 37215, 37196, 37108, 37153, 37146, 37130, 37061, 37026, 37082, 37038, 37085, 37029, 36969, 37031, 36975, 37042, 36944, 36931, 36953, 36912, 36941, 36920, 36955, 36948, 36891, 36865, 36912, 36912, 36916, 36903, 36968, 36875, 36884, 36889, 36860, 36932, 36864, 36876, 36866, 36912, 36886, 36937, 36931, 36880, 36899, 36870, 36814, 36705, 36599, 36597, 36531, 36435, 36417, 36382, 36357, 36235, 36272, 36155, 36187, 36229, 36211, 36225, 36165, 36209, 36150, 36178, 36160, 36111, 36232, 36161, 36102, 36225, 36234, 36226, 36185, 36192, 36174, 36180, 36162, 36232, 36097, 36125, 36064, 36148, 36159, 36198, 36211, 36198, 36217, 36168, 36214, 36336, 36234, 36281, 36311, 36362, 36368, 36362, 36398, 36380, 36422, 36370, 36437, 36425, 36404, 36457, 36377, 36294, 36258, 36208, 36159, 36128, 36113, 35956, 35928, 35935, 35823, 35844, 35834, 35802, 35802, 35737, 35798, 35717, 35823, 35732, 35736, 35726, 35731, 35783, 35732, 35817, 35840, 35824, 35831, 35850, 35783, 35807, 35751, 35746, 35821, 35808, 35794, 35754, 35803, 35880, 35854, 35858, 35865, 35896, 35856, 35853, 35885, 35810, 35946, 35852, 35959, 35955, 35918, 35991, 35929, 36037, 35975, 35994, 35969, 36023, 36057, 35937, 35948, 35904, 35921, 35925, 35840, 35783, 35675, 35646, 35547, 35576, 35526, 35503, 35528, 35535, 35480, 35115, 35282, 35320, 35312, 35375, 35356, 35413, 35435, 35441, 35571, 35653, 35643, 35666, 35673, 35735, 35652, 35788, 35792, 35880, 35872, 35974, 36040, 36113, 36158, 36131, 36167, 36302, 36221, 36333, 36362, 36385, 36413, 36498, 36559, 36505, 36624, 36641, 36689, 36766, 36641, 36601, 36582, 36588, 36511, 36449, 36292, 36151, 36083, 36044, 36013, 35920, 35825, 35891, 35911, 35849, 35880, 35856, 35861, 35886, 36002, 35969, 36024, 35957, 36083, 36233, 36281, 36487, 36516, 36539, 36576, 36592, 36625, 36661, 36668, 36652, 36603, 36657, 36662, 36610, 36631, 36527, 36612, 36583, 36514, 36493, 36556, 36511, 36505, 36530, 36484, 36511, 36498, 36560, 36553, 36539, 36509, 36483, 36474, 36432, 36532, 36467, 36398, 36384, 36254, 36244, 36152, 36062, 35979, 35907, 35804, 35818, 35751, 35755, 35629, 35677, 35623, 35604, 35617, 35531, 35583, 35497, 35576, 35538, 35542, 35520, 35527, 35514, 35481, 35507, 35468, 35447, 35491, 35404, 35445, 35478, 35457, 35481, 35442, 35409, 35433, 35500, 35478, 35531, 35507, 35513, 35528, 35527, 35576, 35596, 35603, 35584, 35632, 35701, 35681, 35611, 35687, 35627, 35715, 35680, 35687, 35648, 35589, 35466, 35486, 35510, 35325, 35253, 35242, 35166, 35186, 35154, 35055, 35035, 35013, 35047, 34969, 35016, 34954, 35003, 34954, 34864, 34913, 34954, 34920, 34934, 34887, 34905, 34880, 34975, 34816, 34916, 34890, 34887, 34886, 34862, 34853, 34927, 34855, 34939, 34844, 34838, 34819, 34863, 34924, 34884, 34934, 34935, 34873, 34981, 34940, 34971, 34935, 34975, 34983, 34975, 34995, 34951, 35002, 34990, 34963, 34958, 34945, 34907, 34786, 34752, 34708, 34650, 34617, 34531, 34512, 34459, 34390, 34443, 34358, 34415, 34370, 34377,
- 34471, 34405, 34405, 34374, 34446, 34388, 34400, 34463, 34404, 34470, 34415, 34460, 34457, 34435, 34466, 34409, 34388, 34438, 34373, 34507, 34477, 34429, 34472, 34467, 34472, 34436, 34535, 34535, 34532, 34646, 34596, 34608, 34653, 34629, 34732, 34629, 34744, 34689, 34787, 34730, 34737, 34832, 34712, 34733, 34681, 34741, 34590, 34425, 34522, 34326, 34296, 34335, 34240, 34258, 34228, 34313, 34237, 34191, 34204, 34229, 34263, 34263, 34224, 34299, 34266, 34286, 34278, 34343, 34308, 34298, 34270, 34276, 34337, 34281, 34355, 34276, 34349, 34284, 34302, 34333, 34290, 34405, 34341, 34406, 34363, 34389, 34365, 34375, 34406, 34430, 34430, 34494, 34459, 34441, 34522, 34617, 34514, 34526, 34619, 34555, 34607, 34490, 34487, 34467, 34372, 34360, 34182, 34222, 34154, 34105, 34064, 34007, 34034, 33961, 33972, 33966, 34005, 33892, 33904, 33980, 33935, 33999, 33959, 34000, 33994, 33975, 33941, 33940, 34020, 33924, 33937, 33952, 33982, 34024, 34002, 33950, 33984, 34007, 34002, 33980, 34035, 34018, 34075, 34040, 34047, 34062, 34063, 34183, 34082, 34222, 34090, 34189, 34199, 34151, 34240, 34198, 34160, 34190, 34131, 34239, 34153, 34080, 33964, 33888, 33871, 33808, 33767, 33818, 33727, 33705, 33637, 33718, 33687, 33687, 33711, 33660, 33724, 33641, 33694, 33736, 33702, 33791, 33798, 33750, 33842, 33783, 33886, 33889, 33839, 33838, 33784, 33825, 33855, 33813, 33879, 33855, 33814, 33866, 33819, 33911, 33840, 33933, 33883, 34014, 33981, 33926, 34026, 34056, 34053, 34020, 34016, 34102, 34065, 34103, 34028, 34129, 34077, 34018, 34078, 33972, 33891, 33933, 33837, 33747, 33758, 33758, 33695, 33602, 33649, 33576, 33561, 33562, 33541, 33618, 33554, 33607, 33564, 33588, 33638, 33678, 33627, 33696, 33668, 33651, 33694, 33729, 33690, 33800, 33708, 33704, 33764, 33709, 33758, 33747, 33757, 33732, 33826, 33818, 33811, 33880, 33852, 33895, 33903, 33891, 33927, 33927, 33942, 33985, 33957, 34111, 34042, 34099, 34080, 34027, 34047, 34029, 33989, 33955, 33828, 33821, 33739, 33774, 33687, 33630, 33586, 33576, 33640, 33548, 33503, 33571, 33540, 33600, 33564, 33498, 33554, 33549, 33582, 33618, 33592, 33656, 33627, 33685, 33674, 33634, 33641, 33627, 33670, 33672, 33620, 33709, 33655, 33683, 33616, 33665, 33724, 33693, 33724, 33777, 33739, 33862, 33853, 33852, 33942, 33878, 33980, 33944, 33905, 33912, 33927, 34003, 33922, 33973, 33796, 33800, 33879, 33785, 33719, 33638, 33641, 33536, 33525, 33522, 33440, 33415, 33455, 33396, 33374, 33387, 33329, 33358, 33357, 33365, 33359, 33325, 33363, 33409, 33409, 33408, 33423, 33465, 33368, 33387, 33454, 33425, 33451, 33421, 33428, 33430, 33452, 33514, 33433, 33501, 33465, 33503, 33470, 33489, 33538, 33507, 33525, 33527, 33481, 33575, 33601, 33601, 33633, 33641, 33694, 33681, 33682, 33645, 33594, 33639, 33561, 33502, 33471, 33294, 33345, 33247, 33174, 33127, 33076, 33104, 32995, 33026, 33044, 33036, 33007, 32896, 33009, 32989, 33036, 33038, 32943, 33078, 33050, 33073, 33071, 33070, 33114, 33041, 33120, 33068, 33107, 33088, 33053, 33112, 33111, 33079, 33114, 33090, 33231, 33091, 33199, 33205, 33189, 33281, 33230, 33296, 33303, 33302, 33387, 33368, 33333, 33374, 33384, 33369, 33397, 33502, 33438, 33387, 33343, 33284, 33228, 33132, 33130, 33092, 33011, 33033, 32906, 32940, 32913, 32908, 32932, 32882, 32807, 32897, 32870, 32886, 32867, 32857, 32863, 32879, 32910, 32920, 32936, 32906, 32944, 32925, 32910, 32961, 32940, 32935, 32998, 32959, 32943, 33042, 33035, 32993, 32961, 33029, 33036, 33044, 33141, 33114, 33152, 33104, 33141, 33215, 33086, 33211, 33269, 33233, 33313, 33230, 33274, 33263, 33246, 33306, 33274, 33245, 33268, 33112, 33191, 32904, 32995, 32908, 32777, 32816, 32710, 32765, 32709, 32732, 32708, 32658, 32659, 32694, 32700, 32719, 32696, 32752, 32762, 32732, 32772, 32788, 32823, 32857, 32846, 32876, 32869, 32866, 32830, 32763, 32887, 32770, 32815, 32821, 32816, 32854, 32880, 32930, 32988, 32916, 32957, 32987, 32992, 33033, 33007, 33074, 33094, 33073, 33164, 33132, 33178, 33115, 33212, 33265, 33130, 33145, 33215, 33194, 33227, 33113, 33102, 33081, 33045, 32971, 32910, 32887, 32765, 32744, 32774, 32646, 32668, 32663, 32711, 32722, 32569, 32650, 32703, 32711, 32752, 32698, 32730, 32736, 32734, 32683, 32643, 32777, 32694, 32696, 32697, 32677, 32709, 32691, 32791, 32733, 32714, 32807, 32717, 32754, 32699, 32777, 32813, 32778, 32820, 32813, 32812, 32903, 32829, 32872, 32867, 32881, 32987, 32897, 33000, 32958, 32989, 33017, 32951, 33053, 32925, 32889, 32820, 32684, 32740, 32595, 32661, 32525, 32553, 32521, 32495, 32462, 32396, 32420, 32420, 32429, 32461, 32438, 32484, 32446, 32433, 32505, 32500, 32603, 32452, 32548, 32569, 32469, 32521, 32491, 32509, 32456, 32465, 32564, 32478, 32572, 32574, 32508, 32576, 32607, 32581, 32628, 32583, 32634, 32603, 32727, 32701, 32660, 32742, 32716, 32771, 32780, 32770, 32802, 32764, 32832, 32803, 32822, 32771, 32695, 32763, 32581, 32563, 32515, 32497, 32428, 32325, 32404, 32346, 32295, 32369, 32343, 32316, 32388, 32288, 32360, 32335, 32371, 32471, 32324, 32427, 32447, 32540, 32433, 32407, 32444, 32394, 32517, 32422, 32481, 32502, 32474, 32507, 32529, 32585, 32552, 32518, 32647, 32579, 32585, 32616, 32650, 32676, 32704, 32688, 32727, 32743, 32766, 32756, 32846, 32807, 32863, 32891, 32922, 32868, 32902, 32917, 32854, 32885, 32837, 32734, 32772, 32691, 32720, 32644, 32599, 32596, 32580, 32544, 32499, 32534, 32493, 32529, 32595, 32607, 32693, 32570, 32614, 32651, 32662, 32711, 32644, 32754, 32750, 32687, 32772, 32746, 32803, 32768, 32780, 32803, 32818, 32784, 32765, 32854, 32919, 32899, 32906, 32905, 32986, 32935, 32968, 33007, 32990, 33055, 33038, 33063, 33128, 33099, 33198, 33129, 33179, 33184, 33226, 33267, 33141, 33228, 33170, 33204, 33101, 33023, 33018, 32911, 32953, 32854, 32816, 32859, 32796, 32811, 32784, 32807, 32875, 32803, 32939, 32894, 32902, 32884, 32886, 32943, 32954, 33033, 32976, 32985, 32990, 33012, 33057, 32990, 32976, 33038, 33013, 33045, 32994, 33027, 33021, 33127, 33090, 33133, 33188, 33105, 33252, 33230, 33146, 33199, 33213, 33294, 33340, 33334, 33308, 33323, 33317, 33380, 33353, 33467, 33392, 33450, 33345, 33330, 33303, 33204, 33217, 33078, 33187, 33123, 33075, 33015, 33008, 33020, 32975, 32995, 33070, 33058, 33086, 33030, 33169, 33038, 33128, 33176, 33064, 33092, 33135, 33149, 33116, 33101, 33196, 33114, 33233, 33211, 33182, 33176, 33205, 33260, 33218, 33264, 33281, 33298, 33279, 33298, 33320, 33351, 33358, 33352, 33375, 33412, 33414, 33457, 33334, 33474, 33536, 33498, 33583, 33443, 33504, 33440, 33486, 33394, 33345, 33300, 33211, 33190, 33184, 33070, 33152, 33019, 33129, 33053, 33088, 33043, 33150, 33141, 32998, 33120, 33143, 33160, 33142, 33126, 33208, 33200, 33147, 33271, 33182, 33282, 33231, 33240, 33158, 33206, 33251, 33159, 33282, 33243, 33319, 33308, 33280, 33376, 33300, 33376, 33423, 33447, 33461, 33422, 33480, 33501, 33501, 33425, 33572, 33590, 33525, 33637, 33621, 33667, 33621, 33622, 33565, 33559, 33570, 33503, 33491, 33421, 33317, 33392, 33363, 33338, 33353, 33386, 33429, 33394, 33443, 33393, 33468, 33433, 33538, 33553, 33521, 33640, 33615, 33630, 33606, 33622, 33725, 33650, 33679, 33660, 33732, 33755, 33701, 33815, 33693, 33785, 33856, 33771, 33798, 33874, 33862, 33857, 33901, 33864, 33916, 33976, 33959, 34024, 33965, 33972, 34052, 34019, 34109, 34107, 34169, 34169, 34122, 34098, 34100, 34029, 34026, 33964, 33959, 33843, 33814, 33761, 33694, 33720, 33698, 33679, 33660, 33704, 33655, 33617, 33673, 33652, 33661, 33745, 33684, 33671, 33640, 33672, 33717, 33715, 33688, 33740, 33738, 33711, 33702, 33705, 33785, 33715, 33679, 33771, 33766, 33891, 33778, 33822, 33774, 33813, 33927, 33853, 33930, 33918, 33986, 33951, 33918, 34033, 34002, 34122, 34070, 34151, 34155, 34066, 34181, 34126, 34120, 34042, 34000, 33972, 33963, 33843, 33802, 33745, 33703, 33718, 33668, 33651, 33628, 33596, 33638, 33633, 33626, 33652, 33603, 33649, 33640, 33700, 33700, 33727, 33744, 33698, 33785, 33780, 33677, 33840, 33734, 33817, 33779, 33842, 33795, 33838, 33872, 33829, 33909, 33882, 33945, 33996, 33901, 33997, 33951, 33943, 33996, 33956, 34083, 34030, 34040, 34062, 34044, 34134, 34133, 34233, 34169, 34208, 34174, 34177, 34152, 34103, 34032, 33903, 33899, 33923, 33822, 33767, 33715, 33722, 33642, 33613, 33635, 33546, 33565, 33634, 33545, 33619, 33601, 33721, 33648, 33626, 33661, 33660, 33700, 33715, 33706, 33726, 33723, 33743, 33700, 33722, 33768, 33720, 33796, 33730, 33767, 33701, 33780, 33764, 33825, 33773, 33844, 33823, 33838, 33860, 33917, 33898, 33826, 33929, 33934, 33933, 33979, 33995, 34009, 34017, 33937, 34028, 34008, 34041, 33939, 33874, 33811, 33729, 33695, 33683, 33606, 33569, 33501, 33503, 33563, 33446, 33517, 33417, 33421, 33401, 33433, 33396, 33430, 33476, 33555, 33571, 33615, 33520, 33603, 33539, 33538, 33596, 33583, 33592, 33556, 33547, 33603, 33514, 33614, 33611, 33542, 33681, 33589, 33652, 33591, 33706, 33742, 33728, 33773, 33786, 33766, 33794, 33830, 33875, 33853, 33889, 33903, 33944, 34007, 33969, 33963, 34010, 33928, 33956, 33823, 33837, 33756, 33729, 33732, 33632, 33641, 33659, 33700, 33631, 33587, 33624, 33669, 33666, 33611, 33620, 33650, 33641, 33732, 33801, 33723, 33831, 33727, 33771, 33811, 33756, 33783, 33783, 33825, 33876, 33867, 33865, 33922, 34002, 33914, 34009, 34022, 33991, 34074, 34095, 34137, 34108, 34189, 34247, 34195, 34290, 34325, 34292, 34347, 34382, 34406, 34434, 34383, 34468, 34467, 34522, 34496, 34404, 34388, 34384, 34255, 34196, 34111, 34063, 33942, 33933, 33912, 33841, 33897, 33795, 33751, 33840, 33771, 33769, 33740, 33764, 33864, 33910, 33889, 33887, 33877, 33948, 33909, 34030, 33984, 34042, 33999, 34051, 34033, 34015, 34041, 34096, 34125, 34163, 34128, 34183, 34148, 34159, 34223, 34200, 34244, 34231, 34309, 34318, 34281, 34312, 34378, 34434, 34419, 34415, 34405, 34426, 34418, 34440, 34429, 34422, 34369, 34317, 34340, 34210, 34251, 34218, 34121, 34101, 34099, 34036, 34088, 34076, 34035, 34006, 34020, 34181, 34022, 34161, 34147, 34179, 34170, 34247, 34291, 34262, 34287, 34307, 34291, 34337, 34354, 34288, 34321, 34375, 34412, 34426,
- 34469, 34480, 34492, 34556, 34514, 34524, 34570, 34581, 34610, 34713, 34640, 34753, 34799, 34841, 34824, 34808, 34876, 34860, 34972, 34917, 34968, 35030, 34979, 34953, 34933, 34887, 34913, 34901, 34889, 34776, 34754, 34716, 34679, 34627, 34585, 34564, 34619, 34617, 34585, 34609, 34666, 34683, 34663, 34648, 34825, 34701, 34812, 34796, 34834, 34931, 34904, 34879, 34784, 34952, 34859, 34855, 35025, 34966, 34940, 35017, 35021, 35064, 35072, 35160, 35123, 35145, 35192, 35129, 35201, 35249, 35235, 35337, 35290, 35372, 35329, 35314, 35417, 35464, 35461, 35466, 35409, 35521, 35491, 35390, 35418, 35423, 35378, 35298, 35303, 35240, 35197, 35161, 35158, 35206, 35199, 35204, 35167, 35115, 35242, 35170, 35169, 35194, 35248, 35291, 35269, 35302, 35388, 35405, 35370, 35413, 35445, 35470, 35494, 35500, 35524, 35485, 35469, 35481, 35521, 35568, 35516, 35661, 35600, 35588, 35715, 35707, 35753, 35711, 35807, 35868, 35838, 35950, 35902, 35961, 35955, 36014, 36042, 36054, 36159, 36109, 36136, 36177, 36139, 36130, 36054, 36059, 35928, 35981, 35957, 35889, 35870, 35787, 35733, 35776, 35717, 35755, 35728, 35755, 35682, 35675, 35733, 35702, 35705, 35678, 35815, 35748, 35721, 35750, 35772, 35819, 35803, 35807, 35853, 35814, 35877, 35822, 35926, 35867, 35890, 35962, 35852, 35970, 35962, 36005, 36026, 36046, 36073, 36050, 36128, 36156, 36184, 36230, 36193, 36230, 36279, 36311, 36333, 36309, 36460, 36445, 36445, 36462, 36377, 36520, 36446, 36449, 36324, 36260, 36236, 36118, 36144, 36177, 36080, 36124, 36045, 36100, 36021, 36109, 36064, 35997, 36014, 36047, 36002, 36041, 36058, 36030, 35990, 36056, 35987, 36056, 36044, 36072, 36043, 36024, 36097, 36018, 36044, 36045, 36033, 36044, 36061, 36040, 36094, 36147, 36068, 36117, 36185, 36212, 36261, 36228, 36276, 36314, 36280, 36315, 36351, 36411, 36509, 36443, 36477, 36505, 36587, 36579, 36639, 36669, 36625, 36730, 36651, 36680, 36586, 36498, 36522, 36416, 36455, 36452, 36413, 36472, 36446, 36459, 36484, 36454, 36470, 36476, 36488, 36506, 36435, 36542, 36471, 36539, 36603, 36610, 36655, 36639, 36674, 36690, 36664, 36754, 36804, 36755, 36832, 36907, 36963, 36986, 37078, 37100, 37098, 37198, 37166, 37194, 37189, 37220, 37271, 37313, 37303, 37364, 37368, 37443
- ]
- let aa = ''
- ipcMain.on('asynchronoushrv-message', function (event, arg) {
- // console.log(arg) // prints "ping"
- let rawData = arg
- client.get_hrv_features(rawData, 0.5, 4.5, 100, function (err, res) {
- if (err) {
- console.log(err)
- }
- console.log(res)
- aa = res
- // eslint-disable-next-line eol-last
- mainWindow.webContents.send('send-message-to-render-hrv', aa)
- })
- // 返回值后向渲染进程传输数据
- // eslint-disable-next-line eol-last
- })
- let pluseAll = ''
- ipcMain.on('asynchronoushrv-message-pluseAll', function (event, arg) {
- // console.log(arg) // prints "ping"
- let rawData = arg
- client.get_hrv_features(rawData, 0.5, 4.5, 100, function (err, res) {
- if (err) {
- console.log(err)
- }
- console.log(res)
- pluseAll = res
- // eslint-disable-next-line eol-last
- mainWindow.webContents.send('send-message-to-render-hrv-pluseAll', pluseAll)
- })
- // 返回值后向渲染进程传输数据
- // eslint-disable-next-line eol-last
- })
- //测试脉搏时传输的数据
- ipcMain.on('asynchronoushrv-message-pluse-realtime', function (event, arg) {
- let pluse = ''
- // console.log(arg) // prints "ping"
- let rawData = arg
- client.get_hrv_features(rawData, 0.5, 4.5, 100, function (err, res) {
- if (err) {
- console.log(err)
- }
- console.log(res)
- pluse = res
- // eslint-disable-next-line eol-last
- mainWindow.webContents.send('send-message-to-render-hrv-realtime', pluse)
- })
- // 返回值后向渲染进程传输数据
- // eslint-disable-next-line eol-last
- })
- // 得到发来的指令 然后传输数据
- let bb = ''
- ipcMain.on('asynchronoushrv-filter_signal', function (event, arg) {
- console.warn('滤波返回事件')
- let rawData = arg
- client.filter_signal(rawData, [0.5, 4.5], 'bandpass', 100, 3, false, function (err, res) {
- if (err) {
- console.log(err)
- }
- bb = res
- console.log('滤波返回事件')
- mainWindow.webContents.send('send-message-to-render-pluse', bb)
- })
- })
- ipcMain.on('window-min', function () {
- mainWindow.minimize();
- })
- ipcMain.on('window-max', function () {
- if (mainWindow.isMaximized()) {
- mainWindow.restore();
- } else {
- mainWindow.maximize();
- }
- })
- //退出程序
- function stopPid(syncData) {
- const cmd = require("node-cmd");
- let a = syncData.data.split("TCP");
- let b = a[1].split("LISTENING");
- let pid = b[1].trim();
- console.log("taskkill -pid " + pid + " -f");
- cmd.runSync("taskkill -pid " + pid + " -f");
- }
- ipcMain.on('window-close', function () {
- if (process.platform !== 'darwin') {
- //退出时关闭端口50300
- let syncData = cmd.runSync("netstat -ano|findstr 50300");
- //在的话判断是不是已经启动了是不是listening
- if (syncData.data != null) {
- if (syncData.data.includes("LISTENING")) {
- stopPid(syncData)
- }
- }
- wssSwitch = false
- cmd.runSync('taskkill /f /im javaw.exe')
- app.quit()
- }
- // mainWindow.close();
- })
- // 获取到com端口
- // eslint-disable-next-line space-before-function-paren
- //
- ipcMain.on('asynchronoushrv-listcom', function (event, arg) {
- console.log(arg)
- // console.log(arg) // prints "ping"
- console.log('来通知主进程了')
- if (arg == 'aa') {
- getComList()
- } else {
- portName = arg
- console.log('串口选择发过来了')
- // creatSerialPort()
- openEEG(creatEEG())
- }
- })
- ipcMain.on('asynchronoushrv-naoData', function (event, arg) {
- let data = arg;
- let buf=Buffer.from(data,'hex')
- // let buf= hex2ArrayBuffer(data);
- // var array = ['1a', '2b', '3c', '4d', '5e', '6f']
- // var hex_array = array.map(el => parseInt(el, 16))
- // var uarray = new Uint8Array(hex_array)
- // var buf = Buffer.from(data)
- console.log(buf)
- // console.log('来通知主进程了')
- //进到这里边
- buf.forEach(q => {
- ring.enq(q)
- handleByte(q)
- })
- })
- // function hex2ArrayBuffer(hex_str) {
- // // let hex_str = 'AA5504B10000B5'
- // let typedArray = new Uint8Array(hex_str.match(/[\da-f]{2}/gi).map(function (h) {
- // return parseInt(h, 16)
- // }))
- // let buffer = typedArray.buffer
- // return buffer
- // }
- // ipcMain.on('asynchronousselect-message123', function (event, arg) {
- // // console.log(arg) // prints "ping"
- // console.log("串口选择发过来了");
- // portName = arg
- // creatSerialPort()
- // serialPortOpen(serialPort)
- // // 回应同步消息
- // })
- function creatEEG() {
- // 创建
- if (serialPort) {
- if (serialPort.isOpen) {
- serialPort.close()
- }
- }
- serialPort = new SerialPort(portName, {
- // 波特率
- baudRate: 115200,
- autoOpen: false,
- dataBits: 8, // 数据位
- parity: 'none', // 奇偶校验
- stopBits: 1, // 停止位
- flowControl: false
- }, false)
- return serialPort
- }
- function openEEG(serialPort) {
- serialPort.open(function (error) {
- if (error) {
- console.log('打开端口' + portName + '错误' + error)
- } else {
- console.log('打开端口成功,正在监听数据中')
- serialPort.on('data', function (data) {
- // console.log(data)
- data.forEach(q => {
- ring.enq(q)
- handleByte(q)
- })
- })
- }
- })
- }
- function handleByte() {
- let parseList
- if (ring.size() >= bigPackageLen) {
- const arr = ring.peekN(3)
- if (arr[0] !== 0xaa || arr[1] !== 0xaa) {
- ring.deq()
- } else {
- if (arr[2] === 0x04) {
- parseList = ring.deqN(smallPackageLen)
- } else {
- parseList = ring.deqN(bigPackageLen)
- }
- const temp = new Buffer(parseList)
- decodeByte(temp)
- // console.log(parseList)
- }
- }
- }
- function decodeByte(temp) {
- const utcTime = getUtcTime()
- // console.log(temp)
- const map = new Map()
- // map.set("utcTime",utcTime)
- // 判断大小包
- if (temp.length === smallPackageLen) { // 先校验再计算rawWaveData
- if (byteSumCheck(temp)) {
- const rawWaveData = getRawWaveValue(temp[5], temp[6])
- map.set('rawWaveData', rawWaveData)
- }
- } else {
- if (byteSumCheck(temp)) {
- // console.log(temp)
- map.set('Signal', temp.readUInt8(4))
- map.set('Delta', temp.readUInt8(7) * 256 * 256 + temp.readUInt8(8) * 256 + temp.readUInt8(9))
- map.set('Theta', temp.readUInt8(10) * 256 * 256 + temp.readUInt8(11) * 256 + temp.readUInt8(12))
- map.set('LowAlpha', temp.readUInt8(13) * 256 * 256 + temp.readUInt8(14) * 256 + temp.readUInt8(15))
- map.set('HighAlpha', temp.readUInt8(16) * 256 * 256 + temp.readUInt8(17) * 256 + temp.readUInt8(18))
- map.set('LowBeta', temp.readUInt8(19) * 256 * 256 + temp.readUInt8(20) * 256 + temp.readUInt8(21))
- map.set('HighBeta', temp.readUInt8(22) * 256 * 256 + temp.readUInt8(23) * 256 + temp.readUInt8(24))
- map.set('LowGamma', temp.readUInt8(25) * 256 * 256 + temp.readUInt8(26) * 256 + temp.readUInt8(27))
- map.set('MiddleGamma', temp.readUInt8(28) * 256 * 256 + temp.readUInt8(29) * 256 + temp.readUInt8(30))
- map.set('Attention', temp.readUInt8(32))
- map.set('Meditation', temp.readUInt8(34))
- }
- }
- // console.log(map.size)
- for (const [key, value] of map) {
- // console.log(key + ' ============ ' + value)
- }
- mainWindow.webContents.send('accelerationData-message', map)
- return map
- }
- function getRawWaveValue(highOrderByte, lowOrderByte) {
- const hi = highOrderByte
- const lo = lowOrderByte & 0xFF
- let value = (hi << 8) | lo
- if (value > 32768) {
- value = value - 65536
- }
- return value
- }
- // 检查校验和aa aa 04 80 02 ff f8 86sum = ((0x80 + 0x02 + xxHigh + xxLow)^ 0xFFFFFFFF) & 0xFF
- function byteSumCheck(byteTemp) {
- if (byteTemp.length === smallPackageLen) {
- if ((((byteTemp[3] + byteTemp[4] + byteTemp[5] + byteTemp[6]) ^ 0xffffffff) & 0xff) === byteTemp[7]) {
- // console.log('sum check ok!');
- return true
- } else {
- // console.log('sum check false!');
- return false
- }
- } else {
- if (byteTemp[0] === 0xaa && byteTemp[1] === 0xaa && byteTemp[2] === 0x20 && byteTemp[3] === 0x02 &&
- byteTemp[5] === 0x83 && byteTemp[6] === 0x18 && byteTemp[31] === 0x04 && byteTemp[33] === 0x05) {
- return true
- } else {
- return false
- }
- }
- }
- // 获取到com端口
- SerialPort.list().then(ports => {
- ports.forEach(function (port) {
- console.log(port.path)
- // console.log(port.pnpId);
- })
- })
- // 获取到格林尼治时间
- function getUtcTime() {
- // 取本地时间
- let localtime = new Date()
- // 取本地毫秒数
- let localmesc = localtime.getTime()
- // 取本地时区与格林尼治所在时区的偏差毫秒数
- let localOffset = localtime.getTimezoneOffset() * 60000
- // 反推得到格林尼治时间
- let utc = localOffset + localmesc
- // 得到指定时区时间
- // let calctime = utc + (3600000 * offset);
- return utc
- };
- ipcMain.on('asynchronoushrv-controlpanel', function (event, arg) {
- // console.log(arg) // prints "ping"
- mainWindow.webContents.send('send-message-control', process.cwd())
- // 回应同步消息
- })
- //------------------------是否需要初始化数据库------------------------------//
- function dbInit() {
- let syncData = null;
- syncData = cmd.runSync('sc query ct')
- if (syncData.data == null) {
- //cmd.runSync('powershell.exe Start-Process -FilePath "./resources/exe/mysql/mysql-5.7.24-winx64/bin/mysql_init.bat" -WindowStyle Hidden -Verb runAs')
- let dbInitScript = 'powershell.exe Start-Process -FilePath "' + serveUrl + '/mysql/mysql-5.7.24-winx64/bin/mysql_init.bat" -WindowStyle Hidden -Verb runAs'
- cmd.runSync(dbInitScript)
- do {
- syncData = cmd.runSync('sc query ct')
- // console.log("数据库服务正在初始化")
- } while (syncData.data == null)
- } else {
- // console.log("数据库初始化完成")
- }
- loadingWindow.webContents.send('main-windows-python-exe-run', {
- type: "dbInit",
- })
- // console.log("数据库初始化完成")
- }
- // //在这里等三秒
- function sleep(delay) {
- for (var t = Date.now(); Date.now() - t <= delay;);
- }
- // // 调用方法,同步执行,阻塞后续程序的执行;
- // sleep(2000)
- // console.log("数据库服务初始化完成")
- // //要设置启动项目时需要启动jar包,和nginx服务
- // //假如数据库已初始化完成
- // //则启动jar包
- function execute_path(cmd, id, path) {
- var exec = require("child_process").exec;
- // var iconv = request('iconv-lite')
- // var encoding ='cp936'
- var binaryEncoding = "utf-8";
- let _this = this;
- exec(cmd, { cwd: path, windowsHide: true }, function (error, stdout, stderr) {
- if (error) {
- //_this.judge_false(id);
- console.log(error);
- } else {
- console.log(id + ": success");
- }
- });
- }
- function execute(cmd, id) {
- var exec = require("child_process").exec;
- let _this = this;
- exec(cmd, function (error, stdout, stderr) {
- if (error) {
- console.log(error + "错误");
- //return stderr;
- } else {
- console.log("" + stdout.toString());
- //return stdout;
- }
- });
- }
- //------------------------需要启动数据库服务-------------------------//
- function startDb() {
- let syncDataDb = null;
- syncDataDb = cmd.runSync('sc query ct')
- if (!(syncDataDb.data.includes("RUNNING"))) {
- execute(
- "powershell -Command \"Start-Process cmd -Verb RunAs -ArgumentList '/c net start ct && command -argument'\"",
- 1
- );
- do {
- syncDataDb = cmd.runSync('sc query ct')
- } while (!(syncDataDb.data.includes("RUNNING")))
- } else {
- }
- loadingWindow.webContents.send('main-windows-python-exe-run', {
- type: "startDb",
- })
- }
- //startDb()
- // //数据库启动完成后
- //---------------------------需要启动jar包-------------------------//
- function startJar() {
- let syncDataJar = null;
- syncDataJar = cmd.runSync("netstat -ano|findstr 8088");
- console.log(syncDataJar)
- //先判断是否已启动后台,假如已启动就不执行启动命令
- // "start jre/bin/javaw -Dfile.encoding=utf-8 -jar KJB-0.0.1-SNAPSHOT.jar",
- // "start jre/bin/javaw -Dfile.encoding=utf-8 -jar psychic_camera-v1.0.jar --spring.profiles.active=lan",
- if (syncDataJar.data == null) {
- execute_path(
- "start jre/bin/javaw -Dfile.encoding=utf-8 -jar confrontation-training-java-0.0.1-SNAPSHOT.jar",
- 2,
- process.cwd() +
- //"\\resources\\exe\\jar"
- //"\\exe\\jar"
- serveUrlJar + "\\jar"
- );
- do {
- syncDataJar = cmd.runSync("netstat -ano|findstr 8088");
- //当返回不等于空时,说明返回有东西,不回报错,当includes中为true是说明已经启动
- } while (!((syncDataJar.data !== null) && syncDataJar.data.includes("LISTENING")))
- } else {
- //当检测端口返回不为空时,且返回的字符串里不包含LISTENing
- if (!(syncDataJar.data.includes("LISTENING"))) {
- execute_path(
- "start jre/bin/javaw -Dfile.encoding=utf-8 -jar confrontation-training-java-0.0.1-SNAPSHOT.jar",
- 2,
- process.cwd() +
- //"\\resources\\exe\\jar"
- //"\\exe\\jar"
- serveUrlJar + "\\jar"
- );
- do {
- syncDataJar = cmd.runSync("netstat -ano|findstr 8088");
- //当返回不等于空时,说明返回有东西,不回报错,当includes中为true是说明已经启动
- } while (!((syncDataJar.data !== null) && syncDataJar.data.includes("LISTENING")))
- }
- syncDataJar.data.includes("LISTENING")
- console.log("jar启动完成")
- }
- loadingWindow.webContents.send('main-windows-python-exe-run', {
- type: "startJar",
- })
- console.log("后台服务已启动");
- }
- //startJar()
- //获取本机ip
- // function getNetworkIp() {
- // var os = require("os");
- // let needHost = "";
- // try {
- // // 获得网络接口列表
- // let network = os.networkInterfaces();
- // for (let item in network) {
- // let iface = network[item];
- // for (let i = 0; i < iface.length; i++) {
- // let alias = iface[i];
- // if (
- // alias.family === "IPv4" &&
- // alias.address !== "127.0.0.1" &&
- // !alias.internal
- // ) {
- // needHost = alias.address;
- // }
- // }
- // }
- // } catch (e) {
- // console.log(e);
- // }
- // return needHost;
- // }
- //获取本机ip 改变util文件夹中的global的ip
- //获取本机ip
- function getNetworkIp() {
- var os = require("os");
- let needHost = "";
- try {
- // 获得网络接口列表
- let network = os.networkInterfaces();
- for (let item in network) {
- let iface = network[item];
- for (let i = 0; i < iface.length; i++) {
- let alias = iface[i];
- if (
- alias.family === "IPv4" &&
- alias.address !== "127.0.0.1" &&
- !alias.internal
- ) {
- needHost = alias.address;
- }
- }
- }
- } catch (e) {
- console.log(e);
- }
- return needHost;
- }
- //调用方法,改动web服务global.js
- function webGlobal() {
- let ipv4 = getNetworkIp();
- console.log(ipv4)
- ipv4 = 'localhost'
- let urlPath = process.cwd() +
- serveUrlJar + "\\global.js"
- // let urlPath = __static + "\\global.js"
- let str = "var env = {dev: 'http://" +
- ipv4 +
- ":8088/',prod: 'http://" +
- ipv4 +
- ":8088/'};export default env;";
- console.log(urlPath)
- console.log(str)
- fs.writeFile(
- urlPath,
- str,
- (error) => {
- if (error) {
- // printInfo("PC写入global文件失败,原因是" + error.message, "warn");
- return console.log("写入global文件失败,原因是" + error.message);
- } else {
- // printInfo("PC写入global文件失败,原因是", "info");
- console.log("写入成功");
- }
- }
- );
- // mainWindow.webContents.send('main-windows-python-exe-run', {
- // type: "webGlobal",
- // })
- }
- webGlobal()
- //启动docker
- function startDocker() {
- execFile("C:/nlp/nlp" + '/start1.bat', function (err, data) {
- console.log(err)
- console.log(data.toString())
- })
- }
- startDocker()
- //关闭docker
- //启动docker
- function stopDocker() {
- execFile("C:/nlp/nlp" + '/stop.bat', function (err, data) {
- console.log(err)
- console.log(data.toString())
- })
- }
- //stopDocker()
- //异步
- ipcMain.on('main-windows-python-exe', function (event, arg) {
- console.log(arg)
- console.log(arg.type)
- if (arg.type === 'exe') {
- console.log("app.vue传值了")
- //调用.exe
- setTimeout(() => {
- starServer()
- }, 2000)
- }
- if (arg.type === "dbInit") {
- dbInit()
- }
- if (arg.type === 'startDb') {
- startDb()
- }
- if (arg.type === 'startJar') {
- startJar()
- }
- if (arg.type === 'webGlobal') {
- //
- // webGlobal()
- }
- })
|