最终TCP
This commit is contained in:
parent
8a15b4ee51
commit
0a1dca0114
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using DataService.Model;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
|
@ -45,11 +46,11 @@ namespace ShuiBiao
|
||||||
//TCP
|
//TCP
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var ip = "172.17.0.9";
|
//var ip = "172.17.0.9";
|
||||||
var port = 12303;
|
//var port = 12301;
|
||||||
|
|
||||||
//var ip = "127.0.0.1";
|
var ip = "127.0.0.1";
|
||||||
//var port = 12303;
|
var port = 12301;
|
||||||
|
|
||||||
//调用socket(函数创建一个用于通信的套接字。
|
//调用socket(函数创建一个用于通信的套接字。
|
||||||
serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
serverSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||||
|
|
@ -167,7 +168,7 @@ namespace ShuiBiao
|
||||||
break;//结束线程
|
break;//结束线程
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length > 0)
|
if (length > 11)//bytes[11]为功能码位
|
||||||
{
|
{
|
||||||
var message = byteArrayToHexString(bytes, length);
|
var message = byteArrayToHexString(bytes, length);
|
||||||
log.Info("接收到 " + clientSocket.RemoteEndPoint + ": " + message);
|
log.Info("接收到 " + clientSocket.RemoteEndPoint + ": " + message);
|
||||||
|
|
@ -178,6 +179,12 @@ namespace ShuiBiao
|
||||||
var LoginFrame = message[20].ToString() + message[21].ToString();//功能码C
|
var LoginFrame = message[20].ToString() + message[21].ToString();//功能码C
|
||||||
JudgmentFunctionCode(LoginFrame, message, baseNum);
|
JudgmentFunctionCode(LoginFrame, message, baseNum);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var message = byteArrayToHexString(bytes, length);
|
||||||
|
log.Info("报文格式错误: " + message);
|
||||||
|
Console.WriteLine("报文格式错误: " + message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -966,12 +973,12 @@ namespace ShuiBiao
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 基础解析【长度--采集时间】
|
/// 基础解析【数据部长度--此帧表数】
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
public static void basicsAnalysis(string message)
|
public static void basicsAnalysis(string message)
|
||||||
{
|
{
|
||||||
#region 长度--采集时间
|
#region 数据部长度--此帧表数
|
||||||
|
|
||||||
StringBuilder DataLength = new StringBuilder("");//数据部长度L
|
StringBuilder DataLength = new StringBuilder("");//数据部长度L
|
||||||
for (int i = 4; i <= 7; i++)
|
for (int i = 4; i <= 7; i++)
|
||||||
|
|
@ -1099,19 +1106,19 @@ namespace ShuiBiao
|
||||||
if (go.ToString() == "84")
|
if (go.ToString() == "84")
|
||||||
{
|
{
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
phenotype84(message, baseNum);
|
SCL61D5_84(message, baseNum, SimID);
|
||||||
dataFramesDecompilation(SimID, code);
|
dataFramesDecompilation(SimID, code);
|
||||||
}
|
}
|
||||||
else if ((go.ToString() == "83"))
|
else if ((go.ToString() == "83"))
|
||||||
{
|
{
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
phenotype83(message, baseNum);
|
SCL61D5_83(message, baseNum, SimID);
|
||||||
dataFramesDecompilation(SimID, code);
|
dataFramesDecompilation(SimID, code);
|
||||||
}
|
}
|
||||||
else if ((go.ToString() == "81"))
|
else if ((go.ToString() == "81"))
|
||||||
{
|
{
|
||||||
Console.WriteLine();
|
Console.WriteLine();
|
||||||
phenotype81(message, baseNum);
|
SCL61D5_81(message, baseNum, SimID);
|
||||||
dataFramesDecompilation(SimID, code);
|
dataFramesDecompilation(SimID, code);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1165,13 +1172,63 @@ namespace ShuiBiao
|
||||||
Console.WriteLine("采集时间:" + date);
|
Console.WriteLine("采集时间:" + date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 0x81解析【站号、表型 、报警码、采集时间】
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
/// <param name="multiplier"></param>
|
||||||
|
/// <param name="wd"></param>
|
||||||
|
public static void shareAnalysis(string message, int multiplier, water_data wd)
|
||||||
|
{
|
||||||
|
StringBuilder platForm = new StringBuilder("");//站号 --十进制减去64 为实际数值
|
||||||
|
for (int i = 28 + multiplier; i <= 29 + multiplier; i++)
|
||||||
|
{
|
||||||
|
platForm.Append(message[i]);
|
||||||
|
}
|
||||||
|
var _platForm = int.Parse(hexStr2Str(platForm.ToString())) - 64;
|
||||||
|
Console.WriteLine("站号:" + _platForm);
|
||||||
|
wd.stop_number = _platForm.ToString();
|
||||||
|
|
||||||
|
StringBuilder phenotype = new StringBuilder("");//表型
|
||||||
|
for (int i = 30 + multiplier; i <= 31 + multiplier; i++)
|
||||||
|
{
|
||||||
|
phenotype.Append(message[i]);
|
||||||
|
}
|
||||||
|
StringBuilder _phenotype = new StringBuilder("");//--表型数字 81 83 84
|
||||||
|
_phenotype.Clear().Append(typePheno(phenotype));
|
||||||
|
wd.phenotype = "SCL61D6 单向不锈钢带温度流量计";
|
||||||
|
|
||||||
|
StringBuilder alarmCode = new StringBuilder("");//报警码
|
||||||
|
for (int i = 32 + multiplier; i <= 33 + multiplier; i++)
|
||||||
|
{
|
||||||
|
alarmCode.Append(message[i]);
|
||||||
|
}
|
||||||
|
wd.alarm_code = typeAlarmcode(alarmCode);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
StringBuilder date = new StringBuilder("20");//采集时间 --(BCD 码)
|
||||||
|
for (int i = 34 + multiplier; i <= 43 + multiplier; i++)
|
||||||
|
{
|
||||||
|
if (i == 35 + multiplier || i == 37 + multiplier) date.Append(message[i] + "-");
|
||||||
|
else if (i == 39 + multiplier) date.Append(message[i] + " ");
|
||||||
|
else if (i == 41 + multiplier) date.Append(message[i] + ":");
|
||||||
|
else date.Append(message[i]);
|
||||||
|
}
|
||||||
|
Console.WriteLine("采集时间:" + date);
|
||||||
|
wd.acquisition_timeA = date.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 表型81
|
/// 表型81
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
/// <param name="baseNum">基数【前置位设备数据总数和】</param>
|
/// <param name="baseNum">基数【前置位设备数据总数和】</param>
|
||||||
public static void phenotype81(string message, int baseNum)
|
public static void SCL61D5_81(string message, int baseNum, StringBuilder SimID)
|
||||||
{
|
{
|
||||||
|
//new数据库
|
||||||
|
water_data wd = new water_data();
|
||||||
|
|
||||||
int multiplier;//基数(前所有位合计)
|
int multiplier;//基数(前所有位合计)
|
||||||
if (baseNum != 0)
|
if (baseNum != 0)
|
||||||
{
|
{
|
||||||
|
|
@ -1208,21 +1265,21 @@ namespace ShuiBiao
|
||||||
}
|
}
|
||||||
//Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
//Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
||||||
|
|
||||||
StringBuilder instantaneousFlow = new StringBuilder("");//瞬时流量 --浮点型,缩小 1000 倍为实际值,单位: m3/h
|
StringBuilder instantaneousFlow = new StringBuilder("");//瞬时流量 --浮点型,缩小 1000 倍为实际值,单位: m³/h
|
||||||
for (int i = 48 + multiplier; i <= 55 + multiplier; i++)
|
for (int i = 48 + multiplier; i <= 55 + multiplier; i++)
|
||||||
{
|
{
|
||||||
instantaneousFlow.Append(message[i]);
|
instantaneousFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
var _instantaneousFlow = byteToFloat(instantaneousFlow.ToString()) / 1000;
|
var _instantaneousFlow = byteToFloat(instantaneousFlow.ToString()) / 1000;
|
||||||
//Console.WriteLine("瞬时流量" + _instantaneousFlow.ToString() + "m3/h");
|
//Console.WriteLine("瞬时流量" + _instantaneousFlow.ToString() + "m³/h");
|
||||||
|
|
||||||
StringBuilder _positiveFlow = new StringBuilder("");//累积流量 --带符号整型,低字节在前,高字节在后,缩小 10 倍为实际数值,单位: m3。
|
StringBuilder _positiveFlow = new StringBuilder("");//累积流量 --带符号整型,低字节在前,高字节在后,缩小 10 倍为实际数值,单位: m³。
|
||||||
for (int i = 56 + multiplier; i <= 63 + multiplier; i++)
|
for (int i = 56 + multiplier; i <= 63 + multiplier; i++)
|
||||||
{
|
{
|
||||||
_positiveFlow.Append(message[i]);
|
_positiveFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
int positiveFlow = int.Parse(/*hexStr2Str*/(interconvert(56 + multiplier, 63 + multiplier, _positiveFlow.ToString()))) / 10;//???
|
int positiveFlow = int.Parse(/*hexStr2Str*/(interconvert(56 + multiplier, 63 + multiplier, _positiveFlow.ToString()))) / 10;//???
|
||||||
//Console.WriteLine("累积流量:" + positiveFlow + "m3");
|
//Console.WriteLine("累积流量:" + positiveFlow + "m³");
|
||||||
|
|
||||||
StringBuilder waterTemperature = new StringBuilder("");//水温 --浮点型,单位: ℃
|
StringBuilder waterTemperature = new StringBuilder("");//水温 --浮点型,单位: ℃
|
||||||
for (int i = 64 + multiplier; i <= 71 + multiplier; i++)
|
for (int i = 64 + multiplier; i <= 71 + multiplier; i++)
|
||||||
|
|
@ -1294,38 +1351,54 @@ namespace ShuiBiao
|
||||||
}
|
}
|
||||||
if (binAccumulation(4 + multiplier, 111 + multiplier, message).ToUpper() != builder.ToString().ToUpper())
|
if (binAccumulation(4 + multiplier, 111 + multiplier, message).ToUpper() != builder.ToString().ToUpper())
|
||||||
{
|
{
|
||||||
|
wd.IsValid = false;
|
||||||
Console.WriteLine("接收数据校验失败" + ": " + message);
|
Console.WriteLine("接收数据校验失败" + ": " + message);
|
||||||
log.Info("登录帧校验失败" + ": " + message);
|
log.Info("登录帧校验失败" + ": " + message);
|
||||||
Isgo(message, baseNum);
|
Isgo(message, baseNum);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else wd.IsValid = true;
|
||||||
|
|
||||||
shareAnalysis(message, multiplier);
|
|
||||||
|
shareAnalysis(message, multiplier, wd);
|
||||||
if (validity.ToString() == "26")
|
if (validity.ToString() == "26")
|
||||||
{
|
{
|
||||||
Console.WriteLine("抄表数据有效");
|
Console.WriteLine("抄表数据有效");
|
||||||
|
wd.is_the_data_valid = "有效";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine("抄表数据无效");
|
Console.WriteLine("抄表数据无效");
|
||||||
|
wd.is_the_data_valid = "无效";
|
||||||
}
|
}
|
||||||
Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
||||||
Console.WriteLine("瞬时流量" + _instantaneousFlow.ToString() + "m3/h");
|
wd.version_number = versionNum.ToString();
|
||||||
Console.WriteLine("累积流量:" + positiveFlow + "m3");
|
Console.WriteLine("瞬时流量" + _instantaneousFlow.ToString() + "m³/h");
|
||||||
|
wd.instantaneous_delivery = (decimal)_instantaneousFlow;
|
||||||
|
Console.WriteLine("累积流量:" + positiveFlow + "m³");
|
||||||
|
|
||||||
Console.WriteLine("水温:" + _waterTemperature + "℃");
|
Console.WriteLine("水温:" + _waterTemperature + "℃");
|
||||||
|
wd.water_temperature = (decimal)_waterTemperature;
|
||||||
Console.WriteLine("累积运行时间:" + RunTime + "h");
|
Console.WriteLine("累积运行时间:" + RunTime + "h");
|
||||||
|
wd.cumulative_running_time = RunTime;
|
||||||
Console.WriteLine("电池电压:" + cellVoltage + "v");
|
Console.WriteLine("电池电压:" + cellVoltage + "v");
|
||||||
|
wd.cell_voltage = (decimal)cellVoltage;
|
||||||
Console.WriteLine("管径:" + pipeSize + "mm");
|
Console.WriteLine("管径:" + pipeSize + "mm");
|
||||||
capacity.Clear().Append(interconvert(0, 0, capacity.ToString()));
|
wd.caliber = (decimal)pipeSize;
|
||||||
Console.WriteLine("量程:" + capacity);//???
|
var _capacity = (interconvert(0, 0, capacity.ToString()));
|
||||||
typeMalfunction(diagnose);
|
Console.WriteLine("量程:" + (_capacity));
|
||||||
|
wd.range = decimal.Parse(_capacity);
|
||||||
|
wd.fault_code = typeMalfunction(diagnose);
|
||||||
|
|
||||||
//数据校验 --版本号-故障代码
|
//数据校验 --版本号-故障代码
|
||||||
Console.WriteLine("数据校验:" + binAccumulation(46 + multiplier, 109 + multiplier, message));//版本号--故障码
|
Console.WriteLine("数据校验:" + binAccumulation(46 + multiplier, 109 + multiplier, message));//版本号--故障码
|
||||||
Console.WriteLine("校验位CS:" + binAccumulation(4 + multiplier, 111 + multiplier, message));//数据部长度--数据校验
|
Console.WriteLine("校验位CS:" + binAccumulation(4 + multiplier, 111 + multiplier, message));//数据部长度--数据校验
|
||||||
|
|
||||||
Isgo(message, baseNum);
|
wd.client_address = SimID.ToString();
|
||||||
|
//指令采集完毕
|
||||||
|
|
||||||
|
|
||||||
|
Isgo(message, baseNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -1333,7 +1406,7 @@ namespace ShuiBiao
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
/// <param name="baseNum">基数【前置位设备数据总数和】</param>
|
/// <param name="baseNum">基数【前置位设备数据总数和】</param>
|
||||||
public static void phenotype83(string message, int baseNum)
|
public static void SCL61D5_83(string message, int baseNum, StringBuilder SimID)
|
||||||
{
|
{
|
||||||
int multiplier;
|
int multiplier;
|
||||||
if (baseNum != 0)
|
if (baseNum != 0)
|
||||||
|
|
@ -1371,22 +1444,22 @@ namespace ShuiBiao
|
||||||
}
|
}
|
||||||
//Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
//Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
||||||
|
|
||||||
StringBuilder instantaneousFlow = new StringBuilder("");//瞬时流量 --浮点型,缩小 1000 倍为实际值,单位: m3/h
|
StringBuilder instantaneousFlow = new StringBuilder("");//瞬时流量 --浮点型,缩小 1000 倍为实际值,单位: m³/h
|
||||||
for (int i = 48 + multiplier; i <= 55 + multiplier; i++)
|
for (int i = 48 + multiplier; i <= 55 + multiplier; i++)
|
||||||
{
|
{
|
||||||
instantaneousFlow.Append(message[i]);
|
instantaneousFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
//Console.WriteLine("瞬时流量" + float.Parse(instantaneousFlow.ToString()) / 1000 + "m3/h");//???
|
//Console.WriteLine("瞬时流量" + float.Parse(instantaneousFlow.ToString()) / 1000 + "m³/h");//???
|
||||||
//Console.WriteLine("瞬时流量" + byteToFloat(instantaneousFlow.ToString()) / 1000 + "m3/h");
|
//Console.WriteLine("瞬时流量" + byteToFloat(instantaneousFlow.ToString()) / 1000 + "m³/h");
|
||||||
|
|
||||||
StringBuilder _positiveFlow = new StringBuilder("");//正累积流量 --带符号整型,低字节在前,高字节在后,缩小 10 倍为实际数值,单位: m3
|
StringBuilder _positiveFlow = new StringBuilder("");//正累积流量 --带符号整型,低字节在前,高字节在后,缩小 10 倍为实际数值,单位: m³
|
||||||
for (int i = 56 + multiplier; i <= 63 + multiplier; i++)
|
for (int i = 56 + multiplier; i <= 63 + multiplier; i++)
|
||||||
{
|
{
|
||||||
_positiveFlow.Append(message[i]);
|
_positiveFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
//int positiveFlow = int.Parse(hexStr2Str(interconvert(56 + multiplier, 63 + multiplier, _positiveFlow.ToString()))) / 10;//???
|
//int positiveFlow = int.Parse(hexStr2Str(interconvert(56 + multiplier, 63 + multiplier, _positiveFlow.ToString()))) / 10;//???
|
||||||
var positiveFlow = float.Parse(/*hexStr2Str*/(interconvert(56 + multiplier, 63 + multiplier, _positiveFlow.ToString()))) / 10;
|
var positiveFlow = float.Parse(/*hexStr2Str*/(interconvert(56 + multiplier, 63 + multiplier, _positiveFlow.ToString()))) / 10;
|
||||||
//Console.WriteLine("正累积流量:" + positiveFlow + "m3");
|
//Console.WriteLine("正累积流量:" + positiveFlow + "m³");
|
||||||
|
|
||||||
StringBuilder loseFlow = new StringBuilder("");//负累积流量 --BCD 码,缩小10 倍为实际数值,单位:m³
|
StringBuilder loseFlow = new StringBuilder("");//负累积流量 --BCD 码,缩小10 倍为实际数值,单位:m³
|
||||||
for (int i = 64 + multiplier; i <= 71 + multiplier; i++)
|
for (int i = 64 + multiplier; i <= 71 + multiplier; i++)
|
||||||
|
|
@ -1394,7 +1467,7 @@ namespace ShuiBiao
|
||||||
loseFlow.Append(message[i]);
|
loseFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
var _loseFlow = float.Parse(loseFlow.ToString()) / 10;
|
var _loseFlow = float.Parse(loseFlow.ToString()) / 10;
|
||||||
//Console.WriteLine("负累积流量:" + _loseFlow + "m3");
|
//Console.WriteLine("负累积流量:" + _loseFlow + "m³");
|
||||||
|
|
||||||
StringBuilder loseRunTime = new StringBuilder("");//负累积运行时间 --BCD 码,单位: h。
|
StringBuilder loseRunTime = new StringBuilder("");//负累积运行时间 --BCD 码,单位: h。
|
||||||
for (int i = 72 + multiplier; i <= 79 + multiplier; i++)
|
for (int i = 72 + multiplier; i <= 79 + multiplier; i++)
|
||||||
|
|
@ -1490,17 +1563,17 @@ namespace ShuiBiao
|
||||||
Console.WriteLine("抄表数据无效");
|
Console.WriteLine("抄表数据无效");
|
||||||
}
|
}
|
||||||
Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
Console.WriteLine("版本号:" + int.Parse(versionNum.ToString()));
|
||||||
Console.WriteLine("瞬时流量" + byteToFloat(instantaneousFlow.ToString()) / 1000 + "m3/h");
|
Console.WriteLine("瞬时流量" + byteToFloat(instantaneousFlow.ToString()) / 1000 + "m³/h");
|
||||||
Console.WriteLine("正累积流量:" + positiveFlow + "m3");
|
Console.WriteLine("正累积流量:" + positiveFlow + "m³");
|
||||||
Console.WriteLine("负累积流量:" + _loseFlow + "m3");
|
Console.WriteLine("负累积流量:" + _loseFlow + "m³");
|
||||||
Console.WriteLine("负累积运行时间:" + _loseRunTime + "h");
|
Console.WriteLine("负累积运行时间:" + _loseRunTime + "h");
|
||||||
Console.WriteLine("水温:" + _waterTemperature + "℃");
|
Console.WriteLine("水温:" + _waterTemperature + "℃");
|
||||||
Console.WriteLine("累积运行时间:" + RunTime + "h");
|
Console.WriteLine("累积运行时间:" + RunTime + "h");
|
||||||
Console.WriteLine("电池电压:" + cellVoltage + "v");
|
Console.WriteLine("电池电压:" + cellVoltage + "v");
|
||||||
Console.WriteLine("管径:" + pipeSize + "mm");
|
Console.WriteLine("管径:" + pipeSize + "mm");
|
||||||
capacity.Clear().Append(interconvert(0, 0, capacity.ToString()));
|
var _capacity = (interconvert(0, 0, capacity.ToString()));
|
||||||
Console.WriteLine("量程:" + capacity);//???
|
Console.WriteLine("量程:" + (_capacity));
|
||||||
//Console.WriteLine("阻尼系数:" + hexToASCII(dampingFactor.ToString()));
|
//Console.WriteLine("阻尼系数:" + hexToASCII(dampingFactor.ToString()));
|
||||||
typeMalfunction(diagnose);
|
typeMalfunction(diagnose);
|
||||||
|
|
||||||
//数据校验 --版本号-故障代码
|
//数据校验 --版本号-故障代码
|
||||||
|
|
@ -1516,7 +1589,7 @@ namespace ShuiBiao
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="message"></param>
|
/// <param name="message"></param>
|
||||||
/// <param name="baseNum">基数【前置位设备数据总数和】</param>
|
/// <param name="baseNum">基数【前置位设备数据总数和】</param>
|
||||||
public static void phenotype84(string message, int baseNum)
|
public static void SCL61D5_84(string message, int baseNum, StringBuilder SimID)
|
||||||
{
|
{
|
||||||
int multiplier;
|
int multiplier;
|
||||||
if (baseNum != 0)
|
if (baseNum != 0)
|
||||||
|
|
@ -1565,22 +1638,22 @@ namespace ShuiBiao
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
|
||||||
StringBuilder instantaneousFlow = new StringBuilder(""); //瞬时流量 --缩小 1000 倍为实际值,单位: m3/h
|
StringBuilder instantaneousFlow = new StringBuilder(""); //瞬时流量 --缩小 1000 倍为实际值,单位: m³/h
|
||||||
for (int i = 48 + multiplier; i <= 55 + multiplier; i++)
|
for (int i = 48 + multiplier; i <= 55 + multiplier; i++)
|
||||||
{
|
{
|
||||||
instantaneousFlow.Append(message[i]);
|
instantaneousFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
var _instantaneousFlow = float.Parse(instantaneousFlow.ToString()) / 1000;
|
var _instantaneousFlow = float.Parse(instantaneousFlow.ToString()) / 1000;
|
||||||
//Console.WriteLine("瞬时流量:" + signDelivery + _instantaneousFlow + "m3/h");
|
//Console.WriteLine("瞬时流量:" + signDelivery + _instantaneousFlow + "m³/h");
|
||||||
|
|
||||||
|
|
||||||
StringBuilder loseFlow = new StringBuilder("");//负累积流量 --缩小 10 倍为实际数值,单位: m3
|
StringBuilder loseFlow = new StringBuilder("");//负累积流量 --缩小 10 倍为实际数值,单位: m³
|
||||||
for (int i = 56 + multiplier; i <= 63 + multiplier; i++)
|
for (int i = 56 + multiplier; i <= 63 + multiplier; i++)
|
||||||
{
|
{
|
||||||
loseFlow.Append(message[i]);
|
loseFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
var _loseFlow = float.Parse(loseFlow.ToString()) / 10;
|
var _loseFlow = float.Parse(loseFlow.ToString()) / 10;
|
||||||
//Console.WriteLine("负累积流量:" + signDelivery + _loseFlow + "m3");
|
//Console.WriteLine("负累积流量:" + signDelivery + _loseFlow + "m³");
|
||||||
|
|
||||||
|
|
||||||
StringBuilder loseRunTime = new StringBuilder("");//负累积运行时间 --单位: h
|
StringBuilder loseRunTime = new StringBuilder("");//负累积运行时间 --单位: h
|
||||||
|
|
@ -1592,13 +1665,13 @@ namespace ShuiBiao
|
||||||
//Console.WriteLine("负累积运行时间:" + _loseRunTime + "h");
|
//Console.WriteLine("负累积运行时间:" + _loseRunTime + "h");
|
||||||
|
|
||||||
|
|
||||||
StringBuilder positiveFlow = new StringBuilder("");//正累积流量 --缩小 10 倍为实际数值,单位: m3
|
StringBuilder positiveFlow = new StringBuilder("");//正累积流量 --缩小 10 倍为实际数值,单位: m³
|
||||||
for (int i = 72 + multiplier; i <= 79 + multiplier; i++)
|
for (int i = 72 + multiplier; i <= 79 + multiplier; i++)
|
||||||
{
|
{
|
||||||
positiveFlow.Append(message[i]);
|
positiveFlow.Append(message[i]);
|
||||||
}
|
}
|
||||||
var _positiveFlow = float.Parse(positiveFlow.ToString()) / 10;
|
var _positiveFlow = float.Parse(positiveFlow.ToString()) / 10;
|
||||||
//Console.WriteLine("正累积流量:" + _positiveFlow + "m3");
|
//Console.WriteLine("正累积流量:" + _positiveFlow + "m³");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1671,10 +1744,10 @@ namespace ShuiBiao
|
||||||
signDelivery.Clear().Append("-");
|
signDelivery.Clear().Append("-");
|
||||||
Console.WriteLine("瞬时流量为负值");
|
Console.WriteLine("瞬时流量为负值");
|
||||||
}
|
}
|
||||||
Console.WriteLine("瞬时流量:" + signDelivery + _instantaneousFlow + "m3/h");
|
Console.WriteLine("瞬时流量:" + signDelivery + _instantaneousFlow + "m³/h");
|
||||||
Console.WriteLine("负累积流量:" + signDelivery + _loseFlow + "m3");
|
Console.WriteLine("负累积流量:" + signDelivery + _loseFlow + "m³");
|
||||||
Console.WriteLine("负累积运行时间:" + _loseRunTime + "h");
|
Console.WriteLine("负累积运行时间:" + _loseRunTime + "h");
|
||||||
Console.WriteLine("正累积流量:" + _positiveFlow + "m3");
|
Console.WriteLine("正累积流量:" + _positiveFlow + "m³");
|
||||||
Console.WriteLine("正累积运行时间:" + _positiveRunTime + "h");
|
Console.WriteLine("正累积运行时间:" + _positiveRunTime + "h");
|
||||||
Console.WriteLine("水温:" + _waterTemperature + "℃");
|
Console.WriteLine("水温:" + _waterTemperature + "℃");
|
||||||
Console.WriteLine("压力:" + _pressure + "mpa");
|
Console.WriteLine("压力:" + _pressure + "mpa");
|
||||||
|
|
@ -1688,6 +1761,21 @@ namespace ShuiBiao
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void SCL61D6_84(string message, int baseNum)
|
||||||
|
{
|
||||||
|
int multiplier;
|
||||||
|
if (baseNum != 0)
|
||||||
|
{
|
||||||
|
multiplier = baseNum;
|
||||||
|
baseNum += (64 + 16);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
multiplier = 0;
|
||||||
|
baseNum = (64 + 16);
|
||||||
|
}
|
||||||
|
//44位开始
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 判断功能码类型
|
/// 判断功能码类型
|
||||||
|
|
@ -1709,7 +1797,8 @@ namespace ShuiBiao
|
||||||
clockAnalysis(message);
|
clockAnalysis(message);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Console.WriteLine("无此功能码: " + str);
|
Console.WriteLine("无此功能码: " + str);
|
||||||
|
log.Info("报文: " + message + " 无此功能码: " + str);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1783,45 +1872,49 @@ namespace ShuiBiao
|
||||||
/// 判断报警码**只在使用08 码上报数据时才会存在
|
/// 判断报警码**只在使用08 码上报数据时才会存在
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="alarmCode"></param>
|
/// <param name="alarmCode"></param>
|
||||||
public static void typeAlarmcode(StringBuilder alarmCode)
|
public static string typeAlarmcode(StringBuilder alarmCode)
|
||||||
{
|
{
|
||||||
switch (alarmCode.ToString())
|
switch (alarmCode.ToString())
|
||||||
{
|
{
|
||||||
|
case "00":
|
||||||
|
alarmCode.Clear().Append("正常");
|
||||||
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
|
return alarmCode.ToString();
|
||||||
case "01":
|
case "01":
|
||||||
alarmCode.Clear().Append("正向流量超上限");
|
alarmCode.Clear().Append("正向流量超上限");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "02":
|
case "02":
|
||||||
alarmCode.Clear().Append("正向流量超下限");
|
alarmCode.Clear().Append("正向流量超下限");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "04":
|
case "04":
|
||||||
alarmCode.Clear().Append("负向流量超上限");
|
alarmCode.Clear().Append("负向流量超上限");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "08":
|
case "08":
|
||||||
alarmCode.Clear().Append("负向流量超下限");
|
alarmCode.Clear().Append("负向流量超下限");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "10":
|
case "10":
|
||||||
alarmCode.Clear().Append("压力超上限");
|
alarmCode.Clear().Append("压力超上限");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "20":
|
case "20":
|
||||||
alarmCode.Clear().Append("压力超下限");
|
alarmCode.Clear().Append("压力超下限");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "40":
|
case "40":
|
||||||
alarmCode.Clear().Append("预留");
|
alarmCode.Clear().Append("预留");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
case "80":
|
case "80":
|
||||||
alarmCode.Clear().Append("预留");
|
alarmCode.Clear().Append("预留");
|
||||||
Console.WriteLine("报警码:" + alarmCode);
|
Console.WriteLine("报警码:" + alarmCode);
|
||||||
break;
|
return alarmCode.ToString();
|
||||||
default:
|
default:
|
||||||
Console.WriteLine($"无此报警码: {alarmCode}");
|
Console.WriteLine($"无此报警码: {alarmCode}");
|
||||||
break;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1829,52 +1922,52 @@ namespace ShuiBiao
|
||||||
/// 判断故障码**当设备上报 0x06 故障时,不应再上报其他故障。
|
/// 判断故障码**当设备上报 0x06 故障时,不应再上报其他故障。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="diagnose"></param>
|
/// <param name="diagnose"></param>
|
||||||
public static void typeMalfunction(StringBuilder diagnose)
|
public static string typeMalfunction(StringBuilder diagnose)
|
||||||
{
|
{
|
||||||
switch (diagnose.ToString())
|
switch (diagnose.ToString())
|
||||||
{
|
{
|
||||||
case "01":
|
case "01":
|
||||||
diagnose.Clear().Append("池电压低于3.37V,需要更换电池");
|
diagnose.Clear().Append("池电压低于3.37V,需要更换电池");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "02":
|
case "02":
|
||||||
diagnose.Clear().Append("空管或者换能器故障无测量信号");
|
diagnose.Clear().Append("空管或者换能器故障无测量信号");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "03":
|
case "03":
|
||||||
diagnose.Clear().Append("代码01 和代码02 同时发生");
|
diagnose.Clear().Append("代码01 和代码02 同时发生");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "04":
|
case "04":
|
||||||
diagnose.Clear().Append("电池电压低于3.3V,必须更换电池");
|
diagnose.Clear().Append("电池电压低于3.3V,必须更换电池");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "05":
|
case "05":
|
||||||
diagnose.Clear().Append("传感器和换能器之间通讯故障,无通讯");
|
diagnose.Clear().Append("传感器和换能器之间通讯故障,无通讯");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "06":
|
case "06":
|
||||||
diagnose.Clear().Append("E2PROM 损坏");
|
diagnose.Clear().Append("E2PROM 损坏");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "10":
|
case "10":
|
||||||
diagnose.Clear().Append("供水温度传感器故障(短路、开路)或供水温度低于2℃");
|
diagnose.Clear().Append("供水温度传感器故障(短路、开路)或供水温度低于2℃");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "20":
|
case "20":
|
||||||
diagnose.Clear().Append("供水温度超出150℃");
|
diagnose.Clear().Append("供水温度超出150℃");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "40":
|
case "40":
|
||||||
diagnose.Clear().Append("回水温度传感器故障(短路、开路)或回水温度低于2℃");
|
diagnose.Clear().Append("回水温度传感器故障(短路、开路)或回水温度低于2℃");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
case "80":
|
case "80":
|
||||||
diagnose.Clear().Append("回水温度超出150℃");
|
diagnose.Clear().Append("回水温度超出150℃");
|
||||||
Console.WriteLine("故障码:" + diagnose);
|
Console.WriteLine("故障码:" + diagnose);
|
||||||
break;
|
return diagnose.ToString();
|
||||||
default:
|
default:
|
||||||
break;
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,7 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ShuiBiao.cs" />
|
<Compile Include="ShuiBiao.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="water_data.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
------------------------------------------------
|
|
||||||
2023-02-27 16:55:04,179 [4] INFO loginfo - 接收到 127.0.0.1:59905: 40 3A 00 46 15 13 32 70 24 76 01 46 00 23 02 27 10 55 05 00 01 41 01 4A 26 48 5A 47 39 36 5F 32 30 31 32 30 37 56 31 2D 31 2E 31 23 4B 18 4C 0E 10 4D 66 34 31 35 31 33 33 32 37 30 32 34 37 36 4F 07 00 00 00 00 00 00 00 17 0D 0A 40 3A 00 22 15 13 32 70 24 76 08 01 01 01 41 01 00 23 02 27 10 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 0D 0A
|
|
||||||
2023-02-27 16:55:04,188 [4] INFO loginfo - 登录帧校验失败: 403A0046151332702476014600230227105505000141014A26485A4739365F32303132303756312D312E31234B184C0E104D66343135313333323730323437364F0700000000000000170D0A403A0022151332702476080101014101002302271054000000000000000000000000000000830D0A
|
|
||||||
2023-02-27 16:59:43,273 [4] INFO loginfo - 接收到 127.0.0.1:59905: 40 3A 00 46 15 13 32 70 24 76 01 46 00 23 02 27 10 55 05 00 01 41 01 4A 26 48 5A 47 39 36 5F 32 30 31 32 30 37 56 31 2D 31 2E 31 23 4B 18 4C 0E 10 4D 66 34 31 35 31 33 33 32 37 30 32 34 37 36 4F 07 00 00 00 00 00 00 00 17 0D 0A 40 3A 00 22 15 13 32 70 24 76 08 01 01 01 41 01 00 23 02 27 10 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 0D 0A
|
|
||||||
2023-02-27 17:00:09,785 [4] INFO loginfo - 登录帧校验失败: 403A0046151332702476014600230227105505000141014A26485A4739365F32303132303756312D312E31234B184C0E104D66343135313333323730323437364F0700000000000000170D0A403A0022151332702476080101014101002302271054000000000000000000000000000000830D0A
|
|
||||||
2023-02-27 17:00:18,585 [4] INFO loginfo - 接收到 127.0.0.1:59905: 40 3A 00 46 15 13 32 70 24 76 01 46 00 23 02 27 10 55 05 00 01 41 01 4A 26 48 5A 47 39 36 5F 32 30 31 32 30 37 56 31 2D 31 2E 31 23 4B 18 4C 0E 10 4D 66 34 31 35 31 33 33 32 37 30 32 34 37 36 4F 07 00 00 00 00 00 00 00 17 0D 0A 40 3A 00 22 15 13 32 70 24 76 08 01 01 01 41 01 00 23 02 27 10 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 0D 0A
|
|
||||||
------------------------------------------------
|
|
||||||
2023-02-27 17:01:28,034 [4] INFO loginfo - 接收到 127.0.0.1:59944: 40 3A 00 46 15 13 32 70 24 76 01 46 00 23 02 27 10 55 05 00 01 41 01 4A 26 48 5A 47 39 36 5F 32 30 31 32 30 37 56 31 2D 31 2E 31 23 4B 18 4C 0E 10 4D 66 34 31 35 31 33 33 32 37 30 32 34 37 36 4F 07 00 00 00 00 00 00 00 17 0D 0A 40 3A 00 22 15 13 32 70 24 76 08 01 01 01 41 01 00 23 02 27 10 54 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 0D 0A
|
|
||||||
------------------------------------------------
|
|
||||||
2023-02-27 17:10:42,313 [4] INFO loginfo - 接收到 127.0.0.1:60011: 40 3A 00 3B 15 13 04 90 07 14 08 01 01 01 41 84 00 20 03 27 06 50 26 0A 00 00 01 76 00 00 15 23 00 00 01
|
|
||||||
------------------------------------------------
|
|
||||||
2023-02-27 17:12:15,786 [4] INFO loginfo - 接收到 127.0.0.1:60017: 40 3A 00 46 15 13 04 90 07 14 01 49 00 20 03 27 06 50 46 00 01 41 84 4A 26 48 5A 47 39 36 5F 32 30 31 32 30 37 56 31 2D 31 2E 31 23 4B 18 4C 0E 10 4D 66 34 31 35 31 33 30 34 39 30 30 37 31 34 4F 07 00 00 00 00 00 00 00 3A 0D 0A
|
|
||||||
2023-02-27 17:13:16,456 [5] INFO loginfo - 接收到 127.0.0.1:60022: 40 3A 00 3B 15 13 04 90 07 14 08 01 01 01 41 84 00 20 03 27 06 50 26 0A 00 00 01 76 00 00 15 23 00 00 01 00 00 00 12 00 00 00 01 50 00 00 28 32 00 00 09 01 10 91 CA 0D 0A
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
4c45faaedcb9e5670ec8ff8478bc1367530a318d
|
be9afcdc750fc7f7e2cb29de52e861e0b13d9617
|
||||||
|
|
|
||||||
|
|
@ -18,3 +18,14 @@ D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.CoreCompileI
|
||||||
D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.CopyComplete
|
D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.CopyComplete
|
||||||
D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.exe
|
D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.exe
|
||||||
D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.pdb
|
D:\XM\C#\DianBiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.pdb
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\bin\Debug\ShuiBiao.exe.config
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\bin\Debug\ShuiBiao.exe
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\bin\Debug\ShuiBiao.pdb
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\bin\Debug\log4net.dll
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\bin\Debug\log4net.xml
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.AssemblyReference.cache
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.SuggestedBindingRedirects.cache
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.CoreCompileInputs.cache
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.csproj.CopyComplete
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.exe
|
||||||
|
D:\XM\C#\ZHshuibiao_TCP\ZHshuibiao\shuibiao\obj\Debug\ShuiBiao.pdb
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,270 @@
|
||||||
|
/** 版本信息模板在安装目录下,可自行修改。
|
||||||
|
* water_data.cs
|
||||||
|
*
|
||||||
|
* 功 能: N/A
|
||||||
|
* 类 名: water_data
|
||||||
|
*
|
||||||
|
* Ver 变更日期 负责人 变更内容
|
||||||
|
* ───────────────────────────────────
|
||||||
|
* V0.01 2023/2/26 20:48:51 N/A 初版
|
||||||
|
*
|
||||||
|
* Copyright (c) 2012 Maticsoft Corporation. All rights reserved.
|
||||||
|
*┌──────────────────────────────────┐
|
||||||
|
*│ 此技术信息为本公司机密信息,未经本公司书面同意禁止向第三方披露. │
|
||||||
|
*│ 版权所有:动软卓越(北京)科技有限公司 │
|
||||||
|
*└──────────────────────────────────┘
|
||||||
|
*/
|
||||||
|
using System;
|
||||||
|
namespace DataService.Model
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// water_data:实体类(属性说明自动提取数据库字段的描述信息)
|
||||||
|
/// </summary>
|
||||||
|
[Serializable]
|
||||||
|
public partial class water_data
|
||||||
|
{
|
||||||
|
public water_data()
|
||||||
|
{}
|
||||||
|
#region Model
|
||||||
|
private string _water_id;
|
||||||
|
private string _stop_number;
|
||||||
|
private string _phenotype;
|
||||||
|
private string _client_address;
|
||||||
|
private string _version_number;
|
||||||
|
private decimal? _instantaneous_delivery;
|
||||||
|
private string _transient_flow_symbol;
|
||||||
|
private decimal? _cumulative_running_time;
|
||||||
|
private decimal? _positive_cumulative_traffic;
|
||||||
|
private decimal? _positive_cumulative_run_time;
|
||||||
|
private decimal? _negative_cumulative_traffic;
|
||||||
|
private decimal? _negative_cumulative_running_time;
|
||||||
|
private decimal? _water_temperature;
|
||||||
|
private decimal? _cell_voltage;
|
||||||
|
private decimal? _caliber;
|
||||||
|
private decimal? _range;
|
||||||
|
private string _fault_code;
|
||||||
|
private string _alarm_code;
|
||||||
|
private DateTime? _acquisition_time;
|
||||||
|
private string _diagnostic_code;
|
||||||
|
private string _is_the_data_valid;
|
||||||
|
private DateTime? _create_time;
|
||||||
|
private string _r1;
|
||||||
|
private string _r2;
|
||||||
|
private string _r3;
|
||||||
|
/// <summary>
|
||||||
|
/// 主键
|
||||||
|
/// </summary>
|
||||||
|
public string water_id
|
||||||
|
{
|
||||||
|
set{ _water_id=value;}
|
||||||
|
get{return _water_id;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 站号
|
||||||
|
/// </summary>
|
||||||
|
public string stop_number
|
||||||
|
{
|
||||||
|
set{ _stop_number=value;}
|
||||||
|
get{return _stop_number;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 表型
|
||||||
|
/// </summary>
|
||||||
|
public string phenotype
|
||||||
|
{
|
||||||
|
set{ _phenotype=value;}
|
||||||
|
get{return _phenotype;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 客户端地址A
|
||||||
|
/// </summary>
|
||||||
|
public string client_address
|
||||||
|
{
|
||||||
|
set{ _client_address=value;}
|
||||||
|
get{return _client_address;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 版本号
|
||||||
|
/// </summary>
|
||||||
|
public string version_number
|
||||||
|
{
|
||||||
|
set{ _version_number=value;}
|
||||||
|
get{return _version_number;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 瞬时流量
|
||||||
|
/// </summary>
|
||||||
|
public decimal? instantaneous_delivery
|
||||||
|
{
|
||||||
|
set{ _instantaneous_delivery=value;}
|
||||||
|
get{return _instantaneous_delivery;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 瞬时流量符号
|
||||||
|
/// </summary>
|
||||||
|
public string transient_flow_symbol
|
||||||
|
{
|
||||||
|
set{ _transient_flow_symbol=value;}
|
||||||
|
get{return _transient_flow_symbol;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 累积运行时间
|
||||||
|
/// </summary>
|
||||||
|
public decimal? cumulative_running_time
|
||||||
|
{
|
||||||
|
set{ _cumulative_running_time=value;}
|
||||||
|
get{return _cumulative_running_time;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 正累积流量
|
||||||
|
/// </summary>
|
||||||
|
public decimal? positive_cumulative_traffic
|
||||||
|
{
|
||||||
|
set{ _positive_cumulative_traffic=value;}
|
||||||
|
get{return _positive_cumulative_traffic;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 正累积运行时间
|
||||||
|
/// </summary>
|
||||||
|
public decimal? positive_cumulative_run_time
|
||||||
|
{
|
||||||
|
set{ _positive_cumulative_run_time=value;}
|
||||||
|
get{return _positive_cumulative_run_time;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 负累积流量
|
||||||
|
/// </summary>
|
||||||
|
public decimal? negative_cumulative_traffic
|
||||||
|
{
|
||||||
|
set{ _negative_cumulative_traffic=value;}
|
||||||
|
get{return _negative_cumulative_traffic;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 负累积运行时间
|
||||||
|
/// </summary>
|
||||||
|
public decimal? negative_cumulative_running_time
|
||||||
|
{
|
||||||
|
set{ _negative_cumulative_running_time=value;}
|
||||||
|
get{return _negative_cumulative_running_time;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 水温
|
||||||
|
/// </summary>
|
||||||
|
public decimal? water_temperature
|
||||||
|
{
|
||||||
|
set{ _water_temperature=value;}
|
||||||
|
get{return _water_temperature;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 电池电压
|
||||||
|
/// </summary>
|
||||||
|
public decimal? cell_voltage
|
||||||
|
{
|
||||||
|
set{ _cell_voltage=value;}
|
||||||
|
get{return _cell_voltage;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 管径
|
||||||
|
/// </summary>
|
||||||
|
public decimal? caliber
|
||||||
|
{
|
||||||
|
set{ _caliber=value;}
|
||||||
|
get{return _caliber;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 量程
|
||||||
|
/// </summary>
|
||||||
|
public decimal? range
|
||||||
|
{
|
||||||
|
set{ _range=value;}
|
||||||
|
get{return _range;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 故障代码
|
||||||
|
/// </summary>
|
||||||
|
public string fault_code
|
||||||
|
{
|
||||||
|
set{ _fault_code=value;}
|
||||||
|
get{return _fault_code;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 报警码
|
||||||
|
/// </summary>
|
||||||
|
public string alarm_code
|
||||||
|
{
|
||||||
|
set{ _alarm_code=value;}
|
||||||
|
get{return _alarm_code;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 采集时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? acquisition_time
|
||||||
|
{
|
||||||
|
set{ _acquisition_time=value;}
|
||||||
|
get{return _acquisition_time;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 诊断代码
|
||||||
|
/// </summary>
|
||||||
|
public string diagnostic_code
|
||||||
|
{
|
||||||
|
set{ _diagnostic_code=value;}
|
||||||
|
get{return _diagnostic_code;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 数据是否有效
|
||||||
|
/// </summary>
|
||||||
|
public string is_the_data_valid
|
||||||
|
{
|
||||||
|
set{ _is_the_data_valid=value;}
|
||||||
|
get{return _is_the_data_valid;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 创建日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? create_time
|
||||||
|
{
|
||||||
|
set{ _create_time=value;}
|
||||||
|
get{return _create_time;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 备用1
|
||||||
|
/// </summary>
|
||||||
|
public string r1
|
||||||
|
{
|
||||||
|
set{ _r1=value;}
|
||||||
|
get{return _r1;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 备用2
|
||||||
|
/// </summary>
|
||||||
|
public string r2
|
||||||
|
{
|
||||||
|
set{ _r2=value;}
|
||||||
|
get{return _r2;}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 备用3
|
||||||
|
/// </summary>
|
||||||
|
public string r3
|
||||||
|
{
|
||||||
|
set{ _r3=value;}
|
||||||
|
get{return _r3;}
|
||||||
|
}
|
||||||
|
#endregion Model
|
||||||
|
|
||||||
|
|
||||||
|
private bool _isValid;
|
||||||
|
/// <summary>
|
||||||
|
/// 数据是否有效
|
||||||
|
/// </summary>
|
||||||
|
public bool IsValid { get { return _isValid; } set { _isValid = value; } }
|
||||||
|
|
||||||
|
private string _acquisition_timeA;
|
||||||
|
/// <summary>
|
||||||
|
/// 采集时间
|
||||||
|
/// </summary>
|
||||||
|
public string acquisition_timeA { get { return _acquisition_timeA; } set { _acquisition_timeA = value; } }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue