Files
StandardSence/StandardScene.Core/Model/LoopTask.cs
T
2026-06-14 11:19:15 +08:00

77 lines
1.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StandardScene.Model
{
/// <summary>
/// 任务类别
/// </summary>
public enum TaskKind
{
Loop,
BranchPoint,
JoinPoint
}
/// <summary>
/// 任务启动类型:API/PLC/按钮盒/自动循环
/// </summary>
public enum TaskStartType
{
Api,
Plc,
ButtonBox,
AutoLoop,
Charge
}
public class LoopTask
{
/// <summary>
/// 任务唯一标识ID(自增)
/// </summary>
public int Id { get; set; } = 0;
/// <summary>
/// 任务类别(枚举:循环/分流点/汇合点)
/// </summary>
public TaskKind Kind { get; set; } = TaskKind.Loop;
/// <summary>
/// 当前点 ID(整数)
/// </summary>
public int CurrentStationId { get; set; } = -1;
/// <summary>
/// 目标点 ID(整数)
/// </summary>
public int TargetStationId { get; set; } = -1;
/// <summary>
/// 流量控制(整数,可代表信号级别或策略编号)
/// </summary>
public int TrafficControl { get; set; } = 0;
/// <summary>
/// 优先级(整数)
/// </summary>
public int Priority { get; set; } = 1;
/// <summary>
/// 是否为途径点(布尔)
/// </summary>
public bool IsViaPoint { get; set; } = false;
/// <summary>
/// 启动类型(枚举:Api/Plc/ButtonBox/AutoLoop
/// </summary>
public TaskStartType StartType { get; set; } = TaskStartType.AutoLoop;
public string[] tags = Array.Empty<string>();
}
}