Quellcode durchsuchen

基础配置

JXJAgvReake
pry vor 1 Jahr
Ursprung
Commit
8b7d0947fb
15 geänderte Dateien mit 295 neuen und 1 gelöschten Zeilen
  1. +18
    -0
      BPASmartClient.Tourism/Alarm.cs
  2. +47
    -0
      BPASmartClient.Tourism/Control_MorkCL.cs
  3. +12
    -0
      BPASmartClient.Tourism/GVL_MorkCL.cs
  4. +3
    -1
      BPASmartClient.Tourism/GlobalUsing.cs
  5. +13
    -0
      BPASmartClient.Tourism/Model/ControlData.cs
  6. +28
    -0
      BPASmartClient.Tourism/Model/EFunc.cs
  7. +34
    -0
      BPASmartClient.Tourism/Model/FuncPar.cs
  8. +38
    -0
      BPASmartClient.Tourism/Model/InitData.cs
  9. +15
    -0
      BPASmartClient.Tourism/Server/DeviceControl.cs
  10. +15
    -0
      BPASmartClient.Tourism/Server/FryingPanServer.cs
  11. +13
    -0
      BPASmartClient.Tourism/Server/IServer.cs
  12. +14
    -0
      BPASmartClient.Tourism/Server/ModbusTcpBase.cs
  13. +15
    -0
      BPASmartClient.Tourism/Server/OtherServer.cs
  14. +15
    -0
      BPASmartClient.Tourism/Server/PressureCookerServer.cs
  15. +15
    -0
      BPASmartClient.Tourism/Server/RobotServer.cs

+ 18
- 0
BPASmartClient.Tourism/Alarm.cs Datei anzeigen

@@ -0,0 +1,18 @@
using BPASmartClient.Device;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege
{
public class Alarm : IAlarm
{
/// <summary>
/// 急停
/// </summary>
[Alarm("设备急停")]
public bool EStop { get; set; }
}
}

+ 47
- 0
BPASmartClient.Tourism/Control_MorkCL.cs Datei anzeigen

@@ -0,0 +1,47 @@
using BPA.Message.Enum;
using BPASmartClient.Device;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege
{
public class Control_MorkCL : BaseDevice
{
public override DeviceClientType DeviceType => DeviceClientType.MORKCL;

GVL_MorkCL morkCL = new GVL_MorkCL();
Alarm alarm = new Alarm();

public override void DoMain()
{
MonitorViewModel.DeviceId = DeviceId;
}

public override void MainTask()
{
throw new NotImplementedException();
}

public override void ReadData()
{
throw new NotImplementedException();
}

public override void ResetProgram()
{
morkCL = null;
morkCL = new GVL_MorkCL();
}

public override void SimOrder()
{
}

public override void Stop()
{
}
}
}

+ 12
- 0
BPASmartClient.Tourism/GVL_MorkCL.cs Datei anzeigen

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege
{
public class GVL_MorkCL : IStatus
{
}
}

+ 3
- 1
BPASmartClient.Tourism/GlobalUsing.cs Datei anzeigen

@@ -10,4 +10,6 @@ global using BPASmartClient.CustomResource;
global using BPASmartClient.TourismCollege.View;
global using BPASmartClient.TourismCollege.ViewModel;
global using BPASmartClient.TourismCollege.Model;

global using System.Collections.Concurrent;
global using System.Collections.ObjectModel;
global using BPASmartClient.Device;

+ 13
- 0
BPASmartClient.Tourism/Model/ControlData.cs Datei anzeigen

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Model
{
internal class ControlData
{
public ConcurrentDictionary<EFunc, List<FuncPar>> ControlFuncs { get; set; } = new ConcurrentDictionary<EFunc, List<FuncPar>>();
}
}

+ 28
- 0
BPASmartClient.Tourism/Model/EFunc.cs Datei anzeigen

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Model
{
/// <summary>
/// 功能枚举列表
/// </summary>
internal enum EFunc
{
搅拌启动,
搅拌停止,
加热启动,
加热停止,
添加调料,
添加主料,
添加辅料,
炒锅回原点位,
出餐启动,
炒锅清洗,
炒锅回投料位置,
去指定炒制位,
炒制
}
}

+ 34
- 0
BPASmartClient.Tourism/Model/FuncPar.cs Datei anzeigen

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Model
{
/// <summary>
/// 功能参数信息
/// </summary>
internal class FuncPar
{
/// <summary>
/// 参数名
/// </summary>
public string ParName { get; set; }

/// <summary>
/// 参数值
/// </summary>
public dynamic ParValue { get; set; }

/// <summary>
/// 参数单位
/// </summary>
public string ParUnit { get; set; }

/// <summary>
/// 参数描述
/// </summary>
public string ParDescribe { get; set; }
}
}

+ 38
- 0
BPASmartClient.Tourism/Model/InitData.cs Datei anzeigen

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Model
{
internal class InitData
{
public static Dictionary<EFunc, FuncPar[]> FunParInit { get; private set; } = new()
{
{ EFunc.搅拌启动,new FuncPar[] { new FuncPar() { ParName="搅拌速度", ParUnit ="HZ", ParDescribe="请输入 0 -- 50 HZ的频率"} } },
{ EFunc.搅拌停止,new FuncPar[0] },
{ EFunc.加热启动,new FuncPar[] { new FuncPar() { ParName="加热档位", ParUnit ="挡", ParDescribe="请输入 1 -- 8 挡的档位"} } },
{ EFunc.加热停止,new FuncPar[0] },
{ EFunc.添加调料,new FuncPar[]
{
new FuncPar() { ParName="调料类型", ParDescribe="请选择一种调料"} ,
new FuncPar() { ParName="调料需求值", ParUnit ="g", ParDescribe="请输入调料的需求量"} ,
}
},
{ EFunc.添加主料,new FuncPar[]
{
new FuncPar() { ParName="主料类型", ParDescribe="请选择一种主料"} ,
new FuncPar() { ParName="主料分量", ParUnit ="KG", ParDescribe="请输入主料的分量"} ,
}
},
{ EFunc.添加辅料,new FuncPar[] { new FuncPar() { ParName= "辅料类型", ParDescribe= "请选择一种辅料" } } },
{ EFunc.炒锅回原点位,new FuncPar[0] },
{ EFunc.出餐启动,new FuncPar[0] },
{ EFunc.炒锅清洗,new FuncPar[0] },
{ EFunc.炒锅回投料位置,new FuncPar[0] },
{ EFunc.去指定炒制位,new FuncPar[] { new FuncPar() { ParName="设置炒制位", ParDescribe="请输入 1--3 选择一个合适的炒制位置"} } },
{ EFunc.炒制,new FuncPar[] { new FuncPar() { ParName="设置炒制时间",ParUnit="秒", ParDescribe="请设置一个合适的炒制时间"} } },
};
}
}

+ 15
- 0
BPASmartClient.Tourism/Server/DeviceControl.cs Datei anzeigen

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
/// <summary>
/// 设备控制类
/// </summary>
internal class DeviceControl
{
}
}

+ 15
- 0
BPASmartClient.Tourism/Server/FryingPanServer.cs Datei anzeigen

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
/// <summary>
/// 炒锅服务类
/// </summary>
internal class FryingPanServer
{
}
}

+ 13
- 0
BPASmartClient.Tourism/Server/IServer.cs Datei anzeigen

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
internal interface IServer
{
void Init();
}
}

+ 14
- 0
BPASmartClient.Tourism/Server/ModbusTcpBase.cs Datei anzeigen

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
internal abstract class ModbusTcpBase
{
internal abstract string IP { get; set; }
internal abstract string Port { get; set; }
}
}

+ 15
- 0
BPASmartClient.Tourism/Server/OtherServer.cs Datei anzeigen

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
/// <summary>
/// 其它服务类
/// </summary>
internal class OtherServer
{
}
}

+ 15
- 0
BPASmartClient.Tourism/Server/PressureCookerServer.cs Datei anzeigen

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
/// <summary>
/// 压力锅服务类
/// </summary>
internal class PressureCookerServer
{
}
}

+ 15
- 0
BPASmartClient.Tourism/Server/RobotServer.cs Datei anzeigen

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPASmartClient.TourismCollege.Server
{
/// <summary>
/// 机器人服务类
/// </summary>
internal class RobotServer
{
}
}

Laden…
Abbrechen
Speichern