You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
975 B

3 years ago
  1. using FrameWork.Log;
  2. using Monitor.FrameWork;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace WorkStationBase
  9. {
  10. public class SendMsg
  11. {
  12. public static void SendMsgToStation( string stationCode,string verifyCode, object msgContent)
  13. {
  14. try
  15. {
  16. MsgStruct msg = new MsgStruct();
  17. msg.MsgSource = "Scada";
  18. msg.MsgTarget = "WorkStation";
  19. msg.StationCode = stationCode;
  20. msg.MsgVerifyCode = verifyCode == null ? "" : verifyCode;
  21. msg.MsgContent = msgContent == null ? new object() : msgContent;
  22. msg.datetime = DateTime.Now;
  23. UpperCommunication.Mq_Adapter.SendMsg(msg);
  24. }
  25. catch (Exception ex)
  26. {
  27. LogHelper.WriteLog(LogHelper.GetMethodInfo(), ex);
  28. }
  29. }
  30. }
  31. }