没有样式
parent
146ead33d5
commit
6fb47d8a1f
|
@ -0,0 +1,24 @@
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
|
||||||
|
}
|
|
@ -1,3 +1,7 @@
|
||||||
# iar_code
|
# Vue 3 + Vite
|
||||||
|
|
||||||
代码生成器
|
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
||||||
|
|
||||||
|
## Recommended IDE Setup
|
||||||
|
|
||||||
|
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Vite + Vue</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "iar",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"element-plus": "^2.6.1",
|
||||||
|
"sass": "^1.71.1",
|
||||||
|
"vue": "^3.4.19",
|
||||||
|
"vue-router": "^4.3.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
|
"vite": "^5.1.4"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -0,0 +1,22 @@
|
||||||
|
<script setup>
|
||||||
|
import Layout from './layout/Layout.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Layout />
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.logo {
|
||||||
|
height: 6em;
|
||||||
|
padding: 1.5em;
|
||||||
|
will-change: filter;
|
||||||
|
transition: filter 300ms;
|
||||||
|
}
|
||||||
|
.logo:hover {
|
||||||
|
filter: drop-shadow(0 0 2em #646cffaa);
|
||||||
|
}
|
||||||
|
.logo.vue:hover {
|
||||||
|
filter: drop-shadow(0 0 2em #42b883aa);
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
After Width: | Height: | Size: 496 B |
|
@ -0,0 +1,40 @@
|
||||||
|
<script setup>
|
||||||
|
import { ref } from 'vue'
|
||||||
|
|
||||||
|
defineProps({
|
||||||
|
msg: String,
|
||||||
|
})
|
||||||
|
|
||||||
|
const count = ref(0)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<h1>{{ msg }}</h1>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<button type="button" @click="count++">count is {{ count }}</button>
|
||||||
|
<p>
|
||||||
|
Edit
|
||||||
|
<code>components/HelloWorld.vue</code> to test HMR
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Check out
|
||||||
|
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
|
||||||
|
>create-vue</a
|
||||||
|
>, the official Vue + Vite starter
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Install
|
||||||
|
<a href="https://github.com/vuejs/language-tools" target="_blank">Volar</a>
|
||||||
|
in your IDE for a better DX
|
||||||
|
</p>
|
||||||
|
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.read-the-docs {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,83 @@
|
||||||
|
export const DEVICE_MODEL = {
|
||||||
|
X10: 'BANKMGMTDEF_FLAVOR_AM_X10',
|
||||||
|
X45R8: 'BANKMGMTDEF_FLAVOR_AM_X45R',
|
||||||
|
X45RA: 'BANKMGMTDEF_FLAVOR_AM_X45R',
|
||||||
|
X47: 'BANKMGMTDEF_FLAVOR_AM_X47',
|
||||||
|
X45B: 'BANKMGMTDEF_FLAVOR_AM_X45B',
|
||||||
|
E527: 'BANKMGMTDEF_FLAVOR_AM_E527_4G',
|
||||||
|
E528: 'BANKMGMTDEF_FLAVOR_AM_E528_4G',
|
||||||
|
};
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_E528_4G 0x08000000
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_E527_4G 0x08000001
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_GS528_4G 0x08000002
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_X47 0x08000003
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_X10 0x08000004
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_X45R 0x08000005
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_X45B 0x08000006
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_EVORA_P564 0x08000007
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_EVORA_MB 0x08000008
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_EVORA_NL 0x08000009
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_MCM7 0x0800000A
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_MCM8 0x0800000B
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_TBL35 0x0800000D
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_MODEVA_GANG1 0x0800000E
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_MODEVA_GANG2 0x0800000F
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_MODEVA_GANG3 0x08000010
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_TBL70_GANG3 0x08000011
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_BG_MODEVA 0x08000016
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_PC502_4G 0x08000020
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_D454_FET 0x08000021
|
||||||
|
//#define BANKMGMTDEF_FLAVOR_AM_D454_TRIAC 0x08000022
|
||||||
|
|
||||||
|
export const DefaultValue = {
|
||||||
|
NormallyOpen: 0x02,
|
||||||
|
NormallyClose: 0x82,
|
||||||
|
}
|
||||||
|
export function NEW_DIGITAL_INTPUT(PinID) {
|
||||||
|
return {
|
||||||
|
Pin: PinID,
|
||||||
|
Func: "Null",
|
||||||
|
P5Addr: 0,
|
||||||
|
ConfFlags: DefaultValue.NormallyOpen,
|
||||||
|
Options: 0x00,
|
||||||
|
LightScene: {
|
||||||
|
Name: 'SmartCircuitToggle',
|
||||||
|
SuiteID: 0,
|
||||||
|
SceneID: 0,
|
||||||
|
LogicalCircuitID: 0,
|
||||||
|
GuideID: 0,
|
||||||
|
RotateSceneCnt: 2,
|
||||||
|
RotateSceneID: [0, 1, 2, 3]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DIGITAL_INTPUT_FUNCTION = {
|
||||||
|
Null: "空",
|
||||||
|
LightScene: "灯光场景",
|
||||||
|
EntryDoor: "房门门磁",
|
||||||
|
RingBell: "门铃按钮",
|
||||||
|
PIR_MotionSensor: "红外信号",
|
||||||
|
WindowBalcony: "阳台窗磁",
|
||||||
|
SmokeSensor: "烟感信号",
|
||||||
|
MinBarDoor: "迷你吧门磁",
|
||||||
|
KeyTagSensor: "插卡信号",
|
||||||
|
CommonDoor: "公共门门磁",
|
||||||
|
ConnectingDoor: "连通门门磁",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const DIGITAL_INTPUT_LIGHT_SCENE = {
|
||||||
|
LightsAllOn_Room: "灯光全开",
|
||||||
|
LightsAllOff_Room: "灯光全关",
|
||||||
|
LightsAllOn_Suite: "套房灯光全开",
|
||||||
|
LightsAllOff_Suite: "套房灯光全关",
|
||||||
|
DimSet: "调光设定",
|
||||||
|
DimToggle: "调光切换",
|
||||||
|
LightCtr: "灯光控制",
|
||||||
|
LightSceneClear: "灯光场景清除",
|
||||||
|
LightSceneSet: "灯光场景设定",
|
||||||
|
SceneClear: "场景清除",
|
||||||
|
SmartCircuitToggle: "智能回路切换",
|
||||||
|
SmartSceneRotate: "智能场景循环",
|
||||||
|
SmartSceneToggle: "智能场景切换",
|
||||||
|
};
|
|
@ -0,0 +1,33 @@
|
||||||
|
<template>
|
||||||
|
设备型号
|
||||||
|
<el-menu default-active=1 @select="handleSelect">
|
||||||
|
<el-menu-item index=1>
|
||||||
|
<el-icon>
|
||||||
|
<Cpu />
|
||||||
|
</el-icon>
|
||||||
|
<span>X10</span>
|
||||||
|
</el-menu-item>
|
||||||
|
<el-menu-item index=2>
|
||||||
|
<el-icon>
|
||||||
|
<Cpu />
|
||||||
|
</el-icon>
|
||||||
|
<span>X45R8</span>
|
||||||
|
</el-menu-item>
|
||||||
|
<el-menu-item index=3>
|
||||||
|
<el-icon>
|
||||||
|
<Cpu />
|
||||||
|
</el-icon>
|
||||||
|
<span>X45RA</span>
|
||||||
|
</el-menu-item>
|
||||||
|
</el-menu>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { Cpu } from '@element-plus/icons-vue';
|
||||||
|
import { useRouter } from 'vue-router';
|
||||||
|
const router = useRouter();
|
||||||
|
const routeList = ['/', 'X10', 'X45R8', 'X45RA'];
|
||||||
|
const handleSelect = (index) => {
|
||||||
|
router.push(routeList[index]);
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,15 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>INNcom IAR 代码生成器</el-header>
|
||||||
|
<el-container>
|
||||||
|
<el-aside width="200px">
|
||||||
|
<Aside />
|
||||||
|
</el-aside>
|
||||||
|
<el-main><router-view /></el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import Aside from './Aside.vue'
|
||||||
|
</script>
|
|
@ -0,0 +1,14 @@
|
||||||
|
import { createApp } from 'vue'
|
||||||
|
import './style.css'
|
||||||
|
import App from './App.vue'
|
||||||
|
|
||||||
|
import ElementPlus from 'element-plus'
|
||||||
|
import 'element-plus/dist/index.css'
|
||||||
|
import router from './router'
|
||||||
|
|
||||||
|
createApp(App).use(ElementPlus).use(router).mount('#app')
|
||||||
|
// import 'highlight.js/styles/atom-one-dark.css'
|
||||||
|
// import 'highlight.js/lib/common'
|
||||||
|
// import hljsVuePlugin from '@highlightjs/vue-plugin'
|
||||||
|
|
||||||
|
// createApp(App).use(ElementPlus).use(router).use(hljsVuePlugin).mount('#app')
|
|
@ -0,0 +1,33 @@
|
||||||
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
||||||
|
import X10 from '../views/X10.vue';
|
||||||
|
import X45R8 from '../views/X45R8.vue';
|
||||||
|
import X45RA from '../views/X45RA.vue';
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{
|
||||||
|
path: '/',
|
||||||
|
redirect: '/X10'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/X10',
|
||||||
|
name: 'X10',
|
||||||
|
component: X10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/X45R8',
|
||||||
|
name: 'X45R8',
|
||||||
|
component: X45R8
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/X45RA',
|
||||||
|
name: 'X45RA',
|
||||||
|
component: X45RA
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const router = createRouter({
|
||||||
|
history: createWebHashHistory(),
|
||||||
|
routes,
|
||||||
|
})
|
||||||
|
|
||||||
|
export default router;
|
|
@ -0,0 +1,79 @@
|
||||||
|
:root {
|
||||||
|
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 400;
|
||||||
|
|
||||||
|
color-scheme: light dark;
|
||||||
|
color: rgba(255, 255, 255, 0.87);
|
||||||
|
background-color: #242424;
|
||||||
|
|
||||||
|
font-synthesis: none;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
font-weight: 500;
|
||||||
|
color: #646cff;
|
||||||
|
text-decoration: inherit;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #535bf2;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
place-items: center;
|
||||||
|
min-width: 320px;
|
||||||
|
min-height: 100vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 3.2em;
|
||||||
|
line-height: 1.1;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
border-radius: 8px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
padding: 0.6em 1.2em;
|
||||||
|
font-size: 1em;
|
||||||
|
font-weight: 500;
|
||||||
|
font-family: inherit;
|
||||||
|
background-color: #1a1a1a;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: border-color 0.25s;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
border-color: #646cff;
|
||||||
|
}
|
||||||
|
button:focus,
|
||||||
|
button:focus-visible {
|
||||||
|
outline: 4px auto -webkit-focus-ring-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
padding: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
max-width: 1280px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 2rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root {
|
||||||
|
color: #213547;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color: #747bff;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
background-color: #f9f9f9;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
<template>
|
||||||
|
<el-form :model="device">
|
||||||
|
|
||||||
|
<el-form-item label="模块地址">
|
||||||
|
<el-input-number v-model="device.ADDR" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-divider>
|
||||||
|
<el-icon><star-filled /></el-icon>
|
||||||
|
DI输入点配置
|
||||||
|
<el-icon><star-filled /></el-icon>
|
||||||
|
</el-divider>
|
||||||
|
|
||||||
|
<el-form-item v-for="(dix, key, index) in device.DIGITAL_INTPUT" :key="index" :label="key">
|
||||||
|
<el-select v-model="dix.Func">
|
||||||
|
<el-option v-for="(func_label, func_value, func_index) in DIGITAL_INTPUT_FUNCTION" :key="func_index"
|
||||||
|
:label="func_label" :value="func_value" />
|
||||||
|
</el-select>
|
||||||
|
<div v-if="dix.Func === 'RingBell'">
|
||||||
|
<el-form-item label="类型">
|
||||||
|
<el-radio-group v-model="dix.ConfFlags">
|
||||||
|
<el-radio :value="DefaultValue.NormallyOpen">常开</el-radio>
|
||||||
|
<el-radio :value="DefaultValue.NormallyClose">常闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="扩展配置">
|
||||||
|
<el-input-number v-model="dix.Options" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="dix.Func === 'CommonDoor' ||
|
||||||
|
dix.Func === 'ConnectingDoor' ||
|
||||||
|
dix.Func === 'EntryDoor' ||
|
||||||
|
dix.Func === 'KeyTagSensor' ||
|
||||||
|
dix.Func === 'MinBarDoor' ||
|
||||||
|
dix.Func === 'PIR_MotionSensor' ||
|
||||||
|
dix.Func === 'SmokeSensor' ||
|
||||||
|
dix.Func === 'WindowBalcony'
|
||||||
|
">
|
||||||
|
<el-form-item label="类型">
|
||||||
|
<el-radio-group v-model="dix.ConfFlags">
|
||||||
|
<el-radio :value="DefaultValue.NormallyOpen">常开</el-radio>
|
||||||
|
<el-radio :value="DefaultValue.NormallyClose">常闭</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="dix.Func === 'LightScene'">
|
||||||
|
灯光场景配置
|
||||||
|
<el-select v-model="dix.LightScene.Name">
|
||||||
|
<el-option v-for="(scene_name, scene_value, scene_index) in DIGITAL_INTPUT_LIGHT_SCENE"
|
||||||
|
:key="scene_index" :label="scene_name" :value="scene_value" />
|
||||||
|
/></el-select>
|
||||||
|
<div v-if="dix.LightScene.Name === 'LightsAllOn_Suite' ||
|
||||||
|
dix.LightScene.Name === 'LightsAllOff_Suite'
|
||||||
|
">
|
||||||
|
<el-form-item label="套房房号">
|
||||||
|
<el-input-number v-model="dix.LightScene.SuiteID" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="dix.LightScene.Name === 'DimSet'">
|
||||||
|
<el-form-item>
|
||||||
|
<span>信号发送地址</span><el-input-number v-model="dix.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>LCflag</span><el-input-number v-model="dix.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>回路</span><el-input-number v-model="dix.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>Level</span><el-input-number v-model="dix.P5Addr" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-divider>
|
||||||
|
<el-icon><star-filled /></el-icon>
|
||||||
|
DO输入点配置
|
||||||
|
<el-icon><star-filled /></el-icon>
|
||||||
|
</el-divider>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit">生成</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive } from "vue";
|
||||||
|
import { StarFilled } from "@element-plus/icons-vue";
|
||||||
|
import { DEVICE_MODEL, NEW_DIGITAL_INTPUT, DIGITAL_INTPUT_FUNCTION, DefaultValue, DIGITAL_INTPUT_LIGHT_SCENE } from '../js/INNcom.js'
|
||||||
|
// 设备信息
|
||||||
|
const device = reactive({
|
||||||
|
ADDR: 0,
|
||||||
|
MODEL: DEVICE_MODEL['X10'],
|
||||||
|
DIGITAL_INTPUT: {
|
||||||
|
DI1: NEW_DIGITAL_INTPUT(1),
|
||||||
|
DI2: NEW_DIGITAL_INTPUT(2),
|
||||||
|
DI3: NEW_DIGITAL_INTPUT(3),
|
||||||
|
DI4: NEW_DIGITAL_INTPUT(4),
|
||||||
|
DI5: NEW_DIGITAL_INTPUT(5),
|
||||||
|
DI6: NEW_DIGITAL_INTPUT(6),
|
||||||
|
DI7: NEW_DIGITAL_INTPUT(7),
|
||||||
|
DI8: NEW_DIGITAL_INTPUT(8),
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const onSubmit = () => {
|
||||||
|
console.log(device);
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -0,0 +1,467 @@
|
||||||
|
<template>
|
||||||
|
<el-form
|
||||||
|
:model="form"
|
||||||
|
label-width="auto"
|
||||||
|
style="max-width: 600px"
|
||||||
|
:rules="rules"
|
||||||
|
>
|
||||||
|
|
||||||
|
<div v-if="form.di1.func === 'LightScene'">
|
||||||
|
灯光场景配置
|
||||||
|
<el-select v-model="form.di1.LightScene">
|
||||||
|
<el-option
|
||||||
|
v-for="(value, key) in di_light_scene"
|
||||||
|
:label="value"
|
||||||
|
:value="key"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
form.di1.LightScene === 'LightsAllOn_Suite' ||
|
||||||
|
form.di1.LightScene === 'LightsAllOff_Suite'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-form-item label="套房房号">
|
||||||
|
<el-input-number v-model="form.di1.SuiteID" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="form.di1.LightScene === 'DimSet'">
|
||||||
|
<el-form-item>
|
||||||
|
<span>信号发送地址</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>LCflag</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>回路</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>Level</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="form.di1.LightScene === 'DimToggle'">
|
||||||
|
<el-form-item>
|
||||||
|
<span>信号发送地址</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>回路</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="
|
||||||
|
form.di1.LightScene === 'LightSceneClear' ||
|
||||||
|
form.di1.LightScene === 'LightSceneSet'
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-form-item>
|
||||||
|
<span>场景ID</span
|
||||||
|
><el-input-number v-model="form.di1.SceneID" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="form.di1.LightScene === 'SmartCircuitToggle'">
|
||||||
|
<el-form-item>
|
||||||
|
<span>信号发送地址</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>逻辑回路ID</span
|
||||||
|
><el-input-number
|
||||||
|
v-model="form.di1.LogicalCircuitID"
|
||||||
|
:min="1"
|
||||||
|
:max="99999"
|
||||||
|
/>
|
||||||
|
<span>参考回路ID</span
|
||||||
|
><el-input-number v-model="form.di1.GuideID" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="form.di1.LightScene === 'SmartSceneToggle'">
|
||||||
|
<el-form-item>
|
||||||
|
<span>信号发送地址</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
<span>场景ID</span
|
||||||
|
><el-input-number v-model="form.di1.SceneID" :min="1" :max="99999" />
|
||||||
|
<span>参考回路ID</span
|
||||||
|
><el-input-number v-model="form.di1.GuideID" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="form.di1.LightScene === 'SmartSceneRotate'">
|
||||||
|
<el-form-item>
|
||||||
|
<span>信号发送地址</span
|
||||||
|
><el-input-number v-model="form.di1.P5Addr" :min="1" :max="99999" />
|
||||||
|
|
||||||
|
<span>循环场景数量</span
|
||||||
|
><el-select v-model="form.di1.SceneCnt">
|
||||||
|
<el-option label="2" value="2" />
|
||||||
|
<el-option label="3" value="3" />
|
||||||
|
<el-option label="4" value="4" />
|
||||||
|
</el-select>
|
||||||
|
|
||||||
|
<span>场景ID1</span
|
||||||
|
><el-input-number v-model="form.di1.SceneID1" :min="1" :max="99999" />
|
||||||
|
<span>场景ID2</span
|
||||||
|
><el-input-number v-model="form.di1.SceneID2" :min="1" :max="99999" />
|
||||||
|
|
||||||
|
<span v-if="form.di1.SceneCnt > 2">场景ID3</span
|
||||||
|
><el-input-number
|
||||||
|
v-model="form.di1.SceneID3"
|
||||||
|
:min="1"
|
||||||
|
:max="99999"
|
||||||
|
v-if="form.di1.SceneCnt > 2"
|
||||||
|
/>
|
||||||
|
<span v-if="form.di1.SceneCnt > 3">场景ID4</span
|
||||||
|
><el-input-number
|
||||||
|
v-model="form.di1.SceneID4"
|
||||||
|
:min="1"
|
||||||
|
:max="99999"
|
||||||
|
v-if="form.di1.SceneCnt > 3"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<span>参考回路ID</span
|
||||||
|
><el-input-number v-model="form.di1.GuideID" :min="1" :max="99999" />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-divider>
|
||||||
|
<el-icon><star-filled /></el-icon>
|
||||||
|
DO输出点配置
|
||||||
|
<el-icon><star-filled /></el-icon>
|
||||||
|
</el-divider>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onSubmit">生成</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogVisible" title="生成代码">
|
||||||
|
<highlightjs
|
||||||
|
class="xx"
|
||||||
|
language="c"
|
||||||
|
:autodetect="false"
|
||||||
|
:code="code"
|
||||||
|
></highlightjs>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { StarFilled } from "@element-plus/icons-vue";
|
||||||
|
import { ref, reactive } from "vue";
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
|
||||||
|
|
||||||
|
const di_light_scene = {
|
||||||
|
LightsAllOn_Room: "灯光全开",
|
||||||
|
LightsAllOff_Room: "灯光全关",
|
||||||
|
LightsAllOn_Suite: "套房灯光全开",
|
||||||
|
LightsAllOff_Suite: "套房灯光全关",
|
||||||
|
DimSet: "调光设定",
|
||||||
|
DimToggle: "调光切换",
|
||||||
|
LightCtr: "灯光控制",
|
||||||
|
LightSceneClear: "灯光场景清除",
|
||||||
|
LightSceneSet: "灯光场景设定",
|
||||||
|
SceneClear: "场景清除",
|
||||||
|
SmartCircuitToggle: "智能回路切换",
|
||||||
|
SmartSceneRotate: "智能场景循环",
|
||||||
|
SmartSceneToggle: "智能场景切换",
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const DIGITAL_INPUT_ITEM = {
|
||||||
|
func: 'null',
|
||||||
|
}
|
||||||
|
|
||||||
|
const mode = 'BANKMGMTDEF_FLAVOR_AM_X10';
|
||||||
|
const form = reactive({
|
||||||
|
address: 0,
|
||||||
|
di1: {
|
||||||
|
func: "null",
|
||||||
|
DriverConfFlags: 0x02,
|
||||||
|
LightScene: "LightsAllOn_Room",
|
||||||
|
SuiteID: 1,
|
||||||
|
P5Addr: 0,
|
||||||
|
SceneID: 0,
|
||||||
|
LogicalCircuitID: 0,
|
||||||
|
GuideID: 0,
|
||||||
|
SceneCnt: 2,
|
||||||
|
SceneID1: 0,
|
||||||
|
SceneID2: 1,
|
||||||
|
SceneID3: 2,
|
||||||
|
SceneID4: 3,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = reactive({
|
||||||
|
address: [
|
||||||
|
{ required: true, message: "地址不能为空", trigger: "blur" },
|
||||||
|
{ type: "number", message: "模块地址只能是数字", trigger: "blur" },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
let code = ``;
|
||||||
|
const onSubmit = () => {
|
||||||
|
let code71="";
|
||||||
|
switch (form.di1.func) {
|
||||||
|
case 'RingBell':
|
||||||
|
code71 += `REG_HELPER_LowVoltage_Input_RingBell(1,1,${form.di1.P5Addr},0,0);`
|
||||||
|
break;
|
||||||
|
case 'CommonDoor':
|
||||||
|
code71 += `REG_HELPER_LowVoltage_Input_StdCommonCtrl_CommonDoor(1,1,${form.di1.P5Addr},0,0);`
|
||||||
|
break;
|
||||||
|
case 'ConnectingDoor':
|
||||||
|
case 'EntryDoor':
|
||||||
|
case 'KeyTagSensor':
|
||||||
|
case 'MinBarDoor':
|
||||||
|
case 'PIR_MotionSensor':
|
||||||
|
case 'SmokeSensor':
|
||||||
|
case 'WindowBalcony':
|
||||||
|
code71 += `REG_HELPER_LowVoltage_Input_RingBell(1,1,${form.di1.P5Addr},0,0);`
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const code72="";
|
||||||
|
const code73="";
|
||||||
|
code = `#include "string.h"
|
||||||
|
#include "APPMAP_Main.h"
|
||||||
|
#include "Personality.h"
|
||||||
|
#define P5_ADDRESS ${form.address}
|
||||||
|
#define APP_ID_DEVICE_TYPE ${mode}
|
||||||
|
const char LogicalDeviceIdentifier[] = "X10.r4";
|
||||||
|
void RunObject(TYPE_CBL32_OBJECT *ptrObj)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
TYPE_REG_ENTRY *RegEntry;
|
||||||
|
TYPE_CBL32_LIGHT_OUTPUT_DATA *LOData;
|
||||||
|
// TYPE_CBL32REG_BASE_OUTPUT *BOConfig;
|
||||||
|
|
||||||
|
if (ptrObj)
|
||||||
|
{
|
||||||
|
RegEntry = ptrObj->ptrRegEntry;
|
||||||
|
LOData = (TYPE_CBL32_LIGHT_OUTPUT_DATA *)ptrObj->ptrData;
|
||||||
|
// BOConfig = (TYPE_CBL32REG_BASE_OUTPUT *)RegEntry->RegData;
|
||||||
|
switch (RegEntry->RegGroup)
|
||||||
|
{
|
||||||
|
case (REG_GRPKEY_IO >> 8):
|
||||||
|
switch (RegEntry->RegKey)
|
||||||
|
{
|
||||||
|
case (REG_GRPKEY_DIGITAL_INPUT & 0xFF):
|
||||||
|
case (REG_GRPKEY_ANALOG_OUTPUT & 0xFF):
|
||||||
|
CBL_HELPER_DefaultIO_RunObject(ptrObj);
|
||||||
|
break;
|
||||||
|
case (REG_GRPKEY_DIGITAL_OUTPUT & 0xFF):
|
||||||
|
{
|
||||||
|
if (LOData->BOData.DriverCtrlCmd == CBL32_IRAS_CTRL_CMD_SET_VALUE)
|
||||||
|
{
|
||||||
|
switch (RegEntry->RegIdx)
|
||||||
|
{
|
||||||
|
case 1: // Pin 3
|
||||||
|
case 2: // Pin 4
|
||||||
|
case 3: // Pin 5
|
||||||
|
case 4: // Pin 6
|
||||||
|
case 5: // Pin 7
|
||||||
|
case 6: // Pin 8
|
||||||
|
case 7: // Pin 9
|
||||||
|
case 8: // Pin 10
|
||||||
|
// HW_API_02_9593_DigitalOut_Control(P5_HELPER_MapOutput_CBL_to_Pin(RegEntry->RegIdx), (BOOL)LOData->BOData.DriverCtrlValue, BOConfig->DriverConfFlags);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (REG_GRPKEY_LIGHT_OUTPUT & 0xFF):
|
||||||
|
break;
|
||||||
|
case (REG_GRPKEY_ANALOG_INPUT & 0xFF):
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void BootRegistry7_1(BYTE IOMAP)
|
||||||
|
{
|
||||||
|
${code71}
|
||||||
|
}
|
||||||
|
void BootRegistry7_2(BYTE IOMAP)
|
||||||
|
{
|
||||||
|
${code72}
|
||||||
|
}
|
||||||
|
void BootRegistry7_3(BYTE IOMAP)
|
||||||
|
{
|
||||||
|
${code73}
|
||||||
|
}
|
||||||
|
void BootRegistry9_32(BYTE IOMAP)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// Registry 9:32 - IRAS
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
TYPE_CBL32REG_9_32_THERMO_IRAS Reg;
|
||||||
|
|
||||||
|
memcpy(&Reg, (BYTE *)®BOOT_9_32_DEFAULT, sizeof(Reg));
|
||||||
|
APPMAP_RegistryCreateUKey((REG_GRPKEY_THERMO_IRAS << 8), (BYTE *)&Reg, sizeof(Reg));
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void ProcessVFI(TYPE_VFI *VFI)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// Process VFIs.
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
/* switch (VFI->VFI_Fct) {
|
||||||
|
case SAC_VFI_LC_DIMM_UP:
|
||||||
|
if (0x33 == VFI->Param[1])// 收到开启LC51, 发关闭LC51(1s触发关闭所有窗帘)
|
||||||
|
{
|
||||||
|
P5_HELPER_SendVFI_Reliable_2(0, SAC_VFI_LC_DIMM_DOWN, 0x80, 0x33);
|
||||||
|
}
|
||||||
|
else if(0x34 == VFI->Param[1]) // 收到开启LC52, 发关闭LC52(1s触发开启所有窗帘)
|
||||||
|
{
|
||||||
|
P5_HELPER_SendVFI_Reliable_2(0, SAC_VFI_LC_DIMM_DOWN, 0x80, 0x34);
|
||||||
|
}
|
||||||
|
else if(0x35 == VFI->Param[1]) // 收到开启LC53, 发关闭LC53(1s触发开启所有窗帘,窗纱无反应)
|
||||||
|
{
|
||||||
|
P5_HELPER_SendVFI_Reliable_2(0, SAC_VFI_LC_DIMM_DOWN, 0x80, 0x35);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void ApplicationStartup(void)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// Called when the application starts up.
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// Boot the AppMap registry items if we detect that we installed a new device software.
|
||||||
|
BOOL flagBootAppRegistry = TRUE;
|
||||||
|
TYPE_REG_ENTRY *RegEntry = (TYPE_REG_ENTRY *)APPMAP_WRAPPER_BootLoaderSendMsg(CBL32_MSG_REGISTRY_SEARCH_UNIQUE, (REG_GRPKEY_EXT_DEV_NAME << 8), 0);
|
||||||
|
if (RegEntry)
|
||||||
|
{
|
||||||
|
if (strcmp(LogicalDeviceIdentifier, (char *)(RegEntry->RegData)) == 0)
|
||||||
|
{
|
||||||
|
flagBootAppRegistry = FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (flagBootAppRegistry)
|
||||||
|
{
|
||||||
|
BootRegistry(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void ProcessP5Reply(BYTE *Data, BYTE DataLen)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void ProcessPAE(BYTE P5Addr, USHORT Param)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void ProcessP5Interceptor(TYPE_CBL32_P5_PRETTY_PACKET *P5PP, ULONG Flags)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// P5PP: Pointer to the P5PP from IRAS
|
||||||
|
// Flags: Future use.
|
||||||
|
// IMPORTANT - Any modification to the P5PP here will effect the processing of this packet by the other CBL32 banks.
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
ULONG ProcessMsg(ULONG Msg, ULONG P1, ULONG P2)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// Process messages from the bootloader and IRAS.
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
switch (Msg)
|
||||||
|
{
|
||||||
|
case CBL32_MSG_4MSEC_TICK:
|
||||||
|
break;
|
||||||
|
case CBL32_MSG_32MSEC_TICK:
|
||||||
|
// APPMAP_Tick32ms();
|
||||||
|
break;
|
||||||
|
case CBL32_MSG_PROCESS_VFI:
|
||||||
|
ProcessVFI((TYPE_VFI *)P1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (CBL_HELPER_DefaultIO_ProcessMsg(Msg, P1, P2));
|
||||||
|
// return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void ReconfRegistry(BYTE ReconfOp)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
}
|
||||||
|
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
void BootRegistry(BYTE IOMAP)
|
||||||
|
{
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
// Called when the device is booted to create the registry back to a default setup.
|
||||||
|
//**********************************************************************************************************************
|
||||||
|
|
||||||
|
if (IOMAP < 1)
|
||||||
|
{
|
||||||
|
// Setup the device address in the P5 domain.
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG0, 0x10); // P5 channel
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG1, 0x0F); // P5 Rx Media Bits
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_STATION_ADDR, P5_ADDRESS); // P5 Address
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG3, 0x0F); // P5 Tx Media Bits
|
||||||
|
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MULTICAST_MAP, 0xFF); // P5 Multicast Address Map
|
||||||
|
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MC_FOCUS_0, 0x00); // Multicast Focus 0
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MC_FOCUS_1, 0x00); // Multicast Focus 1
|
||||||
|
|
||||||
|
// Setup the application server functionality.
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_APP_SERVER_0 + 0, 0x00);
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_APP_SERVER_0 + 1, 0x00);
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_APP_SERVER_0 + 2, 0x00);
|
||||||
|
APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_APP_SERVER_0 + 3, 0x00);
|
||||||
|
REG_HELPER_FormatRegistry();
|
||||||
|
}
|
||||||
|
|
||||||
|
BootRegistry7_1(IOMAP);
|
||||||
|
BootRegistry7_2(IOMAP);
|
||||||
|
BootRegistry7_3(IOMAP);
|
||||||
|
BootRegistry7_8(IOMAP);
|
||||||
|
BootRegistry9_32(IOMAP);
|
||||||
|
|
||||||
|
APPMAP_RegistryCreateUKey_String((REG_GRPKEY_PROPERTY_ID << 8), (const char *)("2.17.3.15"));
|
||||||
|
APPMAP_RegistryCreateUKey_String((REG_GRPKEY_PART_NO << 8), (const char *)("01-8201.C"));
|
||||||
|
APPMAP_RegistryCreateUKey_String((REG_GRPKEY_ENGINEER << 8), (const char *)("Greg.Howard@inncom.com"));
|
||||||
|
APPMAP_RegistryCreateUKey_String((REG_GRPKEY_ENG_MEMO << 8), (const char *)(""));
|
||||||
|
APPMAP_RegistryCreateUKey_String((REG_GRPKEY_EXT_DEV_NAME << 8), LogicalDeviceIdentifier);
|
||||||
|
APPMAP_RegistryCreateUKey_String((REG_GRPKEY_INNCONTROL_OPTIONS << 8), (const char *)("Dev_LVIO_2_17_3_15.cfg"));
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
dialogVisible.value = true;
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.xx {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
r8
|
||||||
|
</template>
|
|
@ -0,0 +1,3 @@
|
||||||
|
<template>
|
||||||
|
ra
|
||||||
|
</template>
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
})
|
Loading…
Reference in New Issue