using FrameWork.Log;
|
|
using Monitor.FrameWork;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace WorkStationBase
|
|
{
|
|
public class SendMsg
|
|
{
|
|
|
|
public static void SendMsgToStation( string stationCode,string verifyCode, object msgContent)
|
|
{
|
|
try
|
|
{
|
|
MsgStruct msg = new MsgStruct();
|
|
msg.MsgSource = "Scada";
|
|
msg.MsgTarget = "WorkStation";
|
|
msg.StationCode = stationCode;
|
|
msg.MsgVerifyCode = verifyCode == null ? "" : verifyCode;
|
|
msg.MsgContent = msgContent == null ? new object() : msgContent;
|
|
msg.datetime = DateTime.Now;
|
|
UpperCommunication.Mq_Adapter.SendMsg(msg);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
LogHelper.WriteLog(LogHelper.GetMethodInfo(), ex);
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
}
|