@@ -46,9 +46,9 @@
灯光场景配置
-
- />
+
@@ -58,16 +58,71 @@
- 信号发送地址
+ 信号发送地址
+ LCflag
+ 回路
+ Level
+
+
+
+
+ 信号发送地址
+ 回路
+
+
+
+
+
+ 场景ID
+
+
+
+
+ 信号发送地址
+ 逻辑回路ID
+ 参考回路ID
+
+
+
+
+ 信号发送地址
+ 场景数量
+ 场景1
+ 场景2
+ 场景3
+ 场景4
-
-
+ 参考回路ID
+
+
+
+
+ 信号发送地址
+ 场景ID
+ 参考回路ID
+
+
@@ -77,38 +132,572 @@
+
+
+
+
+
+
+ PI5_Ofs
+
+ BitMask
+
+ ConfFlags
+
+
+
+
+
+
+ 欢迎模式
+
+ 员工欢迎模式
+
+
+ 客人欢迎模式
+
+
+
+
+
+ 参与的第{{ index }}个逻辑回路ID
+
+
+
+
+
+ 场景{{ index.toString().padStart(2, '0') }}
+
+
+
+
+
+
+
+
+
+ 虚拟回路配置
+
+
+
+
+
+
+
+
+
+ 欢迎模式
+
+ 员工欢迎模式
+
+
+ 客人欢迎模式
+
+
+
+
+
+ 参与的第{{ index }}个逻辑回路ID
+
+
+
+
+
+ 场景{{ index.toString().padStart(2, '0') }}
+
+
+
+
+
+
+
生成
-
-
-
-
-
-
+
+
+ 复制
+
+
+
\ No newline at end of file
+
+void BootRegistry7_1(BYTE IOMAP)
+{
+ ${ code71 }
+}
+
+void BootRegistry7_2(BYTE IOMAP)
+{
+ ${ code72 }
+}
+
+void BootRegistry7_3(BYTE IOMAP)
+{
+ TYPE_CBL32REG_7_3_LIGHT_OUTPUT Reg;
+ memcpy(&Reg, (BYTE *)®BOOT_7_3_DEFAULT, sizeof(Reg));
+ ${ code73 }
+}
+
+void ProcessVFI(TYPE_VFI *VFI)
+{}
+
+void ApplicationStartup(void)
+{
+ 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)
+{}
+
+ULONG ProcessMsg(ULONG Msg, ULONG P1, ULONG P2)
+{
+ switch (Msg)
+ {
+ case CBL32_MSG_4MSEC_TICK:
+ break;
+ case CBL32_MSG_32MSEC_TICK:
+ break;
+ case CBL32_MSG_PROCESS_VFI:
+ ProcessVFI((TYPE_VFI *)P1);
+ break;
+ }
+ return (CBL_HELPER_DefaultIO_ProcessMsg(Msg, P1, P2));
+}
+
+void ReconfRegistry(BYTE ReconfOp)
+{}
+
+void BootRegistry(BYTE IOMAP)
+{
+ if (IOMAP < 1)
+ {
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG0, 0x10);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG1, 0x0F);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_STATION_ADDR, P5_ADDRESS);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG3, 0x0F);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MULTICAST_MAP, 0xFF);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MC_FOCUS_0, 0x00);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MC_FOCUS_1, 0x00);
+ 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);
+ 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;
+}
+
+const iar_code_copy = async () => {
+ try {
+ await navigator.clipboard.writeText(code);
+ ElMessage({
+ message: '已复制',
+ type: 'success',
+ })
+ } catch (err) {
+ console.error('无法复制: ', err);
+ }
+};
+
+
+
\ No newline at end of file
diff --git a/src/views/X101.vue b/src/views/X101.vue
index 373149f..e1503d9 100644
--- a/src/views/X101.vue
+++ b/src/views/X101.vue
@@ -150,28 +150,7 @@
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({
diff --git a/x10.c b/x10.c
new file mode 100644
index 0000000..84aac93
--- /dev/null
+++ b/x10.c
@@ -0,0 +1,165 @@
+//**********************************************************************************************************************
+// FileName : Personality.c
+// Author(s) : Philipp Roosli, Michael Sobanko
+// Description: Template for the personalization of a device.
+//**********************************************************************************************************************
+// Version History:
+// 2011/10/14 Base release.
+//**********************************************************************************************************************
+
+#include "string.h"
+#include "APPMAP_Main.h"
+#include "Personality.h"
+
+//**********************************************************************************************************************
+// 设备型号及地址
+//**********************************************************************************************************************
+
+#define APP_ID_DEVICE_TYPE \
+ ${ device.MODEL }
+#define P5_ADDRESS \
+ ${ device.ADDR }
+
+//**********************************************************************************************************************
+// Constants
+//**********************************************************************************************************************
+const char LogicalDeviceIdentifier[] = "X10.r4";
+
+void RunObject(TYPE_CBL32_OBJECT *ptrObj)
+{
+ TYPE_REG_ENTRY *RegEntry;
+ TYPE_CBL32_LIGHT_OUTPUT_DATA *LOData;
+ if (ptrObj)
+ {
+ RegEntry = ptrObj->ptrRegEntry;
+ LOData = (TYPE_CBL32_LIGHT_OUTPUT_DATA *)ptrObj->ptrData;
+ 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)
+{
+ TYPE_CBL32REG_7_3_LIGHT_OUTPUT Reg;
+ memcpy(&Reg, (BYTE *)®BOOT_7_3_DEFAULT, sizeof(Reg));
+ ${ code73 }
+}
+
+void ProcessVFI(TYPE_VFI *VFI)
+{}
+
+void ApplicationStartup(void)
+{
+ 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)
+{}
+
+ULONG ProcessMsg(ULONG Msg, ULONG P1, ULONG P2)
+{
+ switch (Msg)
+ {
+ case CBL32_MSG_4MSEC_TICK:
+ break;
+ case CBL32_MSG_32MSEC_TICK:
+ break;
+ case CBL32_MSG_PROCESS_VFI:
+ ProcessVFI((TYPE_VFI *)P1);
+ break;
+ }
+ return (CBL_HELPER_DefaultIO_ProcessMsg(Msg, P1, P2));
+}
+
+void ReconfRegistry(BYTE ReconfOp)
+{}
+
+void BootRegistry(BYTE IOMAP)
+{
+ if (IOMAP < 1)
+ {
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG0, 0x10);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG1, 0x0F);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_STATION_ADDR, P5_ADDRESS);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_FLAG3, 0x0F);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MULTICAST_MAP, 0xFF);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MC_FOCUS_0, 0x00);
+ APPMAP_EEPROM_Write(EEPROM_OFS_STD_NSPB_BLOCK_CACHED_NV + P5STM_NSPB_CACHE_MC_FOCUS_1, 0x00);
+ 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);
+ 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"));
+}