feat(processor): 添加循环名称自动生成的配置开关
新增环境变量 ENABLE_LOOP_NAME_AUTO_GENERATION 用于控制当缓存未命中时是否自动生成循环名称。当设置为 false 时,系统将不再生成 [类型-地址-回路] 格式的备用名称,而是直接返回 null。更新了配置文件、处理器逻辑并添加了相应的单元测试。
This commit is contained in:
@@ -223,7 +223,7 @@ describe('Processor Logic', () => {
|
||||
|
||||
const rows = buildRowsFromPayload(payload);
|
||||
expect(rows[0].loop_name).toBe('Main Chandelier');
|
||||
// dev_type 1 is 'Dev_Host_HVout'
|
||||
expect(rows[1].loop_name).toBe('[1Dev_Host_HVout-10-2]');
|
||||
// dev_type 1 is '强电继电器(输出状态)'
|
||||
expect(rows[1].loop_name).toBe('[1强电继电器(输出状态)-10-2]');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user