wxr
2022-09-30 88a66f8374d63fbe9403258a9faa0fdcacf96571
HDL_ON/DAL/DriverLayer/Control.cs
@@ -837,6 +837,33 @@
                new Control_Udp().SendLocalHdlLinkData(sendBytes, aLinkData.id,0);
            }
        }
        /// <summary>
        /// 获取音乐目录
        /// </summary>
        public void GetMusicDirectory(Function function)
        {
            if (Ins.GatewayOnline_Local)
            {
                var objects = new List<Dictionary<string, string>>();
                var readKey = new Dictionary<string, string>();
                readKey.Add("sid", function.sid);
                objects.Add(readKey);
                var readDataObj = new AlinkReadFunctionStatusObj()
                {
                    id = Ins.msg_id.ToString(),
                    objects = objects,
                    time_stamp = Utlis.GetTimestamp()
                };
                var functionControlDataJson = Newtonsoft.Json.JsonConvert.SerializeObject(readDataObj);
                var sendBytes = Ins.ConvertSendBodyData($"/base/{DB_ResidenceData.Instance.HomeGateway.gatewayId}/thing/service/MusicPlayGroupListGet/down", functionControlDataJson);
                MainPage.Log($"本地通讯 发送HDL-Link数据:{functionControlDataJson}");
                new Control_Udp().SendLocalHdlLinkData(sendBytes, readDataObj.id);
            }
        }
        /// <summary>
        /// 网关进入配网模式
        /// </summary>
@@ -1220,6 +1247,13 @@
                        //更新界面状态
                        switch (localFunction.spk)
                        {
                            case SPK.AcstParent:
                                AcstParentPage.UpdateAcstParentInfo(localFunction);
                                break;
                            case SPK.AcstSub:
                                AcstParentPage.UpdateAcstSubInfo(localFunction);
                                AcstSubPage.UpdateStatus(localFunction);
                                break;
                            case SPK.AirSwitch:
                                AirSwitchPage.UpdataState(localFunction);
                                if(localFunction.GetAttribute(FunctionAttributeKey.Power)!=null)//如果是带电量的空开也要更新能源界面
@@ -1454,8 +1488,14 @@
                                //wjc
                                break;
                            case SPK.Inverter:
                                MainPage.Log("逆变器数据更新");
                                var status = new Dictionary<string, object> { ["method"] = "status", ["data"] = temp.objects };
                                Inverter.Ins.H5Page.CallJS($"nativeToJs(\'{Newtonsoft.Json.JsonConvert.SerializeObject(status)}\')");
                                MainPage.Log("逆变器数据更新1");
                                Application.RunOnMainThread(() =>
                                {
                                    Inverter.Ins.H5Page.CallJS($"nativeToJs(\'{Newtonsoft.Json.JsonConvert.SerializeObject(status)}\')");
                                });
                                MainPage.Log("逆变器数据更新2");
                                break;
                        }