123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace NEIntelligentControl2.Models.Windturbine
- {
-
-
-
- public class WindturbineInfo
- {
-
-
-
- public string WindturbineId { set; get; }
-
-
-
- public string ModelId { set; get; }
-
-
-
- public string StationId { set; get; }
- private int id = -1;
-
-
-
- public int ID
- {
- get
- {
- if (id < 0)
- {
- if (WindturbineId == null) return id;
- var vs = WindturbineId.Substring(2);
- int.TryParse(vs, out id);
- }
- return id;
- }
- }
- private string name;
- public string Name
- {
- get
- {
- if (name != null) return name;
- var vs = WindturbineId.Split('_');
- name = $"{vs[0].Substring(0, vs[0].Length - 2)}{vs[1]}";
- return name;
- }
- set => name = value;
- }
- public string Code { get; set; }
-
-
-
- public string ProjectId { get; set; }
-
-
-
- public string WindSpeedCode { set; get; }
-
-
-
- public string PowerCode { set; get; }
-
-
-
- public string RollSpeedCode { set; get; }
-
-
-
- public string StatusCode { set; get; }
-
-
-
- public string LockCode { set; get; }
-
-
-
- public double WindSpeed { set; get; }
-
-
-
- public double Power { set; get; }
-
-
-
- public double RollSpeed { set; get; }
-
-
-
- public double Status { set; get; }
-
-
-
- public WindturbineState State { get => (WindturbineState)Status; }
-
-
-
- public double LockValue { set; get; }
-
-
-
- public bool IsLocked { get => LockValue > 0; }
-
-
-
- public long Ts { set; get; }
-
-
-
- public HungType LockType { get; set; }
-
-
-
- public OperateStyle OperateStyle { get; set; }
- }
- }
|