diff --git a/src/JiShe.CollectBus.Application/ScheduledMeterReading/BasicScheduledMeterReadingService.cs b/src/JiShe.CollectBus.Application/ScheduledMeterReading/BasicScheduledMeterReadingService.cs index c7b7b4e..7f4d6ce 100644 --- a/src/JiShe.CollectBus.Application/ScheduledMeterReading/BasicScheduledMeterReadingService.cs +++ b/src/JiShe.CollectBus.Application/ScheduledMeterReading/BasicScheduledMeterReadingService.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Net; using System.Threading.Tasks; @@ -118,7 +119,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading List itemCodeList = new List(); foreach (var dataType in itemArr) { - var excludeItemCode = "10_98,10_94";//排除透明转发:尖峰平谷时段、跳合闸 + var excludeItemCode = "10_98,10_94";//TODO 排除透明转发:尖峰平谷时段、跳合闸,特殊电表 var gatherItem = gatherItemInfos.FirstOrDefault(f => f.DataType.Equals(dataType)); if (gatherItem != null) { @@ -127,17 +128,21 @@ namespace JiShe.CollectBus.ScheduledMeterReading itemCodeList.Add(gatherItem.ItemCode); } } + + #region 特殊电表采集项编号处理 + if (itemArr.Exists(e => e.Equals("95"))) //德力西DTS + { + itemCodeList.Add("10_95"); + } + if (itemArr.Exists(e => e.Equals("109")))//WAVE_109 + { + itemCodeList.Add("10_109"); + } + #endregion } #endregion - #region 特殊电表采集项编号处理 - if (itemArr.Exists(e => e.Equals("95"))) //德力西DTS - { - itemCodeList.Add("10_95"); - } - //if (itemArr.Exists(e => e.Equals("109")))//WAVE_109 - // ammeter.ItemCodes += "10_109,"; - #endregion + ammeter.ItemCodes = itemCodeList.Serialize();//转换成JSON字符串 @@ -207,7 +212,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading _logger.LogError($"{nameof(AmmeterScheduledMeterFiveMinuteReading)} 5分钟采集电表数据处理时没有获取到缓存信息,-102"); return; } - await AmmerterScheduledMeterReadingIssued(ProtocolConst.AmmeterSubscriberWorkerOneMinuteIssuedEventName, meterInfos); + await AmmerterScheduledMeterReadingIssued(ProtocolConst.AmmeterSubscriberWorkerFiveMinuteIssuedEventName, meterInfos); _logger.LogInformation($"{nameof(AmmeterScheduledMeterFiveMinuteReading)} 5分钟采集电表数据处理完成"); } @@ -235,8 +240,14 @@ namespace JiShe.CollectBus.ScheduledMeterReading return; } - await AmmerterScheduledMeterReadingIssued(ProtocolConst.AmmeterSubscriberWorkerOneMinuteIssuedEventName, meterInfos); - _logger.LogInformation($"{nameof(AmmeterScheduledMeterFifteenMinuteReading)} 15分钟采集电表数据处理完成"); + Stopwatch stopwatch = new Stopwatch(); + stopwatch.Start(); + + await AmmerterScheduledMeterReadingIssued(ProtocolConst.AmmeterSubscriberWorkerFifteenMinuteIssuedEventName, meterInfos); + + stopwatch.Stop(); + + _logger.LogInformation($"{nameof(AmmeterScheduledMeterFifteenMinuteReading)} 15分钟采集电表数据处理完成,共消耗{stopwatch.ElapsedMilliseconds}毫秒。"); } #endregion @@ -494,6 +505,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading foreach (var group in focusHashGroups) { _ = Task.Run(async () => { await CreatePublishTask(eventName, group.Value); }); + //await CreatePublishTask(eventName, group.Value); } await Task.CompletedTask; @@ -538,12 +550,12 @@ namespace JiShe.CollectBus.ScheduledMeterReading continue; } - //排除1天未在线的集中器生成指令 或 排除集中器配置为自动上报的集中器 - if (!IsGennerateCmd(ammeter.LastTime, -1)) - { - _logger.LogInformation($"{nameof(CreatePublishTask)} 集中器{ammeter.FocusAddress}的电表{ammeter.Name},采集时间:{ammeter.LastTime},已超过1天未在线,不生成指令"); - continue; - } + ////排除1天未在线的集中器生成指令 或 排除集中器配置为自动上报的集中器 + //if (!IsGennerateCmd(ammeter.LastTime, -1)) + //{ + // _logger.LogInformation($"{nameof(CreatePublishTask)} 集中器{ammeter.FocusAddress}的电表{ammeter.Name},采集时间:{ammeter.LastTime},已超过1天未在线,不生成指令"); + // continue; + //} if (string.IsNullOrWhiteSpace(ammeter.AreaCode)) { @@ -597,7 +609,7 @@ namespace JiShe.CollectBus.ScheduledMeterReading tempCodes = tempSubCodes; } } - + foreach (var tempItem in tempCodes) { //排除已发送日冻结和月冻结采集项配置 @@ -615,20 +627,22 @@ namespace JiShe.CollectBus.ScheduledMeterReading var aFN = (AFN)itemCodeArr[0].HexToDec(); var fn = int.Parse(itemCodeArr[1]); byte[] dataInfos = null; - if(ammeter.AutomaticReport.Equals(1) && aFN == AFN.请求实时数据) + if (ammeter.AutomaticReport.Equals(1) && aFN == AFN.请求实时数据) { //实时数据 dataInfos = Build3761SendData.BuildAmmeterReadRealTimeDataSendCmd(ammeter.FocusAddress, ammeter.MeteringCode, (ATypeOfDataItems)fn); } else { + //特殊表暂不处理 if (TelemetryPacketBuilder.AFNHandlers.TryGetValue(tempItem, out var handler)) { - dataInfos = handler(ammeter.FocusAddress, fn, ammeter.MeteringCode); + dataInfos = handler(ammeter.FocusAddress, fn, ammeter.MeteringCode); } else { - throw new InvalidOperationException($"无效编码: {tempItem}"); + _logger.LogWarning($"{nameof(CreatePublishTask)} 集中器{ammeter.FocusAddress}的电表{ammeter.Name}采集项{tempItem}无效编码。"); + continue; } } //TODO:特殊表 @@ -648,10 +662,10 @@ namespace JiShe.CollectBus.ScheduledMeterReading await _capBus.PublishAsync(eventName, evenMessageInfo); } - + } - } + } } /// diff --git a/src/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs b/src/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs index 16359f2..dd49e74 100644 --- a/src/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs +++ b/src/JiShe.CollectBus.Application/ScheduledMeterReading/EnergySystemScheduledMeterReadingService.cs @@ -59,11 +59,12 @@ namespace JiShe.CollectBus.ScheduledMeterReading INNER JOIN TB_FocusInfo(NOLOCK) AS B ON A.ID = B.GatherInfoID AND B.RemoveState >= 0 AND B.State>=0 INNER JOIN TB_AmmeterInfo(NOLOCK) AS C ON B.ID = C.FocusID AND C.State>= 0 AND C.State<100 INNER JOIN TB_AmmeterGatherItem(NOLOCK) AS D ON C.ID = D.AmmeterID AND D.State>=0 - WHERE 1=1 "; + WHERE 1=1 and C.Special = 0 "; + //TODO 记得移除特殊表过滤 if (!string.IsNullOrWhiteSpace(gatherCode)) { - sql = $@"{sql} A.GatherCode = '{gatherCode}'"; + sql = $@"{sql} AND A.GatherCode = '{gatherCode}'"; } return await SqlProvider.Instance.Change(DbEnum.EnergyDB) .Ado diff --git a/src/JiShe.CollectBus.Application/Subscribers/WorkerSubscriberAppService.cs b/src/JiShe.CollectBus.Application/Subscribers/WorkerSubscriberAppService.cs index 693abda..b1cc03b 100644 --- a/src/JiShe.CollectBus.Application/Subscribers/WorkerSubscriberAppService.cs +++ b/src/JiShe.CollectBus.Application/Subscribers/WorkerSubscriberAppService.cs @@ -81,7 +81,7 @@ namespace JiShe.CollectBus.Subscribers /// [HttpPost] [Route("ammeter/fiveminute/issued-event")] - [CapSubscribe(ProtocolConst.AmmeterSubscriberWorkerOneMinuteIssuedEventName)] + [CapSubscribe(ProtocolConst.AmmeterSubscriberWorkerFiveMinuteIssuedEventName)] public async Task AmmeterScheduledMeterFiveMinuteReadingIssuedEvent(ScheduledMeterReadingIssuedEventMessage receivedMessage) { _logger.LogInformation("5分钟采集电表数据下行消息消费队列开始处理"); @@ -108,7 +108,7 @@ namespace JiShe.CollectBus.Subscribers /// [HttpPost] [Route("ammeter/fifteenminute/issued-event")] - [CapSubscribe(ProtocolConst.AmmeterSubscriberWorkerOneMinuteIssuedEventName)] + [CapSubscribe(ProtocolConst.AmmeterSubscriberWorkerFifteenMinuteIssuedEventName)] public async Task AmmeterScheduledMeterFifteenMinuteReadingIssuedEvent(ScheduledMeterReadingIssuedEventMessage receivedMessage) { _logger.LogInformation("15分钟采集电表数据下行消息消费队列开始处理"); @@ -164,7 +164,7 @@ namespace JiShe.CollectBus.Subscribers /// [HttpPost] [Route("watermeter/fiveminute/issued-event")] - [CapSubscribe(ProtocolConst.WatermeterSubscriberWorkerOneMinuteIssuedEventName)] + [CapSubscribe(ProtocolConst.AmmeterSubscriberWorkerFiveMinuteIssuedEventName)] public async Task WatermeterScheduledMeterFiveMinuteReadingIssuedEvent(ScheduledMeterReadingIssuedEventMessage receivedMessage) { _logger.LogInformation("5分钟采集电表数据下行消息消费队列开始处理"); @@ -191,7 +191,7 @@ namespace JiShe.CollectBus.Subscribers /// [HttpPost] [Route("watermeter/fifteenminute/issued-event")] - [CapSubscribe(ProtocolConst.WatermeterSubscriberWorkerOneMinuteIssuedEventName)] + [CapSubscribe(ProtocolConst.AmmeterSubscriberWorkerFifteenMinuteIssuedEventName)] public async Task WatermeterScheduledMeterFifteenMinuteReadingIssuedEvent(ScheduledMeterReadingIssuedEventMessage receivedMessage) { _logger.LogInformation("15分钟采集电表数据下行消息消费队列开始处理"); diff --git a/src/JiShe.CollectBus.Common/BuildSendDatas/Build3761SendData.cs b/src/JiShe.CollectBus.Common/BuildSendDatas/Build3761SendData.cs index 9bed5b8..d7a9ece 100644 --- a/src/JiShe.CollectBus.Common/BuildSendDatas/Build3761SendData.cs +++ b/src/JiShe.CollectBus.Common/BuildSendDatas/Build3761SendData.cs @@ -1401,7 +1401,7 @@ namespace JiShe.CollectBus.Common.BuildSendDatas cmdStrList.AddRange(userDatas); cmdStrList.Add(cs); cmdStrList.Add(endStr); - Console.WriteLine(string.Join(" ", cmdStrList)); + //Console.WriteLine(string.Join(" ", cmdStrList)); var bytes = cmdStrList.Select(x => Convert.ToByte(x, 16)).ToArray(); return bytes; } diff --git a/src/JiShe.CollectBus.Common/BuildSendDatas/TelemetryPacketBuilder.cs b/src/JiShe.CollectBus.Common/BuildSendDatas/TelemetryPacketBuilder.cs index 96bb97f..9f5c3ec 100644 --- a/src/JiShe.CollectBus.Common/BuildSendDatas/TelemetryPacketBuilder.cs +++ b/src/JiShe.CollectBus.Common/BuildSendDatas/TelemetryPacketBuilder.cs @@ -38,14 +38,14 @@ namespace JiShe.CollectBus.Common.BuildSendDatas if (method.Name.StartsWith("AFN") && method.Name.EndsWith("_Send")) { // 提取编码部分(例如 "AFN0D_F184_Send" -> "0D_184") - string code = method.Name[3..^5].Replace("F", "_"); // 移除前缀和后缀,替换F为_ + string code = method.Name[3..^5].Replace("F", ""); // 移除前缀和后缀,替换F为_ var delegateInstance = (AFNDelegate)Delegate.CreateDelegate(typeof(AFNDelegate), method); AFNHandlers[code] = delegateInstance; } } } - #region AFN_00H + #region AFN_00H 确认∕否认 public static byte[] AFN00_F1_Send(string address,int fn,int pn = 0) { var reqParameter = new ReqParameter2() @@ -92,7 +92,7 @@ namespace JiShe.CollectBus.Common.BuildSendDatas #endregion - #region AFN_01H + #region AFN_01H 复位命令 public static byte[] AFN01_F1_Send(string address, int fn, int pn = 0) { var reqParameter = new ReqParameter2() @@ -117,7 +117,7 @@ namespace JiShe.CollectBus.Common.BuildSendDatas #endregion - #region AFN_02H + #region AFN_02H 链路接口检测 public static byte[] AFN02_F2_Send(string address, int fn, int pn = 0) { var reqParameter = new ReqParameter2() @@ -140,5 +140,1933 @@ namespace JiShe.CollectBus.Common.BuildSendDatas return bytes; } #endregion + + #region AFN_04H 设置参数 + public static byte[] AFN04_F3_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN04_F10_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN04_F66_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN04_F88_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + #endregion + + #region AFN_05H 控制命令 + public static byte[] AFN05_F31_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + #endregion + + #region AFN_09H 请求终端配置及信息 + public static byte[] AFN09_F1_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN09_F9_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + #endregion + + #region AFN_0AH 查询参数 + public static byte[] AFN0A_F10_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0A_F66_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0A_F88_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + #endregion + + #region AFN_0CH 请求一类数据 + public static byte[] AFN0C_F2_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F25_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F33_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F49_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F129_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F130_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F131_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F132_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F145_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F149_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0C_F188_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + #endregion + + #region AFN_0DH 请求二类数据 + public static byte[] AFN0D_F3_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F4_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F11_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F19_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F81_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F82_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F83_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F84_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F85_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F86_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F87_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN0D_F88_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F89_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F90_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F91_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F92_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F93_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F94_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F95_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN0D_F96_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN0D_F97_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F98_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F99_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F100_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F101_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F102_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F103_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F104_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F105_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN0D_F106_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F107_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F108_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F145_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F146_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F147_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F148_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F161_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F162_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN0D_F163_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F164_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F165_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F166_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F167_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F1618_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F177_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F178_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F179_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN0D_F180_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F181_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F182_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F183_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F184_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F190_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F193_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN0D_F195_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + #endregion + + #region AFN10H 数据转发 + public static byte[] AFN10_F4_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F94_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F97_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + public static byte[] AFN10_F101_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F102_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F103_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F104_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F105_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F106_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F107_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + public static byte[] AFN10_F249_Send(string address, int fn, int pn = 0) + { + var reqParameter = new ReqParameter2() + { + AFN = AFN.链路接口检测, + FunCode = (int)CMasterStationFunCode.请求2级数据, + A = address, + Seq = new Seq() + { + TpV = TpV.附加信息域中无时间标签, + FIRFIN = FIRFIN.单帧, + CON = CON.不需要对该帧进行确认, + PRSEQ = 0, + }, + MSA = Build3761SendData.GetMSA(address), + Pn = pn, + Fn = fn + }; + var bytes = Build3761SendData.BuildSendCommandBytes(reqParameter); + return bytes; + } + + #region SpecialAmmeter 特殊电表转发 + //TODO 特殊电表处理 + + #endregion + + #endregion } } diff --git a/src/JiShe.CollectBus.Domain/Ammeters/AmmeterInfo.cs b/src/JiShe.CollectBus.Domain/Ammeters/AmmeterInfo.cs index f62ba92..eb191ca 100644 --- a/src/JiShe.CollectBus.Domain/Ammeters/AmmeterInfo.cs +++ b/src/JiShe.CollectBus.Domain/Ammeters/AmmeterInfo.cs @@ -119,7 +119,7 @@ namespace JiShe.CollectBus.Ammeters public string GatherCode { get; set; } /// - /// 是否特殊表 + /// 是否特殊表,1是特殊电表 /// public int Special { get; set; } diff --git a/src/JiShe.CollectBus.Host/Pages/Monitor.cshtml b/src/JiShe.CollectBus.Host/Pages/Monitor.cshtml index d742dbc..f5c12d6 100644 --- a/src/JiShe.CollectBus.Host/Pages/Monitor.cshtml +++ b/src/JiShe.CollectBus.Host/Pages/Monitor.cshtml @@ -86,9 +86,9 @@ box-sizing: border-box; } .container { - width: 1170 px; - padding-right: 15 px; - padding-left: 15 px; + width: 1170px; + padding-right: 15px; + padding-left: 15px; margin-right: auto; margin-left: auto; } @@ -97,31 +97,31 @@ text-align: center; font-weight: 200; display: block; - margin: 60 px auto 40 px !important; + margin: 60px auto 40px !important; } .page-header { padding-bottom: 9px; margin: 40px auto; - border-bottom: 1 px solid #eee; + border-bottom: 1px solid #eee; } .projects-header h2 { font-size: 42px; letter-spacing: -1px; } h2 { - margin-top: 20 px; - margin-bottom: 10 px; + margin-top: 20px; + margin-bottom: 10px; font-weight: 500; line-height: 1.1; color: inherit; /* text-align: center; */ } p { - margin: 0 0 10 px; + margin: 0 0 10px; } .row { - margin-right: -15 px; - margin-left: -15 px; + margin-right: -15px; + margin-left: -15px; } .col-lg-3 { width: 25%; @@ -131,7 +131,7 @@ margin-right: auto; margin-left: auto; text-align: center; - margin-bottom: 30 px; + margin-bottom: 30px; border-radius: 0; } .thumbnail { @@ -139,7 +139,7 @@ padding: 4px; line-height: 1.42857143; background-color: #fff; - border: 1 px solid #ddd; + border: 1px solid #ddd; .transition(border 0.2s ease-in-out); } a { diff --git a/src/JiShe.CollectBus.Host/appsettings.Development.json b/src/JiShe.CollectBus.Host/appsettings.Development.json index 0c208ae..bcdd3fc 100644 --- a/src/JiShe.CollectBus.Host/appsettings.Development.json +++ b/src/JiShe.CollectBus.Host/appsettings.Development.json @@ -1,7 +1,7 @@ { "Logging": { "LogLevel": { - "Default": "Information", + "Default": "Warning", "Microsoft.AspNetCore": "Warning" } } diff --git a/src/JiShe.CollectBus.Host/appsettings.json b/src/JiShe.CollectBus.Host/appsettings.json index 4a166da..ab593ab 100644 --- a/src/JiShe.CollectBus.Host/appsettings.json +++ b/src/JiShe.CollectBus.Host/appsettings.json @@ -5,7 +5,7 @@ "Serilog.Sinks.File" ], "MinimumLevel": { - "Default": "Information", + "Default": "Warning", "Override": { "Microsoft": "Information", "Volo.Abp": "Warning",