using Newtonsoft.Json.Linq;
using Sodao.FastSocket.Server.Messaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace XImaging.Automation.Service.Message
{
public class BiosenDriverMessage : IMessage
{
protected string m_strGUID;
protected int m_strEndpoint;
protected JObject m_jsonOriginMessage;
protected string m_strMessageID;
protected int m_iMessageType;
protected string m_strMethod;
protected string m_strEquipmentID;
protected string m_strWorkflowID;
protected string m_strExperimentID;
protected JObject m_jsonParameters;
protected int m_iTroubleshoot;
protected string m_strTimestamp;
///
/// 消息类型0: 心跳包
///
public static int MESSAGE_TYPE_HEARTBEAT { get; } = 0;
///
/// 消息类型1:方法消息(延迟返回消息)
///
public static int MESSAGE_TYPE_TASK { get; } = 1;
///
/// 消息类型2:查询方法消息(即时返回消息)
///
public static int MESSAGE_TYPE_QUERY { get; } = 2;
///
/// 消息类型3:错误处理消息(无返回消息)
///
public static int MESSAGE_TYPE_TROUBLESHOOT { get; } = 3;
///
/// 消息类型4:确认消息
///
public static int MESSAGE_TYPE_ACK { get; } = 4;
///
/// 消息类型5:完成消息
///
public static int MESSAGE_TYPE_FINISH { get; } = 5;
///
/// 消息类型6:错误消息(可被代替,兼容v1.6版本)
///
public static int MESSAGE_TYPE_ERROR { get; } = 6;
public static int METHOD_STATUS_NULL { get; } = -1;
public static int METHOD_STATUS_SCHEDULED { get; } = 0;
public static int METHOD_STATUS_INPROGRES { get; } = 1;
public static int METHOD_STATUS_COMPLETED { get; } = 2;
public static int METHOD_STATUS_FAILED { get; } = 3;
public static int METHOD_STATUS_CANCELED { get; } = 4;
public string GUID
{
get
{
return this.m_strGUID;
}
}
public int LocalEndpoint
{
get
{
return this.m_strEndpoint;
}
}
public string MessageID
{
get
{
return this.m_strMessageID;
}
}
public int MessageType
{
get
{
return this.m_iMessageType;
}
}
public string Method
{
get
{
return this.m_strMethod;
}
}
public string EquipmentID
{
get
{
return this.m_strEquipmentID;
}
}
public string WorkflowID
{
get
{
return this.m_strWorkflowID;
}
}
public string ExperimentID
{
get
{
return this.m_strExperimentID;
}
}
public string Timestamp
{
get
{
return this.m_strTimestamp;
}
}
public BiosenDriverMessage()
{
}
}
}