Save last

This commit is contained in:
2024-09-22 04:27:05 +05:00
parent 0e645d20e2
commit ef797b23df
377 changed files with 14540 additions and 5819 deletions

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ApiServer.Structures
{
public class Analog
{
public string Start { get { return start.ToString("yyyy.MM.dd HH:mm:ss"); } }
public DateTime start = new DateTime();
public double? Value { get; set; }
}
public class AnalogArr
{
public int Index { get; set; }
public Analog[] Analogs { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ApiServer.Structures
{
public class Discret
{
public int Index { get; set; }
public string Start { get { return start.ToString("yyyy.MM.dd HH:mm:ss"); } }
public DateTime start = new DateTime();
public byte? State { get; set; }
}
public class DiscretMatrix
{
public string Dt { get { return start.ToString("yyyy.MM.dd HH:mm:ss"); } }
public DateTime start = new DateTime();
public byte?[] M { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ApiServer.Structures
{
public class Protect
{
public byte Index { get; set; }
public byte State { get; set; }
public DateTime start;
public string Start { get { return start.ToString("yyyy.MM.dd HH.mm.ss.fff"); } }
}
}

View File

@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace ApiServer.Structures
{
public class TechCycle
{
public sbyte Index { get; set; }
public string Start { get { return start.ToString("yyyy.MM.dd HH:mm:ss"); } }
public DateTime start = new DateTime();
public TechCycle(DateTime date, string line)
{
var splits = line.Split('\t');
if (splits[0] == "00")
this.Index = -1;
else
this.Index = sbyte.Parse(splits[0]);
var times = splits[1].Split(":");
this.start = new DateTime(
date.Year,
date.Month,
date.Day,
int.Parse(times[0]),
int.Parse(times[1]),
int.Parse(times[2])
);
}
}
}