Send Data

This commit is contained in:
Georgy Khatuncev 2021-08-02 23:01:18 +05:00
parent 25f8be5f24
commit 6ba90bf7e5
118 changed files with 1794 additions and 33 deletions

Binary file not shown.

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DataClient.Struct;
namespace ApiServer.ApiStruct
{
public class DataCheckApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
}
public class DataCheckClient
{
public bool Status { get; set; }
public bool Exist { get; set; }
public ulong DataSize { get; set; }
}
public class DataCreateApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
public byte[] Struct { get; set; }
}
public class DataCreateClient
{
public bool Status { get; set; }
}
}

@ -0,0 +1,86 @@
using Microsoft.AspNetCore.Mvc;
using NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ApiServer.ApiStruct;
using Newtonsoft.Json;
using System.IO;
namespace ApiServer.Controllers
{
[ApiController, Route("[controller]")]
public class DataController : ControllerBase
{
private Logger log = LogManager.GetCurrentClassLogger();
[HttpPost, Route("check")]
public DataCheckClient Check([FromBody] object value)
{
try
{
var getResult = JsonConvert.DeserializeObject<DataCheckApi>(value.ToString());
if (!getResult.Status || string.IsNullOrEmpty(getResult.Name))
{
log.Warn("Wrong answer.");
return new DataCheckClient();
}
var dataDir = Path.Combine(
Directory.GetCurrentDirectory(),
"data", "data",
getResult.DateAndTime.Year.ToString("D4"),
getResult.DateAndTime.Month.ToString("D2"),
getResult.DateAndTime.Day.ToString("D2"),
getResult.Name);
log.Info("Search data: " + dataDir);
if (!System.IO.File.Exists(dataDir))
{
log.Info("Data not exist: " + dataDir);
return new DataCheckClient { Status = true, Exist = false, DataSize = 0 };
}
var dataArr = System.IO.File.ReadAllBytes(dataDir);
log.Info("Send data size: " + dataArr.Length + " | " + dataDir);
return new DataCheckClient { Status = true, Exist = true, DataSize = (ulong)dataArr.Length };
}
catch (Exception e)
{
log.Warn(e);
return new DataCheckClient();
}
}
[HttpPost, Route("create")]
public DataCreateClient Create([FromBody] object value)
{
try
{
var getResult = JsonConvert.DeserializeObject<DataCreateApi>(value.ToString());
if (!getResult.Status ||
string.IsNullOrEmpty(getResult.Name) ||
getResult.Struct.Length == 0)
{
log.Warn("Wrong answer.");
return new DataCreateClient();
}
var dataDir = Path.Combine(
Directory.GetCurrentDirectory(),
"data", "data",
getResult.DateAndTime.Year.ToString("D4"),
getResult.DateAndTime.Month.ToString("D2"),
getResult.DateAndTime.Day.ToString("D2"));
if (!Directory.Exists(dataDir))
Directory.CreateDirectory(dataDir);
dataDir = Path.Combine(dataDir, getResult.Name);
System.IO.File.WriteAllBytes(dataDir, getResult.Struct);
log.Info("Save data: " + dataDir);
return new DataCreateClient { Status = true };
}
catch (Exception e)
{
log.Warn(e);
return new DataCreateClient();
}
}
}
}

@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2021-08-01T14:33:24.0605718Z;True|2021-08-01T19:29:09.0622642+05:00;True|2021-08-01T16:14:00.2837619+05:00;True|2021-07-31T17:43:14.2797709+05:00;False|2021-07-31T17:41:49.3152422+05:00;True|2021-07-31T14:07:45.4057263+05:00;False|2021-07-31T13:53:38.4952669+05:00;</History>
<History>True|2021-08-02T16:42:10.4757931Z;True|2021-08-01T19:33:24.0605718+05:00;True|2021-08-01T19:29:09.0622642+05:00;True|2021-08-01T16:14:00.2837619+05:00;True|2021-07-31T17:43:14.2797709+05:00;False|2021-07-31T17:41:49.3152422+05:00;True|2021-07-31T14:07:45.4057263+05:00;False|2021-07-31T13:53:38.4952669+05:00;</History>
<_PublishTargetUrl>F:\GIT\ASCKU_PC\ApiServer\bin\Release\</_PublishTargetUrl>
</PropertyGroup>
</Project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -1 +1 @@
d29ca1fc6ac51c211fa6b3f4cdcf6f83a5b03d11
0ba5eb43d3c8baaf93d0a30f42372f5107b7f4d6

33
ClientCollector/Data.cs Normal file

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DataClient.Struct;
namespace ApiServer.ApiStruct
{
public class DataCheckApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
}
public class DataCheckClient
{
public bool Status { get; set; }
public bool Exist { get; set; }
public ulong DataSize { get; set; }
}
public class DataCreateApi
{
public bool Status { get; set; }
public DateTime DateAndTime { get; set; }
public string Name { get; set; }
public byte[] Struct { get; set; }
}
public class DataCreateClient
{
public bool Status { get; set; }
}
}

@ -14,6 +14,7 @@ using Newtonsoft.Json;
using System.Text;
using System.IO;
using System.Collections.Generic;
using System.Diagnostics;
namespace ClientCollector
{
@ -26,27 +27,36 @@ namespace ClientCollector
LogConf();
log.Info("Start Client Collector.");
Task taskPasp = null;
Task taskData = null;
while (true)
{
if (taskPasp == null || taskPasp.IsCompleted)
{
log.Info("Start Pasport Task.");
taskPasp = Task.Run(WorkPasport);
taskPasp = WorkPasport();
}
if (taskData == null || taskData.IsCompleted)
{
log.Info("Start Data Task.");
taskData = WorkData();
}
log.Info("Wait tasks.");
Task.WaitAny(new Task[] { taskPasp });
Task.WaitAny(new Task[] { taskPasp, taskData });
}
}
static async void WorkPasport()
static async Task WorkPasport()
{
await Task.Delay(1000);
var IpSTP = "10.10.45.152";
var PortSTP = 1070;
var nameCurrDate = "pasport";
var currDate = GetCurrData(nameCurrDate);
if (!currDate.HasValue)
currDate = new DateTime(2001, 01, 01);
currDate = new DateTime(2001, 02, 01);
NETClient netClient = new NETClient(IpSTP, PortSTP);
var flagcycle = false;
while (currDate.Value < DateTime.Now.AddDays(-1))
{
try
@ -56,14 +66,17 @@ namespace ClientCollector
currDate.Value.Month.ToString("D2") + '/' +
currDate.Value.Day.ToString("D2");
log.Info("Get pasports from: " + currDir);
while (!netClient.Connected())
if (!netClient.Connect())
while (!netClient.Connected() || flagcycle)
{
flagcycle = false;
if (!netClient.ReConnect())
{
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
log.Warn("Can't connect to STP.");
await Task.Delay(10000);
}
}
var currPasports = netClient.Full_Dir_Browse(currDir);
netClient.Close();
if (currPasports == null)
@ -75,20 +88,25 @@ namespace ClientCollector
try
{
log.Info("Get pasport: " + paspDir);
while (!netClient.Connected())
if (!netClient.Connect())
while (!netClient.Connected() || flagcycle)
{
flagcycle = false;
if (!netClient.ReConnect())
{
log.Warn("Can't connect to STP.");
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
await Task.Delay(10000);
}
}
var pasp = netClient.Full_Pasp_Download(paspDir);
netClient.Close();
if (pasp == null || !pasp.HasData)
{
log.Warn("Can't get pasport.");
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
flagcycle = true;
await Task.Delay(10000);
continue;
}
@ -102,6 +120,8 @@ namespace ClientCollector
catch (Exception e)
{
log.Warn(e.Message);
netClient.Close();
flagcycle = true;
await Task.Delay(5000);
}
}
@ -110,11 +130,14 @@ namespace ClientCollector
log.Info("End day: " + currDir);
SaveCurrData(nameCurrDate, currDate.Value);
currDate = currDate.Value.AddDays(1);
await Task.Delay(60000);
await Task.Delay(5000);
}
catch (Exception e)
{
log.Warn(e.Message);
flagcycle = true;
netClient.Close();
netClient = new NETClient(IpSTP, PortSTP);
await Task.Delay(1000 * 60 * 5);
}
}
@ -123,13 +146,150 @@ namespace ClientCollector
log.Info("Wait next day.");
await Task.Delay(1000 * 60 * 60);
} while (!(currDate.Value < DateTime.Now.AddDays(-1)));
currDate.Value.AddMonths(-1);
currDate.Value.AddDays(-15);
SaveCurrData(nameCurrDate, currDate.Value);
}
static bool SendPasport(Pasport pasp)
static async Task WorkData()
{
HttpWebRequest GetRequest(string path, bool useProxy = true)
await Task.Delay(1000);
var IpSTP = "10.10.45.152";
var PortSTP = 1070;
NETClient netClient = new NETClient(IpSTP, PortSTP);
var mainDir = Path.Combine(Directory.GetCurrentDirectory(), "archive");
var nameCurrDate = "data";
var currDate = GetCurrData(nameCurrDate);
if (!currDate.HasValue)
currDate = new DateTime(2001, 02, 01);
var flagcycle = false;
while (currDate.Value < DateTime.Now.AddDays(-1))
{
try
{
while(DateTime.Now.Hour < 12)
{
log.Info("Await 12:00.");
await Task.Delay(15000 * 60);
}
log.Info("Connect to archive.");
await CreateConnectionNFS(mainDir);
var subDir = Path.Combine(mainDir, "data",
currDate.Value.Year.ToString("D4"),
currDate.Value.Month.ToString("D2"),
currDate.Value.Day.ToString("D2"));
log.Info("Check dir: " + subDir);
if (Directory.Exists(subDir))
{
var listFiles = Directory.GetFiles(subDir);
foreach(var fileDir in listFiles)
{
log.Info("Get file: " + fileDir);
var fileStruct = File.ReadAllBytes(fileDir);
log.Info("Send file to API: " + fileDir);
while (!SendData(currDate.Value, Path.GetFileName(fileDir), fileStruct))
{
log.Warn("Can't send data to API.");
await Task.Delay(10000);
}
}
}
log.Info("End day: " + subDir);
SaveCurrData(nameCurrDate, currDate.Value);
currDate = currDate.Value.AddDays(1);
await Task.Delay(5000);
}
catch (Exception e)
{
log.Warn(e.Message);
}
}
do
{
log.Info("Wait next day.");
await Task.Delay(1000 * 60 * 60);
} while (!(currDate.Value < DateTime.Now.AddDays(-1)));
currDate.Value.AddDays(-15);
SaveCurrData(nameCurrDate, currDate.Value);
}
static async Task CreateConnectionNFS(string dir)
{
var dirCreated = false;
while (!dirCreated)
{
try
{
dirCreated = Directory.Exists(Path.Combine(dir));
if (!dirCreated) Directory.CreateDirectory(dir);
}
catch (Exception e)
{
log.Warn(e.Message);
log.Warn("Can't create directory");
await Task.Delay(60000);
}
}
var connected = false;
while (!connected)
{
try
{
var procD = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "/usr/bin/umount",
Arguments = dir,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
}
};
var procC = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "/usr/bin/mount",
Arguments = "-t nfs 10.10.45.236:/archiv " + dir,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
},
};
if (!procC.Start())
{
log.Warn("Can't start mount command.");
await Task.Delay(60000);
continue;
}
var answer = procC.StandardError.ReadToEnd() + procC.StandardOutput.ReadToEnd();
connected = string.IsNullOrEmpty(answer);
if (connected)
{
log.Info("Connect Success");
continue;
}
else log.Info(answer);
if (!procD.Start())
{
log.Warn("Can't start umount command.");
await Task.Delay(60000);
continue;
}
answer = procC.StandardError.ReadToEnd() + procC.StandardOutput.ReadToEnd();
log.Info(string.IsNullOrEmpty(answer) ? "NFS disconnected." : answer);
}
catch (Exception e)
{
log.Warn(e.Message);
log.Warn("Can't connect to NFS.");
await Task.Delay(60000);
}
}
}
static HttpWebRequest GetRequest(string path, bool useProxy = true)
{
HttpWebRequest clientReq = (HttpWebRequest)WebRequest.Create(path);
clientReq.Method = "POST";
@ -144,7 +304,8 @@ namespace ClientCollector
}
return clientReq;
}
static bool SendPasport(Pasport pasp)
{
try
{
{
@ -222,7 +383,83 @@ namespace ClientCollector
return false;
}
}
static bool SendData(DateTime dateAndTime, string fileName, byte[] fileStruct)
{
try
{
{
log.Info("Check data on remote API server.");
var req = JsonConvert.SerializeObject(
new DataCheckApi()
{
Status = true,
DateAndTime = dateAndTime,
Name = fileName
});
var reqArr = Encoding.UTF8.GetBytes(req);
HttpWebRequest clientReq = GetRequest("https://vsmpo.mbucb.ru/api/data/check");
clientReq.ContentLength = reqArr.Length;
using (var stream = clientReq.GetRequestStream())
{
stream.Write(reqArr, 0, reqArr.Length);
}
string response = "";
using (var clientRes = (HttpWebResponse)clientReq.GetResponse())
{
using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8))
{
response = readStream.ReadToEnd();
readStream.Close();
clientRes.Close();
}
}
var rep = JsonConvert.DeserializeObject<DataCheckClient>(response);
if (!rep.Status) return false;
if (rep.Exist && rep.DataSize == (ulong)fileStruct.Length) return true;
if (!rep.Exist)
log.Info("API: Data not exist.");
if (rep.Exist && rep.DataSize != (ulong)fileStruct.Length)
log.Info("API: Wrong size data.");
}
{
log.Info("Send data to remote API server.");
var req = JsonConvert.SerializeObject(
new DataCreateApi()
{
Status = true,
DateAndTime = dateAndTime,
Name = fileName,
Struct = fileStruct
});
var reqArr = Encoding.UTF8.GetBytes(req);
HttpWebRequest clientReq = GetRequest("https://vsmpo.mbucb.ru/api/data/create");
clientReq.ContentLength = reqArr.Length;
using (var stream = clientReq.GetRequestStream())
{
stream.Write(reqArr, 0, reqArr.Length);
}
string response = "";
using (var clientRes = (HttpWebResponse)clientReq.GetResponse())
{
using (var readStream = new StreamReader(clientRes.GetResponseStream(), Encoding.UTF8))
{
response = readStream.ReadToEnd();
readStream.Close();
clientRes.Close();
}
}
var rep = JsonConvert.DeserializeObject<DataCreateClient>(response);
if (!rep.Status) return false;
}
return true;
}
catch (Exception e)
{
log.Warn(e.Message);
return false;
}
}
static void LogConf()
{
var conf = new LoggingConfiguration();

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2021-08-01T17:53:02.2382201Z;True|2021-08-01T22:48:16.9658882+05:00;True|2021-08-01T22:40:58.1479436+05:00;True|2021-08-01T22:28:58.9840017+05:00;True|2021-08-01T20:16:20.5210616+05:00;True|2021-08-01T19:27:43.9900600+05:00;True|2021-08-01T19:18:48.8000969+05:00;True|2021-08-01T19:15:19.9257002+05:00;True|2021-08-01T19:08:17.1315589+05:00;True|2021-07-31T20:35:08.9408458+05:00;True|2021-07-31T20:20:29.0886405+05:00;</History>
<History>True|2021-08-02T17:58:49.1867297Z;True|2021-08-02T22:56:02.6749724+05:00;True|2021-08-02T22:50:24.0842490+05:00;True|2021-08-02T22:46:50.7307549+05:00;True|2021-08-02T22:46:32.2783734+05:00;True|2021-08-02T22:37:45.7957317+05:00;True|2021-08-02T22:34:37.2905589+05:00;True|2021-08-02T22:31:30.3451541+05:00;True|2021-08-02T12:26:02.5496847+05:00;True|2021-08-01T23:12:48.3492831+05:00;True|2021-08-01T22:53:02.2382201+05:00;True|2021-08-01T22:48:16.9658882+05:00;True|2021-08-01T22:40:58.1479436+05:00;True|2021-08-01T22:28:58.9840017+05:00;True|2021-08-01T20:16:20.5210616+05:00;True|2021-08-01T19:27:43.9900600+05:00;True|2021-08-01T19:18:48.8000969+05:00;True|2021-08-01T19:15:19.9257002+05:00;True|2021-08-01T19:08:17.1315589+05:00;True|2021-07-31T20:35:08.9408458+05:00;True|2021-07-31T20:20:29.0886405+05:00;</History>
</PropertyGroup>
</Project>

@ -1 +1 @@
5e9419778287ec5b4cc0bdffcb19831a1be63478
ab788a0c45ec070b599653ff0cff4d13aa37f97d

@ -317,6 +317,15 @@ namespace DataClient
catch { return false; }
return Connected();
}
public bool ReConnect()
{
if (tcpC != null && tcpC.Connected)
tcpC.Close();
tcpC = new TcpClient();
try { tcpC.Connect(new IPEndPoint(IPAddress.Parse(ip), port)); }
catch { return false; }
return Connected();
}
/// <include file='DataClientSrc.xml' path='docs/NET/m[@n="Connected"]/*' />
public bool Connected() { return (tcpC != null && tcpC.Connected); }
/// <include file='DataClientSrc.xml' path='docs/NET/m[@n="Close"]/*' />

@ -4,6 +4,8 @@ using NLog.Config;
using NLog.Targets;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@ -14,6 +16,92 @@ namespace test3
static bool flag_end_task = true;
static Logger log = LogManager.GetCurrentClassLogger();
static void Main(string[] args)
{
var dconn = false;
var conn = false;
foreach(var arg in args)
{
if(int.TryParse(arg, out int a))
{
if (a == 1)
dconn = true;
if (a == 2)
conn = true;
}
}
if (dconn)
{
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "/usr/bin/umount",
Arguments = "/archive_rmt/",
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
}
};
while (true)
{
if (!proc.Start())
{
Console.WriteLine("Can't Disconnect.");
Task.Delay(5000).Wait();
continue;
}
var answer = proc.StandardError.ReadToEnd() + proc.StandardOutput.ReadToEnd();
if (string.IsNullOrEmpty(answer))
{
Console.WriteLine("Disconnect success.");
break;
}
if (answer.Contains("not mounted"))
{
Console.WriteLine("Already dosconnect.");
break;
}
break;
}
}
if(conn)
{
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "/usr/bin/mount",
Arguments = "-t nfs 10.10.45.236:/archiv /archive_rmt/",
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
},
};
while (true)
{
if (!proc.Start())
{
Console.WriteLine("Can't Disconnect.");
Task.Delay(5000).Wait();
continue;
}
var answer = proc.StandardError.ReadToEnd() + proc.StandardOutput.ReadToEnd();
if (string.IsNullOrEmpty(answer))
{
Console.WriteLine("Connect success.");
break;
}
if (answer.Contains("busy or already mounted"))
{
Console.WriteLine("Busy dir or already mounted.");
break;
}
break;
}
}
}
static void Tasks()
{
LogConf();
Test1();
@ -41,7 +129,6 @@ namespace test3
Console.ReadKey();
}
static void LogConf()
{
var conf = new LoggingConfiguration();

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<History>True|2021-07-09T08:26:04.0054456Z;</History>
<History>True|2021-08-02T13:47:15.2680386Z;True|2021-08-02T18:37:02.6273387+05:00;True|2021-08-02T18:29:32.8259488+05:00;True|2021-08-02T14:01:44.3772955+05:00;True|2021-08-02T13:59:09.7953609+05:00;True|2021-08-02T13:56:29.9486596+05:00;True|2021-08-02T13:53:13.8764442+05:00;True|2021-07-09T13:26:04.0054456+05:00;</History>
</PropertyGroup>
</Project>

@ -0,0 +1,368 @@
{
"deleteAll": true,
"delete": [],
"add": [
{
"id": 0,
"name": "Ток дуги",
"sname": "I д",
"measure": "кА",
"mul": 0.1,
"byteId": [ 0, 1 ]
},
{
"id": 1,
"name": "Напряжение дуги",
"sname": "U д",
"measure": "В",
"mul": 0.1,
"byteId": [ 2, 3 ]
},
{
"id": 2,
"name": "Ток рабочего двигателя",
"sname": "I рд",
"measure": "А",
"mul": 0.1,
"byteId": [4,5]
},
{
"id": 3,
"name": "U рабочего двигателя",
"sname": "U рд",
"measure": "В",
"mul": 0.1,
"byteId": [6,7]
},
{
"id": 4,
"name": "Ток соленоида",
"sname": "I сол",
"measure": "А",
"mul": 0.1,
"byteId": [8,9]
},
{
"id": 5,
"name": "U соленоида",
"sname": "U сол",
"measure": "В",
"mul": 0.1,
"byteId": [10,11]
},
{
"id": 6,
"name": "Ток задания",
"sname": "I рз",
"measure": "кА",
"mul": 0.1,
"byteId": [12,13]
},
{
"id": 7,
"name": "t кристаллизатора на входе",
"sname": "t кр.вых",
"measure": "гр.С",
"byteId": [14,15]
},
{
"id": 8,
"name": "t кристаллизатора на выходе",
"sname": "t кр.вх",
"measure": "гр.С",
"byteId": [16,17]
},
{
"id": 9,
"name": "t вакуум-камеры",
"sname": "t вак-кам",
"measure": "гр.С",
"byteId": [18,19]
},
{
"id": 10,
"name": "t штока",
"sname": "t шт",
"measure": "гр.С",
"byteId": [20,21]
},
{
"id": 11,
"name": "Перемещение 0.1",
"sname": "S шт",
"measure": "мм",
"mul": 0.1,
"byteId": [22,23]
},
{
"id": 12,
"name": "Перемещение",
"sname": "S шт",
"measure": "мм",
"byteId": [24,25]
},
{
"id": 13,
"name": "Остаточное давление",
"measure": "мкм.рт.ст",
"mul": -1,
"byteId": [26,27]
},
{
"id": 14,
"name": "Изоляция шток-крышка",
"sname": "R шт-кр",
"measure": "В",
"mul": 0.1,
"byteId": [28,29]
},
{
"id": 15,
"name": "Изоляция крышка-камера",
"sname": "R кр-кам",
"measure": "В",
"mul": 0.1,
"byteId": [30,31]
},
{
"id": 16,
"name": "Расход воды",
"sname": "Q в.кр",
"measure": "м^3/ч",
"byteId": [ 32, 33 ]
},
{
"id": 17,
"name": "Капельные замыкания",
"sname": "Кап.зам.",
"mul": 0.01,
"byteId": [34,35]
},
{
"id": 18,
"name": "Усреднённая ширина импульсов КЗ",
"sname": "Кап.зым.",
"mul": 0.1,
"byteId": [36,37]
},
{
"id": 19,
"name": "Проток воды фланца",
"sname": "Qв. фл.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [38,39]
},
{
"id": 20,
"name": "Проток воды штока",
"sname": "Qв. шт.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [40,41]
},
{
"id": 21,
"name": "Давление воды крист.+1,5",
"sname": "P в.кр",
"measure": "кгс/см^2",
"mul": 0.01,
"byteId": [42,43]
},
{
"id": 22,
"name": "Проток воды камеры",
"sname": "Qв. кам.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [44,45]
},
{
"id": 23,
"name": "Ток задания источника(САУ)",
"sname": "I з.ист САУ",
"measure": "кА",
"mul": 0.1,
"byteId": [58,59]
},
{
"id": 25,
"name": "ПИД-рег. основная уставка",
"sname": "ПИД-осн",
"measure": "В",
"mul": 0.1,
"byteId": [62,63]
},
{
"id": 26,
"name": "ПИД-рег. макс. скорость",
"sname": "ПИД-макс",
"measure": "В",
"mul": 0.1,
"byteId": [64,65]
},
{
"id": 27,
"name": "t фланца вакуум-камеры",
"sname": "t фл.",
"measure": "гр.С",
"byteId": [66,67]
},
{
"id": 28,
"name": "t подставки",
"sname": "t под.",
"measure": "гр.С",
"byteId": [68,69]
},
{
"id": 29,
"name": "Проток воды подставки",
"sname": "Qв. под.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [70,71]
},
{
"id": 30,
"name": "Задание соленоида",
"sname": "Зад. сол.",
"measure": "А",
"mul": 0.1,
"byteId": [72,73]
},
{
"id": 31,
"name": "Ток задания источника(преобраз.)",
"sname": "I з.ист. преоб.",
"measure": "кА",
"mul": 0.1,
"byteId": [74,75]
},
{
"id": 33,
"name": "Вакуум по МЕТРАН-1200",
"sname": "МЕТРАН-1200",
"measure": "мм.рт.ст",
"mul": 0.1,
"byteId": [78,79]
},
{
"id": 34,
"name": "Вакуум по МЕТРАН-18,75",
"sname": "МЕТРАН-18,25",
"measure": "мм.рт.ст",
"mul": 0.001,
"byteId": [80,81]
},
{
"id": 35,
"name": "Давление газа в баллоне",
"sname": "P г.балл.",
"measure": "кгс/см^2",
"mul": 0.1,
"byteId": [82,83]
},
{
"id": 36,
"name": "Давление воды поддона",
"sname": "P в.подд.",
"measure": "кгс/см^2",
"byteId": [84,85]
},
{
"id": 37,
"name": "Задание тока дуги (ЦАП)",
"sname": "Зад.I, ЦАП",
"measure": "кА",
"mul": 0.1,
"byteId": [86,87]
},
{
"id": 38,
"name": "Задание скорости рабочего двигателя",
"sname": "Зад.ск.раб.дв",
"measure": "В",
"mul": 0.01,
"byteId": [88,89]
},
{
"id": 39,
"name": "Ток двигателя насоса ARPW",
"sname": "I дв. ARPW",
"measure": "А",
"mul": 0.01,
"byteId": [90,91]
},
{
"id": 40,
"name": "Энергия плавильного пролёта",
"sname": "Эн.пролёта, МВт",
"measure": "МВт",
"mul": 0.1,
"byteId": []
},
{
"id": 41,
"name": "Среднее напряжение плавл. за 1 мин.",
"sname": "U ср. 1мин, В",
"measure": "В",
"mul": 0.1,
"byteId": [92,93]
},
{
"id": 42,
"name": "ГМП: ток катушки 1",
"sname": "I кат1 ГМП",
"measure": "А",
"byteId": [94,95]
},
{
"id": 43,
"name": "ГМП: ток катушки 2",
"sname": "I кат2 ГМП",
"measure": "А",
"byteId": [96,97]
},
{
"id": 44,
"name": "ГМП: ток катушки 3",
"sname": "I кат3 ГМП",
"measure": "А",
"byteId": [98,99]
},
{
"id": 45,
"name": "ГМП: частота",
"sname": "Част. ГМП",
"measure": "Гц",
"mul": 0.1,
"byteId": [100,101]
},
{
"id": 46,
"name": "ПИД: коэффицинт Кp",
"mul": 0.01,
"byteId": [102,103]
},
{
"id": 47,
"name": "ПИД: коэффицинт Кi",
"mul": 0.01,
"byteId": [104,105]
},
{
"id": 49,
"name": "Количество точек усреднения",
"byteId": [106,107]
},
{
"id": 50,
"name": "Пороговое U ДКЗ",
"measure": "В",
"mul": 0.1,
"byteId": [108,109]
}
]
}

@ -0,0 +1,16 @@
{
"servers": [
{
"name": "STP 1",
"ip": "10.10.45.151",
"port": 1070,
"dir": "Y:\\data"
},
{
"name": "STP 2",
"ip": "10.10.45.152",
"port": 1070,
"dir": "Z:\\data"
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,368 @@
{
"deleteAll": true,
"delete": [],
"add": [
{
"id": 0,
"name": "Ток дуги",
"sname": "I д",
"measure": "кА",
"mul": 0.1,
"byteId": [ 0, 1 ]
},
{
"id": 1,
"name": "Напряжение дуги",
"sname": "U д",
"measure": "В",
"mul": 0.1,
"byteId": [ 2, 3 ]
},
{
"id": 2,
"name": "Ток рабочего двигателя",
"sname": "I рд",
"measure": "А",
"mul": 0.1,
"byteId": [4,5]
},
{
"id": 3,
"name": "U рабочего двигателя",
"sname": "U рд",
"measure": "В",
"mul": 0.1,
"byteId": [6,7]
},
{
"id": 4,
"name": "Ток соленоида",
"sname": "I сол",
"measure": "А",
"mul": 0.1,
"byteId": [8,9]
},
{
"id": 5,
"name": "U соленоида",
"sname": "U сол",
"measure": "В",
"mul": 0.1,
"byteId": [10,11]
},
{
"id": 6,
"name": "Ток задания",
"sname": "I рз",
"measure": "кА",
"mul": 0.1,
"byteId": [12,13]
},
{
"id": 7,
"name": "t кристаллизатора на входе",
"sname": "t кр.вых",
"measure": "гр.С",
"byteId": [14,15]
},
{
"id": 8,
"name": "t кристаллизатора на выходе",
"sname": "t кр.вх",
"measure": "гр.С",
"byteId": [16,17]
},
{
"id": 9,
"name": "t вакуум-камеры",
"sname": "t вак-кам",
"measure": "гр.С",
"byteId": [18,19]
},
{
"id": 10,
"name": "t штока",
"sname": "t шт",
"measure": "гр.С",
"byteId": [20,21]
},
{
"id": 11,
"name": "Перемещение 0.1",
"sname": "S шт",
"measure": "мм",
"mul": 0.1,
"byteId": [22,23]
},
{
"id": 12,
"name": "Перемещение",
"sname": "S шт",
"measure": "мм",
"byteId": [24,25]
},
{
"id": 13,
"name": "Остаточное давление",
"measure": "мкм.рт.ст",
"mul": -1,
"byteId": [26,27]
},
{
"id": 14,
"name": "Изоляция шток-крышка",
"sname": "R шт-кр",
"measure": "В",
"mul": 0.1,
"byteId": [28,29]
},
{
"id": 15,
"name": "Изоляция крышка-камера",
"sname": "R кр-кам",
"measure": "В",
"mul": 0.1,
"byteId": [30,31]
},
{
"id": 16,
"name": "Расход воды",
"sname": "Q в.кр",
"measure": "м^3/ч",
"byteId": [ 32, 33 ]
},
{
"id": 17,
"name": "Капельные замыкания",
"sname": "Кап.зам.",
"mul": 0.01,
"byteId": [34,35]
},
{
"id": 18,
"name": "Усреднённая ширина импульсов КЗ",
"sname": "Кап.зым.",
"mul": 0.1,
"byteId": [36,37]
},
{
"id": 19,
"name": "Проток воды фланца",
"sname": "Qв. фл.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [38,39]
},
{
"id": 20,
"name": "Проток воды штока",
"sname": "Qв. шт.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [40,41]
},
{
"id": 21,
"name": "Давление воды крист.+1,5",
"sname": "P в.кр",
"measure": "кгс/см^2",
"mul": 0.01,
"byteId": [42,43]
},
{
"id": 22,
"name": "Проток воды камеры",
"sname": "Qв. кам.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [44,45]
},
{
"id": 23,
"name": "Ток задания источника(САУ)",
"sname": "I з.ист САУ",
"measure": "кА",
"mul": 0.1,
"byteId": [58,59]
},
{
"id": 25,
"name": "ПИД-рег. основная уставка",
"sname": "ПИД-осн",
"measure": "В",
"mul": 0.1,
"byteId": [62,63]
},
{
"id": 26,
"name": "ПИД-рег. макс. скорость",
"sname": "ПИД-макс",
"measure": "В",
"mul": 0.1,
"byteId": [64,65]
},
{
"id": 27,
"name": "t фланца вакуум-камеры",
"sname": "t фл.",
"measure": "гр.С",
"byteId": [66,67]
},
{
"id": 28,
"name": "t подставки",
"sname": "t под.",
"measure": "гр.С",
"byteId": [68,69]
},
{
"id": 29,
"name": "Проток воды подставки",
"sname": "Qв. под.",
"measure": "м^3/ч",
"mul": 0.01,
"byteId": [70,71]
},
{
"id": 30,
"name": "Задание соленоида",
"sname": "Зад. сол.",
"measure": "А",
"mul": 0.1,
"byteId": [72,73]
},
{
"id": 31,
"name": "Ток задания источника(преобраз.)",
"sname": "I з.ист. преоб.",
"measure": "кА",
"mul": 0.1,
"byteId": [74,75]
},
{
"id": 33,
"name": "Вакуум по МЕТРАН-1200",
"sname": "МЕТРАН-1200",
"measure": "мм.рт.ст",
"mul": 0.1,
"byteId": [78,79]
},
{
"id": 34,
"name": "Вакуум по МЕТРАН-18,75",
"sname": "МЕТРАН-18,25",
"measure": "мм.рт.ст",
"mul": 0.001,
"byteId": [80,81]
},
{
"id": 35,
"name": "Давление газа в баллоне",
"sname": "P г.балл.",
"measure": "кгс/см^2",
"mul": 0.1,
"byteId": [82,83]
},
{
"id": 36,
"name": "Давление воды поддона",
"sname": "P в.подд.",
"measure": "кгс/см^2",
"byteId": [84,85]
},
{
"id": 37,
"name": "Задание тока дуги (ЦАП)",
"sname": "Зад.I, ЦАП",
"measure": "кА",
"mul": 0.1,
"byteId": [86,87]
},
{
"id": 38,
"name": "Задание скорости рабочего двигателя",
"sname": "Зад.ск.раб.дв",
"measure": "В",
"mul": 0.01,
"byteId": [88,89]
},
{
"id": 39,
"name": "Ток двигателя насоса ARPW",
"sname": "I дв. ARPW",
"measure": "А",
"mul": 0.01,
"byteId": [90,91]
},
{
"id": 40,
"name": "Энергия плавильного пролёта",
"sname": "Эн.пролёта, МВт",
"measure": "МВт",
"mul": 0.1,
"byteId": []
},
{
"id": 41,
"name": "Среднее напряжение плавл. за 1 мин.",
"sname": "U ср. 1мин, В",
"measure": "В",
"mul": 0.1,
"byteId": [92,93]
},
{
"id": 42,
"name": "ГМП: ток катушки 1",
"sname": "I кат1 ГМП",
"measure": "А",
"byteId": [94,95]
},
{
"id": 43,
"name": "ГМП: ток катушки 2",
"sname": "I кат2 ГМП",
"measure": "А",
"byteId": [96,97]
},
{
"id": 44,
"name": "ГМП: ток катушки 3",
"sname": "I кат3 ГМП",
"measure": "А",
"byteId": [98,99]
},
{
"id": 45,
"name": "ГМП: частота",
"sname": "Част. ГМП",
"measure": "Гц",
"mul": 0.1,
"byteId": [100,101]
},
{
"id": 46,
"name": "ПИД: коэффицинт Кp",
"mul": 0.01,
"byteId": [102,103]
},
{
"id": 47,
"name": "ПИД: коэффицинт Кi",
"mul": 0.01,
"byteId": [104,105]
},
{
"id": 49,
"name": "Количество точек усреднения",
"byteId": [106,107]
},
{
"id": 50,
"name": "Пороговое U ДКЗ",
"measure": "В",
"mul": 0.1,
"byteId": [108,109]
}
]
}

@ -0,0 +1,16 @@
{
"servers": [
{
"name": "STP 1",
"ip": "10.10.45.151",
"port": 1070,
"dir": "Y:\\data"
},
{
"name": "STP 2",
"ip": "10.10.45.152",
"port": 1070,
"dir": "Z:\\data"
}
]
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,214 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v5.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v5.0": {
"test3/1.0.0": {
"dependencies": {
"DataClient": "0.0.3",
"NLog": "4.7.10",
"NLog.Extensions.Logging": "1.7.3"
},
"runtime": {
"test3.dll": {}
}
},
"Microsoft.Extensions.Configuration.Abstractions/5.0.0": {
"dependencies": {
"Microsoft.Extensions.Primitives": "5.0.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Configuration.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.Extensions.DependencyInjection/5.0.0": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0"
},
"runtime": {
"lib/net5.0/Microsoft.Extensions.DependencyInjection.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.DependencyInjection.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.Extensions.Logging/5.0.0": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "5.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"Microsoft.Extensions.Logging.Abstractions": "5.0.0",
"Microsoft.Extensions.Options": "5.0.0"
},
"runtime": {
"lib/netstandard2.1/Microsoft.Extensions.Logging.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.Extensions.Logging.Abstractions/5.0.0": {
"runtime": {
"lib/netstandard2.0/Microsoft.Extensions.Logging.Abstractions.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.Extensions.Options/5.0.0": {
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "5.0.0",
"Microsoft.Extensions.Primitives": "5.0.0"
},
"runtime": {
"lib/net5.0/Microsoft.Extensions.Options.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Microsoft.Extensions.Primitives/5.0.0": {
"runtime": {
"lib/netcoreapp3.0/Microsoft.Extensions.Primitives.dll": {
"assemblyVersion": "5.0.0.0",
"fileVersion": "5.0.20.51904"
}
}
},
"Newtonsoft.Json/13.0.1": {
"runtime": {
"lib/netstandard2.0/Newtonsoft.Json.dll": {
"assemblyVersion": "13.0.0.0",
"fileVersion": "13.0.1.25517"
}
}
},
"NLog/4.7.10": {
"runtime": {
"lib/netstandard2.0/NLog.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "4.7.10.13013"
}
}
},
"NLog.Extensions.Logging/1.7.3": {
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "5.0.0",
"Microsoft.Extensions.Logging": "5.0.0",
"NLog": "4.7.10"
},
"runtime": {
"lib/net5.0/NLog.Extensions.Logging.dll": {
"assemblyVersion": "1.0.0.0",
"fileVersion": "1.7.3.1580"
}
}
},
"DataClient/0.0.3": {
"dependencies": {
"NLog": "4.7.10",
"NLog.Extensions.Logging": "1.7.3",
"Newtonsoft.Json": "13.0.1"
},
"runtime": {
"DataClient.dll": {}
}
}
}
},
"libraries": {
"test3/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Microsoft.Extensions.Configuration.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ETjSBHMp3OAZ4HxGQYpwyGsD8Sw5FegQXphi0rpoGMT74S4+I2mm7XJEswwn59XAaKOzC15oDSOWEE8SzDCd6Q==",
"path": "microsoft.extensions.configuration.abstractions/5.0.0",
"hashPath": "microsoft.extensions.configuration.abstractions.5.0.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rc2kb/p3Ze6cP6rhFC3PJRdWGbLvSHZc0ev7YlyeU6FmHciDMLrhoVoTUEzKPhN5ZjFgKF1Cf5fOz8mCMIkvpA==",
"path": "microsoft.extensions.dependencyinjection/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.5.0.0.nupkg.sha512"
},
"Microsoft.Extensions.DependencyInjection.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ORj7Zh81gC69TyvmcUm9tSzytcy8AVousi+IVRAI8nLieQjOFryRusSFh7+aLk16FN9pQNqJAiMd7BTKINK0kA==",
"path": "microsoft.extensions.dependencyinjection.abstractions/5.0.0",
"hashPath": "microsoft.extensions.dependencyinjection.abstractions.5.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Logging/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-MgOwK6tPzB6YNH21wssJcw/2MKwee8b2gI7SllYfn6rvTpIrVvVS5HAjSU2vqSku1fwqRvWP0MdIi14qjd93Aw==",
"path": "microsoft.extensions.logging/5.0.0",
"hashPath": "microsoft.extensions.logging.5.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Logging.Abstractions/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-NxP6ahFcBnnSfwNBi2KH2Oz8Xl5Sm2krjId/jRR3I7teFphwiUoUeZPwTNA21EX+5PtjqmyAvKaOeBXcJjcH/w==",
"path": "microsoft.extensions.logging.abstractions/5.0.0",
"hashPath": "microsoft.extensions.logging.abstractions.5.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Options/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-CBvR92TCJ5uBIdd9/HzDSrxYak+0W/3+yxrNg8Qm6Bmrkh5L+nu6m3WeazQehcZ5q1/6dDA7J5YdQjim0165zg==",
"path": "microsoft.extensions.options/5.0.0",
"hashPath": "microsoft.extensions.options.5.0.0.nupkg.sha512"
},
"Microsoft.Extensions.Primitives/5.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cI/VWn9G1fghXrNDagX9nYaaB/nokkZn0HYAawGaELQrl8InSezfe9OnfPZLcJq3esXxygh3hkq2c3qoV3SDyQ==",
"path": "microsoft.extensions.primitives/5.0.0",
"hashPath": "microsoft.extensions.primitives.5.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==",
"path": "newtonsoft.json/13.0.1",
"hashPath": "newtonsoft.json.13.0.1.nupkg.sha512"
},
"NLog/4.7.10": {
"type": "package",
"serviceable": true,
"sha512": "sha512-rcegW7kYOCjl7wX0SzsqpPBqnJ51JKi1WkYb6QBVX0Wc5IgH19Pv4t/co+T0s06OS0Ne44xgkY/mHg0PdrmJow==",
"path": "nlog/4.7.10",
"hashPath": "nlog.4.7.10.nupkg.sha512"
},
"NLog.Extensions.Logging/1.7.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-7RvUvGd9Ad37pNedjPHbCUroscLGuChLBo0OBveGp92vIpEHLZm/in+Ydd+c9qpv1XMQQIx7yZv1F5qyy/AxHQ==",
"path": "nlog.extensions.logging/1.7.3",
"hashPath": "nlog.extensions.logging.1.7.3.nupkg.sha512"
},
"DataClient/0.0.3": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "5.0.0"
}
}
}

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More