IFdcCommunicableController.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using Edge.Core.Parser;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using Wayne.FDCPOSLibrary;
  8. namespace Edge.Core.Processor
  9. {
  10. public interface IFdcCommunicableController //: IDeviceController
  11. {
  12. /// <summary>
  13. /// send a broadcast message to all fdc clients.
  14. /// String is message content will be send to Fdc client.
  15. /// Bool is the sending result, true for send succeed, otherwise, failed.
  16. /// </summary>
  17. Func<string, bool> BroadcastMessageViaFdc { get; set; }
  18. /// <summary>
  19. /// send a message to a specific fdc client.
  20. /// 1st String is the workstation id for the target fdc client.
  21. /// 2nd String is the application sender for the target fdc client.
  22. /// 3rd String is the message content will be send to Fdc client.
  23. /// Bool is the sending result, true for send succeed, otherwise, failed.
  24. /// </summary>
  25. Func<string, string, string, bool> SendMessageViaFdc { get; set; }
  26. /// <summary>
  27. /// Once a request is received from remote fdc client via network, this Func will be called,
  28. /// meanwhile, a response will be constructed here and returned to Fdc client.
  29. ///
  30. /// String as the In parameter is the message content send from Fdc client.
  31. /// String in Tuple<,> is the message content as the response will be returned to Fdc client.
  32. /// OverallResult in Tuple<,> is the overall result value in response which will be returned to Fdc client.
  33. /// </summary>
  34. Func<string, Tuple<string, OverallResult>> OnMessageReceivedViaFdc { get; set; }
  35. }
  36. }